diff --git a/.circleci/config.yml b/.circleci/config.yml index 101357a36da..25583c16e04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,6 +79,38 @@ jobs: command: 'cd packages/python/plotly; tox -e py37-core' no_output_timeout: 20m + python-3.7-percy: + docker: + - image: circleci/python:3.7-stretch-node-browsers + environment: + PERCY_ENABLED: True + PERCY_PROJECT: plotly/plotly.py + + steps: + - checkout + - run: + name: Inject Percy Environment variables + command: | + echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V0"' >> $BASH_ENV + - run: + name: Install requirements + command: | + sudo pip install --upgrade virtualenv + python -m venv venv || virtualenv venv + . venv/bin/activate + pip install -e ./packages/python/plotly + - run: + name: Build html figures + command: | + . venv/bin/activate + pip install pandas statsmodels --quiet + python test/percy/plotly-express.py + - run: + name: Run percy snapshots + command: | + npx percy snapshot test/percy/ + rm test/percy/*.html + # Optional python-2.7-optional: docker: @@ -367,6 +399,7 @@ workflows: - python-3.5-core - python-3.6-core - python-3.7-core + - python-3.7-percy - python-2.7-optional - python-3.5-optional - python-3.6-optional diff --git a/.gitignore b/.gitignore index bc52251c604..01af9978893 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ plotly/tests/test_orca/images/*/failed plotly/tests/test_orca/images/*/tmp /plotly-package/plotly/tests/test_core/test_offline/plotly.min.js temp-plot.html +.vscode diff --git a/.gitmodules b/.gitmodules index ffc4738a547..ad8c80fba3d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "submodules/mplexporter"] path = submodules/mplexporter url = git://github.com/mpld3/mplexporter.git -[submodule "submodules/chunked_requests"] - path = submodules/chunked_requests - url = git://github.com/chriddyp/chunked_requests.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a8262d980..81a20ee234e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,42 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.2.1] - 2019-10-18 +### Fixed + - Fixed regression in 4.2.0 that caused all figure factories to require that scikit-image be installed ([#1832](https://github.com/plotly/plotly.py/pull/1832)) + +## [4.2.0] - 2019-10-16 + +### Updated + - Updated Plotly.js to version 1.50.1. See the + [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1501----2019-10-15) + for more information + +### Added + - Added `treemap` trace type ([plotly.js#4185](https://github.com/plotly/plotly.js/pull/4185), [plotly.js#4219](https://github.com/plotly/plotly.js/pull/4219), [plotly.js#4227](https://github.com/plotly/plotly.js/pull/4227), [plotly.js#4242](https://github.com/plotly/plotly.js/pull/4242)) + - Added `add_*`/`select_*`/`for_each_*`/`update_*` convenience figure methods for annotations, shapes, and images ([#1817](https://github.com/plotly/plotly.py/pull/1817)) + - Added `overwrite` kwarg to `update*` figure methods to fully replace property values, rather than update them recursively ([#1726](https://github.com/plotly/plotly.py/pull/1726)) + - Added `texttemplate` attribute to all traces that support on-graph text ([plotly.js#4071](https://github.com/plotly/plotly.js/pull/4071), [plotly.js#4179](https://github.com/plotly/plotly.js/pull/4179)) + - Added date custom formatting in `hovertemplate` and `texttemplate` e.g. `'%{x|%b %-d, %Y}'` ([plotly.js#4071](https://github.com/plotly/plotly.js/pull/4071)) + - Added transition support to `bar` trace length, width, on-graph text positioning, marker style and error bars ([plotly.js#4180](https://github.com/plotly/plotly.js/pull/4180), [plotly.js#4186](https://github.com/plotly/plotly.js/pull/4186)) + - Added support for legend scrolling via touch interactions ([plotly.js#3873](https://github.com/plotly/plotly.js/pull/3873), [plotly.js#4214](https://github.com/plotly/plotly.js/pull/4214)) + +### Fixed + - Fixed `iframe` renderer on Python 2 ([#1822](https://github.com/plotly/plotly.py/pull/1822)) + - Fixed use of merged templates in plotly.express ([#1819](https://github.com/plotly/plotly.py/pull/1819)) + +## [4.1.1] - 2019-09-02 + +### Updated + - Updated Plotly.js to version 1.49.4. See the + [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1494----2019-08-22) + for more information + - The width of a figure produced by the `create_gantt` figure factory now resizes responsively ([#1724](https://github.com/plotly/plotly.py/pull/1724)) + +### Fixed + - The name of the steps property of `graph_objects.indicator.Guage` has been renamed from `stepss` to `steps` + - Avoid crash in iframe renderers when running outside iPython ([#1723](https://github.com/plotly/plotly.py/pull/1723)) + ## [4.1.0] - 2019-08-06 ### Updated diff --git a/README.md b/README.md index b5f9274e471..23b035c6848 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is - [Online Documentation](https://plot.ly/python) - [Contributing](contributing.md) -- [Changelog](packages/python/plotly-geo/CHANGELOG.md) +- [Changelog](CHANGELOG.md) - [Code of Conduct](CODE_OF_CONDUCT.md) - [Version 3 Migration Guide](migration-guide.md) - [New! Announcing Dash](https://medium.com/@plotlygraphs/introducing-dash-5ecf7191b503) @@ -78,12 +78,12 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is plotly.py may be installed using pip... ``` -pip install plotly==4.1.0 +pip install plotly==4.2.1 ``` or conda. ``` -conda install -c plotly plotly==4.1.0 +conda install -c plotly plotly=4.2.1 ``` ### Jupyter Notebook Support @@ -126,10 +126,10 @@ set NODE_OPTIONS=--max-old-space-size=4096 jupyter labextension install @jupyter-widgets/jupyterlab-manager@1.0 --no-build # FigureWidget support -jupyter labextension install plotlywidget@1.1.0 --no-build +jupyter labextension install plotlywidget@1.2.0 --no-build # and jupyterlab renderer support -jupyter labextension install jupyterlab-plotly@1.1.0 --no-build +jupyter labextension install jupyterlab-plotly@1.2.0 --no-build # JupyterLab chart editor support (optional) jupyter labextension install jupyterlab-chart-editor@1.2 --no-build @@ -162,6 +162,12 @@ pip install psutil and orca can be installed according to the instructions in the [orca README](https://github.com/plotly/orca). +#### Troubleshooting +##### Wrong Executable found +If you get an error message stating that the `orca` executable that was found is not valid, this may be because another executable with the same name was found on your system. Please specify the complete path to the Plotly-Orca binary that you downloaded (for instance in the Miniconda folder) with the following command: + +`plotly.io.orca.config.executable = '/home/your_name/miniconda3/bin/orca'` + ### Extended Geo Support Some plotly.py features rely on fairly large geographic shape files. The county choropleth figure factory is one such example. These shape files are distributed as a diff --git a/packages/javascript/jupyterlab-plotly/package-lock.json b/packages/javascript/jupyterlab-plotly/package-lock.json index 43298c597d8..e35201a6ac0 100644 --- a/packages/javascript/jupyterlab-plotly/package-lock.json +++ b/packages/javascript/jupyterlab-plotly/package-lock.json @@ -1,6 +1,6 @@ { "name": "jupyterlab-plotly", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -283,9 +283,9 @@ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==" }, "add-line-numbers": { "version": "1.0.1", @@ -513,9 +513,9 @@ }, "dependencies": { "acorn": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", - "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" } } }, @@ -970,9 +970,9 @@ "integrity": "sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==" }, "d3-color": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.3.0.tgz", - "integrity": "sha512-NHODMBlj59xPAwl2BDiO2Mog6V+PrGRtBfWKqKRrs9MCqlSkIEb0Z/SfY7jW29ReHTDC/j+vwXhnZcXI3+3fbg==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.4.0.tgz", + "integrity": "sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg==" }, "d3-dispatch": { "version": "1.0.5", @@ -1154,9 +1154,9 @@ } }, "earcut": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.1.5.tgz", - "integrity": "sha512-QFWC7ywTVLtvRAJTVp8ugsuuGQ5mVqNmJ1cRYeLrSHgP3nycr2RHTJob9OtM0v8ujuoKN0NY1a93J/omeTL1PA==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.1.tgz", + "integrity": "sha512-5jIMi2RB3HtGPHcYd9Yyl0cczo84y+48lgKPxMijliNQaKAHEZJbdzLmKmdxG/mCdS/YD9DQ1gihL8mxzR0F9w==" }, "edges-to-adjacency-list": { "version": "1.0.0", @@ -1180,24 +1180,28 @@ } }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { "once": "^1.4.0" } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.15.0.tgz", + "integrity": "sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ==", "requires": { "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", "has": "^1.0.3", + "has-symbols": "^1.0.0", "is-callable": "^1.1.4", "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" } }, "es-to-primitive": { @@ -1211,9 +1215,9 @@ } }, "es5-ext": { - "version": "0.10.50", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", - "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "version": "0.10.51", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz", + "integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==", "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.1", @@ -1236,12 +1240,12 @@ "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" }, "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz", + "integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==", "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "^1.0.1", + "es5-ext": "^0.10.51" } }, "es6-weak-map": { @@ -1261,9 +1265,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", - "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz", + "integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==", "requires": { "esprima": "^3.1.3", "estraverse": "^4.2.0", @@ -1272,20 +1276,15 @@ "source-map": "~0.6.1" } }, - "esm": { - "version": "3.0.84", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.0.84.tgz", - "integrity": "sha512-SzSGoZc17S7P+12R9cg21Bdb7eybX25RnIeRZ80xZs+VZ3kdQKzqTp2k4hZJjR7p9l0186TTXSgrxzlMDBktlw==" - }, "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, "esutils": { "version": "2.0.3", @@ -1502,15 +1501,24 @@ } }, "gl-cone3d": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/gl-cone3d/-/gl-cone3d-1.3.1.tgz", - "integrity": "sha512-ftw75smsDy5nU94susUNimXo8H40BEOVjaFrjT387vP4fJqkSVpzVK7jGrPA8/nSrFCOIQ0msWNYL9MMqQ3hjg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/gl-cone3d/-/gl-cone3d-1.4.1.tgz", + "integrity": "sha512-mWmUsTye5/4/dVpBMdFmkXYYxbWf1tkXQpD4RZ4Iym4T8NcSZ+w+SIlFRPoHhT2eOiUT4EN3ttjHOuZ20K0W0w==", "requires": { + "colormap": "^2.3.1", + "gl-buffer": "^2.1.2", + "gl-mat4": "^1.2.0", "gl-shader": "^4.2.1", + "gl-texture2d": "^2.1.0", + "gl-vao": "^1.3.0", "gl-vec3": "^1.1.3", "glsl-inverse": "^1.0.0", "glsl-out-of-range": "^1.0.4", - "glslify": "^7.0.0" + "glslify": "^7.0.0", + "ndarray": "^1.0.18", + "normals": "^1.1.0", + "simplicial-complex-contour": "^1.0.2", + "typedarray-pool": "^1.1.0" } }, "gl-constants": { @@ -1610,9 +1618,9 @@ "integrity": "sha512-sT5C0pwB1/e9G9AvAoLsoaJtbMGjfd/jfxo8jMCKqYYEnjZuFvqV5rehqar0538EmssjdDeiEWnKyBSTw7quoA==" }, "gl-matrix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.0.0.tgz", - "integrity": "sha512-PD4mVH/C/Zs64kOozeFnKY8ybhgwxXXQYGWdB4h68krAHknWJgk9uKOn6z8YElh5//vs++90pb6csrTIDWnexA==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.1.0.tgz", + "integrity": "sha512-526NA+3EA+ztAQi0IZpSWiM0fyQXIp7IbRvfJ4wS/TjjQD0uv0fVybXwwqqSOlq33UckivI0yMDlVtboWm3k7A==" }, "gl-matrix-invert": { "version": "1.0.0", @@ -1776,14 +1784,25 @@ } }, "gl-streamtube3d": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/gl-streamtube3d/-/gl-streamtube3d-1.2.1.tgz", - "integrity": "sha512-1aj1noU+jJirl5IwFXk29eDx1nO7PQk4r0UZK3My56J3vDSfRR+IbMq2YBhBkjfCWsKY1nc9ESD8t9EcqZY91w==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/gl-streamtube3d/-/gl-streamtube3d-1.3.1.tgz", + "integrity": "sha512-agbhv3MWUmi06HTrlS+CtV13ZV/06NTagbYAyeviOJWHJLfz2v0HonIqSZGco2It2Q1slnNZV+1lQQmZLgw8xg==", "requires": { - "gl-vec3": "^1.0.0", + "colormap": "^2.3.1", + "gl-buffer": "^2.1.2", + "gl-mat4": "^1.2.0", + "gl-shader": "^4.2.1", + "gl-texture2d": "^2.1.0", + "gl-vao": "^1.3.0", + "gl-vec3": "^1.1.3", + "gl-vec4": "^1.0.1", "glsl-inverse": "^1.0.0", "glsl-out-of-range": "^1.0.4", - "glslify": "^7.0.0" + "glslify": "^7.0.0", + "ndarray": "^1.0.18", + "normals": "^1.1.0", + "simplicial-complex-contour": "^1.0.2", + "typedarray-pool": "^1.1.0" } }, "gl-surface3d": { @@ -2120,9 +2139,9 @@ } }, "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" } } }, @@ -2426,9 +2445,9 @@ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "magic-string": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", - "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", + "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==", "requires": { "sourcemap-codec": "^1.4.4" } @@ -2452,9 +2471,9 @@ } }, "mapbox-gl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.2.0.tgz", - "integrity": "sha512-RDo0kMuo9gs6HFX2Maj+tYO5bUT6WFTQkFbJoKdfe2pK8SY/RgyG3SNJRgZypdBR8loxGCG9geeOwc+JJqblHQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.3.2.tgz", + "integrity": "sha512-6Ro7GbTMWxcbc836m6rbBNkesgTncbE1yXWeuHlr89esSqaItKr0+ntOu8rZie3fv+GtitkbODysXzIGCA7G+w==", "requires": { "@mapbox/geojson-rewind": "^0.4.0", "@mapbox/geojson-types": "^1.0.2", @@ -2467,7 +2486,6 @@ "@mapbox/whoots-js": "^3.1.0", "csscolorparser": "~1.0.2", "earcut": "^2.1.5", - "esm": "~3.0.84", "geojson-vt": "^3.2.1", "gl-matrix": "^3.0.0", "grid-index": "^1.1.0", @@ -2905,9 +2923,9 @@ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" }, "pbf": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.0.tgz", - "integrity": "sha512-98Eh7rsJNJF/Im6XYMLaOW3cLnNyedlOd6hu3iWMD5I7FZGgpw8yN3vQBrmLbLodu7G784Irb9Qsv2yFrxSAGw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", "requires": { "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" @@ -2964,9 +2982,9 @@ } }, "plotly.js": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-1.49.1.tgz", - "integrity": "sha512-hWYqsKZMV/DSA/i4z5dPdqZ5o2FMPVTgerGe3f0x7TRd0UFEd8GdiUzHz8xs+lZvFn2SwMUpri1IKWJqBAxfcQ==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-1.50.1.tgz", + "integrity": "sha512-+IbuR3wkr5p+0vatSm25O/KTppIWtDuJofxk2wLWpDIq0Cr39+v2cGoHtDFDhk/xm0zsrHzi9Id5oP79Ji63QQ==", "requires": { "@plotly/d3-sankey": "0.7.2", "@plotly/d3-sankey-circular": "0.33.1", @@ -2975,6 +2993,7 @@ "alpha-shape": "^1.0.0", "canvas-fit": "^1.5.0", "color-normalize": "^1.5.0", + "color-rgba": "^2.1.1", "convex-hull": "^1.0.3", "country-regex": "^1.1.0", "d3": "^3.5.12", @@ -2984,7 +3003,7 @@ "delaunay-triangulate": "^1.1.6", "es6-promise": "^3.0.2", "fast-isnumeric": "^1.1.3", - "gl-cone3d": "^1.3.1", + "gl-cone3d": "^1.4.1", "gl-contour2d": "^1.1.6", "gl-error3d": "^1.0.15", "gl-heatmap2d": "^1.0.5", @@ -2992,18 +3011,18 @@ "gl-mat4": "^1.2.0", "gl-mesh3d": "^2.1.1", "gl-plot2d": "^1.4.2", - "gl-plot3d": "^2.2.1", + "gl-plot3d": "^2.2.2", "gl-pointcloud2d": "^1.0.2", "gl-scatter3d": "^1.2.2", "gl-select-box": "^1.0.3", "gl-spikes2d": "^1.0.2", - "gl-streamtube3d": "^1.2.1", + "gl-streamtube3d": "^1.3.1", "gl-surface3d": "^1.4.6", "gl-text": "^1.1.8", "glslify": "^7.0.0", "has-hover": "^1.0.1", "has-passive-events": "^1.0.0", - "mapbox-gl": "^1.1.1", + "mapbox-gl": "1.3.2", "matrix-camera-controller": "^2.1.3", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", @@ -3031,20 +3050,22 @@ } }, "point-cluster": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/point-cluster/-/point-cluster-3.1.5.tgz", - "integrity": "sha512-KpVtB1mXDlo6yzv80MA6oUq+1519CMeeUd4PPluM4ZlAQgHi/qeBrLY2G53RLy41kas7XvKol0FM98MSrjNH7Q==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/point-cluster/-/point-cluster-3.1.7.tgz", + "integrity": "sha512-U7rv1gHdcQONHa3RQV3YvoWV2CQKYapckcAzoZbwbyXBCiLU7YtlsSWIpHrzoLSB8+mCUvFArdnkPZNuiCAs9g==", "requires": { "array-bounds": "^1.0.1", "array-normalize": "^1.1.3", "binary-search-bounds": "^2.0.4", "bubleify": "^1.1.0", "clamp": "^1.0.1", + "defined": "^1.0.0", "dtype": "^2.0.0", "flatten-vertex-data": "^1.0.0", "is-obj": "^1.0.1", "math-log2": "^1.0.1", - "parse-rect": "^1.2.0" + "parse-rect": "^1.2.0", + "pick-by-alias": "^1.2.0" } }, "point-in-big-polygon": { @@ -3112,9 +3133,9 @@ }, "dependencies": { "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" } } }, @@ -3258,12 +3279,12 @@ "integrity": "sha1-kEih6uuHD01IDavHb8Qs3MC8OnI=" }, "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", + "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.0.2", + "regenerate-unicode-properties": "^8.1.0", "regjsgen": "^0.5.0", "regjsparser": "^0.6.0", "unicode-match-property-ecmascript": "^1.0.4", @@ -3284,9 +3305,9 @@ } }, "regl": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/regl/-/regl-1.3.11.tgz", - "integrity": "sha512-tmt6CRhRqbcsYDWNwv+iG7GGOXdgoOBC7lKzoPMgnzpt3WKBQ3c8i7AxgbvTRZzty29hrW92fAJeZkPFQehfWA==" + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/regl/-/regl-1.3.13.tgz", + "integrity": "sha512-TTiCabJbbUykCL4otjqOvKqDFJhvJOT7xB51JxcDeSHGrEJl1zz4RthPcoOogqfuR3ECN4Te790DfHCXzli5WQ==" }, "regl-error2d": { "version": "2.0.8", @@ -3323,10 +3344,11 @@ } }, "regl-scatter2d": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.1.5.tgz", - "integrity": "sha512-VCmASgrNIQXzDxmTLpLA4MAlbi+kdjKcVR9XugmFCTnWY7zytIhuMyIoPxinpaejGXzsC0Lq5oKvOnWFMQFGng==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.1.6.tgz", + "integrity": "sha512-mnLcwQzTHWgmkiD+5fToNaKJ7QNylvOcBJ/1roJJkIAtr1jnvgXiqrkeqkMIb8IVBKvm00/lCdPZat6Qifxvmw==", "requires": { + "array-bounds": "^1.0.1", "array-range": "^1.0.1", "array-rearrange": "^2.2.2", "clamp": "^1.0.1", @@ -3854,6 +3876,24 @@ "function-bind": "^1.0.2" } }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", @@ -4100,9 +4140,9 @@ "integrity": "sha1-MdPzIjnk9zHsqd+RVeKyl/AIq2Q=" }, "type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz", - "integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, "type-check": { "version": "0.3.2", diff --git a/packages/javascript/jupyterlab-plotly/package.json b/packages/javascript/jupyterlab-plotly/package.json index 86ff503fc5c..310403dbd60 100644 --- a/packages/javascript/jupyterlab-plotly/package.json +++ b/packages/javascript/jupyterlab-plotly/package.json @@ -1,6 +1,6 @@ { "name": "jupyterlab-plotly", - "version": "1.1.0", + "version": "1.2.0", "description": "The plotly JupyterLab extension", "author": "The plotly.py team", "license": "MIT", @@ -31,7 +31,7 @@ "typescript": "~3.1.1" }, "dependencies": { - "plotly.js": "^1.49.1", + "plotly.js": "^1.50.1", "@types/plotly.js": "^1.44.9", "@jupyterlab/rendermime-interfaces": "^1.3.0", "@phosphor/messaging": "^1.2.3", diff --git a/packages/javascript/plotlywidget/package-lock.json b/packages/javascript/plotlywidget/package-lock.json index 18893e6d22f..9f5b5736fe0 100644 --- a/packages/javascript/plotlywidget/package-lock.json +++ b/packages/javascript/plotlywidget/package-lock.json @@ -1,6 +1,6 @@ { "name": "plotlywidget", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -377,9 +377,9 @@ } }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==" }, "add-line-numbers": { "version": "1.0.1", @@ -819,9 +819,9 @@ }, "dependencies": { "acorn": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", - "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" }, "acorn-dynamic-import": { "version": "4.0.0", @@ -1425,9 +1425,9 @@ "integrity": "sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==" }, "d3-color": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.3.0.tgz", - "integrity": "sha512-NHODMBlj59xPAwl2BDiO2Mog6V+PrGRtBfWKqKRrs9MCqlSkIEb0Z/SfY7jW29ReHTDC/j+vwXhnZcXI3+3fbg==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.4.0.tgz", + "integrity": "sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg==" }, "d3-dispatch": { "version": "1.0.5", @@ -1642,9 +1642,9 @@ } }, "earcut": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.1.5.tgz", - "integrity": "sha512-QFWC7ywTVLtvRAJTVp8ugsuuGQ5mVqNmJ1cRYeLrSHgP3nycr2RHTJob9OtM0v8ujuoKN0NY1a93J/omeTL1PA==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.1.tgz", + "integrity": "sha512-5jIMi2RB3HtGPHcYd9Yyl0cczo84y+48lgKPxMijliNQaKAHEZJbdzLmKmdxG/mCdS/YD9DQ1gihL8mxzR0F9w==" }, "edges-to-adjacency-list": { "version": "1.0.0", @@ -1689,9 +1689,9 @@ "dev": true }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { "once": "^1.4.0" } @@ -1727,16 +1727,20 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.15.0.tgz", + "integrity": "sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ==", "requires": { "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", "has": "^1.0.3", + "has-symbols": "^1.0.0", "is-callable": "^1.1.4", "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" } }, "es-to-primitive": { @@ -1827,9 +1831,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", - "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz", + "integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==", "requires": { "esprima": "^3.1.3", "estraverse": "^4.2.0", @@ -1858,11 +1862,6 @@ "estraverse": "^4.1.1" } }, - "esm": { - "version": "3.0.84", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.0.84.tgz", - "integrity": "sha512-SzSGoZc17S7P+12R9cg21Bdb7eybX25RnIeRZ80xZs+VZ3kdQKzqTp2k4hZJjR7p9l0186TTXSgrxzlMDBktlw==" - }, "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", @@ -3130,15 +3129,24 @@ } }, "gl-cone3d": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/gl-cone3d/-/gl-cone3d-1.3.1.tgz", - "integrity": "sha512-ftw75smsDy5nU94susUNimXo8H40BEOVjaFrjT387vP4fJqkSVpzVK7jGrPA8/nSrFCOIQ0msWNYL9MMqQ3hjg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/gl-cone3d/-/gl-cone3d-1.4.1.tgz", + "integrity": "sha512-mWmUsTye5/4/dVpBMdFmkXYYxbWf1tkXQpD4RZ4Iym4T8NcSZ+w+SIlFRPoHhT2eOiUT4EN3ttjHOuZ20K0W0w==", "requires": { + "colormap": "^2.3.1", + "gl-buffer": "^2.1.2", + "gl-mat4": "^1.2.0", "gl-shader": "^4.2.1", + "gl-texture2d": "^2.1.0", + "gl-vao": "^1.3.0", "gl-vec3": "^1.1.3", "glsl-inverse": "^1.0.0", "glsl-out-of-range": "^1.0.4", - "glslify": "^7.0.0" + "glslify": "^7.0.0", + "ndarray": "^1.0.18", + "normals": "^1.1.0", + "simplicial-complex-contour": "^1.0.2", + "typedarray-pool": "^1.1.0" } }, "gl-constants": { @@ -3238,9 +3246,9 @@ "integrity": "sha512-sT5C0pwB1/e9G9AvAoLsoaJtbMGjfd/jfxo8jMCKqYYEnjZuFvqV5rehqar0538EmssjdDeiEWnKyBSTw7quoA==" }, "gl-matrix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.0.0.tgz", - "integrity": "sha512-PD4mVH/C/Zs64kOozeFnKY8ybhgwxXXQYGWdB4h68krAHknWJgk9uKOn6z8YElh5//vs++90pb6csrTIDWnexA==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.1.0.tgz", + "integrity": "sha512-526NA+3EA+ztAQi0IZpSWiM0fyQXIp7IbRvfJ4wS/TjjQD0uv0fVybXwwqqSOlq33UckivI0yMDlVtboWm3k7A==" }, "gl-matrix-invert": { "version": "1.0.0", @@ -3404,14 +3412,25 @@ } }, "gl-streamtube3d": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/gl-streamtube3d/-/gl-streamtube3d-1.2.1.tgz", - "integrity": "sha512-1aj1noU+jJirl5IwFXk29eDx1nO7PQk4r0UZK3My56J3vDSfRR+IbMq2YBhBkjfCWsKY1nc9ESD8t9EcqZY91w==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/gl-streamtube3d/-/gl-streamtube3d-1.3.1.tgz", + "integrity": "sha512-agbhv3MWUmi06HTrlS+CtV13ZV/06NTagbYAyeviOJWHJLfz2v0HonIqSZGco2It2Q1slnNZV+1lQQmZLgw8xg==", "requires": { - "gl-vec3": "^1.0.0", + "colormap": "^2.3.1", + "gl-buffer": "^2.1.2", + "gl-mat4": "^1.2.0", + "gl-shader": "^4.2.1", + "gl-texture2d": "^2.1.0", + "gl-vao": "^1.3.0", + "gl-vec3": "^1.1.3", + "gl-vec4": "^1.0.1", "glsl-inverse": "^1.0.0", "glsl-out-of-range": "^1.0.4", - "glslify": "^7.0.0" + "glslify": "^7.0.0", + "ndarray": "^1.0.18", + "normals": "^1.1.0", + "simplicial-complex-contour": "^1.0.2", + "typedarray-pool": "^1.1.0" } }, "gl-surface3d": { @@ -3465,9 +3484,9 @@ }, "dependencies": { "es5-ext": { - "version": "0.10.50", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", - "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "version": "0.10.51", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz", + "integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==", "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.1", @@ -3790,9 +3809,9 @@ } }, "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" } } }, @@ -4342,9 +4361,9 @@ } }, "magic-string": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", - "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", + "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==", "requires": { "sourcemap-codec": "^1.4.4" } @@ -4368,9 +4387,9 @@ } }, "mapbox-gl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.2.0.tgz", - "integrity": "sha512-RDo0kMuo9gs6HFX2Maj+tYO5bUT6WFTQkFbJoKdfe2pK8SY/RgyG3SNJRgZypdBR8loxGCG9geeOwc+JJqblHQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.3.2.tgz", + "integrity": "sha512-6Ro7GbTMWxcbc836m6rbBNkesgTncbE1yXWeuHlr89esSqaItKr0+ntOu8rZie3fv+GtitkbODysXzIGCA7G+w==", "requires": { "@mapbox/geojson-rewind": "^0.4.0", "@mapbox/geojson-types": "^1.0.2", @@ -4383,7 +4402,6 @@ "@mapbox/whoots-js": "^3.1.0", "csscolorparser": "~1.0.2", "earcut": "^2.1.5", - "esm": "~3.0.84", "geojson-vt": "^3.2.1", "gl-matrix": "^3.0.0", "grid-index": "^1.1.0", @@ -5187,9 +5205,9 @@ } }, "pbf": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.0.tgz", - "integrity": "sha512-98Eh7rsJNJF/Im6XYMLaOW3cLnNyedlOd6hu3iWMD5I7FZGgpw8yN3vQBrmLbLodu7G784Irb9Qsv2yFrxSAGw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", "requires": { "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" @@ -5272,9 +5290,9 @@ } }, "plotly.js": { - "version": "1.49.1", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-1.49.1.tgz", - "integrity": "sha512-hWYqsKZMV/DSA/i4z5dPdqZ5o2FMPVTgerGe3f0x7TRd0UFEd8GdiUzHz8xs+lZvFn2SwMUpri1IKWJqBAxfcQ==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-1.50.1.tgz", + "integrity": "sha512-+IbuR3wkr5p+0vatSm25O/KTppIWtDuJofxk2wLWpDIq0Cr39+v2cGoHtDFDhk/xm0zsrHzi9Id5oP79Ji63QQ==", "requires": { "@plotly/d3-sankey": "0.7.2", "@plotly/d3-sankey-circular": "0.33.1", @@ -5283,6 +5301,7 @@ "alpha-shape": "^1.0.0", "canvas-fit": "^1.5.0", "color-normalize": "^1.5.0", + "color-rgba": "^2.1.1", "convex-hull": "^1.0.3", "country-regex": "^1.1.0", "d3": "^3.5.12", @@ -5292,7 +5311,7 @@ "delaunay-triangulate": "^1.1.6", "es6-promise": "^3.0.2", "fast-isnumeric": "^1.1.3", - "gl-cone3d": "^1.3.1", + "gl-cone3d": "^1.4.1", "gl-contour2d": "^1.1.6", "gl-error3d": "^1.0.15", "gl-heatmap2d": "^1.0.5", @@ -5300,18 +5319,18 @@ "gl-mat4": "^1.2.0", "gl-mesh3d": "^2.1.1", "gl-plot2d": "^1.4.2", - "gl-plot3d": "^2.2.1", + "gl-plot3d": "^2.2.2", "gl-pointcloud2d": "^1.0.2", "gl-scatter3d": "^1.2.2", "gl-select-box": "^1.0.3", "gl-spikes2d": "^1.0.2", - "gl-streamtube3d": "^1.2.1", + "gl-streamtube3d": "^1.3.1", "gl-surface3d": "^1.4.6", "gl-text": "^1.1.8", "glslify": "^7.0.0", "has-hover": "^1.0.1", "has-passive-events": "^1.0.0", - "mapbox-gl": "^1.1.1", + "mapbox-gl": "1.3.2", "matrix-camera-controller": "^2.1.3", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", @@ -5339,20 +5358,22 @@ } }, "point-cluster": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/point-cluster/-/point-cluster-3.1.5.tgz", - "integrity": "sha512-KpVtB1mXDlo6yzv80MA6oUq+1519CMeeUd4PPluM4ZlAQgHi/qeBrLY2G53RLy41kas7XvKol0FM98MSrjNH7Q==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/point-cluster/-/point-cluster-3.1.7.tgz", + "integrity": "sha512-U7rv1gHdcQONHa3RQV3YvoWV2CQKYapckcAzoZbwbyXBCiLU7YtlsSWIpHrzoLSB8+mCUvFArdnkPZNuiCAs9g==", "requires": { "array-bounds": "^1.0.1", "array-normalize": "^1.1.3", "binary-search-bounds": "^2.0.4", "bubleify": "^1.1.0", "clamp": "^1.0.1", + "defined": "^1.0.0", "dtype": "^2.0.0", "flatten-vertex-data": "^1.0.0", "is-obj": "^1.0.1", "math-log2": "^1.0.1", - "parse-rect": "^1.2.0" + "parse-rect": "^1.2.0", + "pick-by-alias": "^1.2.0" } }, "point-in-big-polygon": { @@ -5463,9 +5484,9 @@ }, "dependencies": { "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" } } }, @@ -5760,12 +5781,12 @@ "integrity": "sha1-kEih6uuHD01IDavHb8Qs3MC8OnI=" }, "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", + "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.0.2", + "regenerate-unicode-properties": "^8.1.0", "regjsgen": "^0.5.0", "regjsparser": "^0.6.0", "unicode-match-property-ecmascript": "^1.0.4", @@ -5786,9 +5807,9 @@ } }, "regl": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/regl/-/regl-1.3.11.tgz", - "integrity": "sha512-tmt6CRhRqbcsYDWNwv+iG7GGOXdgoOBC7lKzoPMgnzpt3WKBQ3c8i7AxgbvTRZzty29hrW92fAJeZkPFQehfWA==" + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/regl/-/regl-1.3.13.tgz", + "integrity": "sha512-TTiCabJbbUykCL4otjqOvKqDFJhvJOT7xB51JxcDeSHGrEJl1zz4RthPcoOogqfuR3ECN4Te790DfHCXzli5WQ==" }, "regl-error2d": { "version": "2.0.8", @@ -5825,9 +5846,9 @@ }, "dependencies": { "es5-ext": { - "version": "0.10.50", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", - "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "version": "0.10.51", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz", + "integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==", "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.1", @@ -5848,10 +5869,11 @@ } }, "regl-scatter2d": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.1.5.tgz", - "integrity": "sha512-VCmASgrNIQXzDxmTLpLA4MAlbi+kdjKcVR9XugmFCTnWY7zytIhuMyIoPxinpaejGXzsC0Lq5oKvOnWFMQFGng==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.1.6.tgz", + "integrity": "sha512-mnLcwQzTHWgmkiD+5fToNaKJ7QNylvOcBJ/1roJJkIAtr1jnvgXiqrkeqkMIb8IVBKvm00/lCdPZat6Qifxvmw==", "requires": { + "array-bounds": "^1.0.1", "array-range": "^1.0.1", "array-rearrange": "^2.2.2", "clamp": "^1.0.1", @@ -6592,6 +6614,24 @@ "function-bind": "^1.0.2" } }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", diff --git a/packages/javascript/plotlywidget/package.json b/packages/javascript/plotlywidget/package.json index 2ee22c55e6b..42b705f3535 100644 --- a/packages/javascript/plotlywidget/package.json +++ b/packages/javascript/plotlywidget/package.json @@ -1,6 +1,6 @@ { "name": "plotlywidget", - "version": "1.1.0", + "version": "1.2.0", "description": "The plotly JupyterLab extension", "author": "The plotly.py team", "license": "MIT", @@ -35,7 +35,7 @@ "typescript": "~3.1.1" }, "dependencies": { - "plotly.js": "^1.49.1", + "plotly.js": "^1.50.1", "@jupyter-widgets/base": "^2.0.0", "lodash": "^4.17.4" }, diff --git a/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_stream/__init__.py b/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_stream/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_stream/test_stream.py b/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_stream/test_stream.py deleted file mode 100644 index 01f8a5b143a..00000000000 --- a/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_stream/test_stream.py +++ /dev/null @@ -1,165 +0,0 @@ -""" -Streaming tests. - -""" -from __future__ import absolute_import - -import time - -from nose.plugins.attrib import attr - -from chart_studio import plotly as py -from plotly.graph_objs import Layout, Scatter, Stream -from chart_studio.tests.utils import PlotlyTestCase - -un = "PythonAPI" -ak = "ubpiol2cve" -tk = "vaia8trjjb" -config = { - "plotly_domain": "https://plot.ly", - "plotly_streaming_domain": "stream.plot.ly", - "plotly_api_domain": "https://api.plot.ly", - "plotly_ssl_verification": False, -} - - -class TestStreaming(PlotlyTestCase): - def setUp(self): - super(TestStreaming, self).setUp() - py.sign_in(un, ak, **config) - - # @attr('slow') - def test_initialize_stream_plot(self): - py.sign_in(un, ak) - stream = Stream(token=tk, maxpoints=50) - url = py.plot( - [Scatter(x=[], y=[], mode="markers", stream=stream)], - auto_open=False, - world_readable=True, - filename="stream-test2", - ) - self.assertTrue(url.startswith("https://plot.ly/~PythonAPI/")) - time.sleep(0.5) - - @attr("slow") - def test_stream_single_points(self): - py.sign_in(un, ak) - stream = Stream(token=tk, maxpoints=50) - res = py.plot( - [Scatter(x=[], y=[], mode="markers", stream=stream)], - auto_open=False, - world_readable=True, - filename="stream-test2", - ) - time.sleep(0.5) - my_stream = py.Stream(tk) - my_stream.open() - my_stream.write(Scatter(x=[1], y=[10])) - time.sleep(0.5) - my_stream.close() - - @attr("slow") - def test_stream_multiple_points(self): - py.sign_in(un, ak) - stream = Stream(token=tk, maxpoints=50) - url = py.plot( - [Scatter(x=[], y=[], mode="markers", stream=stream)], - auto_open=False, - world_readable=True, - filename="stream-test2", - ) - time.sleep(0.5) - my_stream = py.Stream(tk) - my_stream.open() - my_stream.write(Scatter(x=[1, 2, 3, 4], y=[2, 1, 2, 5])) - time.sleep(0.5) - my_stream.close() - - @attr("slow") - def test_stream_layout(self): - py.sign_in(un, ak) - stream = Stream(token=tk, maxpoints=50) - url = py.plot( - [Scatter(x=[], y=[], mode="markers", stream=stream)], - auto_open=False, - world_readable=True, - filename="stream-test2", - ) - time.sleep(0.5) - title_0 = "some title i picked first" - title_1 = "this other title i picked second" - my_stream = py.Stream(tk) - my_stream.open() - my_stream.write(Scatter(x=[1], y=[10]), layout=Layout(title=title_0)) - time.sleep(0.5) - my_stream.close() - my_stream.open() - my_stream.write(Scatter(x=[1], y=[10]), layout=Layout(title=title_1)) - my_stream.close() - - @attr("slow") - def test_stream_unstreamable(self): - - # even though `name` isn't streamable, we don't validate it --> pass - - py.sign_in(un, ak) - my_stream = py.Stream(tk) - my_stream.open() - my_stream.write(Scatter(x=[1], y=[10], name="nope")) - my_stream.close() - - def test_stream_no_scheme(self): - - # If no scheme is used in the plotly_streaming_domain, port 80 - # should be used for streaming and ssl_enabled should be False - - py.sign_in(un, ak, **{"plotly_streaming_domain": "stream.plot.ly"}) - my_stream = py.Stream(tk) - expected_streaming_specs = { - "server": "stream.plot.ly", - "port": 80, - "ssl_enabled": False, - "ssl_verification_enabled": False, - "headers": {"Host": "stream.plot.ly", "plotly-streamtoken": tk}, - } - actual_streaming_specs = my_stream.get_streaming_specs() - self.assertEqual(expected_streaming_specs, actual_streaming_specs) - - def test_stream_http(self): - - # If the http scheme is used in the plotly_streaming_domain, port 80 - # should be used for streaming and ssl_enabled should be False - - py.sign_in(un, ak, **{"plotly_streaming_domain": "http://stream.plot.ly"}) - my_stream = py.Stream(tk) - expected_streaming_specs = { - "server": "stream.plot.ly", - "port": 80, - "ssl_enabled": False, - "ssl_verification_enabled": False, - "headers": {"Host": "stream.plot.ly", "plotly-streamtoken": tk}, - } - actual_streaming_specs = my_stream.get_streaming_specs() - self.assertEqual(expected_streaming_specs, actual_streaming_specs) - - def test_stream_https(self): - - # If the https scheme is used in the plotly_streaming_domain, port 443 - # should be used for streaming, ssl_enabled should be True, - # and ssl_verification_enabled should equal plotly_ssl_verification - - ssl_stream_config = { - "plotly_streaming_domain": "https://stream.plot.ly", - "plotly_ssl_verification": True, - } - py.sign_in(un, ak, **ssl_stream_config) - my_stream = py.Stream(tk) - expected_streaming_specs = { - "server": "stream.plot.ly", - "port": 443, - "ssl_enabled": True, - "ssl_verification_enabled": True, - "headers": {"Host": "stream.plot.ly", "plotly-streamtoken": tk}, - } - actual_streaming_specs = my_stream.get_streaming_specs() - self.assertEqual(expected_streaming_specs, actual_streaming_specs) diff --git a/packages/python/plotly/_plotly_utils/colors/qualitative.py b/packages/python/plotly/_plotly_utils/colors/qualitative.py index d53835658fb..9984cc4b049 100644 --- a/packages/python/plotly/_plotly_utils/colors/qualitative.py +++ b/packages/python/plotly/_plotly_utils/colors/qualitative.py @@ -14,12 +14,12 @@ def swatches(): swatches.__doc__ = _swatches.__doc__ Plotly = [ - "#636efa", + "#636EFA", "#EF553B", - "#00cc96", - "#ab63fa", + "#00CC96", + "#AB63FA", "#FFA15A", - "#19d3f3", + "#19D3F3", "#FF6692", "#B6E880", "#FF97FF", @@ -27,40 +27,40 @@ def swatches(): ] D3 = [ - "#1f77b4", - "#ff7f0e", - "#2ca02c", - "#d62728", - "#9467bd", - "#8c564b", - "#e377c2", - "#7f7f7f", - "#bcbd22", - "#17becf", + "#1F77B4", + "#FF7F0E", + "#2CA02C", + "#D62728", + "#9467BD", + "#8C564B", + "#E377C2", + "#7F7F7F", + "#BCBD22", + "#17BECF", ] G10 = [ - "#3366cc", - "#dc3912", - "#ff9900", + "#3366CC", + "#DC3912", + "#FF9900", "#109618", "#990099", - "#0099c6", - "#dd4477", - "#66aa00", - "#b82e2e", + "#0099C6", + "#DD4477", + "#66AA00", + "#B82E2E", "#316395", ] T10 = [ - "#4c78a8", - "#f58518", - "#e45756", - "#72b7b2", - "#54a24b", - "#eeca3b", - "#b279a2", - "#ff9da6", - "#9d755d", - "#bab0ac", + "#4C78A8", + "#F58518", + "#E45756", + "#72B7B2", + "#54A24B", + "#EECA3B", + "#B279A2", + "#FF9DA6", + "#9D755D", + "#BAB0AC", ] Alphabet = [ "#AA0DFE", diff --git a/packages/python/plotly/codegen/__init__.py b/packages/python/plotly/codegen/__init__.py index d33b785bf8f..6676744d2a4 100644 --- a/packages/python/plotly/codegen/__init__.py +++ b/packages/python/plotly/codegen/__init__.py @@ -143,6 +143,12 @@ def perform_codegen(): if node.node_data.get("_isSubplotObj", False) ] + layout_array_nodes = [ + node + for node in layout_node.child_compound_datatypes + if node.is_array_element and node.has_child("xref") and node.has_child("yref") + ] + # ### FrameNode ### compound_frame_nodes = PlotlyNode.get_all_compound_datatype_nodes( plotly_schema, FrameNode @@ -176,19 +182,22 @@ def perform_codegen(): # ### Data (traces) validator ### write_data_validator_py(outdir, base_traces_node) + # Alls + # ---- + alls = {} + # Write out datatypes # ------------------- - # ### Layout ### - for node in compound_layout_nodes: - write_datatype_py(outdir, node) - - # ### Trace ### - for node in compound_trace_nodes: - write_datatype_py(outdir, node) - - # ### Frames ### - for node in compound_frame_nodes: + for node in all_compound_nodes: write_datatype_py(outdir, node) + alls.setdefault(node.path_parts, []) + alls[node.path_parts].extend( + c.name_datatype_class for c in node.child_compound_datatypes + ) + if node.parent_path_parts == (): + # Add top-level classes to alls + alls.setdefault((), []) + alls[node.parent_path_parts].append(node.name_datatype_class) # ### Deprecated ### # These are deprecated legacy datatypes like graph_objs.Marker @@ -207,6 +216,7 @@ def perform_codegen(): layout_validator, frame_validator, subplot_nodes, + layout_array_nodes, ) # Write datatype __init__.py files @@ -222,6 +232,7 @@ def perform_codegen(): path_to_datatype_import_info.setdefault(key, []).append( (f"plotly.graph_objs{node.parent_dotpath_str}", node.name_undercase) ) + alls[node.parent_path_parts].append(node.name_undercase) # ### Write plotly/graph_objs/graph_objs.py ### # This if for backward compatibility. It just imports everything from @@ -231,8 +242,18 @@ def perform_codegen(): # ### Add Figure and FigureWidget ### root_datatype_imports = path_to_datatype_import_info[()] root_datatype_imports.append(("._figure", "Figure")) + alls[()].append("Figure") + + # ### Add deprecations ### + root_datatype_imports.append(("._deprecations", DEPRECATED_DATATYPES.keys())) + alls[()].extend(DEPRECATED_DATATYPES.keys()) - optional_figure_widget_import = """ + # Sort alls + for k, v in alls.items(): + alls[k] = list(sorted(v)) + + optional_figure_widget_import = f""" +__all__ = {alls[()]} try: import ipywidgets from distutils.version import LooseVersion @@ -240,22 +261,38 @@ def perform_codegen(): from ._figurewidget import FigureWidget del LooseVersion del ipywidgets + __all__.append("FigureWidget") except ImportError: pass """ root_datatype_imports.append(optional_figure_widget_import) - # ### Add deprecations ### - root_datatype_imports.append(("._deprecations", DEPRECATED_DATATYPES.keys())) + # ### __all__ ### + for path_parts, class_names in alls.items(): + if path_parts and class_names: + filepath = opath.join(outdir, "graph_objs", *path_parts, "__init__.py") + with open(filepath, "at") as f: + f.write(f"\n__all__ = {class_names}") # ### Output datatype __init__.py files ### graph_objs_pkg = opath.join(outdir, "graph_objs") for path_parts, import_pairs in path_to_datatype_import_info.items(): write_init_py(graph_objs_pkg, path_parts, import_pairs) + # ### Output graph_objects.py alias + graph_objects_path = opath.join(outdir, "graph_objects.py") + with open(graph_objects_path, "wt") as f: + f.write( + f"""\ +from __future__ import absolute_import +from plotly.graph_objs import * +__all__ = {alls[()]}""" + ) + # ### Run black code formatter on output directories ### subprocess.call(["black", "--target-version=py27", validators_pkgdir]) subprocess.call(["black", "--target-version=py27", graph_objs_pkgdir]) + subprocess.call(["black", "--target-version=py27", graph_objects_path]) if __name__ == "__main__": diff --git a/packages/python/plotly/codegen/compatibility.py b/packages/python/plotly/codegen/compatibility.py index 7dd7fc89d6a..65baf3860ee 100644 --- a/packages/python/plotly/codegen/compatibility.py +++ b/packages/python/plotly/codegen/compatibility.py @@ -26,7 +26,7 @@ "Margin": {"base_type": dict, "new": ["layout"]}, "Marker": {"base_type": dict, "new": ["scatter", "histogram.selected", "etc."]}, "RadialAxis": {"base_type": dict, "new": ["layout", "layout.polar"]}, - "Scene": {"base_type": dict, "new": ["Scene"]}, + "Scene": {"base_type": dict, "new": ["layout"]}, "Stream": {"base_type": dict, "new": ["scatter", "area"]}, "XAxis": {"base_type": dict, "new": ["layout", "layout.scene"]}, "YAxis": {"base_type": dict, "new": ["layout", "layout.scene"]}, diff --git a/packages/python/plotly/codegen/figure.py b/packages/python/plotly/codegen/figure.py index ab1e1c9b748..1a0f073af8c 100644 --- a/packages/python/plotly/codegen/figure.py +++ b/packages/python/plotly/codegen/figure.py @@ -25,6 +25,7 @@ def build_figure_py( layout_validator, frame_validator, subplot_nodes, + layout_array_nodes, ): """ @@ -47,6 +48,8 @@ def build_figure_py( FrameValidator instance subplot_nodes: list of str List of names of all of the layout subplot properties + layout_array_nodes: list of PlotlyNode + List of array nodes under layout that can be positioned using xref/yref Returns ------- str @@ -66,8 +69,10 @@ def build_figure_py( # ### Import base class ### buffer.write(f"from plotly.{base_package} import {base_classname}\n") - # ### Import trace graph_obj classes ### - trace_types_csv = ", ".join([n.name_datatype_class for n in trace_nodes]) + # ### Import trace graph_obj classes / layout ### + trace_types_csv = ", ".join( + [n.name_datatype_class for n in trace_nodes] + ["layout as _layout"] + ) buffer.write(f"from plotly.graph_objs import ({trace_types_csv})\n") # Write class definition @@ -313,6 +318,7 @@ def update_{plural_name}( self, patch=None, selector=None, + overwrite=False, row=None, col=None{secondary_y_1}, **kwargs): \"\"\" @@ -330,6 +336,10 @@ def update_{plural_name}( properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None (the default), all {singular_name} objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) Subplot row and column index of {singular_name} objects to select. To select {singular_name} objects by row and column, the Figure @@ -348,11 +358,244 @@ def update_{plural_name}( \"\"\" for obj in self.select_{plural_name}( selector=selector, row=row, col=col{secondary_y_2}): - obj.update(patch, **kwargs) + obj.update(patch, overwrite=overwrite, **kwargs) return self""" ) + # update annotations/shapes/images + # -------------------------------- + for node in layout_array_nodes: + singular_name = node.plotly_name + plural_name = node.name_property + + if singular_name == "image": + # Rename image to layout_image to avoid conflict with an image trace + method_prefix = "layout_" + else: + method_prefix = "" + + buffer.write( + f""" + def select_{method_prefix}{plural_name}( + self, selector=None, row=None, col=None, secondary_y=None + ): + \"\"\" + Select {plural_name} from a particular subplot cell and/or {plural_name} + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all {plural_name} are + selected. + row, col: int or None (default None) + Subplot row and column index of {plural_name} to select. + To select {plural_name} by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + {singular_name} that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all {plural_name} are selected. + secondary_y: boolean or None (default None) + * If True, only select {plural_name} associated with the secondary + y-axis of the subplot. + * If False, only select {plural_name} associated with the primary + y-axis of the subplot. + * If None (the default), do not filter {plural_name} based on secondary + y-axis. + + To select {plural_name} by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the {plural_name} that satisfy + all of the specified selection criteria + \"\"\" + return self._select_annotations_like( + "{plural_name}", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_{method_prefix}{singular_name}( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + \"\"\" + Apply a function to all {plural_name} that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single {singular_name} object. + selector: dict or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all {plural_name} are + selected. + row, col: int or None (default None) + Subplot row and column index of {plural_name} to select. + To select {plural_name} by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + {plural_name} that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all {plural_name} are selected. + secondary_y: boolean or None (default None) + * If True, only select {plural_name} associated with the secondary + y-axis of the subplot. + * If False, only select {plural_name} associated with the primary + y-axis of the subplot. + * If None (the default), do not filter {plural_name} based on secondary + y-axis. + + To select {plural_name} by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + \"\"\" + for obj in self._select_annotations_like( + prop='{plural_name}', + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_{method_prefix}{plural_name}( + self, + patch, + selector=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + \"\"\" + Perform a property update operation on all {plural_name} that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all {plural_name} that + satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all {plural_name} are + selected. + row, col: int or None (default None) + Subplot row and column index of {plural_name} to select. + To select {plural_name} by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + {singular_name} that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all {plural_name} are selected. + secondary_y: boolean or None (default None) + * If True, only select {plural_name} associated with the secondary + y-axis of the subplot. + * If False, only select {plural_name} associated with the primary + y-axis of the subplot. + * If None (the default), do not filter {plural_name} based on secondary + y-axis. + + To select {plural_name} by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected {singular_name}. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + \"\"\" + for obj in self._select_annotations_like( + prop='{plural_name}', + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self +""" + ) + # Add layout array items + buffer.write( + f""" + def add_{method_prefix}{singular_name}(self""" + ) + add_constructor_params( + buffer, + node.child_datatypes, + prepend_extras=["arg"], + append_extras=["row", "col", "secondary_y"], + ) + + prepend_extras = [ + ( + "arg", + f"instance of {node.name_datatype_class} or dict with " + "compatible properties", + ) + ] + append_extras = [ + ("row", f"Subplot row for {singular_name}"), + ("col", f"Subplot column for {singular_name}"), + ("secondary_y", f"Whether to add {singular_name} to secondary y-axis"), + ] + add_docstring( + buffer, + node, + header=f"Create and add a new {singular_name} to the figure's layout", + prepend_extras=prepend_extras, + append_extras=append_extras, + return_type=fig_classname, + ) + + # #### Function body #### + buffer.write( + f""" + new_obj = _layout.{node.name_datatype_class}(arg, + """ + ) + + for i, subtype_node in enumerate(node.child_datatypes): + subtype_prop_name = subtype_node.name_property + buffer.write( + f""" + {subtype_prop_name}={subtype_prop_name},""" + ) + + buffer.write("""**kwargs)""") + + buffer.write( + f""" + return self._add_annotation_like( + '{singular_name}', + '{plural_name}', + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + )""" + ) + # Return source string # -------------------- buffer.write("\n") @@ -360,7 +603,13 @@ def update_{plural_name}( def write_figure_classes( - outdir, trace_node, data_validator, layout_validator, frame_validator, subplot_nodes + outdir, + trace_node, + data_validator, + layout_validator, + frame_validator, + subplot_nodes, + layout_array_nodes, ): """ Construct source code for the Figure and FigureWidget classes and @@ -380,9 +629,10 @@ def write_figure_classes( LayoutValidator instance frame_validator : CompoundArrayValidator FrameValidator instance - subplot_nodes: list of str + subplot_nodes: list of PlotlyNode List of names of all of the layout subplot properties - + layout_array_nodes: list of PlotlyNode + List of array nodes under layout that can be positioned using xref/yref Returns ------- None @@ -415,6 +665,7 @@ def write_figure_classes( layout_validator, frame_validator, subplot_nodes, + layout_array_nodes, ) # ### Format and write to file### diff --git a/packages/python/plotly/codegen/resources/plot-schema.json b/packages/python/plotly/codegen/resources/plot-schema.json index 0f1f496edd6..4d71963664d 100644 --- a/packages/python/plotly/codegen/resources/plot-schema.json +++ b/packages/python/plotly/codegen/resources/plot-schema.json @@ -529,6 +529,14 @@ "editType": "calc", "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "calc", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. ", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -566,7 +574,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "line": { @@ -2251,6 +2259,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -2297,7 +2311,7 @@ "showLegend", "zoomScale" ], - "animatable": false, + "animatable": true, "type": "bar", "attributes": { "type": "bar", @@ -2346,11 +2360,13 @@ "valType": "string", "role": "info", "editType": "plot", + "anim": true, "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions." }, "ids": { "valType": "data_array", "editType": "calc", + "anim": true, "description": "Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.", "role": "data" }, @@ -2542,6 +2558,7 @@ "x": { "valType": "data_array", "editType": "calc+clearAxisTypes", + "anim": true, "description": "Sets the x coordinates.", "role": "data" }, @@ -2550,6 +2567,7 @@ "dflt": 0, "role": "info", "editType": "calc+clearAxisTypes", + "anim": true, "description": "Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step." }, "dx": { @@ -2557,11 +2575,13 @@ "dflt": 1, "role": "info", "editType": "calc", + "anim": true, "description": "Sets the x coordinate step. See `x0` for more info." }, "y": { "valType": "data_array", "editType": "calc+clearAxisTypes", + "anim": true, "description": "Sets the y coordinates.", "role": "data" }, @@ -2570,6 +2590,7 @@ "dflt": 0, "role": "info", "editType": "calc+clearAxisTypes", + "anim": true, "description": "Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting coordinate and `dy` the step." }, "dy": { @@ -2577,6 +2598,7 @@ "dflt": 1, "role": "info", "editType": "calc", + "anim": true, "description": "Sets the y coordinate step. See `y0` for more info." }, "text": { @@ -2587,6 +2609,14 @@ "editType": "calc", "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. ", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -2600,7 +2630,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "textposition": { @@ -2834,6 +2864,7 @@ "arrayOk": true, "role": "style", "editType": "style", + "anim": true, "description": "Sets the width (in px) of the lines bounding the marker points.", "dflt": 0 }, @@ -3965,6 +3996,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -4360,7 +4397,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "whiskerwidth": { @@ -5451,7 +5488,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "zauto": { @@ -6592,7 +6629,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `binNumber` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `binNumber` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "marker": { @@ -8210,7 +8247,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `z` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `z` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "zauto": { @@ -9466,10 +9503,10 @@ "width": { "valType": "number", "min": 0, - "dflt": 2, "role": "style", "editType": "style+colorbars", - "description": "Sets the line width (in px)." + "description": "Sets the contour line width in (in px)", + "dflt": 0.5 }, "dash": { "valType": "string", @@ -9510,7 +9547,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `z` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `z` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "zauto": { @@ -10559,7 +10596,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "connectgaps": { @@ -10738,10 +10775,9 @@ "width": { "valType": "number", "min": 0, - "dflt": 2, "role": "style", "editType": "style+colorbars", - "description": "Sets the line width (in px)." + "description": "Sets the contour line width in (in px) Defaults to *0.5* when `contours.type` is *levels*. Defaults to *2* when `contour.type` is *constraint*." }, "dash": { "valType": "string", @@ -11748,6 +11784,14 @@ "editType": "calc", "description": "Sets text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `a`, `b`, `c` and `text`.", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -13106,7 +13150,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "subplot": { @@ -13158,6 +13202,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -13975,7 +14025,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "box": { @@ -14532,7 +14582,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `percentInitial`, `percentPrevious` and `percentTotal`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `percentInitial`, `percentPrevious` and `percentTotal`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "hoverinfo": { @@ -14575,6 +14625,14 @@ "arrayOk": false, "description": "Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace)." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `percentInitial`, `percentPrevious`, `percentTotal`, `label` and `value`.", + "arrayOk": true + }, "text": { "valType": "string", "role": "info", @@ -15629,6 +15687,12 @@ "description": "Sets the source reference on plot.ly for hoverinfo .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "textsrc": { "valType": "string", "role": "info", @@ -15976,7 +16040,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `initial`, `delta` and `final`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `initial`, `delta` and `final`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "hoverinfo": { @@ -16018,6 +16082,14 @@ "arrayOk": false, "description": "Determines which trace information appear on the graph. In the case of having multiple waterfalls, totals are computed separately (per trace)." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `initial`, `delta`, `final` and `label`.", + "arrayOk": true + }, "text": { "valType": "string", "role": "info", @@ -16484,6 +16556,12 @@ "description": "Sets the source reference on plot.ly for hoverinfo .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "textsrc": { "valType": "string", "role": "info", @@ -16842,7 +16920,7 @@ }, "text": { "valType": "data_array", - "editType": "calc", + "editType": "plot", "description": "Sets text elements associated with each sector. If trace `textinfo` contains a *text* flag, these elements will be seen on the chart. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", "role": "data" }, @@ -16901,7 +16979,15 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label`, `color`, `value`, `percent` and `text`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label`, `color`, `value`, `percent` and `text`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "arrayOk": true + }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label`, `color`, `value`, `percent` and `text`.", "arrayOk": true }, "textposition": { @@ -17342,6 +17428,12 @@ "description": "Sets the source reference on plot.ly for hovertemplate .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "textpositionsrc": { "valType": "string", "role": "info", @@ -17446,28 +17538,2212 @@ "editType": "plot", "description": "Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index." }, - "hoverlabel": { - "bgcolor": { - "valType": "color", - "role": "style", - "editType": "none", - "description": "Sets the background color of the hover labels for this trace", - "arrayOk": true + "hoverlabel": { + "bgcolor": { + "valType": "color", + "role": "style", + "editType": "none", + "description": "Sets the background color of the hover labels for this trace", + "arrayOk": true + }, + "bordercolor": { + "valType": "color", + "role": "style", + "editType": "none", + "description": "Sets the border color of the hover labels for this trace.", + "arrayOk": true + }, + "font": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "editType": "none", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "arrayOk": true + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "none", + "arrayOk": true + }, + "color": { + "valType": "color", + "role": "style", + "editType": "none", + "arrayOk": true + }, + "editType": "none", + "description": "Sets the font used in hover labels.", + "role": "object", + "familysrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for family .", + "editType": "none" + }, + "sizesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for size .", + "editType": "none" + }, + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + } + }, + "align": { + "valType": "enumerated", + "values": [ + "left", + "right", + "auto" + ], + "dflt": "auto", + "role": "style", + "editType": "none", + "description": "Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines", + "arrayOk": true + }, + "namelength": { + "valType": "integer", + "min": -1, + "dflt": 15, + "role": "style", + "editType": "none", + "description": "Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.", + "arrayOk": true + }, + "editType": "none", + "role": "object", + "bgcolorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for bgcolor .", + "editType": "none" + }, + "bordercolorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for bordercolor .", + "editType": "none" + }, + "alignsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for align .", + "editType": "none" + }, + "namelengthsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for namelength .", + "editType": "none" + } + }, + "stream": { + "token": { + "valType": "string", + "noBlank": true, + "strict": true, + "role": "info", + "editType": "calc", + "description": "The stream id number links a data trace on a plot with a stream. See https://plot.ly/settings for more details." + }, + "maxpoints": { + "valType": "number", + "min": 0, + "max": 10000, + "dflt": 500, + "role": "info", + "editType": "calc", + "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot." + }, + "editType": "calc", + "role": "object" + }, + "transforms": { + "items": { + "transform": { + "editType": "calc", + "description": "An array of operations that manipulate the trace data, for example filtering or sorting the data arrays.", + "role": "object" + } + }, + "role": "object" + }, + "uirevision": { + "valType": "any", + "role": "info", + "editType": "none", + "description": "Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves." + }, + "labels": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the labels of each of the sectors.", + "role": "data" + }, + "parents": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the parent sectors for each of the sectors. Empty string items '' are understood to reference the root node in the hierarchy. If `ids` is filled, `parents` items are understood to be \"ids\" themselves. When `ids` is not set, plotly attempts to find matching items in `labels`, but beware they must be unique.", + "role": "data" + }, + "values": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the values associated with each of the sectors. Use with `branchvalues` to determine how the values are summed.", + "role": "data" + }, + "branchvalues": { + "valType": "enumerated", + "values": [ + "remainder", + "total" + ], + "dflt": "remainder", + "editType": "calc", + "role": "info", + "description": "Determines how the items in `values` are summed. When set to *total*, items in `values` are taken to be value of all its descendants. When set to *remainder*, items in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves." + }, + "count": { + "valType": "flaglist", + "flags": [ + "branches", + "leaves" + ], + "dflt": "leaves", + "editType": "calc", + "role": "info", + "description": "Determines default for `values` when it is not provided, by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0." + }, + "level": { + "valType": "any", + "editType": "plot", + "anim": true, + "role": "info", + "description": "Sets the level from which this trace hierarchy is rendered. Set `level` to `''` to start from the root node in the hierarchy. Must be an \"id\" if `ids` is filled in, otherwise plotly attempts to find a matching item in `labels`." + }, + "maxdepth": { + "valType": "integer", + "editType": "plot", + "role": "info", + "dflt": -1, + "description": "Sets the number of rendered sectors from any given `level`. Set `maxdepth` to *-1* to render all the levels in the hierarchy." + }, + "marker": { + "colors": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the color of each sector of this trace. If not specified, the default trace color set is used to pick the sector colors.", + "role": "data" + }, + "line": { + "color": { + "valType": "color", + "role": "style", + "dflt": null, + "arrayOk": true, + "editType": "style", + "description": "Sets the color of the line enclosing each sector. Defaults to the `paper_bgcolor` value." + }, + "width": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 1, + "arrayOk": true, + "editType": "style", + "description": "Sets the width (in px) of the line enclosing each sector." + }, + "editType": "calc", + "role": "object", + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + }, + "widthsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for width .", + "editType": "none" + } + }, + "editType": "calc", + "cauto": { + "valType": "boolean", + "role": "info", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "description": "Determines whether or not the color domain is computed with respect to the input data (here colors) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if colorsis set to a numerical array. Defaults to `false` when `marker.cmin` and `marker.cmax` are set by the user." + }, + "cmin": { + "valType": "number", + "role": "info", + "dflt": null, + "editType": "plot", + "impliedEdits": { + "cauto": false + }, + "description": "Sets the lower bound of the color domain. Has an effect only if colorsis set to a numerical array. Value should have the same units as colors and if set, `marker.cmax` must be set as well." + }, + "cmax": { + "valType": "number", + "role": "info", + "dflt": null, + "editType": "plot", + "impliedEdits": { + "cauto": false + }, + "description": "Sets the upper bound of the color domain. Has an effect only if colorsis set to a numerical array. Value should have the same units as colors and if set, `marker.cmin` must be set as well." + }, + "cmid": { + "valType": "number", + "role": "info", + "dflt": null, + "editType": "calc", + "impliedEdits": {}, + "description": "Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if colorsis set to a numerical array. Value should have the same units as colors. Has no effect when `marker.cauto` is `false`." + }, + "colorscale": { + "valType": "colorscale", + "role": "style", + "editType": "calc", + "dflt": null, + "impliedEdits": { + "autocolorscale": false + }, + "description": "Sets the colorscale. Has an effect only if colorsis set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis." + }, + "autocolorscale": { + "valType": "boolean", + "role": "style", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if colorsis set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed." + }, + "reversescale": { + "valType": "boolean", + "role": "style", + "dflt": false, + "editType": "plot", + "description": "Reverses the color mapping if true. Has an effect only if colorsis set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color." + }, + "showscale": { + "valType": "boolean", + "role": "info", + "dflt": false, + "editType": "calc", + "description": "Determines whether or not a colorbar is displayed for this trace. Has an effect only if colorsis set to a numerical array." + }, + "colorbar": { + "thicknessmode": { + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ], + "role": "style", + "dflt": "pixels", + "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", + "editType": "colorbars" + }, + "thickness": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 30, + "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", + "editType": "colorbars" + }, + "lenmode": { + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ], + "role": "info", + "dflt": "fraction", + "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", + "editType": "colorbars" + }, + "len": { + "valType": "number", + "min": 0, + "dflt": 1, + "role": "style", + "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", + "editType": "colorbars" + }, + "x": { + "valType": "number", + "dflt": 1.02, + "min": -2, + "max": 3, + "role": "style", + "description": "Sets the x position of the color bar (in plot fraction).", + "editType": "colorbars" + }, + "xanchor": { + "valType": "enumerated", + "values": [ + "left", + "center", + "right" + ], + "dflt": "left", + "role": "style", + "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", + "editType": "colorbars" + }, + "xpad": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 10, + "description": "Sets the amount of padding (in px) along the x direction.", + "editType": "colorbars" + }, + "y": { + "valType": "number", + "role": "style", + "dflt": 0.5, + "min": -2, + "max": 3, + "description": "Sets the y position of the color bar (in plot fraction).", + "editType": "colorbars" + }, + "yanchor": { + "valType": "enumerated", + "values": [ + "top", + "middle", + "bottom" + ], + "role": "style", + "dflt": "middle", + "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", + "editType": "colorbars" + }, + "ypad": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 10, + "description": "Sets the amount of padding (in px) along the y direction.", + "editType": "colorbars" + }, + "outlinecolor": { + "valType": "color", + "dflt": "#444", + "role": "style", + "editType": "colorbars", + "description": "Sets the axis line color." + }, + "outlinewidth": { + "valType": "number", + "min": 0, + "dflt": 1, + "role": "style", + "editType": "colorbars", + "description": "Sets the width (in px) of the axis line." + }, + "bordercolor": { + "valType": "color", + "dflt": "#444", + "role": "style", + "editType": "colorbars", + "description": "Sets the axis line color." + }, + "borderwidth": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 0, + "description": "Sets the width (in px) or the border enclosing this color bar.", + "editType": "colorbars" + }, + "bgcolor": { + "valType": "color", + "role": "style", + "dflt": "rgba(0,0,0,0)", + "description": "Sets the color of padded area.", + "editType": "colorbars" + }, + "tickmode": { + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ], + "role": "info", + "editType": "colorbars", + "impliedEdits": {}, + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided)." + }, + "nticks": { + "valType": "integer", + "min": 0, + "dflt": 0, + "role": "style", + "editType": "colorbars", + "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*." + }, + "tick0": { + "valType": "any", + "role": "style", + "editType": "colorbars", + "impliedEdits": { + "tickmode": "linear" + }, + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears." + }, + "dtick": { + "valType": "any", + "role": "style", + "editType": "colorbars", + "impliedEdits": { + "tickmode": "linear" + }, + "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*" + }, + "tickvals": { + "valType": "data_array", + "editType": "colorbars", + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data" + }, + "ticktext": { + "valType": "data_array", + "editType": "colorbars", + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", + "role": "data" + }, + "ticks": { + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ], + "role": "style", + "editType": "colorbars", + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "dflt": "" + }, + "ticklen": { + "valType": "number", + "min": 0, + "dflt": 5, + "role": "style", + "editType": "colorbars", + "description": "Sets the tick length (in px)." + }, + "tickwidth": { + "valType": "number", + "min": 0, + "dflt": 1, + "role": "style", + "editType": "colorbars", + "description": "Sets the tick width (in px)." + }, + "tickcolor": { + "valType": "color", + "dflt": "#444", + "role": "style", + "editType": "colorbars", + "description": "Sets the tick color." + }, + "showticklabels": { + "valType": "boolean", + "dflt": true, + "role": "style", + "editType": "colorbars", + "description": "Determines whether or not the tick labels are drawn." + }, + "tickfont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "colorbars" + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "colorbars" + }, + "color": { + "valType": "color", + "role": "style", + "editType": "colorbars" + }, + "description": "Sets the color bar's tick label font", + "editType": "colorbars", + "role": "object" + }, + "tickangle": { + "valType": "angle", + "dflt": "auto", + "role": "style", + "editType": "colorbars", + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically." + }, + "tickformat": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*" + }, + "tickformatstops": { + "items": { + "tickformatstop": { + "enabled": { + "valType": "boolean", + "role": "info", + "dflt": true, + "editType": "colorbars", + "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`." + }, + "dtickrange": { + "valType": "info_array", + "role": "info", + "items": [ + { + "valType": "any", + "editType": "colorbars" + }, + { + "valType": "any", + "editType": "colorbars" + } + ], + "editType": "colorbars", + "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*" + }, + "value": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "string - dtickformat for described zoom level, the same as *tickformat*" + }, + "editType": "colorbars", + "name": { + "valType": "string", + "role": "style", + "editType": "colorbars", + "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template." + }, + "templateitemname": { + "valType": "string", + "role": "info", + "editType": "colorbars", + "description": "Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`." + }, + "role": "object" + } + }, + "role": "object" + }, + "tickprefix": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "Sets a tick label prefix." + }, + "showtickprefix": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ], + "dflt": "all", + "role": "style", + "editType": "colorbars", + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden." + }, + "ticksuffix": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "Sets a tick label suffix." + }, + "showticksuffix": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ], + "dflt": "all", + "role": "style", + "editType": "colorbars", + "description": "Same as `showtickprefix` but for tick suffixes." + }, + "separatethousands": { + "valType": "boolean", + "dflt": false, + "role": "style", + "editType": "colorbars", + "description": "If \"true\", even 4-digit integers are separated" + }, + "exponentformat": { + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ], + "dflt": "B", + "role": "style", + "editType": "colorbars", + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B." + }, + "showexponent": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ], + "dflt": "all", + "role": "style", + "editType": "colorbars", + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear." + }, + "title": { + "text": { + "valType": "string", + "role": "info", + "description": "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", + "editType": "colorbars" + }, + "font": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "colorbars" + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "colorbars" + }, + "color": { + "valType": "color", + "role": "style", + "editType": "colorbars" + }, + "description": "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.", + "editType": "colorbars", + "role": "object" + }, + "side": { + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ], + "role": "style", + "dflt": "top", + "description": "Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute.", + "editType": "colorbars" + }, + "editType": "colorbars", + "role": "object" + }, + "_deprecated": { + "title": { + "valType": "string", + "role": "info", + "description": "Deprecated in favor of color bar's `title.text`. Note that value of color bar's `title` is no longer a simple *string* but a set of sub-attributes.", + "editType": "colorbars" + }, + "titlefont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "colorbars" + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "colorbars" + }, + "color": { + "valType": "color", + "role": "style", + "editType": "colorbars" + }, + "description": "Deprecated in favor of color bar's `title.font`.", + "editType": "colorbars" + }, + "titleside": { + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ], + "role": "style", + "dflt": "top", + "description": "Deprecated in favor of color bar's `title.side`.", + "editType": "colorbars" + } + }, + "editType": "colorbars", + "role": "object", + "tickvalssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for tickvals .", + "editType": "none" + }, + "ticktextsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for ticktext .", + "editType": "none" + } + }, + "coloraxis": { + "valType": "subplotid", + "role": "info", + "regex": "/^coloraxis([2-9]|[1-9][0-9]+)?$/", + "dflt": null, + "editType": "calc", + "description": "Sets a reference to a shared color axis. References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis." + }, + "role": "object", + "colorssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for colors .", + "editType": "none" + } + }, + "leaf": { + "opacity": { + "valType": "number", + "editType": "style", + "role": "style", + "min": 0, + "max": 1, + "description": "Sets the opacity of the leaves. With colorscale it is defaulted to 1; otherwise it is defaulted to 0.7" + }, + "editType": "plot", + "role": "object" + }, + "text": { + "valType": "data_array", + "editType": "plot", + "description": "Sets text elements associated with each sector. If trace `textinfo` contains a *text* flag, these elements will be seen on the chart. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", + "role": "data" + }, + "textinfo": { + "valType": "flaglist", + "role": "info", + "flags": [ + "label", + "text", + "value", + "current path", + "percent root", + "percent entry", + "percent parent" + ], + "extras": [ + "none" + ], + "editType": "plot", + "description": "Determines which trace information appear on the graph." + }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry`, `percentParent`, `label` and `value`.", + "arrayOk": true + }, + "hovertext": { + "valType": "string", + "role": "info", + "dflt": "", + "arrayOk": true, + "editType": "style", + "description": "Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace's sectors. To be seen, trace `hoverinfo` must contain a *text* flag." + }, + "hoverinfo": { + "valType": "flaglist", + "role": "info", + "flags": [ + "label", + "text", + "value", + "name", + "current path", + "percent root", + "percent entry", + "percent parent" + ], + "extras": [ + "all", + "none", + "skip" + ], + "arrayOk": true, + "dflt": "label+text+value+name", + "editType": "none", + "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired." + }, + "hovertemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "none", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry` and `percentParent`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "arrayOk": true + }, + "textfont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "editType": "plot", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "arrayOk": true + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "plot", + "arrayOk": true + }, + "color": { + "valType": "color", + "role": "style", + "editType": "plot", + "arrayOk": true + }, + "editType": "plot", + "description": "Sets the font used for `textinfo`.", + "role": "object", + "familysrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for family .", + "editType": "none" + }, + "sizesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for size .", + "editType": "none" + }, + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + } + }, + "insidetextfont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "editType": "plot", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "arrayOk": true + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "plot", + "arrayOk": true + }, + "color": { + "valType": "color", + "role": "style", + "editType": "plot", + "arrayOk": true + }, + "editType": "plot", + "description": "Sets the font used for `textinfo` lying inside the sector.", + "role": "object", + "familysrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for family .", + "editType": "none" + }, + "sizesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for size .", + "editType": "none" + }, + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + } + }, + "outsidetextfont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "editType": "plot", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "arrayOk": true + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "plot", + "arrayOk": true + }, + "color": { + "valType": "color", + "role": "style", + "editType": "plot", + "arrayOk": true + }, + "editType": "plot", + "description": "Sets the font used for `textinfo` lying outside the sector.", + "role": "object", + "familysrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for family .", + "editType": "none" + }, + "sizesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for size .", + "editType": "none" + }, + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + } + }, + "domain": { + "x": { + "valType": "info_array", + "role": "info", + "editType": "calc", + "items": [ + { + "valType": "number", + "min": 0, + "max": 1, + "editType": "calc" + }, + { + "valType": "number", + "min": 0, + "max": 1, + "editType": "calc" + } + ], + "dflt": [ + 0, + 1 + ], + "description": "Sets the horizontal domain of this sunburst trace (in plot fraction)." + }, + "y": { + "valType": "info_array", + "role": "info", + "editType": "calc", + "items": [ + { + "valType": "number", + "min": 0, + "max": 1, + "editType": "calc" + }, + { + "valType": "number", + "min": 0, + "max": 1, + "editType": "calc" + } + ], + "dflt": [ + 0, + 1 + ], + "description": "Sets the vertical domain of this sunburst trace (in plot fraction)." + }, + "editType": "calc", + "row": { + "valType": "integer", + "min": 0, + "dflt": 0, + "role": "info", + "editType": "calc", + "description": "If there is a layout grid, use the domain for this row in the grid for this sunburst trace ." + }, + "column": { + "valType": "integer", + "min": 0, + "dflt": 0, + "role": "info", + "editType": "calc", + "description": "If there is a layout grid, use the domain for this column in the grid for this sunburst trace ." + }, + "role": "object" + }, + "idssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for ids .", + "editType": "none" + }, + "customdatasrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for customdata .", + "editType": "none" + }, + "metasrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for meta .", + "editType": "none" + }, + "labelssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for labels .", + "editType": "none" + }, + "parentssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for parents .", + "editType": "none" + }, + "valuessrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for values .", + "editType": "none" + }, + "textsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for text .", + "editType": "none" + }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, + "hovertextsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for hovertext .", + "editType": "none" + }, + "hoverinfosrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for hoverinfo .", + "editType": "none" + }, + "hovertemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for hovertemplate .", + "editType": "none" + } + }, + "layoutAttributes": { + "sunburstcolorway": { + "valType": "colorlist", + "role": "style", + "editType": "calc", + "description": "Sets the default sunburst slice colors. Defaults to the main `colorway` used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see `extendsunburstcolors`." + }, + "extendsunburstcolors": { + "valType": "boolean", + "dflt": true, + "role": "style", + "editType": "calc", + "description": "If `true`, the sunburst slice colors (whether given by `sunburstcolorway` or inherited from `colorway`) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set `false` to disable. Colors provided in the trace, using `marker.colors`, are never extended." + } + } + }, + "treemap": { + "meta": { + "description": "Visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. The treemap sectors are determined by the entries in *labels* or *ids* and in *parents*." + }, + "categories": [], + "animatable": true, + "type": "treemap", + "attributes": { + "type": "treemap", + "visible": { + "valType": "enumerated", + "values": [ + true, + false, + "legendonly" + ], + "role": "info", + "dflt": true, + "editType": "calc", + "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible)." + }, + "opacity": { + "valType": "number", + "role": "style", + "min": 0, + "max": 1, + "dflt": 1, + "editType": "style", + "description": "Sets the opacity of the trace." + }, + "name": { + "valType": "string", + "role": "info", + "editType": "style", + "description": "Sets the trace name. The trace name appear as the legend item and on hover." + }, + "uid": { + "valType": "string", + "role": "info", + "editType": "plot", + "anim": true, + "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions." + }, + "ids": { + "valType": "data_array", + "editType": "calc", + "anim": true, + "description": "Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.", + "role": "data" + }, + "customdata": { + "valType": "data_array", + "editType": "calc", + "description": "Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, *scatter* traces also appends customdata items in the markers DOM elements", + "role": "data" + }, + "meta": { + "valType": "any", + "arrayOk": true, + "role": "info", + "editType": "plot", + "description": "Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index." + }, + "hoverlabel": { + "bgcolor": { + "valType": "color", + "role": "style", + "editType": "none", + "description": "Sets the background color of the hover labels for this trace", + "arrayOk": true + }, + "bordercolor": { + "valType": "color", + "role": "style", + "editType": "none", + "description": "Sets the border color of the hover labels for this trace.", + "arrayOk": true + }, + "font": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "editType": "none", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "arrayOk": true + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "none", + "arrayOk": true + }, + "color": { + "valType": "color", + "role": "style", + "editType": "none", + "arrayOk": true + }, + "editType": "none", + "description": "Sets the font used in hover labels.", + "role": "object", + "familysrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for family .", + "editType": "none" + }, + "sizesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for size .", + "editType": "none" + }, + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + } + }, + "align": { + "valType": "enumerated", + "values": [ + "left", + "right", + "auto" + ], + "dflt": "auto", + "role": "style", + "editType": "none", + "description": "Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines", + "arrayOk": true + }, + "namelength": { + "valType": "integer", + "min": -1, + "dflt": 15, + "role": "style", + "editType": "none", + "description": "Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.", + "arrayOk": true + }, + "editType": "none", + "role": "object", + "bgcolorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for bgcolor .", + "editType": "none" + }, + "bordercolorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for bordercolor .", + "editType": "none" + }, + "alignsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for align .", + "editType": "none" + }, + "namelengthsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for namelength .", + "editType": "none" + } + }, + "stream": { + "token": { + "valType": "string", + "noBlank": true, + "strict": true, + "role": "info", + "editType": "calc", + "description": "The stream id number links a data trace on a plot with a stream. See https://plot.ly/settings for more details." + }, + "maxpoints": { + "valType": "number", + "min": 0, + "max": 10000, + "dflt": 500, + "role": "info", + "editType": "calc", + "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot." + }, + "editType": "calc", + "role": "object" + }, + "transforms": { + "items": { + "transform": { + "editType": "calc", + "description": "An array of operations that manipulate the trace data, for example filtering or sorting the data arrays.", + "role": "object" + } + }, + "role": "object" + }, + "uirevision": { + "valType": "any", + "role": "info", + "editType": "none", + "description": "Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves." + }, + "labels": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the labels of each of the sectors.", + "role": "data" + }, + "parents": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the parent sectors for each of the sectors. Empty string items '' are understood to reference the root node in the hierarchy. If `ids` is filled, `parents` items are understood to be \"ids\" themselves. When `ids` is not set, plotly attempts to find matching items in `labels`, but beware they must be unique.", + "role": "data" + }, + "values": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the values associated with each of the sectors. Use with `branchvalues` to determine how the values are summed.", + "role": "data" + }, + "branchvalues": { + "valType": "enumerated", + "values": [ + "remainder", + "total" + ], + "dflt": "remainder", + "editType": "calc", + "role": "info", + "description": "Determines how the items in `values` are summed. When set to *total*, items in `values` are taken to be value of all its descendants. When set to *remainder*, items in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves." + }, + "count": { + "valType": "flaglist", + "flags": [ + "branches", + "leaves" + ], + "dflt": "leaves", + "editType": "calc", + "role": "info", + "description": "Determines default for `values` when it is not provided, by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0." + }, + "level": { + "valType": "any", + "editType": "plot", + "anim": true, + "role": "info", + "description": "Sets the level from which this trace hierarchy is rendered. Set `level` to `''` to start from the root node in the hierarchy. Must be an \"id\" if `ids` is filled in, otherwise plotly attempts to find a matching item in `labels`." + }, + "maxdepth": { + "valType": "integer", + "editType": "plot", + "role": "info", + "dflt": -1, + "description": "Sets the number of rendered sectors from any given `level`. Set `maxdepth` to *-1* to render all the levels in the hierarchy." + }, + "tiling": { + "packing": { + "valType": "enumerated", + "values": [ + "squarify", + "binary", + "dice", + "slice", + "slice-dice", + "dice-slice" + ], + "dflt": "squarify", + "role": "info", + "editType": "plot", + "description": "Determines d3 treemap solver. For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling" + }, + "squarifyratio": { + "valType": "number", + "role": "info", + "min": 1, + "dflt": 1, + "editType": "plot", + "description": "When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio this option specifies the desired aspect ratio of the generated rectangles. The ratio must be specified as a number greater than or equal to one. Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio; for example, a ratio of two will attempt to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2. When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034, Plotly applies 1 to increase squares in treemap layouts." + }, + "flip": { + "valType": "flaglist", + "role": "info", + "flags": [ + "x", + "y" + ], + "dflt": "", + "editType": "plot", + "description": "Determines if the positions obtained from solver are flipped on each axis." + }, + "pad": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 3, + "editType": "plot", + "description": "Sets the inner padding (in px)." + }, + "editType": "calc", + "role": "object" + }, + "marker": { + "pad": { + "t": { + "valType": "number", + "role": "style", + "min": 0, + "editType": "plot", + "description": "Sets the padding form the top (in px)." + }, + "l": { + "valType": "number", + "role": "style", + "min": 0, + "editType": "plot", + "description": "Sets the padding form the left (in px)." + }, + "r": { + "valType": "number", + "role": "style", + "min": 0, + "editType": "plot", + "description": "Sets the padding form the right (in px)." + }, + "b": { + "valType": "number", + "role": "style", + "min": 0, + "editType": "plot", + "description": "Sets the padding form the bottom (in px)." + }, + "editType": "calc", + "role": "object" + }, + "colors": { + "valType": "data_array", + "editType": "calc", + "description": "Sets the color of each sector of this trace. If not specified, the default trace color set is used to pick the sector colors.", + "role": "data" + }, + "depthfade": { + "valType": "enumerated", + "values": [ + true, + false, + "reversed" + ], + "editType": "style", + "role": "style", + "description": "Determines if the sector colors are faded towards the background from the leaves up to the headers. This option is unavailable when a `colorscale` is present, defaults to false when `marker.colors` is set, but otherwise defaults to true. When set to *reversed*, the fading direction is inverted, that is the top elements within hierarchy are drawn with fully saturated colors while the leaves are faded towards the background color." + }, + "line": { + "color": { + "valType": "color", + "role": "style", + "dflt": null, + "arrayOk": true, + "editType": "style", + "description": "Sets the color of the line enclosing each sector. Defaults to the `paper_bgcolor` value." + }, + "width": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 1, + "arrayOk": true, + "editType": "style", + "description": "Sets the width (in px) of the line enclosing each sector." + }, + "editType": "calc", + "role": "object", + "colorsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for color .", + "editType": "none" + }, + "widthsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for width .", + "editType": "none" + } + }, + "editType": "calc", + "cauto": { + "valType": "boolean", + "role": "info", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "description": "Determines whether or not the color domain is computed with respect to the input data (here colors) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if colorsis set to a numerical array. Defaults to `false` when `marker.cmin` and `marker.cmax` are set by the user." + }, + "cmin": { + "valType": "number", + "role": "info", + "dflt": null, + "editType": "plot", + "impliedEdits": { + "cauto": false + }, + "description": "Sets the lower bound of the color domain. Has an effect only if colorsis set to a numerical array. Value should have the same units as colors and if set, `marker.cmax` must be set as well." + }, + "cmax": { + "valType": "number", + "role": "info", + "dflt": null, + "editType": "plot", + "impliedEdits": { + "cauto": false + }, + "description": "Sets the upper bound of the color domain. Has an effect only if colorsis set to a numerical array. Value should have the same units as colors and if set, `marker.cmin` must be set as well." + }, + "cmid": { + "valType": "number", + "role": "info", + "dflt": null, + "editType": "calc", + "impliedEdits": {}, + "description": "Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if colorsis set to a numerical array. Value should have the same units as colors. Has no effect when `marker.cauto` is `false`." + }, + "colorscale": { + "valType": "colorscale", + "role": "style", + "editType": "calc", + "dflt": null, + "impliedEdits": { + "autocolorscale": false + }, + "description": "Sets the colorscale. Has an effect only if colorsis set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis." + }, + "autocolorscale": { + "valType": "boolean", + "role": "style", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if colorsis set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed." + }, + "reversescale": { + "valType": "boolean", + "role": "style", + "dflt": false, + "editType": "plot", + "description": "Reverses the color mapping if true. Has an effect only if colorsis set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color." + }, + "showscale": { + "valType": "boolean", + "role": "info", + "dflt": false, + "editType": "calc", + "description": "Determines whether or not a colorbar is displayed for this trace. Has an effect only if colorsis set to a numerical array." + }, + "colorbar": { + "thicknessmode": { + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ], + "role": "style", + "dflt": "pixels", + "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", + "editType": "colorbars" + }, + "thickness": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 30, + "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", + "editType": "colorbars" + }, + "lenmode": { + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ], + "role": "info", + "dflt": "fraction", + "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", + "editType": "colorbars" + }, + "len": { + "valType": "number", + "min": 0, + "dflt": 1, + "role": "style", + "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", + "editType": "colorbars" + }, + "x": { + "valType": "number", + "dflt": 1.02, + "min": -2, + "max": 3, + "role": "style", + "description": "Sets the x position of the color bar (in plot fraction).", + "editType": "colorbars" + }, + "xanchor": { + "valType": "enumerated", + "values": [ + "left", + "center", + "right" + ], + "dflt": "left", + "role": "style", + "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", + "editType": "colorbars" + }, + "xpad": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 10, + "description": "Sets the amount of padding (in px) along the x direction.", + "editType": "colorbars" + }, + "y": { + "valType": "number", + "role": "style", + "dflt": 0.5, + "min": -2, + "max": 3, + "description": "Sets the y position of the color bar (in plot fraction).", + "editType": "colorbars" + }, + "yanchor": { + "valType": "enumerated", + "values": [ + "top", + "middle", + "bottom" + ], + "role": "style", + "dflt": "middle", + "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", + "editType": "colorbars" + }, + "ypad": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 10, + "description": "Sets the amount of padding (in px) along the y direction.", + "editType": "colorbars" + }, + "outlinecolor": { + "valType": "color", + "dflt": "#444", + "role": "style", + "editType": "colorbars", + "description": "Sets the axis line color." + }, + "outlinewidth": { + "valType": "number", + "min": 0, + "dflt": 1, + "role": "style", + "editType": "colorbars", + "description": "Sets the width (in px) of the axis line." + }, + "bordercolor": { + "valType": "color", + "dflt": "#444", + "role": "style", + "editType": "colorbars", + "description": "Sets the axis line color." + }, + "borderwidth": { + "valType": "number", + "role": "style", + "min": 0, + "dflt": 0, + "description": "Sets the width (in px) or the border enclosing this color bar.", + "editType": "colorbars" + }, + "bgcolor": { + "valType": "color", + "role": "style", + "dflt": "rgba(0,0,0,0)", + "description": "Sets the color of padded area.", + "editType": "colorbars" + }, + "tickmode": { + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ], + "role": "info", + "editType": "colorbars", + "impliedEdits": {}, + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided)." + }, + "nticks": { + "valType": "integer", + "min": 0, + "dflt": 0, + "role": "style", + "editType": "colorbars", + "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*." + }, + "tick0": { + "valType": "any", + "role": "style", + "editType": "colorbars", + "impliedEdits": { + "tickmode": "linear" + }, + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears." + }, + "dtick": { + "valType": "any", + "role": "style", + "editType": "colorbars", + "impliedEdits": { + "tickmode": "linear" + }, + "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*" + }, + "tickvals": { + "valType": "data_array", + "editType": "colorbars", + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data" + }, + "ticktext": { + "valType": "data_array", + "editType": "colorbars", + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", + "role": "data" + }, + "ticks": { + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ], + "role": "style", + "editType": "colorbars", + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "dflt": "" + }, + "ticklen": { + "valType": "number", + "min": 0, + "dflt": 5, + "role": "style", + "editType": "colorbars", + "description": "Sets the tick length (in px)." + }, + "tickwidth": { + "valType": "number", + "min": 0, + "dflt": 1, + "role": "style", + "editType": "colorbars", + "description": "Sets the tick width (in px)." + }, + "tickcolor": { + "valType": "color", + "dflt": "#444", + "role": "style", + "editType": "colorbars", + "description": "Sets the tick color." + }, + "showticklabels": { + "valType": "boolean", + "dflt": true, + "role": "style", + "editType": "colorbars", + "description": "Determines whether or not the tick labels are drawn." + }, + "tickfont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "colorbars" + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "colorbars" + }, + "color": { + "valType": "color", + "role": "style", + "editType": "colorbars" + }, + "description": "Sets the color bar's tick label font", + "editType": "colorbars", + "role": "object" + }, + "tickangle": { + "valType": "angle", + "dflt": "auto", + "role": "style", + "editType": "colorbars", + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically." + }, + "tickformat": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*" + }, + "tickformatstops": { + "items": { + "tickformatstop": { + "enabled": { + "valType": "boolean", + "role": "info", + "dflt": true, + "editType": "colorbars", + "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`." + }, + "dtickrange": { + "valType": "info_array", + "role": "info", + "items": [ + { + "valType": "any", + "editType": "colorbars" + }, + { + "valType": "any", + "editType": "colorbars" + } + ], + "editType": "colorbars", + "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*" + }, + "value": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "string - dtickformat for described zoom level, the same as *tickformat*" + }, + "editType": "colorbars", + "name": { + "valType": "string", + "role": "style", + "editType": "colorbars", + "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template." + }, + "templateitemname": { + "valType": "string", + "role": "info", + "editType": "colorbars", + "description": "Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`." + }, + "role": "object" + } + }, + "role": "object" + }, + "tickprefix": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "Sets a tick label prefix." + }, + "showtickprefix": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ], + "dflt": "all", + "role": "style", + "editType": "colorbars", + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden." + }, + "ticksuffix": { + "valType": "string", + "dflt": "", + "role": "style", + "editType": "colorbars", + "description": "Sets a tick label suffix." + }, + "showticksuffix": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ], + "dflt": "all", + "role": "style", + "editType": "colorbars", + "description": "Same as `showtickprefix` but for tick suffixes." + }, + "separatethousands": { + "valType": "boolean", + "dflt": false, + "role": "style", + "editType": "colorbars", + "description": "If \"true\", even 4-digit integers are separated" + }, + "exponentformat": { + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ], + "dflt": "B", + "role": "style", + "editType": "colorbars", + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B." + }, + "showexponent": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ], + "dflt": "all", + "role": "style", + "editType": "colorbars", + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear." + }, + "title": { + "text": { + "valType": "string", + "role": "info", + "description": "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", + "editType": "colorbars" + }, + "font": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "colorbars" + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "colorbars" + }, + "color": { + "valType": "color", + "role": "style", + "editType": "colorbars" + }, + "description": "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.", + "editType": "colorbars", + "role": "object" + }, + "side": { + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ], + "role": "style", + "dflt": "top", + "description": "Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute.", + "editType": "colorbars" + }, + "editType": "colorbars", + "role": "object" + }, + "_deprecated": { + "title": { + "valType": "string", + "role": "info", + "description": "Deprecated in favor of color bar's `title.text`. Note that value of color bar's `title` is no longer a simple *string* but a set of sub-attributes.", + "editType": "colorbars" + }, + "titlefont": { + "family": { + "valType": "string", + "role": "style", + "noBlank": true, + "strict": true, + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "colorbars" + }, + "size": { + "valType": "number", + "role": "style", + "min": 1, + "editType": "colorbars" + }, + "color": { + "valType": "color", + "role": "style", + "editType": "colorbars" + }, + "description": "Deprecated in favor of color bar's `title.font`.", + "editType": "colorbars" + }, + "titleside": { + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ], + "role": "style", + "dflt": "top", + "description": "Deprecated in favor of color bar's `title.side`.", + "editType": "colorbars" + } + }, + "editType": "colorbars", + "role": "object", + "tickvalssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for tickvals .", + "editType": "none" + }, + "ticktextsrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for ticktext .", + "editType": "none" + } + }, + "coloraxis": { + "valType": "subplotid", + "role": "info", + "regex": "/^coloraxis([2-9]|[1-9][0-9]+)?$/", + "dflt": null, + "editType": "calc", + "description": "Sets a reference to a shared color axis. References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis." + }, + "role": "object", + "colorssrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for colors .", + "editType": "none" + } + }, + "pathbar": { + "visible": { + "valType": "boolean", + "dflt": true, + "role": "info", + "editType": "plot", + "description": "Determines if the path bar is drawn i.e. outside the trace `domain` and with one pixel gap." }, - "bordercolor": { - "valType": "color", + "side": { + "valType": "enumerated", + "values": [ + "top", + "bottom" + ], + "dflt": "top", + "role": "info", + "editType": "plot", + "description": "Determines on which side of the the treemap the `pathbar` should be presented." + }, + "edgeshape": { + "valType": "enumerated", + "values": [ + ">", + "<", + "|", + "/", + "\\" + ], + "dflt": ">", "role": "style", - "editType": "none", - "description": "Sets the border color of the hover labels for this trace.", - "arrayOk": true + "editType": "plot", + "description": "Determines which shape is used for edges between `barpath` labels." }, - "font": { + "thickness": { + "valType": "number", + "min": 12, + "role": "info", + "editType": "plot", + "description": "Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used with 3 pixles extra padding on each side." + }, + "textfont": { "family": { "valType": "string", "role": "style", "noBlank": true, "strict": true, - "editType": "none", + "editType": "plot", "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", "arrayOk": true }, @@ -17475,17 +19751,17 @@ "valType": "number", "role": "style", "min": 1, - "editType": "none", + "editType": "plot", "arrayOk": true }, "color": { "valType": "color", "role": "style", - "editType": "none", + "editType": "plot", "arrayOk": true }, - "editType": "none", - "description": "Sets the font used in hover labels.", + "editType": "plot", + "description": "Sets the font used inside `pathbar`.", "role": "object", "familysrc": { "valType": "string", @@ -17506,216 +19782,79 @@ "editType": "none" } }, - "align": { - "valType": "enumerated", - "values": [ - "left", - "right", - "auto" - ], - "dflt": "auto", - "role": "style", - "editType": "none", - "description": "Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines", - "arrayOk": true - }, - "namelength": { - "valType": "integer", - "min": -1, - "dflt": 15, - "role": "style", - "editType": "none", - "description": "Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.", - "arrayOk": true - }, - "editType": "none", - "role": "object", - "bgcolorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for bgcolor .", - "editType": "none" - }, - "bordercolorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for bordercolor .", - "editType": "none" - }, - "alignsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for align .", - "editType": "none" - }, - "namelengthsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for namelength .", - "editType": "none" - } - }, - "stream": { - "token": { - "valType": "string", - "noBlank": true, - "strict": true, - "role": "info", - "editType": "calc", - "description": "The stream id number links a data trace on a plot with a stream. See https://plot.ly/settings for more details." - }, - "maxpoints": { - "valType": "number", - "min": 0, - "max": 10000, - "dflt": 500, - "role": "info", - "editType": "calc", - "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot." - }, "editType": "calc", "role": "object" }, - "transforms": { - "items": { - "transform": { - "editType": "calc", - "description": "An array of operations that manipulate the trace data, for example filtering or sorting the data arrays.", - "role": "object" - } - }, - "role": "object" - }, - "uirevision": { - "valType": "any", - "role": "info", - "editType": "none", - "description": "Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves." - }, - "labels": { - "valType": "data_array", - "editType": "calc", - "description": "Sets the labels of each of the sunburst sectors.", - "role": "data" - }, - "parents": { - "valType": "data_array", - "editType": "calc", - "description": "Sets the parent sectors for each of the sunburst sectors. Empty string items '' are understood to reference the root node in the hierarchy. If `ids` is filled, `parents` items are understood to be \"ids\" themselves. When `ids` is not set, plotly attempts to find matching items in `labels`, but beware they must be unique.", - "role": "data" - }, - "values": { + "text": { "valType": "data_array", - "editType": "calc", - "description": "Sets the values associated with each of the sunburst sectors. Use with `branchvalues` to determine how the values are summed.", + "editType": "plot", + "description": "Sets text elements associated with each sector. If trace `textinfo` contains a *text* flag, these elements will be seen on the chart. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", "role": "data" }, - "branchvalues": { - "valType": "enumerated", - "values": [ - "remainder", - "total" - ], - "dflt": "remainder", - "editType": "calc", + "textinfo": { + "valType": "flaglist", "role": "info", - "description": "Determines how the items in `values` are summed. When set to *total*, items in `values` are taken to be value of all its descendants. When set to *remainder*, items in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves." - }, - "level": { - "valType": "any", + "flags": [ + "label", + "text", + "value", + "current path", + "percent root", + "percent entry", + "percent parent" + ], + "extras": [ + "none" + ], "editType": "plot", - "anim": true, - "role": "info", - "description": "Sets the level from which this sunburst trace hierarchy is rendered. Set `level` to `''` to start the sunburst from the root node in the hierarchy. Must be an \"id\" if `ids` is filled in, otherwise plotly attempts to find a matching item in `labels`." + "description": "Determines which trace information appear on the graph." }, - "maxdepth": { - "valType": "integer", - "editType": "plot", + "texttemplate": { + "valType": "string", "role": "info", - "dflt": -1, - "description": "Sets the number of rendered sunburst rings from any given `level`. Set `maxdepth` to *-1* to render all the levels in the hierarchy." - }, - "marker": { - "colors": { - "valType": "data_array", - "editType": "calc", - "description": "Sets the color of each sector of this sunburst chart. If not specified, the default trace color set is used to pick the sector colors.", - "role": "data" - }, - "line": { - "color": { - "valType": "color", - "role": "style", - "dflt": null, - "arrayOk": true, - "editType": "style", - "description": "Sets the color of the line enclosing each sector. Defaults to the `paper_bgcolor` value." - }, - "width": { - "valType": "number", - "role": "style", - "min": 0, - "dflt": 1, - "arrayOk": true, - "editType": "style", - "description": "Sets the width (in px) of the line enclosing each sector." - }, - "editType": "calc", - "role": "object", - "colorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for color .", - "editType": "none" - }, - "widthsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for width .", - "editType": "none" - } - }, - "editType": "calc", - "role": "object", - "colorssrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for colors .", - "editType": "none" - } - }, - "leaf": { - "opacity": { - "valType": "number", - "editType": "style", - "role": "style", - "min": 0, - "max": 1, - "dflt": 0.7, - "description": "Sets the opacity of the leaves." - }, + "dflt": "", "editType": "plot", - "role": "object" + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry`, `percentParent`, `label` and `value`.", + "arrayOk": true }, - "text": { - "valType": "data_array", - "editType": "calc", - "description": "Sets text elements associated with each sector. If trace `textinfo` contains a *text* flag, these elements will be seen on the chart. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", - "role": "data" + "hovertext": { + "valType": "string", + "role": "info", + "dflt": "", + "arrayOk": true, + "editType": "style", + "description": "Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace's sectors. To be seen, trace `hoverinfo` must contain a *text* flag." }, - "textinfo": { + "hoverinfo": { "valType": "flaglist", "role": "info", "flags": [ "label", "text", - "value" + "value", + "name", + "current path", + "percent root", + "percent entry", + "percent parent" ], "extras": [ - "none" + "all", + "none", + "skip" ], - "editType": "plot", - "description": "Determines which trace information appear on the graph." + "arrayOk": true, + "dflt": "label+text+value+name", + "editType": "none", + "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired." + }, + "hovertemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "none", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry` and `percentParent`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "arrayOk": true }, "textfont": { "family": { @@ -17762,41 +19901,6 @@ "editType": "none" } }, - "hovertext": { - "valType": "string", - "role": "info", - "dflt": "", - "arrayOk": true, - "editType": "style", - "description": "Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace's sectors. To be seen, trace `hoverinfo` must contain a *text* flag." - }, - "hoverinfo": { - "valType": "flaglist", - "role": "info", - "flags": [ - "label", - "text", - "value", - "name" - ], - "extras": [ - "all", - "none", - "skip" - ], - "arrayOk": true, - "dflt": "all", - "editType": "none", - "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired." - }, - "hovertemplate": { - "valType": "string", - "role": "info", - "dflt": "", - "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", - "arrayOk": true - }, "insidetextfont": { "family": { "valType": "string", @@ -17887,6 +19991,24 @@ "editType": "none" } }, + "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", + "role": "style", + "editType": "plot", + "description": "Sets the positions of the `text` elements." + }, "domain": { "x": { "valType": "info_array", @@ -17910,7 +20032,7 @@ 0, 1 ], - "description": "Sets the horizontal domain of this sunburst trace (in plot fraction)." + "description": "Sets the horizontal domain of this treemap trace (in plot fraction)." }, "y": { "valType": "info_array", @@ -17934,7 +20056,7 @@ 0, 1 ], - "description": "Sets the vertical domain of this sunburst trace (in plot fraction)." + "description": "Sets the vertical domain of this treemap trace (in plot fraction)." }, "editType": "calc", "row": { @@ -17943,7 +20065,7 @@ "dflt": 0, "role": "info", "editType": "calc", - "description": "If there is a layout grid, use the domain for this row in the grid for this sunburst trace ." + "description": "If there is a layout grid, use the domain for this row in the grid for this treemap trace ." }, "column": { "valType": "integer", @@ -17951,7 +20073,7 @@ "dflt": 0, "role": "info", "editType": "calc", - "description": "If there is a layout grid, use the domain for this column in the grid for this sunburst trace ." + "description": "If there is a layout grid, use the domain for this column in the grid for this treemap trace ." }, "role": "object" }, @@ -17997,6 +20119,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -18017,18 +20145,18 @@ } }, "layoutAttributes": { - "sunburstcolorway": { + "treemapcolorway": { "valType": "colorlist", "role": "style", "editType": "calc", - "description": "Sets the default sunburst slice colors. Defaults to the main `colorway` used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see `extendsunburstcolors`." + "description": "Sets the default treemap slice colors. Defaults to the main `colorway` used for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, see `extendtreemapcolors`." }, - "extendsunburstcolors": { + "extendtreemapcolors": { "valType": "boolean", "dflt": true, "role": "style", "editType": "calc", - "description": "If `true`, the sunburst slice colors (whether given by `sunburstcolorway` or inherited from `colorway`) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set `false` to disable. Colors provided in the trace, using `marker.colors`, are never extended." + "description": "If `true`, the treemap slice colors (whether given by `treemapcolorway` or inherited from `colorway`) will be extended to three times its original length by first repeating every color 20% lighter then each color 20% darker. This is intended to reduce the likelihood of reusing the same color when you have many slices, but you can set `false` to disable. Colors provided in the trace, using `marker.colors`, are never extended." } } }, @@ -18334,7 +20462,7 @@ }, "text": { "valType": "data_array", - "editType": "calc", + "editType": "plot", "description": "Sets text elements associated with each sector. If trace `textinfo` contains a *text* flag, these elements will be seen on the chart. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", "role": "data" }, @@ -18368,6 +20496,14 @@ "editType": "calc", "description": "Determines which trace information appear on the graph." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label`, `color`, `value`, `text` and `percent`.", + "arrayOk": true + }, "hoverinfo": { "valType": "flaglist", "role": "info", @@ -18393,7 +20529,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label`, `color`, `value`, `percent` and `text`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `label`, `color`, `value`, `text` and `percent`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "textposition": { @@ -18693,6 +20829,12 @@ "description": "Sets the source reference on plot.ly for hovertext .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hoverinfosrc": { "valType": "string", "role": "info", @@ -18748,7 +20890,8 @@ "categories": [ "gl3d", "symbols", - "showLegend" + "showLegend", + "scatter-like" ], "animatable": false, "type": "scatter3d", @@ -18992,6 +21135,14 @@ "editType": "calc", "description": "Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y,z) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "calc", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. ", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -19005,7 +21156,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "mode": { @@ -21049,6 +23200,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -21306,7 +23463,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "connectgaps": { @@ -22969,7 +25126,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "cauto": { @@ -24259,7 +26416,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "cauto": { @@ -25321,7 +27478,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "delaunayaxis": { @@ -26556,7 +28713,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `norm` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `norm` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "cauto": { @@ -27349,7 +29506,7 @@ }, "streamtube": { "meta": { - "description": "Use a streamtube trace to visualize flow in a vector field. Specify a vector field using 6 1D arrays of equal length, 3 position arrays `x`, `y` and `z` and 3 vector component arrays `u`, `v`, and `w`. By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. To specify your own starting position, use attributes `starts.x`, `starts.y` and `starts.z`." + "description": "Use a streamtube trace to visualize flow in a vector field. Specify a vector field using 6 1D arrays of equal length, 3 position arrays `x`, `y` and `z` and 3 vector component arrays `u`, `v`, and `w`. By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. To specify your own starting position, use attributes `starts.x`, `starts.y` and `starts.z`. The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w)." }, "categories": [ "gl3d" @@ -27648,7 +29805,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "cauto": { @@ -28714,6 +30871,14 @@ "editType": "calc", "description": "Sets text elements associated with each (lon,lat) pair or item in `locations`. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) or `locations` coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "calc", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `lat`, `lon`, `location` and `text`.", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -30026,7 +32191,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "geo": { @@ -30078,6 +32243,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -30460,7 +32631,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "zauto": { @@ -32688,7 +34859,15 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "arrayOk": true + }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "calc", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. ", "arrayOk": true }, "error_x": { @@ -33041,6 +35220,12 @@ "role": "info", "description": "Sets the source reference on plot.ly for hovertemplate .", "editType": "none" + }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" } } }, @@ -33379,7 +35564,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "marker": { @@ -37201,7 +39386,7 @@ "role": "info", "dflt": "", "editType": "plot", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `bandcolorcount`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``." + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `bandcolorcount`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``." }, "arrangement": { "valType": "enumerated", @@ -37955,7 +40140,7 @@ "role": "info", "dflt": "", "editType": "plot", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `count` and `probability`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``." + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `count` and `probability`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``." }, "role": "object", "colorsrc": { @@ -37998,7 +40183,7 @@ "gl", "symbols", "showLegend", - "scatterlike" + "scatter-like" ], "animatable": false, "type": "scattermapbox", @@ -38257,6 +40442,14 @@ "editType": "calc", "description": "Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "calc", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `lat`, `lon` and `text`.", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -39096,7 +41289,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "subplot": { @@ -39142,6 +41335,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -39520,7 +41719,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `properties` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variable `properties` Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "zauto": { @@ -40441,7 +42640,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "zauto": { @@ -41652,7 +43851,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `value` and `label`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `value` and `label`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "description": "The nodes of the Sankey plot.", @@ -41884,7 +44083,7 @@ "role": "info", "dflt": "", "editType": "calc", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `value` and `label`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `value` and `label`. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "colorscales": { @@ -42010,7 +44209,7 @@ }, "indicator": { "meta": { - "description": "TODO: add description" + "description": "An indicator is used to visualize a single `value` along with some contextual information such as `steps` or a `threshold`, using a combination of three visual elements: a number, a delta, and/or a gauge. Deltas are taken with respect to a `reference`. Gauges can be either angular or bullet (aka linear) gauges." }, "categories": [ "svg", @@ -42761,7 +44960,7 @@ }, "steps": { "items": { - "steps": { + "step": { "color": { "valType": "color", "editType": "plot", @@ -43588,7 +45787,8 @@ "carpet", "carpetAxis", "notLegendIsolatable", - "noMultiCategory" + "noMultiCategory", + "noHover" ], "animatable": true, "type": "carpet", @@ -43648,135 +45848,6 @@ "editType": "plot", "description": "Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index." }, - "hoverinfo": { - "valType": "flaglist", - "role": "info", - "flags": [ - "x", - "y", - "z", - "text", - "name" - ], - "extras": [ - "all", - "none", - "skip" - ], - "arrayOk": true, - "dflt": "all", - "editType": "none", - "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired." - }, - "hoverlabel": { - "bgcolor": { - "valType": "color", - "role": "style", - "editType": "none", - "description": "Sets the background color of the hover labels for this trace", - "arrayOk": true - }, - "bordercolor": { - "valType": "color", - "role": "style", - "editType": "none", - "description": "Sets the border color of the hover labels for this trace.", - "arrayOk": true - }, - "font": { - "family": { - "valType": "string", - "role": "style", - "noBlank": true, - "strict": true, - "editType": "none", - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "arrayOk": true - }, - "size": { - "valType": "number", - "role": "style", - "min": 1, - "editType": "none", - "arrayOk": true - }, - "color": { - "valType": "color", - "role": "style", - "editType": "none", - "arrayOk": true - }, - "editType": "none", - "description": "Sets the font used in hover labels.", - "role": "object", - "familysrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for family .", - "editType": "none" - }, - "sizesrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for size .", - "editType": "none" - }, - "colorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for color .", - "editType": "none" - } - }, - "align": { - "valType": "enumerated", - "values": [ - "left", - "right", - "auto" - ], - "dflt": "auto", - "role": "style", - "editType": "none", - "description": "Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines", - "arrayOk": true - }, - "namelength": { - "valType": "integer", - "min": -1, - "dflt": 15, - "role": "style", - "editType": "none", - "description": "Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.", - "arrayOk": true - }, - "editType": "none", - "role": "object", - "bgcolorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for bgcolor .", - "editType": "none" - }, - "bordercolorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for bordercolor .", - "editType": "none" - }, - "alignsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for align .", - "editType": "none" - }, - "namelengthsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for namelength .", - "editType": "none" - } - }, "stream": { "token": { "valType": "string", @@ -43808,7 +45879,7 @@ "valType": "string", "role": "info", "editType": "calc", - "description": "An identifier for this carpet, so that `scattercarpet` and `scattercontour` traces can specify a carpet plot on which they lie" + "description": "An identifier for this carpet, so that `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie" }, "x": { "valType": "data_array", @@ -45071,12 +47142,6 @@ "description": "Sets the source reference on plot.ly for meta .", "editType": "none" }, - "hoverinfosrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for hoverinfo .", - "editType": "none" - }, "xsrc": { "valType": "string", "role": "info", @@ -45342,7 +47407,7 @@ "valType": "string", "role": "info", "editType": "calc", - "description": "An identifier for this carpet, so that `scattercarpet` and `scattercontour` traces can specify a carpet plot on which they lie" + "description": "An identifier for this carpet, so that `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie" }, "a": { "valType": "data_array", @@ -45379,6 +47444,14 @@ "editType": "calc", "description": "Sets text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `a`, `b` and `text`.", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -46729,7 +48802,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "xaxis": { @@ -46782,6 +48855,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -46821,7 +48900,8 @@ "symbols", "showLegend", "hasLines", - "carpetDependent" + "carpetDependent", + "noHover" ], "animatable": false, "type": "contourcarpet", @@ -46893,135 +48973,6 @@ "editType": "plot", "description": "Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index." }, - "hoverinfo": { - "valType": "flaglist", - "role": "info", - "flags": [ - "x", - "y", - "z", - "text", - "name" - ], - "extras": [ - "all", - "none", - "skip" - ], - "arrayOk": true, - "dflt": "all", - "editType": "none", - "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired." - }, - "hoverlabel": { - "bgcolor": { - "valType": "color", - "role": "style", - "editType": "none", - "description": "Sets the background color of the hover labels for this trace", - "arrayOk": true - }, - "bordercolor": { - "valType": "color", - "role": "style", - "editType": "none", - "description": "Sets the border color of the hover labels for this trace.", - "arrayOk": true - }, - "font": { - "family": { - "valType": "string", - "role": "style", - "noBlank": true, - "strict": true, - "editType": "none", - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "arrayOk": true - }, - "size": { - "valType": "number", - "role": "style", - "min": 1, - "editType": "none", - "arrayOk": true - }, - "color": { - "valType": "color", - "role": "style", - "editType": "none", - "arrayOk": true - }, - "editType": "none", - "description": "Sets the font used in hover labels.", - "role": "object", - "familysrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for family .", - "editType": "none" - }, - "sizesrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for size .", - "editType": "none" - }, - "colorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for color .", - "editType": "none" - } - }, - "align": { - "valType": "enumerated", - "values": [ - "left", - "right", - "auto" - ], - "dflt": "auto", - "role": "style", - "editType": "none", - "description": "Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines", - "arrayOk": true - }, - "namelength": { - "valType": "integer", - "min": -1, - "dflt": 15, - "role": "style", - "editType": "none", - "description": "Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.", - "arrayOk": true - }, - "editType": "none", - "role": "object", - "bgcolorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for bgcolor .", - "editType": "none" - }, - "bordercolorsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for bordercolor .", - "editType": "none" - }, - "alignsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for align .", - "editType": "none" - }, - "namelengthsrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for namelength .", - "editType": "none" - } - }, "stream": { "token": { "valType": "string", @@ -47320,16 +49271,15 @@ "color": { "valType": "color", "role": "style", - "editType": "style", - "description": "Sets the color of the contour level. Has no if `contours.coloring` is set to *lines*." + "editType": "style+colorbars", + "description": "Sets the color of the contour level. Has no effect if `contours.coloring` is set to *lines*." }, "width": { "valType": "number", "min": 0, - "dflt": 2, "role": "style", - "editType": "style", - "description": "Sets the line width (in px)." + "editType": "style+colorbars", + "description": "Sets the contour line width in (in px) Defaults to *0.5* when `contours.type` is *levels*. Defaults to *2* when `contour.type` is *constraint*." }, "dash": { "valType": "string", @@ -47960,12 +49910,6 @@ "description": "Sets the source reference on plot.ly for meta .", "editType": "none" }, - "hoverinfosrc": { - "valType": "string", - "role": "info", - "description": "Sets the source reference on plot.ly for hoverinfo .", - "editType": "none" - }, "zsrc": { "valType": "string", "role": "info", @@ -49350,6 +51294,14 @@ "editType": "calc", "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `r`, `theta` and `text`.", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -50629,7 +52581,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "selected": { @@ -50753,6 +52705,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -51087,6 +53045,14 @@ "editType": "calc", "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels." }, + "texttemplate": { + "valType": "string", + "role": "info", + "dflt": "", + "editType": "plot", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `r`, `theta` and `text`.", + "arrayOk": true + }, "hovertext": { "valType": "string", "role": "info", @@ -51100,7 +53066,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "line": { @@ -52426,6 +54392,12 @@ "description": "Sets the source reference on plot.ly for text .", "editType": "none" }, + "texttemplatesrc": { + "valType": "string", + "role": "info", + "description": "Sets the source reference on plot.ly for texttemplate .", + "editType": "none" + }, "hovertextsrc": { "valType": "string", "role": "info", @@ -53504,7 +55476,7 @@ "role": "info", "dflt": "", "editType": "none", - "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "arrayOk": true }, "selected": { @@ -54541,7 +56513,8 @@ "valType": "boolean", "role": "info", "dflt": true, - "editType": "plot" + "editType": "plot", + "description": "Turns on/off margin expansion computations. Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider are allowed to push the margins by defaults." }, "editType": "plot", "role": "object" @@ -54671,7 +56644,7 @@ "arrayOk": true, "role": "info", "editType": "plot", - "description": "Assigns extra meta information that can be used in various `text` attributes. Attributes such as the graph, axis and colorbar `title.text`, annotation `text` `trace.name` in legend items, `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. One can access `meta` fields using template strings: `%{meta[i]}` where `i` is the index of the `meta` item in question. `meta` can also be an object for example `{key: value}` which can be accessed %{meta[key]}." + "description": "Assigns extra meta information that can be used in various `text` attributes. Attributes such as the graph, axis and colorbar `title.text`, annotation `text` `trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text all support `meta`. One can access `meta` fields using template strings: `%{meta[i]}` where `i` is the index of the `meta` item in question. `meta` can also be an object for example `{key: value}` which can be accessed %{meta[key]}." }, "transition": { "duration": { @@ -63141,10 +65114,9 @@ "valType": "number", "min": -2, "max": 3, - "dflt": 1.02, "role": "style", "editType": "legend", - "description": "Sets the x position (in normalized coordinates) of the legend." + "description": "Sets the x position (in normalized coordinates) of the legend. Defaults to *1.02* for vertical legends and defaults to *0* for horizontal legends." }, "xanchor": { "valType": "enumerated", @@ -63157,16 +65129,15 @@ "dflt": "left", "role": "info", "editType": "legend", - "description": "Sets the legend's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the legend." + "description": "Sets the legend's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the legend. Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise." }, "y": { "valType": "number", "min": -2, "max": 3, - "dflt": 1, "role": "style", "editType": "legend", - "description": "Sets the y position (in normalized coordinates) of the legend." + "description": "Sets the y position (in normalized coordinates) of the legend. Defaults to *1* for vertical legends, defaults to *-0.1* for horizontal legends on graphs w/o range sliders and defaults to *1.1* for horizontal legends on graph with one or multiple range sliders." }, "yanchor": { "valType": "enumerated", @@ -63176,10 +65147,9 @@ "middle", "bottom" ], - "dflt": "auto", "role": "info", "editType": "legend", - "description": "Sets the legend's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the legend." + "description": "Sets the legend's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the legend. Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise." }, "uirevision": { "valType": "any", diff --git a/packages/python/plotly/codegen/utils.py b/packages/python/plotly/codegen/utils.py index f60be8391ee..ff950d60117 100644 --- a/packages/python/plotly/codegen/utils.py +++ b/packages/python/plotly/codegen/utils.py @@ -6,6 +6,7 @@ from io import StringIO from typing import List import re +import errno # Source code utilities @@ -30,6 +31,8 @@ def write_source_py(py_source, filepath, leading_newlines=0): # Make dir if needed # ------------------ filedir = opath.dirname(filepath) + # The exist_ok kwarg is only supported with Python 3, but that's ok since + # codegen is only supported with Python 3 anyway os.makedirs(filedir, exist_ok=True) # Write file @@ -893,6 +896,12 @@ def child_literals(self) -> List["PlotlyNode"]: """ return [n for n in self.children if n.is_literal] + def has_child(self, name) -> bool: + """ + Check whether node has child of the specified name + """ + return bool([n for n in self.children if n.plotly_name == name]) + def get_constructor_params_docstring(self, indent=12): """ Return a docstring-style string containing the names and diff --git a/packages/python/plotly/plotly/_widget_version.py b/packages/python/plotly/plotly/_widget_version.py index 593e93e6fd6..df8aeec3a64 100644 --- a/packages/python/plotly/plotly/_widget_version.py +++ b/packages/python/plotly/plotly/_widget_version.py @@ -2,4 +2,4 @@ # for automated dev builds # # It is edited by hand prior to official releases -__frontend_version__ = "^1.1.0" +__frontend_version__ = "^1.2.0" diff --git a/packages/python/plotly/plotly/basedatatypes.py b/packages/python/plotly/plotly/basedatatypes.py index a423ae11978..bd3d658d490 100644 --- a/packages/python/plotly/plotly/basedatatypes.py +++ b/packages/python/plotly/plotly/basedatatypes.py @@ -438,7 +438,7 @@ def _ipython_display_(self): else: print (repr(self)) - def update(self, dict1=None, **kwargs): + def update(self, dict1=None, overwrite=False, **kwargs): """ Update the properties of the figure with a dict and/or with keyword arguments. @@ -450,6 +450,10 @@ def update(self, dict1=None, **kwargs): ---------- dict1 : dict Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. kwargs : Keyword/value pair of properties to be updated @@ -484,15 +488,19 @@ def update(self, dict1=None, **kwargs): if d: for k, v in d.items(): update_target = self[k] - if update_target == (): - # existing data or frames property is empty - # In this case we accept the v as is. + if update_target == () or overwrite: if k == "data": + # Overwrite all traces as special due to + # restrictions on trace assignment + self.data = () self.add_traces(v) else: # Accept v self[k] = v - elif isinstance(update_target, BasePlotlyType) or ( + elif ( + isinstance(update_target, BasePlotlyType) + and isinstance(v, (dict, BasePlotlyType)) + ) or ( isinstance(update_target, tuple) and isinstance(update_target[0], BasePlotlyType) ): @@ -843,7 +851,14 @@ def for_each_trace(self, fn, selector=None, row=None, col=None, secondary_y=None return self def update_traces( - self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + self, + patch=None, + selector=None, + row=None, + col=None, + secondary_y=None, + overwrite=False, + **kwargs ): """ Perform a property update operation on all traces that satisfy the @@ -877,6 +892,10 @@ def update_traces( created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. **kwargs Additional property updates to apply to each selected trace. If a property is specified in both patch and in **kwargs then the @@ -890,10 +909,10 @@ def update_traces( for trace in self.select_traces( selector=selector, row=row, col=col, secondary_y=secondary_y ): - trace.update(patch, **kwargs) + trace.update(patch, overwrite=overwrite, **kwargs) return self - def update_layout(self, dict1=None, **kwargs): + def update_layout(self, dict1=None, overwrite=False, **kwargs): """ Update the properties of the figure's layout with a dict and/or with keyword arguments. @@ -905,6 +924,10 @@ def update_layout(self, dict1=None, **kwargs): ---------- dict1 : dict Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. kwargs : Keyword/value pair of properties to be updated @@ -913,7 +936,7 @@ def update_layout(self, dict1=None, **kwargs): BaseFigure The Figure object that the update_layout method was called on """ - self.layout.update(dict1, **kwargs) + self.layout.update(dict1, overwrite=overwrite, **kwargs) return self def _select_layout_subplots_by_prefix( @@ -978,6 +1001,119 @@ def _select_layout_subplots_by_prefix( yield self.layout[k] + def _select_annotations_like( + self, prop, selector=None, row=None, col=None, secondary_y=None + ): + """ + Helper to select annotation-like elements from a layout object array. + Compatible with layout.annotations, layout.shapes, and layout.images + """ + xref_to_col = {} + yref_to_row = {} + yref_to_secondary_y = {} + if isinstance(row, int) or isinstance(col, int) or secondary_y is not None: + grid_ref = self._validate_get_grid_ref() + for r, subplot_row in enumerate(grid_ref): + for c, subplot_refs in enumerate(subplot_row): + if not subplot_refs: + continue + + for i, subplot_ref in enumerate(subplot_refs): + if subplot_ref.subplot_type == "xy": + is_secondary_y = i == 1 + xaxis, yaxis = subplot_ref.layout_keys + xref = xaxis.replace("axis", "") + yref = yaxis.replace("axis", "") + xref_to_col[xref] = c + 1 + yref_to_row[yref] = r + 1 + yref_to_secondary_y[yref] = is_secondary_y + + for obj in self.layout[prop]: + # Filter by row + if col is not None: + if col == "paper" and obj.xref != "paper": + continue + elif col != "paper" and xref_to_col.get(obj.xref, None) != col: + continue + + # Filter by col + if row is not None: + if row == "paper" and obj.yref != "paper": + continue + elif row != "paper" and yref_to_row.get(obj.yref, None) != row: + continue + + # Filter by secondary y + if ( + secondary_y is not None + and yref_to_secondary_y.get(obj.yref, None) != secondary_y + ): + continue + + # Filter by selector + if not self._selector_matches(obj, selector): + continue + + yield obj + + def _add_annotation_like( + self, prop_singular, prop_plural, new_obj, row=None, col=None, secondary_y=None + ): + # Make sure we have both row and col or neither + if row is not None and col is None: + raise ValueError( + "Received row parameter but not col.\n" + "row and col must be specified together" + ) + elif col is not None and row is None: + raise ValueError( + "Received col parameter but not row.\n" + "row and col must be specified together" + ) + + # Get grid_ref if specific row or column requested + if row is not None: + grid_ref = self._validate_get_grid_ref() + refs = grid_ref[row - 1][col - 1] + + if not refs: + raise ValueError( + "No subplot found at position ({r}, {c})".format(r=row, c=col) + ) + + if refs[0].subplot_type != "xy": + raise ValueError( + """ +Cannot add {prop_singular} to subplot at position ({r}, {c}) because subplot +is of type {subplot_type}.""".format( + prop_singular=prop_singular, + r=row, + c=col, + subplot_type=refs[0].subplot_type, + ) + ) + if len(refs) == 1 and secondary_y: + raise ValueError( + """ +Cannot add {prop_singular} to secondary y-axis of subplot at position ({r}, {c}) +because subplot does not have a secondary y-axis""" + ) + if secondary_y: + xaxis, yaxis = refs[1].layout_keys + else: + xaxis, yaxis = refs[0].layout_keys + xref, yref = xaxis.replace("axis", ""), yaxis.replace("axis", "") + new_obj.update(xref=xref, yref=yref) + + if new_obj.xref is None: + new_obj.xref = "paper" + if new_obj.yref is None: + new_obj.yref = "paper" + + self.layout[prop_plural] += (new_obj,) + + return self + # Restyle # ------- def plotly_restyle(self, restyle_data, trace_indexes=None, **kwargs): @@ -1471,13 +1607,6 @@ def add_trace(self, trace, row=None, col=None, secondary_y=None): >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) """ - # Validate row/col - if row is not None and not isinstance(row, int): - pass - - if col is not None and not isinstance(col, int): - pass - # Make sure we have both row and col or neither if row is not None and col is None: raise ValueError( @@ -2697,7 +2826,7 @@ def _is_dict_list(v): return isinstance(v, list) and len(v) > 0 and isinstance(v[0], dict) @staticmethod - def _perform_update(plotly_obj, update_obj): + def _perform_update(plotly_obj, update_obj, overwrite=False): """ Helper to support the update() methods on :class:`BaseFigure` and :class:`BasePlotlyType` @@ -2747,6 +2876,12 @@ def _perform_update(plotly_obj, update_obj): # ------------------------ for key in update_obj: val = update_obj[key] + + if overwrite: + # Don't recurse and assign property as-is + plotly_obj[key] = val + continue + validator = plotly_obj._get_prop_validator(key) if isinstance(validator, CompoundValidator) and isinstance(val, dict): @@ -3530,7 +3665,7 @@ def _raise_on_invalid_property_error(self, *args): ) ) - def update(self, dict1=None, **kwargs): + def update(self, dict1=None, overwrite=False, **kwargs): """ Update the properties of an object with a dict and/or with keyword arguments. @@ -3542,6 +3677,10 @@ def update(self, dict1=None, **kwargs): ---------- dict1 : dict Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. kwargs : Keyword/value pair of properties to be updated @@ -3552,11 +3691,11 @@ def update(self, dict1=None, **kwargs): """ if self.figure: with self.figure.batch_update(): - BaseFigure._perform_update(self, dict1) - BaseFigure._perform_update(self, kwargs) + BaseFigure._perform_update(self, dict1, overwrite=overwrite) + BaseFigure._perform_update(self, kwargs, overwrite=overwrite) else: - BaseFigure._perform_update(self, dict1) - BaseFigure._perform_update(self, kwargs) + BaseFigure._perform_update(self, dict1, overwrite=overwrite) + BaseFigure._perform_update(self, kwargs, overwrite=overwrite) return self diff --git a/packages/python/plotly/plotly/express/__init__.py b/packages/python/plotly/plotly/express/__init__.py index 19aa4bb3e51..4ff085156ce 100644 --- a/packages/python/plotly/plotly/express/__init__.py +++ b/packages/python/plotly/plotly/express/__init__.py @@ -2,6 +2,16 @@ `plotly_express` is a terse, consistent, high-level wrapper around `plotly` for rapid \ data exploration and figure generation. See the gallery at https://plotly.github.io/plotly_express """ +from __future__ import absolute_import +from plotly import optional_imports + +pd = optional_imports.get_module("pandas") +if pd is None: + raise ImportError( + """\ +Plotly express requires pandas to be installed.""" + ) + from ._chart_types import ( # noqa: F401 scatter, diff --git a/packages/python/plotly/plotly/express/_chart_types.py b/packages/python/plotly/plotly/express/_chart_types.py index c6f2fc099a0..7ac0507956d 100644 --- a/packages/python/plotly/plotly/express/_chart_types.py +++ b/packages/python/plotly/plotly/express/_chart_types.py @@ -4,7 +4,7 @@ def scatter( - data_frame, + data_frame=None, x=None, y=None, color=None, @@ -12,6 +12,7 @@ def scatter( size=None, hover_name=None, hover_data=None, + custom_data=None, text=None, facet_row=None, facet_col=None, @@ -56,7 +57,7 @@ def scatter( def density_contour( - data_frame, + data_frame=None, x=None, y=None, z=None, @@ -112,7 +113,7 @@ def density_contour( def density_heatmap( - data_frame, + data_frame=None, x=None, y=None, z=None, @@ -166,7 +167,7 @@ def density_heatmap( def line( - data_frame, + data_frame=None, x=None, y=None, line_group=None, @@ -174,6 +175,7 @@ def line( line_dash=None, hover_name=None, hover_data=None, + custom_data=None, text=None, facet_row=None, facet_col=None, @@ -210,13 +212,14 @@ def line( def area( - data_frame, + data_frame=None, x=None, y=None, line_group=None, color=None, hover_name=None, hover_data=None, + custom_data=None, text=None, facet_row=None, facet_col=None, @@ -254,7 +257,7 @@ def area( def bar( - data_frame, + data_frame=None, x=None, y=None, color=None, @@ -262,6 +265,7 @@ def bar( facet_col=None, hover_name=None, hover_data=None, + custom_data=None, text=None, error_x=None, error_x_minus=None, @@ -303,7 +307,7 @@ def bar( def histogram( - data_frame, + data_frame=None, x=None, y=None, color=None, @@ -360,7 +364,7 @@ def histogram( def violin( - data_frame, + data_frame=None, x=None, y=None, color=None, @@ -368,6 +372,7 @@ def violin( facet_col=None, hover_name=None, hover_data=None, + custom_data=None, animation_frame=None, animation_group=None, category_orders={}, @@ -410,7 +415,7 @@ def violin( def box( - data_frame, + data_frame=None, x=None, y=None, color=None, @@ -418,6 +423,7 @@ def box( facet_col=None, hover_name=None, hover_data=None, + custom_data=None, animation_frame=None, animation_group=None, category_orders={}, @@ -455,7 +461,7 @@ def box( def strip( - data_frame, + data_frame=None, x=None, y=None, color=None, @@ -463,6 +469,7 @@ def strip( facet_col=None, hover_name=None, hover_data=None, + custom_data=None, animation_frame=None, animation_group=None, category_orders={}, @@ -504,7 +511,7 @@ def strip( def scatter_3d( - data_frame, + data_frame=None, x=None, y=None, z=None, @@ -514,6 +521,7 @@ def scatter_3d( text=None, hover_name=None, hover_data=None, + custom_data=None, error_x=None, error_x_minus=None, error_y=None, @@ -554,7 +562,7 @@ def scatter_3d( def line_3d( - data_frame, + data_frame=None, x=None, y=None, z=None, @@ -564,6 +572,7 @@ def line_3d( line_group=None, hover_name=None, hover_data=None, + custom_data=None, error_x=None, error_x_minus=None, error_y=None, @@ -599,7 +608,7 @@ def line_3d( def scatter_ternary( - data_frame, + data_frame=None, a=None, b=None, c=None, @@ -609,6 +618,7 @@ def scatter_ternary( text=None, hover_name=None, hover_data=None, + custom_data=None, animation_frame=None, animation_group=None, category_orders={}, @@ -637,7 +647,7 @@ def scatter_ternary( def line_ternary( - data_frame, + data_frame=None, a=None, b=None, c=None, @@ -646,6 +656,7 @@ def line_ternary( line_group=None, hover_name=None, hover_data=None, + custom_data=None, text=None, animation_frame=None, animation_group=None, @@ -671,7 +682,7 @@ def line_ternary( def scatter_polar( - data_frame, + data_frame=None, r=None, theta=None, color=None, @@ -679,6 +690,7 @@ def scatter_polar( size=None, hover_name=None, hover_data=None, + custom_data=None, text=None, animation_frame=None, animation_group=None, @@ -714,13 +726,14 @@ def scatter_polar( def line_polar( - data_frame, + data_frame=None, r=None, theta=None, color=None, line_dash=None, hover_name=None, hover_data=None, + custom_data=None, line_group=None, text=None, animation_frame=None, @@ -753,19 +766,20 @@ def line_polar( def bar_polar( - data_frame, + data_frame=None, r=None, theta=None, color=None, hover_name=None, hover_data=None, + custom_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, - barnorm="", + barnorm=None, barmode="relative", direction="clockwise", start_angle=90, @@ -790,7 +804,7 @@ def bar_polar( def choropleth( - data_frame, + data_frame=None, lat=None, lon=None, locations=None, @@ -798,6 +812,7 @@ def choropleth( color=None, hover_name=None, hover_data=None, + custom_data=None, size=None, animation_frame=None, animation_group=None, @@ -829,7 +844,7 @@ def choropleth( def scatter_geo( - data_frame, + data_frame=None, lat=None, lon=None, locations=None, @@ -838,6 +853,7 @@ def scatter_geo( text=None, hover_name=None, hover_data=None, + custom_data=None, size=None, animation_frame=None, animation_group=None, @@ -872,7 +888,7 @@ def scatter_geo( def line_geo( - data_frame, + data_frame=None, lat=None, lon=None, locations=None, @@ -882,6 +898,7 @@ def line_geo( text=None, hover_name=None, hover_data=None, + custom_data=None, line_group=None, animation_frame=None, animation_group=None, @@ -913,13 +930,14 @@ def line_geo( def scatter_mapbox( - data_frame, + data_frame=None, lat=None, lon=None, color=None, text=None, hover_name=None, hover_data=None, + custom_data=None, size=None, animation_frame=None, animation_group=None, @@ -948,13 +966,14 @@ def scatter_mapbox( def line_mapbox( - data_frame, + data_frame=None, lat=None, lon=None, color=None, text=None, hover_name=None, hover_data=None, + custom_data=None, line_group=None, animation_frame=None, animation_group=None, @@ -978,13 +997,14 @@ def line_mapbox( def scatter_matrix( - data_frame, + data_frame=None, dimensions=None, color=None, symbol=None, size=None, hover_name=None, hover_data=None, + custom_data=None, category_orders={}, labels={}, color_discrete_sequence=None, @@ -1015,7 +1035,7 @@ def scatter_matrix( def parallel_coordinates( - data_frame, + data_frame=None, dimensions=None, color=None, labels={}, @@ -1039,7 +1059,7 @@ def parallel_coordinates( def parallel_categories( - data_frame, + data_frame=None, dimensions=None, color=None, labels={}, diff --git a/packages/python/plotly/plotly/express/_core.py b/packages/python/plotly/plotly/express/_core.py index 69b3c9ac382..e5846be0668 100644 --- a/packages/python/plotly/plotly/express/_core.py +++ b/packages/python/plotly/plotly/express/_core.py @@ -5,7 +5,8 @@ from _plotly_utils.basevalidators import ColorscaleValidator from .colors import qualitative, sequential import math -import pandas +import pandas as pd +import numpy as np from plotly.subplots import ( make_subplots, @@ -137,12 +138,35 @@ def make_mapping(args, variable): def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref): - + """Populates a dict with arguments to update trace + + Parameters + ---------- + args : dict + args to be used for the trace + trace_spec : NamedTuple + which kind of trace to be used (has constructor, marginal etc. + attributes) + g : pandas DataFrame + data + mapping_labels : dict + to be used for hovertemplate + sizeref : float + marker sizeref + + Returns + ------- + result : dict + dict to be used to update trace + fit_results : dict + fit information to be used for trendlines + """ if "line_close" in args and args["line_close"]: g = g.append(g.iloc[0]) result = trace_spec.trace_patch.copy() or {} fit_results = None hover_header = "" + custom_data_len = 0 for k in trace_spec.attrs: v = args[k] v_label = get_decorated_label(args, v, k) @@ -194,7 +218,6 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref): elif k == "trendline": if v in ["ols", "lowess"] and args["x"] and args["y"] and len(g) > 1: import statsmodels.api as sm - import numpy as np # sorting is bad but trace_specs with "trendline" have no other attrs g2 = g.sort_values(by=args["x"]) @@ -231,6 +254,9 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref): if error_xy not in result: result[error_xy] = {} result[error_xy][arr] = g[v] + elif k == "custom_data": + result["customdata"] = g[v].values + custom_data_len = len(v) # number of custom data columns elif k == "hover_name": if trace_spec.constructor not in [ go.Histogram, @@ -246,10 +272,20 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref): go.Histogram2d, go.Histogram2dContour, ]: - result["customdata"] = g[v].values - for i, col in enumerate(v): + for col in v: + try: + position = args["custom_data"].index(col) + except (ValueError, AttributeError, KeyError): + position = custom_data_len + custom_data_len += 1 + if "customdata" in result: + result["customdata"] = np.hstack( + (result["customdata"], g[col].values[:, None]) + ) + else: + result["customdata"] = g[col].values[:, None] v_label_col = get_decorated_label(args, col, None) - mapping_labels[v_label_col] = "%%{customdata[%d]}" % i + mapping_labels[v_label_col] = "%%{customdata[%d]}" % (position) elif k == "color": if trace_spec.constructor == go.Choropleth: result["z"] = g[v] @@ -718,38 +754,227 @@ def apply_default_cascade(args): args["marginal_x"] = None +def _check_name_not_reserved(field_name, reserved_names): + if field_name not in reserved_names: + return field_name + else: + raise NameError( + "A name conflict was encountered for argument %s. " + "A column with name %s is already used." % (field_name, field_name) + ) + + +def _get_reserved_col_names(args, attrables, array_attrables): + """ + This function builds a list of columns of the data_frame argument used + as arguments, either as str/int arguments or given as columns + (pandas series type). + """ + df = args["data_frame"] + reserved_names = set() + for field in args: + if field not in attrables: + continue + names = args[field] if field in array_attrables else [args[field]] + if names is None: + continue + for arg in names: + if arg is None: + continue + elif isinstance(arg, str): # no need to add ints since kw arg are not ints + reserved_names.add(arg) + elif isinstance(arg, pd.Series): + arg_name = arg.name + if arg_name and hasattr(df, arg_name): + in_df = arg is df[arg_name] + if in_df: + reserved_names.add(arg_name) + + return reserved_names + + +def build_dataframe(args, attrables, array_attrables): + """ + Constructs a dataframe and modifies `args` in-place. + + The argument values in `args` can be either strings corresponding to + existing columns of a dataframe, or data arrays (lists, numpy arrays, + pandas columns, series). + + Parameters + ---------- + args : OrderedDict + arguments passed to the px function and subsequently modified + attrables : list + list of keys into `args`, all of whose corresponding values are + converted into columns of a dataframe. + array_attrables : list + argument names corresponding to iterables, such as `hover_data`, ... + """ + for field in args: + if field in array_attrables and args[field] is not None: + args[field] = ( + dict(args[field]) + if isinstance(args[field], dict) + else list(args[field]) + ) + # Cast data_frame argument to DataFrame (it could be a numpy array, dict etc.) + df_provided = args["data_frame"] is not None + if df_provided and not isinstance(args["data_frame"], pd.DataFrame): + args["data_frame"] = pd.DataFrame(args["data_frame"]) + df_input = args["data_frame"] + + # We start from an empty DataFrame + df_output = pd.DataFrame() + + # Initialize set of column names + # These are reserved names + if df_provided: + reserved_names = _get_reserved_col_names(args, attrables, array_attrables) + else: + reserved_names = set() + + # Case of functions with a "dimensions" kw: scatter_matrix, parcats, parcoords + if "dimensions" in args and args["dimensions"] is None: + if not df_provided: + raise ValueError( + "No data were provided. Please provide data either with the `data_frame` or with the `dimensions` argument." + ) + else: + df_output[df_input.columns] = df_input[df_input.columns] + + # Loop over possible arguments + for field_name in attrables: + # Massaging variables + argument_list = ( + [args.get(field_name)] + if field_name not in array_attrables + else args.get(field_name) + ) + # argument not specified, continue + if argument_list is None or argument_list is [None]: + continue + # Argument name: field_name if the argument is not a list + # Else we give names like ["hover_data_0, hover_data_1"] etc. + field_list = ( + [field_name] + if field_name not in array_attrables + else [field_name + "_" + str(i) for i in range(len(argument_list))] + ) + # argument_list and field_list ready, iterate over them + # Core of the loop starts here + for i, (argument, field) in enumerate(zip(argument_list, field_list)): + length = len(df_output) + if argument is None: + continue + # Case of multiindex + if isinstance(argument, pd.MultiIndex): + raise TypeError( + "Argument '%s' is a pandas MultiIndex. " + "pandas MultiIndex is not supported by plotly express " + "at the moment." % field + ) + ## ----------------- argument is a col name ---------------------- + if isinstance(argument, str) or isinstance( + argument, int + ): # just a column name given as str or int + if not df_provided: + raise ValueError( + "String or int arguments are only possible when a " + "DataFrame or an array is provided in the `data_frame` " + "argument. No DataFrame was provided, but argument " + "'%s' is of type str or int." % field + ) + # Check validity of column name + if argument not in df_input.columns: + err_msg = ( + "Value of '%s' is not the name of a column in 'data_frame'. " + "Expected one of %s but received: %s" + % (field, str(list(df_input.columns)), argument) + ) + if argument == "index": + err_msg += ( + "\n To use the index, pass it in directly as `df.index`." + ) + raise ValueError(err_msg) + if length and len(df_input[argument]) != length: + raise ValueError( + "All arguments should have the same length. " + "The length of column argument `df[%s]` is %d, whereas the " + "length of previous arguments %s is %d" + % ( + field, + len(df_input[argument]), + str(list(df_output.columns)), + length, + ) + ) + col_name = str(argument) + df_output[col_name] = df_input[argument] + # ----------------- argument is a column / array / list.... ------- + else: + is_index = isinstance(argument, pd.RangeIndex) + # First pandas + # pandas series have a name but it's None + if ( + hasattr(argument, "name") and argument.name is not None + ) or is_index: + col_name = argument.name # pandas df + if col_name is None and is_index: + col_name = "index" + if not df_provided: + col_name = field + else: + if is_index: + keep_name = df_provided and argument is df_input.index + else: + keep_name = ( + col_name in df_input and argument is df_input[col_name] + ) + col_name = ( + col_name + if keep_name + else _check_name_not_reserved(field, reserved_names) + ) + else: # numpy array, list... + col_name = _check_name_not_reserved(field, reserved_names) + if length and len(argument) != length: + raise ValueError( + "All arguments should have the same length. " + "The length of argument `%s` is %d, whereas the " + "length of previous arguments %s is %d" + % (field, len(argument), str(list(df_output.columns)), length) + ) + df_output[str(col_name)] = argument + + # Finally, update argument with column name now that column exists + if field_name not in array_attrables: + args[field_name] = str(col_name) + else: + args[field_name][i] = str(col_name) + + args["data_frame"] = df_output + return args + + def infer_config(args, constructor, trace_patch): # Declare all supported attributes, across all plot types attrables = ( - ["x", "y", "z", "a", "b", "c", "r", "theta", "size"] - + ["dimensions", "hover_name", "hover_data", "text", "error_x", "error_x_minus"] + ["x", "y", "z", "a", "b", "c", "r", "theta", "size", "dimensions"] + + ["custom_data", "hover_name", "hover_data", "text"] + + ["error_x", "error_x_minus"] + ["error_y", "error_y_minus", "error_z", "error_z_minus"] + ["lat", "lon", "locations", "animation_group"] ) - array_attrables = ["dimensions", "hover_data"] + array_attrables = ["dimensions", "custom_data", "hover_data"] group_attrables = ["animation_frame", "facet_row", "facet_col", "line_group"] + all_attrables = attrables + group_attrables + ["color"] + group_attrs = ["symbol", "line_dash"] + for group_attr in group_attrs: + if group_attr in args: + all_attrables += [group_attr] - # Validate that the strings provided as attribute values reference columns - # in the provided data_frame - df_columns = args["data_frame"].columns - - for attr in attrables + group_attrables + ["color"]: - if attr in args and args[attr] is not None: - maybe_col_list = [args[attr]] if attr not in array_attrables else args[attr] - for maybe_col in maybe_col_list: - try: - in_cols = maybe_col in df_columns - except TypeError: - in_cols = False - if not in_cols: - value_str = ( - "Element of value" if attr in array_attrables else "Value" - ) - raise ValueError( - "%s of '%s' is not the name of a column in 'data_frame'. " - "Expected one of %s but received: %s" - % (value_str, attr, str(list(df_columns)), str(maybe_col)) - ) + args = build_dataframe(args, all_attrables, array_attrables) attrs = [k for k in attrables if k in args] grouped_attrs = [] @@ -827,7 +1052,7 @@ def infer_config(args, constructor, trace_patch): # Create trace specs trace_specs = make_trace_spec(args, constructor, attrs, trace_patch) - return trace_specs, grouped_mappings, sizeref, show_colorbar + return args, trace_specs, grouped_mappings, sizeref, show_colorbar def get_orderings(args, grouper, grouped): @@ -865,7 +1090,7 @@ def get_orderings(args, grouper, grouped): def make_figure(args, constructor, trace_patch={}, layout_patch={}): apply_default_cascade(args) - trace_specs, grouped_mappings, sizeref, show_colorbar = infer_config( + args, trace_specs, grouped_mappings, sizeref, show_colorbar = infer_config( args, constructor, trace_patch ) grouper = [x.grouper or one_group for x in grouped_mappings] or [one_group] @@ -916,6 +1141,7 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}): if constructor_to_use == go.Scatter else go.Scatterpolargl ) + # Create the trace trace = constructor_to_use(name=trace_name) if trace_spec.constructor not in [ go.Parcats, @@ -1057,7 +1283,7 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}): fig.layout.update(layout_patch) fig.frames = frame_list if len(frames) > 1 else [] - fig._px_trendlines = pandas.DataFrame(trendline_rows) + fig._px_trendlines = pd.DataFrame(trendline_rows) configure_axes(args, constructor, fig, orders) configure_animation_controls(args, constructor, fig) diff --git a/packages/python/plotly/plotly/express/_doc.py b/packages/python/plotly/plotly/express/_doc.py index 8c54f89a026..179378a5986 100644 --- a/packages/python/plotly/plotly/express/_doc.py +++ b/packages/python/plotly/plotly/express/_doc.py @@ -1,7 +1,7 @@ import inspect -colref = "(string: name of column in `data_frame`)" -colref_list = "(list of string: names of columns in `data_frame`)" +colref = "(string or int: name of column in `data_frame`, or pandas Series, or array_like object)" +colref_list = "(list of string or int: names of columns in `data_frame`, or pandas Series, or array_like objects)" # TODO contents of columns # TODO explain categorical @@ -12,53 +12,57 @@ # TODO standardize positioning and casing of 'default' docs = dict( - data_frame=["A 'tidy' `pandas.DataFrame`"], + data_frame=[ + "A `pandas.DataFrame`, or a `NumPy` array or a dictionary", + "which are tranformed internally to `pandas.DataFrame`. This argument needs" + "to be passed for column names (and not keyword names) to be used.", + ], x=[ colref, - "Values from this column are used to position marks along the x axis in cartesian coordinates.", + "Values from this column or array_like are used to position marks along the x axis in cartesian coordinates.", "For horizontal `histogram`s, these values are used as inputs to `histfunc`.", ], y=[ colref, - "Values from this column are used to position marks along the y axis in cartesian coordinates.", + "Values from this column or array_like are used to position marks along the y axis in cartesian coordinates.", "For vertical `histogram`s, these values are used as inputs to `histfunc`.", ], z=[ colref, - "Values from this column are used to position marks along the z axis in cartesian coordinates.", + "Values from this column or array_like are used to position marks along the z axis in cartesian coordinates.", "For `density_heatmap` and `density_contour` these values are used as the inputs to `histfunc`.", ], a=[ colref, - "Values from this column are used to position marks along the a axis in ternary coordinates.", + "Values from this column or array_like are used to position marks along the a axis in ternary coordinates.", ], b=[ colref, - "Values from this column are used to position marks along the b axis in ternary coordinates.", + "Values from this column or array_like are used to position marks along the b axis in ternary coordinates.", ], c=[ colref, - "Values from this column are used to position marks along the c axis in ternary coordinates.", + "Values from this column or array_like are used to position marks along the c axis in ternary coordinates.", ], r=[ colref, - "Values from this column are used to position marks along the radial axis in polar coordinates.", + "Values from this column or array_like are used to position marks along the radial axis in polar coordinates.", ], theta=[ colref, - "Values from this column are used to position marks along the angular axis in polar coordinates.", + "Values from this column or array_like are used to position marks along the angular axis in polar coordinates.", ], lat=[ colref, - "Values from this column are used to position marks according to latitude on a map.", + "Values from this column or array_like are used to position marks according to latitude on a map.", ], lon=[ colref, - "Values from this column are used to position marks according to longitude on a map.", + "Values from this column or array_like are used to position marks according to longitude on a map.", ], locations=[ colref, - "Values from this column are be interpreted according to `locationmode` and mapped to longitude/latitude.", + "Values from this column or array_like are be interpreted according to `locationmode` and mapped to longitude/latitude.", ], dimensions=[ "(list of strings, names of columns in `data_frame`)", @@ -66,71 +70,90 @@ ], error_x=[ colref, - "Values from this column are used to size x-axis error bars.", + "Values from this column or array_like are used to size x-axis error bars.", "If `error_x_minus` is `None`, error bars will be symmetrical, otherwise `error_x` is used for the positive direction only.", ], error_x_minus=[ colref, - "Values from this column are used to size x-axis error bars in the negative direction.", + "Values from this column or array_like are used to size x-axis error bars in the negative direction.", "Ignored if `error_x` is `None`.", ], error_y=[ colref, - "Values from this column are used to size y-axis error bars.", + "Values from this column or array_like are used to size y-axis error bars.", "If `error_y_minus` is `None`, error bars will be symmetrical, otherwise `error_y` is used for the positive direction only.", ], error_y_minus=[ colref, - "Values from this column are used to size y-axis error bars in the negative direction.", + "Values from this column or array_like are used to size y-axis error bars in the negative direction.", "Ignored if `error_y` is `None`.", ], error_z=[ colref, - "Values from this column are used to size z-axis error bars.", + "Values from this column or array_like are used to size z-axis error bars.", "If `error_z_minus` is `None`, error bars will be symmetrical, otherwise `error_z` is used for the positive direction only.", ], error_z_minus=[ colref, - "Values from this column are used to size z-axis error bars in the negative direction.", + "Values from this column or array_like are used to size z-axis error bars in the negative direction.", "Ignored if `error_z` is `None`.", ], - color=[colref, "Values from this column are used to assign color to marks."], + color=[ + colref, + "Values from this column or array_like are used to assign color to marks.", + ], opacity=["(number, between 0 and 1) Sets the opacity for markers."], line_dash=[ colref, - "Values from this column are used to assign dash-patterns to lines.", + "Values from this column or array_like are used to assign dash-patterns to lines.", ], line_group=[ colref, - "Values from this column are used to group rows of `data_frame` into lines.", + "Values from this column or array_like are used to group rows of `data_frame` into lines.", + ], + symbol=[ + colref, + "Values from this column or array_like are used to assign symbols to marks.", + ], + size=[ + colref, + "Values from this column or array_like are used to assign mark sizes.", + ], + hover_name=[ + colref, + "Values from this column or array_like appear in bold in the hover tooltip.", ], - symbol=[colref, "Values from this column are used to assign symbols to marks."], - size=[colref, "Values from this column are used to assign mark sizes."], - hover_name=[colref, "Values from this column appear in bold in the hover tooltip."], hover_data=[ colref_list, "Values from these columns appear as extra data in the hover tooltip.", ], - text=[colref, "Values from this column appear in the figure as text labels."], + custom_data=[ + colref_list, + "Values from these columns are extra data, to be used in widgets or Dash callbacks for example. This data is not user-visible but is included in events emitted by the figure (lasso selection etc.)", + ], + text=[ + colref, + "Values from this column or array_like appear in the figure as text labels.", + ], locationmode=[ "(string, one of 'ISO-3', 'USA-states', 'country names')", "Determines the set of locations used to match entries in `locations` to regions on the map.", ], facet_row=[ colref, - "Values from this column are used to assign marks to facetted subplots in the vertical direction.", + "Values from this column or array_like are used to assign marks to facetted subplots in the vertical direction.", ], facet_col=[ colref, - "Values from this column are used to assign marks to facetted subplots in the horizontal direction.", + "Values from this column or array_like are used to assign marks to facetted subplots in the horizontal direction.", ], animation_frame=[ colref, - "Values from this column are used to assign marks to animation frames.", + "Values from this column or array_like are used to assign marks to animation frames.", ], animation_group=[ colref, - "Values from this column are used to provide object-constancy across animation frames: rows with matching `animation_group`s will be treated as if they describe the same object in each frame.", + "Values from this column or array_like are used to provide object-constancy across animation frames: rows with matching `animation_group`s will be treated as if they describe the same object in each frame.", ], symbol_sequence=[ "(list of strings defining plotly.js symbols)", @@ -279,18 +302,20 @@ ], barnorm=[ "(string, one of `'fraction'` or `'percent'`, default is `None`)", - "If set to `'fraction'`, the value of each bar is divided by the sum of all values at that location coordinate.", + "If `'fraction'`, the value of each bar is divided by the sum of all values at that location coordinate.", "`'percent'` is the same but multiplied by 100 to show percentages.", + "`None` will stack up all values at each location coordinate.", ], groupnorm=[ "(string, one of `'fraction'` or `'percent'`, default is `None`)", - "If set to `'fraction'`, the value of each point is divided by the sum of all values at that location coordinate.", + "If `'fraction'`, the value of each point is divided by the sum of all values at that location coordinate.", "`'percent'` is the same but multiplied by 100 to show percentages.", + "`None` will stack up all values at each location coordinate.", ], barmode=[ "(string, one of `'group'`, `'overlay'` or `'relative'`. Default is `'relative'`)", "In `'relative'` mode, bars are stacked above zero for positive values and below zero for negative values.", - "In `'overlay'` mode, bars are on drawn top of one another.", + "In `'overlay'` mode, bars are drawn on top of one another.", "In `'group'` mode, bars are placed beside each other.", ], boxmode=[ diff --git a/packages/python/plotly/plotly/figure_factory/__init__.py b/packages/python/plotly/plotly/figure_factory/__init__.py index 6ce7217803e..3829ca2fb67 100644 --- a/packages/python/plotly/plotly/figure_factory/__init__.py +++ b/packages/python/plotly/plotly/figure_factory/__init__.py @@ -24,9 +24,41 @@ from plotly.figure_factory._scatterplot import create_scatterplotmatrix from plotly.figure_factory._streamline import create_streamline from plotly.figure_factory._table import create_table -from plotly.figure_factory._ternary_contour import create_ternary_contour from plotly.figure_factory._trisurf import create_trisurf from plotly.figure_factory._violin import create_violin if optional_imports.get_module("pandas") is not None: from plotly.figure_factory._county_choropleth import create_choropleth +else: + + def create_choropleth(*args, **kwargs): + raise ImportError("Please install pandas to use `create_choropleth`") + + +if optional_imports.get_module("skimage") is not None: + from plotly.figure_factory._ternary_contour import create_ternary_contour +else: + + def create_ternary_contour(*args, **kwargs): + raise ImportError("Please install scikit-image to use `create_ternary_contour`") + + +__all__ = [ + "create_2d_density", + "create_annotated_heatmap", + "create_bullet", + "create_candlestick", + "create_choropleth", + "create_dendrogram", + "create_distplot", + "create_facet_grid", + "create_gantt", + "create_ohlc", + "create_quiver", + "create_scatterplotmatrix", + "create_streamline", + "create_table", + "create_ternary_contour", + "create_trisurf", + "create_violin", +] diff --git a/packages/python/plotly/plotly/figure_factory/_gantt.py b/packages/python/plotly/plotly/figure_factory/_gantt.py index ca0a182f766..8af7a435381 100644 --- a/packages/python/plotly/plotly/figure_factory/_gantt.py +++ b/packages/python/plotly/plotly/figure_factory/_gantt.py @@ -811,7 +811,7 @@ def create_gantt( showgrid_x=False, showgrid_y=False, height=600, - width=900, + width=None, tasks=None, task_names=None, data=None, diff --git a/packages/python/plotly/plotly/figure_factory/_ternary_contour.py b/packages/python/plotly/plotly/figure_factory/_ternary_contour.py index f45a9fcc135..52c7099bced 100644 --- a/packages/python/plotly/plotly/figure_factory/_ternary_contour.py +++ b/packages/python/plotly/plotly/figure_factory/_ternary_contour.py @@ -6,9 +6,9 @@ from plotly.graph_objs import graph_objs as go np = optional_imports.get_module("numpy") -sk_measure = optional_imports.get_module("skimage.measure") scipy_interp = optional_imports.get_module("scipy.interpolate") +from skimage import measure # -------------------------- Layout ------------------------------ @@ -305,8 +305,8 @@ def _extract_contours(im, values, colors): all_contours1, all_values1, all_areas1, all_colors1 = [], [], [], [] all_contours2, all_values2, all_areas2, all_colors2 = [], [], [], [] for i, val in enumerate(values): - contour_level1 = sk_measure.find_contours(zz_min, val) - contour_level2 = sk_measure.find_contours(zz_max, val) + contour_level1 = measure.find_contours(zz_min, val) + contour_level2 = measure.find_contours(zz_max, val) all_contours1.extend(contour_level1) all_contours2.extend(contour_level2) all_values1.extend([val] * len(contour_level1)) @@ -614,6 +614,7 @@ def create_ternary_contour( """\ The create_ternary_contour figure factory requires the scipy package""" ) + sk_measure = optional_imports.get_module("skimage") if sk_measure is None: raise ImportError( """\ diff --git a/packages/python/plotly/plotly/graph_objects.py b/packages/python/plotly/plotly/graph_objects.py index 406bd66fd8d..97f385ab20b 100644 --- a/packages/python/plotly/plotly/graph_objects.py +++ b/packages/python/plotly/plotly/graph_objects.py @@ -1,2 +1,126 @@ from __future__ import absolute_import from plotly.graph_objs import * + +__all__ = [ + "AngularAxis", + "Annotation", + "Annotations", + "Area", + "Bar", + "Barpolar", + "Box", + "Candlestick", + "Carpet", + "Choropleth", + "Choroplethmapbox", + "ColorBar", + "Cone", + "Contour", + "Contourcarpet", + "Contours", + "Data", + "Densitymapbox", + "ErrorX", + "ErrorY", + "ErrorZ", + "Figure", + "Font", + "Frame", + "Frames", + "Funnel", + "Funnelarea", + "Heatmap", + "Heatmapgl", + "Histogram", + "Histogram2d", + "Histogram2dContour", + "Histogram2dcontour", + "Indicator", + "Isosurface", + "Layout", + "Legend", + "Line", + "Margin", + "Marker", + "Mesh3d", + "Ohlc", + "Parcats", + "Parcoords", + "Pie", + "Pointcloud", + "RadialAxis", + "Sankey", + "Scatter", + "Scatter3d", + "Scattercarpet", + "Scattergeo", + "Scattergl", + "Scattermapbox", + "Scatterpolar", + "Scatterpolargl", + "Scatterternary", + "Scene", + "Splom", + "Stream", + "Streamtube", + "Sunburst", + "Surface", + "Table", + "Trace", + "Treemap", + "Violin", + "Volume", + "Waterfall", + "XAxis", + "XBins", + "YAxis", + "YBins", + "ZAxis", + "area", + "bar", + "barpolar", + "box", + "candlestick", + "carpet", + "choropleth", + "choroplethmapbox", + "cone", + "contour", + "contourcarpet", + "densitymapbox", + "funnel", + "funnelarea", + "heatmap", + "heatmapgl", + "histogram", + "histogram2d", + "histogram2dcontour", + "indicator", + "isosurface", + "layout", + "mesh3d", + "ohlc", + "parcats", + "parcoords", + "pie", + "pointcloud", + "sankey", + "scatter", + "scatter3d", + "scattercarpet", + "scattergeo", + "scattergl", + "scattermapbox", + "scatterpolar", + "scatterpolargl", + "scatterternary", + "splom", + "streamtube", + "sunburst", + "surface", + "table", + "treemap", + "violin", + "volume", + "waterfall", +] diff --git a/packages/python/plotly/plotly/graph_objs/__init__.py b/packages/python/plotly/plotly/graph_objs/__init__.py index cdb453e3a60..3bf52d18179 100644 --- a/packages/python/plotly/plotly/graph_objs/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/__init__.py @@ -1,1011 +1,561 @@ -from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType +from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy -class Layout(_BaseLayoutType): - - _subplotid_prop_names = [ - "coloraxis", - "geo", - "mapbox", - "polar", - "scene", - "ternary", - "xaxis", - "yaxis", - ] - - import re - - _subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + ")(\d+)$") +class Waterfall(_BaseTraceType): + # alignmentgroup + # -------------- @property - def _subplotid_validators(self): + def alignmentgroup(self): """ - dict of validator classes for each subplot type + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - dict + str """ - from plotly.validators.layout import ( - ColoraxisValidator, - GeoValidator, - MapboxValidator, - PolarValidator, - SceneValidator, - TernaryValidator, - XAxisValidator, - YAxisValidator, - ) - - return { - "coloraxis": ColoraxisValidator, - "geo": GeoValidator, - "mapbox": MapboxValidator, - "polar": PolarValidator, - "scene": SceneValidator, - "ternary": TernaryValidator, - "xaxis": XAxisValidator, - "yaxis": YAxisValidator, - } + return self["alignmentgroup"] - def _subplot_re_match(self, prop): - return self._subplotid_prop_re.match(prop) + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val - # angularaxis - # ----------- + # base + # ---- @property - def angularaxis(self): + def base(self): """ - The 'angularaxis' property is an instance of AngularAxis - that may be specified as: - - An instance of plotly.graph_objs.layout.AngularAxis - - A dict of string/value properties that will be passed - to the AngularAxis constructor + Sets where the bar base is drawn (in position axis units). - Supported dict properties: - - domain - Polar chart subplots are not supported yet. - This key has currently no effect. - endpadding - Legacy polar charts are deprecated! Please - switch to "polar" subplots. - range - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Defines the start - and end point of this angular axis. - showline - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the line bounding this angular axis will - be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the angular axis ticks will feature tick - labels. - tickcolor - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the color of - the tick lines on this angular axis. - ticklen - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this angular axis. - tickorientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (from the paper perspective) of the - angular axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this angular axis. - visible - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not this axis will be visible. + The 'base' property is a number and may be specified as: + - An int or float Returns ------- - plotly.graph_objs.layout.AngularAxis + int|float """ - return self["angularaxis"] + return self["base"] - @angularaxis.setter - def angularaxis(self, val): - self["angularaxis"] = val + @base.setter + def base(self, val): + self["base"] = val - # annotations - # ----------- + # cliponaxis + # ---------- @property - def annotations(self): + def cliponaxis(self): """ - The 'annotations' property is a tuple of instances of - Annotation that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Annotation - - A list or tuple of dicts of string/value properties that - will be passed to the Annotation constructor + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans more two or more lines (i.e. `text` - contains one or more
HTML tags) or if an - explicit width is set to override the text - width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head. If `axref` is `pixel`, a - positive (negative) component corresponds to - an arrow pointing from right to left (left to - right). If `axref` is an axis, this is an - absolute value on that axis, like `x`, NOT a - relative value. - axref - Indicates in what terms the tail of the - annotation (ax,ay) is specified. If `pixel`, - `ax` is a relative offset in pixels from `x`. - If set to an x axis id (e.g. "x" or "x2"), `ax` - is specified in the same terms as that axis. - This is useful for trendline annotations which - should continue to indicate the correct trend - when zoomed. - ay - Sets the y component of the arrow tail about - the arrow head. If `ayref` is `pixel`, a - positive (negative) component corresponds to - an arrow pointing from bottom to top (top to - bottom). If `ayref` is an axis, this is an - absolute value on that axis, like `y`, NOT a - relative value. - ayref - Indicates in what terms the tail of the - annotation (ax,ay) is specified. If `pixel`, - `ay` is a relative offset in pixels from `y`. - If set to a y axis id (e.g. "y" or "y2"), `ay` - is specified in the same terms as that axis. - This is useful for trendline annotations which - should continue to indicate the correct trend - when zoomed. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the - plot. If you click a data point that exactly - matches the `x` and `y` values of this - annotation, and it is hidden (visible: false), - it will appear. In "onoff" mode, you must click - the same point again to make it disappear, so - if you click multiple points, you can show - multiple annotations. In "onout" mode, a click - anywhere else in the plot (on another data - point or not) will hide this annotation. If you - need to show/hide this annotation in response - to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for - example to label the side of a bar. To label - markers though, `standoff` is preferred over - `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - plotly.graph_objects.layout.annotation.Hoverlab - el instance or dict with compatible properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , are also - supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xclick - Toggle this annotation when clicking a data - point whose `x` value is `xclick` rather than - the annotation's `x` value. - xref - Sets the annotation's x coordinate axis. If set - to an x axis id (e.g. "x" or "x2"), the `x` - position refers to an x coordinate If set to - "paper", the `x` position refers to the - distance from the left side of the plotting - area in normalized coordinates where 0 (1) - corresponds to the left (right) side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yclick - Toggle this annotation when clicking a data - point whose `y` value is `yclick` rather than - the annotation's `y` value. - yref - Sets the annotation's y coordinate axis. If set - to an y axis id (e.g. "y" or "y2"), the `y` - position refers to an y coordinate If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. + The 'cliponaxis' property must be specified as a bool + (either True, or False) Returns ------- - tuple[plotly.graph_objs.layout.Annotation] + bool """ - return self["annotations"] + return self["cliponaxis"] - @annotations.setter - def annotations(self, val): - self["annotations"] = val + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val - # annotationdefaults - # ------------------ + # connector + # --------- @property - def annotationdefaults(self): + def connector(self): """ - When used in a template (as - layout.template.layout.annotationdefaults), sets the default - property values to use for elements of layout.annotations - - The 'annotationdefaults' property is an instance of Annotation + The 'connector' property is an instance of Connector that may be specified as: - - An instance of plotly.graph_objs.layout.Annotation + - An instance of plotly.graph_objs.waterfall.Connector - A dict of string/value properties that will be passed - to the Annotation constructor + to the Connector constructor Supported dict properties: + + line + plotly.graph_objects.waterfall.connector.Line + instance or dict with compatible properties + mode + Sets the shape of connector lines. + visible + Determines if connector lines are drawn. Returns ------- - plotly.graph_objs.layout.Annotation + plotly.graph_objs.waterfall.Connector """ - return self["annotationdefaults"] + return self["connector"] - @annotationdefaults.setter - def annotationdefaults(self, val): - self["annotationdefaults"] = val + @connector.setter + def connector(self, val): + self["connector"] = val - # autosize - # -------- + # constraintext + # ------------- @property - def autosize(self): + def constraintext(self): """ - Determines whether or not a layout width or height that has - been left undefined by the user is initialized on each - relayout. Note that, regardless of this attribute, an undefined - layout width or height is always initialized on the first call - to plot. + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. - The 'autosize' property must be specified as a bool - (either True, or False) + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] Returns ------- - bool + Any """ - return self["autosize"] + return self["constraintext"] - @autosize.setter - def autosize(self, val): - self["autosize"] = val + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val - # bargap - # ------ + # customdata + # ---------- @property - def bargap(self): + def customdata(self): """ - Sets the gap (in plot fraction) between bars of adjacent - location coordinates. + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'bargap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["bargap"] + return self["customdata"] - @bargap.setter - def bargap(self, val): - self["bargap"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # bargroupgap - # ----------- + # customdatasrc + # ------------- @property - def bargroupgap(self): + def customdatasrc(self): """ - Sets the gap (in plot fraction) between bars of the same - location coordinate. + Sets the source reference on plot.ly for customdata . - The 'bargroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["bargroupgap"] + return self["customdatasrc"] - @bargroupgap.setter - def bargroupgap(self, val): - self["bargroupgap"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # barmode - # ------- + # decreasing + # ---------- @property - def barmode(self): + def decreasing(self): """ - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are stacked on - top of one another With "relative", the bars are stacked on top - of one another, with negative values below the axis, positive - values above With "group", the bars are plotted next to one - another centered around the shared location. With "overlay", - the bars are plotted over one another, you might need to an - "opacity" to see multiple bars. + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of plotly.graph_objs.waterfall.Decreasing + - A dict of string/value properties that will be passed + to the Decreasing constructor - The 'barmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['stack', 'group', 'overlay', 'relative'] + Supported dict properties: + + marker + plotly.graph_objects.waterfall.decreasing.Marke + r instance or dict with compatible properties Returns ------- - Any + plotly.graph_objs.waterfall.Decreasing """ - return self["barmode"] + return self["decreasing"] - @barmode.setter - def barmode(self, val): - self["barmode"] = val + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val - # barnorm - # ------- + # dx + # -- @property - def barnorm(self): + def dx(self): """ - Sets the normalization for bar traces on the graph. With - "fraction", the value of each bar is divided by the sum of all - values at that location coordinate. "percent" is the same but - multiplied by 100 to show percentages. + Sets the x coordinate step. See `x0` for more info. - The 'barnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'fraction', 'percent'] + The 'dx' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["barnorm"] + return self["dx"] - @barnorm.setter - def barnorm(self, val): - self["barnorm"] = val + @dx.setter + def dx(self, val): + self["dx"] = val - # boxgap - # ------ + # dy + # -- @property - def boxgap(self): + def dy(self): """ - Sets the gap (in plot fraction) between boxes of adjacent - location coordinates. Has no effect on traces that have "width" - set. + Sets the y coordinate step. See `y0` for more info. - The 'boxgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'dy' property is a number and may be specified as: + - An int or float Returns ------- int|float """ - return self["boxgap"] + return self["dy"] - @boxgap.setter - def boxgap(self, val): - self["boxgap"] = val + @dy.setter + def dy(self, val): + self["dy"] = val - # boxgroupgap - # ----------- + # hoverinfo + # --------- @property - def boxgroupgap(self): + def hoverinfo(self): """ - Sets the gap (in plot fraction) between boxes of the same - location coordinate. Has no effect on traces that have "width" - set. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'boxgroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['name', 'x', 'y', 'text', 'initial', 'delta', 'final'] joined with '+' characters + (e.g. 'name+x') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - int|float + Any|numpy.ndarray """ - return self["boxgroupgap"] + return self["hoverinfo"] - @boxgroupgap.setter - def boxgroupgap(self, val): - self["boxgroupgap"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # boxmode - # ------- + # hoverinfosrc + # ------------ @property - def boxmode(self): + def hoverinfosrc(self): """ - Determines how boxes at the same location coordinate are - displayed on the graph. If "group", the boxes are plotted next - to one another centered around the shared location. If - "overlay", the boxes are plotted over one another, you might - need to set "opacity" to see them multiple boxes. Has no effect - on traces that have "width" set. + Sets the source reference on plot.ly for hoverinfo . - The 'boxmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['group', 'overlay'] + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["boxmode"] + return self["hoverinfosrc"] - @boxmode.setter - def boxmode(self, val): - self["boxmode"] = val + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val - # calendar - # -------- + # hoverlabel + # ---------- @property - def calendar(self): + def hoverlabel(self): """ - Sets the default calendar system to use for interpreting and - displaying dates throughout the plot. + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.waterfall.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor - The 'calendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - Any + plotly.graph_objs.waterfall.Hoverlabel """ - return self["calendar"] + return self["hoverlabel"] - @calendar.setter - def calendar(self, val): - self["calendar"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # clickmode - # --------- + # hovertemplate + # ------------- @property - def clickmode(self): + def hovertemplate(self): """ - Determines the mode of single click interactions. "event" is - the default value and emits the `plotly_click` event. In - addition this mode emits the `plotly_selected` event in drag - modes "lasso" and "select", but with no event data attached - (kept for compatibility reasons). The "select" flag enables - selecting single data points via click. This mode also supports - persistent selections, meaning that pressing Shift while - clicking, adds to / subtracts from an existing selection. - "select" with `hovermode`: "x" can be confusing, consider - explicitly setting `hovermode`: "closest" when using this - feature. Selection events are sent accordingly as long as - "event" flag is set as well. When the "event" flag is missing, - `plotly_click` and `plotly_selected` events are not fired. + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `initial`, `delta` and `final`. Anything contained in + tag `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. - The 'clickmode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['event', 'select'] joined with '+' characters - (e.g. 'event+select') - OR exactly one of ['none'] (e.g. 'none') + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + str|numpy.ndarray """ - return self["clickmode"] + return self["hovertemplate"] - @clickmode.setter - def clickmode(self, val): - self["clickmode"] = val + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val - # coloraxis - # --------- + # hovertemplatesrc + # ---------------- @property - def coloraxis(self): + def hovertemplatesrc(self): """ - The 'coloraxis' property is an instance of Coloraxis - that may be specified as: - - An instance of plotly.graph_objs.layout.Coloraxis - - A dict of string/value properties that will be passed - to the Coloraxis constructor + Sets the source reference on plot.ly for hovertemplate . - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - corresponding trace color array(s)) or the - bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the - user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmin` must be - set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as corresponding trace color array(s). Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmax` must be - set as well. - colorbar - plotly.graph_objects.layout.coloraxis.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Grey - s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, - Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth - ,Electric,Viridis,Cividis. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.layout.Coloraxis + str """ - return self["coloraxis"] + return self["hovertemplatesrc"] - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val - # colorscale - # ---------- + # hovertext + # --------- @property - def colorscale(self): + def hovertext(self): """ - The 'colorscale' property is an instance of Colorscale - that may be specified as: - - An instance of plotly.graph_objs.layout.Colorscale - - A dict of string/value properties that will be passed - to the Colorscale constructor + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. - Supported dict properties: - - diverging - Sets the default diverging colorscale. Note - that `autocolorscale` must be true for this - attribute to work. - sequential - Sets the default sequential colorscale for - positive values. Note that `autocolorscale` - must be true for this attribute to work. - sequentialminus - Sets the default sequential colorscale for - negative values. Note that `autocolorscale` - must be true for this attribute to work. + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - plotly.graph_objs.layout.Colorscale + str|numpy.ndarray """ - return self["colorscale"] + return self["hovertext"] - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val - # colorway - # -------- + # hovertextsrc + # ------------ @property - def colorway(self): + def hovertextsrc(self): """ - Sets the default trace colors. + Sets the source reference on plot.ly for hovertext . - The 'colorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - list + str """ - return self["colorway"] + return self["hovertextsrc"] - @colorway.setter - def colorway(self, val): - self["colorway"] = val + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val - # datarevision - # ------------ + # ids + # --- @property - def datarevision(self): + def ids(self): """ - If provided, a changed value tells `Plotly.react` that one or - more data arrays has changed. This way you can modify arrays - in-place rather than making a complete new copy for an - incremental change. If NOT provided, `Plotly.react` assumes - that data arrays are being treated as immutable, thus any data - array with a different identity from its predecessor contains - new data. + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. - The 'datarevision' property accepts values of any type + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["datarevision"] + return self["ids"] - @datarevision.setter - def datarevision(self, val): - self["datarevision"] = val + @ids.setter + def ids(self, val): + self["ids"] = val - # direction - # --------- + # idssrc + # ------ @property - def direction(self): + def idssrc(self): """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Sets the direction corresponding to positive angles - in legacy polar charts. + Sets the source reference on plot.ly for ids . - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['clockwise', 'counterclockwise'] + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["direction"] + return self["idssrc"] - @direction.setter - def direction(self, val): - self["direction"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # dragmode - # -------- + # increasing + # ---------- @property - def dragmode(self): + def increasing(self): """ - Determines the mode of drag interactions. "select" and "lasso" - apply only to scatter traces with markers or text. "orbit" and - "turntable" apply only to 3D scenes. + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of plotly.graph_objs.waterfall.Increasing + - A dict of string/value properties that will be passed + to the Increasing constructor - The 'dragmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable', - False] + Supported dict properties: + + marker + plotly.graph_objects.waterfall.increasing.Marke + r instance or dict with compatible properties Returns ------- - Any + plotly.graph_objs.waterfall.Increasing """ - return self["dragmode"] - - @dragmode.setter - def dragmode(self, val): - self["dragmode"] = val + return self["increasing"] - # editrevision - # ------------ - @property - def editrevision(self): - """ - Controls persistence of user-driven changes in `editable: true` - configuration, other than trace names and axis titles. Defaults - to `layout.uirevision`. - - The 'editrevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["editrevision"] - - @editrevision.setter - def editrevision(self, val): - self["editrevision"] = val - - # extendfunnelareacolors - # ---------------------- - @property - def extendfunnelareacolors(self): - """ - If `true`, the funnelarea slice colors (whether given by - `funnelareacolorway` or inherited from `colorway`) will be - extended to three times its original length by first repeating - every color 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing the same color - when you have many slices, but you can set `false` to disable. - Colors provided in the trace, using `marker.colors`, are never - extended. - - The 'extendfunnelareacolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["extendfunnelareacolors"] - - @extendfunnelareacolors.setter - def extendfunnelareacolors(self, val): - self["extendfunnelareacolors"] = val - - # extendpiecolors - # --------------- - @property - def extendpiecolors(self): - """ - If `true`, the pie slice colors (whether given by `piecolorway` - or inherited from `colorway`) will be extended to three times - its original length by first repeating every color 20% lighter - then each color 20% darker. This is intended to reduce the - likelihood of reusing the same color when you have many slices, - but you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - - The 'extendpiecolors' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["extendpiecolors"] - - @extendpiecolors.setter - def extendpiecolors(self, val): - self["extendpiecolors"] = val + @increasing.setter + def increasing(self, val): + self["increasing"] = val - # extendsunburstcolors - # -------------------- + # insidetextanchor + # ---------------- @property - def extendsunburstcolors(self): + def insidetextanchor(self): """ - If `true`, the sunburst slice colors (whether given by - `sunburstcolorway` or inherited from `colorway`) will be - extended to three times its original length by first repeating - every color 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing the same color - when you have many slices, but you can set `false` to disable. - Colors provided in the trace, using `marker.colors`, are never - extended. + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. - The 'extendsunburstcolors' property must be specified as a bool - (either True, or False) + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] Returns ------- - bool + Any """ - return self["extendsunburstcolors"] + return self["insidetextanchor"] - @extendsunburstcolors.setter - def extendsunburstcolors(self, val): - self["extendsunburstcolors"] = val + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val - # font - # ---- + # insidetextfont + # -------------- @property - def font(self): + def insidetextfont(self): """ - Sets the global font. Note that fonts used in traces and other - layout components inherit from the global font. + Sets the font used for `text` lying inside the bar. - The 'font' property is an instance of Font + The 'insidetextfont' property is an instance of Insidetextfont that may be specified as: - - An instance of plotly.graph_objs.layout.Font + - An instance of plotly.graph_objs.waterfall.Insidetextfont - A dict of string/value properties that will be passed - to the Font constructor + to the Insidetextfont constructor Supported dict properties: color + colorsrc + Sets the source reference on plot.ly for color + . family HTML font family - the typeface that will be applied by the web browser. The web browser @@ -1022,2466 +572,2051 @@ def font(self): Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - plotly.graph_objs.layout.Font + plotly.graph_objs.waterfall.Insidetextfont """ - return self["font"] + return self["insidetextfont"] - @font.setter - def font(self, val): - self["font"] = val + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val - # funnelareacolorway - # ------------------ + # legendgroup + # ----------- @property - def funnelareacolorway(self): + def legendgroup(self): """ - Sets the default funnelarea slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendfunnelareacolors`. + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - The 'funnelareacolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - list + str """ - return self["funnelareacolorway"] + return self["legendgroup"] - @funnelareacolorway.setter - def funnelareacolorway(self, val): - self["funnelareacolorway"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # funnelgap - # --------- + # measure + # ------- @property - def funnelgap(self): + def measure(self): """ - Sets the gap (in plot fraction) between bars of adjacent - location coordinates. + An array containing types of values. By default the values are + considered as 'relative'. However; it is possible to use + 'total' to compute the sums. Also 'absolute' could be applied + to reset the computed total or to declare an initial value + where needed. - The 'funnelgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'measure' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["funnelgap"] + return self["measure"] - @funnelgap.setter - def funnelgap(self, val): - self["funnelgap"] = val + @measure.setter + def measure(self, val): + self["measure"] = val - # funnelgroupgap - # -------------- + # measuresrc + # ---------- @property - def funnelgroupgap(self): + def measuresrc(self): """ - Sets the gap (in plot fraction) between bars of the same - location coordinate. + Sets the source reference on plot.ly for measure . - The 'funnelgroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'measuresrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["funnelgroupgap"] + return self["measuresrc"] - @funnelgroupgap.setter - def funnelgroupgap(self, val): - self["funnelgroupgap"] = val + @measuresrc.setter + def measuresrc(self, val): + self["measuresrc"] = val - # funnelmode - # ---------- + # meta + # ---- @property - def funnelmode(self): + def meta(self): """ - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are stacked on - top of one another With "group", the bars are plotted next to - one another centered around the shared location. With - "overlay", the bars are plotted over one another, you might - need to an "opacity" to see multiple bars. + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'funnelmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['stack', 'group', 'overlay'] + The 'meta' property accepts values of any type Returns ------- - Any + Any|numpy.ndarray """ - return self["funnelmode"] + return self["meta"] - @funnelmode.setter - def funnelmode(self, val): - self["funnelmode"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # geo - # --- + # metasrc + # ------- @property - def geo(self): + def metasrc(self): """ - The 'geo' property is an instance of Geo - that may be specified as: - - An instance of plotly.graph_objs.layout.Geo - - A dict of string/value properties that will be passed - to the Geo constructor + Sets the source reference on plot.ly for meta . - Supported dict properties: - - bgcolor - Set the background color of the map - center - plotly.graph_objects.layout.geo.Center instance - or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country - boundaries. - domain - plotly.graph_objects.layout.geo.Domain instance - or dict with compatible properties - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - plotly.graph_objects.layout.geo.Lataxis - instance or dict with compatible properties - lonaxis - plotly.graph_objects.layout.geo.Lonaxis - instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - plotly.graph_objects.layout.geo.Projection - instance or dict with compatible properties - resolution - Sets the resolution of the base layers. The - values have units of km/mm e.g. 110 corresponds - to a scale ratio of 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are - drawn. - showframe - Sets whether or not a frame is drawn around the - map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in - color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits - within countries (e.g. states, provinces) are - drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in - the view (projection and center). Defaults to - `layout.uirevision`. + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.layout.Geo + str """ - return self["geo"] + return self["metasrc"] - @geo.setter - def geo(self, val): - self["geo"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # grid + # name # ---- @property - def grid(self): + def name(self): """ - The 'grid' property is an instance of Grid - that may be specified as: - - An instance of plotly.graph_objs.layout.Grid - - A dict of string/value properties that will be passed - to the Grid constructor + Sets the trace name. The trace name appear as the legend item + and on hover. - Supported dict properties: - - columns - The number of columns in the grid. If you - provide a 2D `subplots` array, the length of - its longest row is used as the default. If you - give an `xaxes` array, its length is used as - the default. But it's also possible to have a - different length, if you want to leave a row at - the end for non-cartesian subplots. - domain - plotly.graph_objects.layout.grid.Domain - instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given - but we do have `rows` and `columns`, we can - generate defaults using consecutive axis IDs, - in two ways: "coupled" gives one x axis per - column and one y axis per row. "independent" - uses a new xy pair for each cell, left-to-right - across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note - that columns are always enumerated from left to - right. - rows - The number of rows in the grid. If you provide - a 2D `subplots` array or a `yaxes` array, its - length is used as the default. But it's also - possible to have a different length, if you - want to leave a row at the end for non- - cartesian subplots. - subplots - Used for freeform grids, where some axes may be - shared across subplots but others are not. Each - entry should be a cartesian subplot id, like - "xy" or "x3y2", or "" to leave that cell empty. - You may reuse x axes within the same column, - and y axes within the same row. Non-cartesian - subplots and traces that support `domain` can - place themselves in this grid separately using - the `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an x axis id like "x", "x2", etc., or - "" to not put an x axis in that column. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `yaxes` - is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed - as a fraction of the total width available to - one cell. Defaults to 0.1 for coupled-axes - grids and 0.2 for independent grids. - xside - Sets where the x axis labels and titles go. - "bottom" means the very bottom of the grid. - "bottom plot" is the lowest plot that each x - axis is used in. "top" and "top plot" are - similar. - yaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an y axis id like "y", "y2", etc., or - "" to not put a y axis in that row. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `xaxes` - is present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as - a fraction of the total height available to one - cell. Defaults to 0.1 for coupled-axes grids - and 0.3 for independent grids. - yside - Sets where the y axis labels and titles go. - "left" means the very left edge of the grid. - *left plot* is the leftmost plot that each y - axis is used in. "right" and *right plot* are - similar. + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.layout.Grid + str """ - return self["grid"] + return self["name"] - @grid.setter - def grid(self, val): - self["grid"] = val + @name.setter + def name(self, val): + self["name"] = val - # height + # offset # ------ @property - def height(self): + def offset(self): """ - Sets the plot's height (in px). + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. - The 'height' property is a number and may be specified as: - - An int or float in the interval [10, inf] + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - int|float + int|float|numpy.ndarray """ - return self["height"] + return self["offset"] - @height.setter - def height(self, val): - self["height"] = val + @offset.setter + def offset(self, val): + self["offset"] = val - # hiddenlabels - # ------------ + # offsetgroup + # ----------- @property - def hiddenlabels(self): + def offsetgroup(self): """ - hiddenlabels is the funnelarea & pie chart analog of - visible:'legendonly' but it can contain many labels, and can - simultaneously hide slices from several pies/funnelarea charts + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. - The 'hiddenlabels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - numpy.ndarray + str """ - return self["hiddenlabels"] - - @hiddenlabels.setter - def hiddenlabels(self, val): - self["hiddenlabels"] = val + return self["offsetgroup"] - # hiddenlabelssrc - # --------------- + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # offsetsrc + # --------- @property - def hiddenlabelssrc(self): + def offsetsrc(self): """ - Sets the source reference on plot.ly for hiddenlabels . + Sets the source reference on plot.ly for offset . - The 'hiddenlabelssrc' property must be specified as a string or + The 'offsetsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["hiddenlabelssrc"] + return self["offsetsrc"] - @hiddenlabelssrc.setter - def hiddenlabelssrc(self, val): - self["hiddenlabelssrc"] = val + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val - # hidesources - # ----------- + # opacity + # ------- @property - def hidesources(self): + def opacity(self): """ - Determines whether or not a text link citing the data source is - placed at the bottom-right cored of the figure. Has only an - effect only on graphs that have been generated via forked - graphs from the plotly service (at https://plot.ly or on- - premise). + Sets the opacity of the trace. - The 'hidesources' property must be specified as a bool - (either True, or False) + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - bool + int|float """ - return self["hidesources"] + return self["opacity"] - @hidesources.setter - def hidesources(self, val): - self["hidesources"] = val + @opacity.setter + def opacity(self, val): + self["opacity"] = val - # hoverdistance - # ------------- + # orientation + # ----------- @property - def hoverdistance(self): + def orientation(self): """ - Sets the default distance (in pixels) to look for data to add - hover labels (-1 means no cutoff, 0 means no looking for data). - This is only a real distance for hovering on point-like - objects, like scatter points. For area-like objects (bars, - scatter fills, etc) hovering is on inside the area and off - outside, but these objects will not supersede hover on point- - like objects in case of conflict. + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). - The 'hoverdistance' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] Returns ------- - int + Any """ - return self["hoverdistance"] + return self["orientation"] - @hoverdistance.setter - def hoverdistance(self, val): - self["hoverdistance"] = val + @orientation.setter + def orientation(self, val): + self["orientation"] = val - # hoverlabel - # ---------- + # outsidetextfont + # --------------- @property - def hoverlabel(self): + def outsidetextfont(self): """ - The 'hoverlabel' property is an instance of Hoverlabel + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont that may be specified as: - - An instance of plotly.graph_objs.layout.Hoverlabel + - An instance of plotly.graph_objs.waterfall.Outsidetextfont - A dict of string/value properties that will be passed - to the Hoverlabel constructor + to the Outsidetextfont constructor Supported dict properties: - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - bgcolor - Sets the background color of all hover labels - on graph - bordercolor - Sets the border color of all hover labels on - graph. - font - Sets the default hover label font used by all - traces on the graph. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - plotly.graph_objs.layout.Hoverlabel + plotly.graph_objs.waterfall.Outsidetextfont """ - return self["hoverlabel"] + return self["outsidetextfont"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val - # hovermode - # --------- + # selectedpoints + # -------------- @property - def hovermode(self): + def selectedpoints(self): """ - Determines the mode of hover interactions. If `clickmode` - includes the "select" flag, `hovermode` defaults to "closest". - If `clickmode` lacks the "select" flag, it defaults to "x" or - "y" (depending on the trace's `orientation` value) for plots - based on cartesian coordinates. For anything else the default - value is "closest". + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. - The 'hovermode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['x', 'y', 'closest', False] + The 'selectedpoints' property accepts values of any type Returns ------- Any """ - return self["hovermode"] + return self["selectedpoints"] - @hovermode.setter - def hovermode(self, val): - self["hovermode"] = val + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val - # images - # ------ + # showlegend + # ---------- @property - def images(self): + def showlegend(self): """ - The 'images' property is a tuple of instances of - Image that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Image - - A list or tuple of dicts of string/value properties that - will be passed to the Image constructor + Determines whether or not an item corresponding to this trace + is shown in the legend. - Supported dict properties: - - layer - Specifies whether images are drawn below or - above traces. When `xref` and `yref` are both - set to `paper`, image is drawn below the entire - plot area. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The - image will be sized based on the `position` - value. When `xref` is set to `paper`, units are - sized relative to the plot width. - sizey - Sets the image container size vertically. The - image will be sized based on the `position` - value. When `yref` is set to `paper`, units are - sized relative to the plot height. - sizing - Specifies which dimension of the image to - constrain. - source - Specifies the URL of the image to be used. The - URL must be accessible from the domain where - the plot code is run, and can be either - relative or absolute. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this image is - visible. - x - Sets the image's x position. When `xref` is set - to `paper`, units are sized relative to the - plot height. See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to - a x axis id (e.g. "x" or "x2"), the `x` - position refers to an x data coordinate If set - to "paper", the `x` position refers to the - distance from the left of plot in normalized - coordinates where 0 (1) corresponds to the left - (right). - y - Sets the image's y position. When `yref` is set - to `paper`, units are sized relative to the - plot height. See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to - a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y data coordinate. If set - to "paper", the `y` position refers to the - distance from the bottom of the plot in - normalized coordinates where 0 (1) corresponds - to the bottom (top). + The 'showlegend' property must be specified as a bool + (either True, or False) Returns ------- - tuple[plotly.graph_objs.layout.Image] + bool """ - return self["images"] + return self["showlegend"] - @images.setter - def images(self, val): - self["images"] = val + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val - # imagedefaults - # ------------- + # stream + # ------ @property - def imagedefaults(self): + def stream(self): """ - When used in a template (as - layout.template.layout.imagedefaults), sets the default - property values to use for elements of layout.images - - The 'imagedefaults' property is an instance of Image + The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.layout.Image + - An instance of plotly.graph_objs.waterfall.Stream - A dict of string/value properties that will be passed - to the Image constructor + to the Stream constructor Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - plotly.graph_objs.layout.Image + plotly.graph_objs.waterfall.Stream """ - return self["imagedefaults"] + return self["stream"] - @imagedefaults.setter - def imagedefaults(self, val): - self["imagedefaults"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # legend - # ------ + # text + # ---- @property - def legend(self): + def text(self): """ - The 'legend' property is an instance of Legend - that may be specified as: - - An instance of plotly.graph_objs.layout.Legend - - A dict of string/value properties that will be passed - to the Legend constructor + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. - Supported dict properties: - - bgcolor - Sets the legend background color. - bordercolor - Sets the color of the border enclosing the - legend. - borderwidth - Sets the width (in px) of the border enclosing - the legend. - font - Sets the font used to text the legend items. - itemclick - Determines the behavior on legend item click. - "toggle" toggles the visibility of the item - clicked on the graph. "toggleothers" makes the - clicked item the sole visible item on the - graph. False disable legend item click - interactions. - itemdoubleclick - Determines the behavior on legend item double- - click. "toggle" toggles the visibility of the - item clicked on the graph. "toggleothers" makes - the clicked item the sole visible item on the - graph. False disable legend item double-click - interactions. - itemsizing - Determines if the legend items symbols scale - with their corresponding "trace" attributes or - remain "constant" independent of the symbol - size on the graph. - orientation - Sets the orientation of the legend. - tracegroupgap - Sets the amount of vertical space (in px) - between legend groups. - traceorder - Determines the order at which the legend items - are displayed. If "normal", the items are - displayed top-to-bottom in the same order as - the input data. If "reversed", the items are - displayed in the opposite order as "normal". If - "grouped", the items are displayed in groups - (when a trace `legendgroup` is provided). if - "grouped+reversed", the items are displayed in - the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes - in trace and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with - respect to their associated text. - x - Sets the x position (in normalized coordinates) - of the legend. - xanchor - Sets the legend's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the legend. - y - Sets the y position (in normalized coordinates) - of the legend. - yanchor - Sets the legend's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the legend. + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - plotly.graph_objs.layout.Legend + str|numpy.ndarray """ - return self["legend"] + return self["text"] - @legend.setter - def legend(self, val): - self["legend"] = val + @text.setter + def text(self, val): + self["text"] = val - # mapbox - # ------ + # textangle + # --------- @property - def mapbox(self): + def textangle(self): """ - The 'mapbox' property is an instance of Mapbox - that may be specified as: - - An instance of plotly.graph_objs.layout.Mapbox - - A dict of string/value properties that will be passed - to the Mapbox constructor + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. - Supported dict properties: - - accesstoken - Sets the mapbox access token to be used for - this mapbox map. Alternatively, the mapbox - access token can be set in the configuration - options under `mapboxAccessToken`. Note that - accessToken are only required when `style` (e.g - with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a - layout layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (mapbox.bearing). - center - plotly.graph_objects.layout.mapbox.Center - instance or dict with compatible properties - domain - plotly.graph_objects.layout.mapbox.Domain - instance or dict with compatible properties - layers - A tuple of - plotly.graph_objects.layout.mapbox.Layer - instances or dicts with compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), - sets the default property values to use for - elements of layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (mapbox.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.mapbox.layers`. These layers can be - defined either explicitly as a Mapbox Style - object which can contain multiple layer - definitions that load data from any public or - private Tile Map Service (TMS or XYZ) or Web - Map Service (WMS) or implicitly by using one of - the built-in style objects which use WMSes - which do not require any access tokens, or by - using a default Mapbox style or custom Mapbox - style URL, both of which require a Mapbox - access token Note that Mapbox access token can - be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox - Style objects are of the form described in the - Mapbox GL JS documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec - The built-in plotly.js styles objects are: - open-street-map, white-bg, carto-positron, - carto-darkmatter, stamen-terrain, stamen-toner, - stamen-watercolor The built-in Mapbox styles - are: basic, streets, outdoors, light, dark, - satellite, satellite-streets Mapbox style URLs - are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). Returns ------- - plotly.graph_objs.layout.Mapbox + int|float """ - return self["mapbox"] + return self["textangle"] - @mapbox.setter - def mapbox(self, val): - self["mapbox"] = val + @textangle.setter + def textangle(self, val): + self["textangle"] = val - # margin - # ------ + # textfont + # -------- @property - def margin(self): + def textfont(self): """ - The 'margin' property is an instance of Margin + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.layout.Margin + - An instance of plotly.graph_objs.waterfall.Textfont - A dict of string/value properties that will be passed - to the Margin constructor + to the Textfont constructor Supported dict properties: - autoexpand + color - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the - plotting area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - plotly.graph_objs.layout.Margin + plotly.graph_objs.waterfall.Textfont """ - return self["margin"] + return self["textfont"] - @margin.setter - def margin(self, val): - self["margin"] = val + @textfont.setter + def textfont(self, val): + self["textfont"] = val - # meta - # ---- + # textinfo + # -------- @property - def meta(self): + def textinfo(self): """ - Assigns extra meta information that can be used in various - `text` attributes. Attributes such as the graph, axis and - colorbar `title.text`, annotation `text` `trace.name` in legend - items, `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. One can access `meta` fields using - template strings: `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an object for - example `{key: value}` which can be accessed %{meta[key]}. + Determines which trace information appear on the graph. In the + case of having multiple waterfalls, totals are computed + separately (per trace). - The 'meta' property accepts values of any type + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'initial', 'delta', 'final'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray """ - return self["meta"] + return self["textposition"] - @meta.setter - def meta(self, val): - self["meta"] = val + @textposition.setter + def textposition(self, val): + self["textposition"] = val - # metasrc - # ------- + # textpositionsrc + # --------------- @property - def metasrc(self): + def textpositionsrc(self): """ - Sets the source reference on plot.ly for meta . + Sets the source reference on plot.ly for textposition . - The 'metasrc' property must be specified as a string or + The 'textpositionsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["metasrc"] + return self["textpositionsrc"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val - # modebar + # textsrc # ------- @property - def modebar(self): + def textsrc(self): """ - The 'modebar' property is an instance of Modebar - that may be specified as: - - An instance of plotly.graph_objs.layout.Modebar - - A dict of string/value properties that will be passed - to the Modebar constructor + Sets the source reference on plot.ly for text . - Supported dict properties: - - activecolor - Sets the color of the active or hovered on - icons in the modebar. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - uirevision - Controls persistence of user-driven changes - related to the modebar, including `hovermode`, - `dragmode`, and `showspikes` at both the root - level and inside subplots. Defaults to - `layout.uirevision`. + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.layout.Modebar + str """ - return self["modebar"] + return self["textsrc"] - @modebar.setter - def modebar(self, val): - self["modebar"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # orientation - # ----------- + # texttemplate + # ------------ @property - def orientation(self): + def texttemplate(self): """ - Legacy polar charts are deprecated! Please switch to "polar" - subplots. Rotates the entire polar by the given angle in legacy - polar charts. - - The 'orientation' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `initial`, `delta`, `final` and `label`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - int|float + str|numpy.ndarray """ - return self["orientation"] + return self["texttemplate"] - @orientation.setter - def orientation(self, val): - self["orientation"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # paper_bgcolor - # ------------- + # texttemplatesrc + # --------------- @property - def paper_bgcolor(self): + def texttemplatesrc(self): """ - Sets the color of paper where the graph is drawn. + Sets the source reference on plot.ly for texttemplate . - The 'paper_bgcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["paper_bgcolor"] + return self["texttemplatesrc"] - @paper_bgcolor.setter - def paper_bgcolor(self, val): - self["paper_bgcolor"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # piecolorway - # ----------- + # totals + # ------ @property - def piecolorway(self): + def totals(self): """ - Sets the default pie slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendpiecolors`. + The 'totals' property is an instance of Totals + that may be specified as: + - An instance of plotly.graph_objs.waterfall.Totals + - A dict of string/value properties that will be passed + to the Totals constructor - The 'piecolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings + Supported dict properties: + + marker + plotly.graph_objects.waterfall.totals.Marker + instance or dict with compatible properties Returns ------- - list + plotly.graph_objs.waterfall.Totals """ - return self["piecolorway"] + return self["totals"] - @piecolorway.setter - def piecolorway(self, val): - self["piecolorway"] = val + @totals.setter + def totals(self, val): + self["totals"] = val - # plot_bgcolor - # ------------ + # uid + # --- @property - def plot_bgcolor(self): + def uid(self): """ - Sets the color of plotting area in-between x and y axes. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'plot_bgcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["plot_bgcolor"] + return self["uid"] - @plot_bgcolor.setter - def plot_bgcolor(self, val): - self["plot_bgcolor"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # polar - # ----- + # uirevision + # ---------- @property - def polar(self): + def uirevision(self): """ - The 'polar' property is an instance of Polar - that may be specified as: - - An instance of plotly.graph_objs.layout.Polar - - A dict of string/value properties that will be passed - to the Polar constructor + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - Supported dict properties: - - angularaxis - plotly.graph_objects.layout.polar.AngularAxis - instance or dict with compatible properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they - represent fractions of the minimum difference - in bar positions in the data. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "overlay", the bars are plotted - over one another, you might need to an - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - plotly.graph_objects.layout.polar.Domain - instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and - angular axis line are drawn as "circular" - sectors or as "linear" (polygon) sectors. Has - an effect only when the angular axis has `type` - "category". Note that `radialaxis.angle` is - snapped to the angle of the closest vertex when - `gridshape` is "circular" (so that radial axis - scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of - the polar subplot. - radialaxis - plotly.graph_objects.layout.polar.RadialAxis - instance or dict with compatible properties - sector - Sets angular span of this polar subplot with - two angles (in degrees). Sector are assumed to - be spanned in the counterclockwise direction - with 0 corresponding to rightmost limit of the - polar subplot. - uirevision - Controls persistence of user-driven changes in - axis attributes, if not overridden in the - individual axes. Defaults to - `layout.uirevision`. + The 'uirevision' property accepts values of any type Returns ------- - plotly.graph_objs.layout.Polar + Any """ - return self["polar"] + return self["uirevision"] - @polar.setter - def polar(self, val): - self["polar"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # radialaxis - # ---------- + # visible + # ------- @property - def radialaxis(self): + def visible(self): """ - The 'radialaxis' property is an instance of RadialAxis - that may be specified as: - - An instance of plotly.graph_objs.layout.RadialAxis - - A dict of string/value properties that will be passed - to the RadialAxis constructor + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - Supported dict properties: - - domain - Polar chart subplots are not supported yet. - This key has currently no effect. - endpadding - Legacy polar charts are deprecated! Please - switch to "polar" subplots. - orientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (an angle with respect to the - origin) of the radial axis. - range - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Defines the start - and end point of this radial axis. - showline - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the line bounding this radial axis will - be shown on the figure. - showticklabels - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not the radial axis ticks will feature tick - labels. - tickcolor - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the color of - the tick lines on this radial axis. - ticklen - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this radial axis. - tickorientation - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the - orientation (from the paper perspective) of the - radial axis tick labels. - ticksuffix - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Sets the length of - the tick lines on this radial axis. - visible - Legacy polar charts are deprecated! Please - switch to "polar" subplots. Determines whether - or not this axis will be visible. + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - plotly.graph_objs.layout.RadialAxis + Any """ - return self["radialaxis"] + return self["visible"] - @radialaxis.setter - def radialaxis(self, val): - self["radialaxis"] = val + @visible.setter + def visible(self, val): + self["visible"] = val - # scene + # width # ----- @property - def scene(self): + def width(self): """ - The 'scene' property is an instance of Scene - that may be specified as: - - An instance of plotly.graph_objs.layout.Scene - - A dict of string/value properties that will be passed - to the Scene constructor - - Supported dict properties: - - annotations - A tuple of - plotly.graph_objects.layout.scene.Annotation - instances or dicts with compatible properties - annotationdefaults - When used in a template (as layout.template.lay - out.scene.annotationdefaults), sets the default - property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a - cube, regardless of the axes' ranges. If - "data", this scene's axes are drawn in - proportion with the axes' ranges. If "manual", - this scene's axes are drawn in proportion with - the input of "aspectratio" (the default - behavior if "aspectratio" is provided). If - "auto", this scene's axes are drawn using the - results of "data" except when one axis is more - than four times the size of the two others, - where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor + Sets the bar width (in position axis units). - camera - plotly.graph_objects.layout.scene.Camera - instance or dict with compatible properties - domain - plotly.graph_objects.layout.scene.Domain - instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for - this scene. - hovermode - Determines the mode of hover interactions for - this scene. - uirevision - Controls persistence of user-driven changes in - camera attributes. Defaults to - `layout.uirevision`. - xaxis - plotly.graph_objects.layout.scene.XAxis - instance or dict with compatible properties - yaxis - plotly.graph_objects.layout.scene.YAxis - instance or dict with compatible properties - zaxis - plotly.graph_objects.layout.scene.ZAxis - instance or dict with compatible properties + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - plotly.graph_objs.layout.Scene + int|float|numpy.ndarray """ - return self["scene"] + return self["width"] - @scene.setter - def scene(self, val): - self["scene"] = val + @width.setter + def width(self, val): + self["width"] = val - # selectdirection - # --------------- + # widthsrc + # -------- @property - def selectdirection(self): + def widthsrc(self): """ - When "dragmode" is set to "select", this limits the selection - of the drag to horizontal, vertical or diagonal. "h" only - allows horizontal selection, "v" only vertical, "d" only - diagonal and "any" sets no limit. + Sets the source reference on plot.ly for width . - The 'selectdirection' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['h', 'v', 'd', 'any'] + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["selectdirection"] + return self["widthsrc"] - @selectdirection.setter - def selectdirection(self, val): - self["selectdirection"] = val + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val - # selectionrevision - # ----------------- + # x + # - @property - def selectionrevision(self): + def x(self): """ - Controls persistence of user-driven changes in selected points - from all traces. + Sets the x coordinates. - The 'selectionrevision' property accepts values of any type + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["selectionrevision"] + return self["x"] - @selectionrevision.setter - def selectionrevision(self, val): - self["selectionrevision"] = val + @x.setter + def x(self, val): + self["x"] = val - # separators - # ---------- + # x0 + # -- @property - def separators(self): + def x0(self): """ - Sets the decimal and thousand separators. For example, *. * - puts a '.' before decimals and a space between thousands. In - English locales, dflt is ".," but other locales may alter this - default. + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. - The 'separators' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'x0' property accepts values of any type Returns ------- - str + Any """ - return self["separators"] + return self["x0"] - @separators.setter - def separators(self, val): - self["separators"] = val + @x0.setter + def x0(self, val): + self["x0"] = val - # shapes - # ------ + # xaxis + # ----- @property - def shapes(self): + def xaxis(self): """ - The 'shapes' property is a tuple of instances of - Shape that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Shape - - A list or tuple of dicts of string/value properties that - will be passed to the Shape constructor + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - Supported dict properties: - - fillcolor - Sets the color filling the shape's interior. - layer - Specifies whether shapes are drawn below or - above traces. - line - plotly.graph_objects.layout.shape.Line instance - or dict with compatible properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the - pixel values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and - taken unmodified as pixels relative to - `xanchor` and `yanchor` in case of "pixel" size - mode. There are a few restrictions / quirks - only absolute instructions, not relative. So - the allowed segments are: M, L, H, V, Q, C, T, - S, and Z arcs (A) are not allowed because - radius rx and ry are relative. In the future we - could consider supporting relative commands, - but we would have to decide on how to handle - date and log axes. Note that even as is, Q and - C Bezier paths that are smooth on linear axes - may not be smooth on log, and vice versa. no - chained "polybezier" commands - specify the - segment type for each one. On category axes, - values are numbers scaled to the serial numbers - of categories because using the categories - themselves there would be no way to describe - fractional positions On data axes: because - space and T are both normal components of path - strings, we can't use either to separate date - from time parts. Therefore we'll use underscore - for this purpose: 2015-02-21_13:45:56.789 - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If - "line", a line is drawn from (`x0`,`y0`) to - (`x1`,`y1`) with respect to the axes' sizing - mode. If "circle", a circle is drawn from - ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 - -`y0`)|) with respect to the axes' sizing mode. - If "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), - (`x0`,`y1`), (`x0`,`y0`) with respect to the - axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' - sizing mode. - visible - Determines whether or not this shape is - visible. - x0 - Sets the shape's starting x position. See - `type` and `xsizemode` for more info. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - xanchor - Only relevant in conjunction with `xsizemode` - set to "pixel". Specifies the anchor point on - the x axis to which `x0`, `x1` and x - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `xsizemode` - not set to "pixel". - xref - Sets the shape's x coordinate axis. If set to - an x axis id (e.g. "x" or "x2"), the `x` - position refers to an x coordinate. If set to - "paper", the `x` position refers to the - distance from the left side of the plotting - area in normalized coordinates where 0 (1) - corresponds to the left (right) side. If the - axis `type` is "log", then you must take the - log of your desired range. If the axis `type` - is "date", then you must convert the date to - unix time in milliseconds. - xsizemode - Sets the shapes's sizing mode along the x axis. - If set to "scaled", `x0`, `x1` and x - coordinates within `path` refer to data values - on the x axis or a fraction of the plot area's - width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in - terms of data or plot fraction but `x0`, `x1` - and x coordinates within `path` are pixels - relative to `xanchor`. This way, the shape can - have a fixed width while maintaining a position - relative to data or plot fraction. - y0 - Sets the shape's starting y position. See - `type` and `ysizemode` for more info. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - yanchor - Only relevant in conjunction with `ysizemode` - set to "pixel". Specifies the anchor point on - the y axis to which `y0`, `y1` and y - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `ysizemode` - not set to "pixel". - yref - Sets the annotation's y coordinate axis. If set - to an y axis id (e.g. "y" or "y2"), the `y` - position refers to an y coordinate If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). - ysizemode - Sets the shapes's sizing mode along the y axis. - If set to "scaled", `y0`, `y1` and y - coordinates within `path` refer to data values - on the y axis or a fraction of the plot area's - height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in - terms of data or plot fraction but `y0`, `y1` - and y coordinates within `path` are pixels - relative to `yanchor`. This way, the shape can - have a fixed height while maintaining a - position relative to data or plot fraction. + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - tuple[plotly.graph_objs.layout.Shape] + str """ - return self["shapes"] + return self["xaxis"] - @shapes.setter - def shapes(self, val): - self["shapes"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # shapedefaults - # ------------- + # xsrc + # ---- @property - def shapedefaults(self): + def xsrc(self): """ - When used in a template (as - layout.template.layout.shapedefaults), sets the default - property values to use for elements of layout.shapes - - The 'shapedefaults' property is an instance of Shape - that may be specified as: - - An instance of plotly.graph_objs.layout.Shape - - A dict of string/value properties that will be passed - to the Shape constructor + Sets the source reference on plot.ly for x . - Supported dict properties: + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.layout.Shape + str """ - return self["shapedefaults"] + return self["xsrc"] - @shapedefaults.setter - def shapedefaults(self, val): - self["shapedefaults"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # showlegend - # ---------- + # y + # - @property - def showlegend(self): + def y(self): """ - Determines whether or not a legend is drawn. Default is `true` - if there is a trace to show and any of these: a) Two or more - traces would by default be shown in the legend. b) One pie - trace is shown in the legend. c) One trace is explicitly given - with `showlegend: true`. + Sets the y coordinates. - The 'showlegend' property must be specified as a bool - (either True, or False) + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - bool + numpy.ndarray """ - return self["showlegend"] + return self["y"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @y.setter + def y(self, val): + self["y"] = val - # sliders - # ------- + # y0 + # -- @property - def sliders(self): + def y0(self): """ - The 'sliders' property is a tuple of instances of - Slider that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Slider - - A list or tuple of dicts of string/value properties that - will be passed to the Slider constructor + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. - Supported dict properties: - - active - Determines which button (by index starting from - 0) is considered active. - activebgcolor - Sets the background color of the slider grip - while dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the - slider. - borderwidth - Sets the width (in px) of the border enclosing - the slider. - currentvalue - plotly.graph_objects.layout.slider.Currentvalue - instance or dict with compatible properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure - excludes the padding of both ends. That is, the - slider's length is this length minus the - padding on both ends. - lenmode - Determines whether this slider length is set in - units of plot "fraction" or in *pixels. Use - `len` to set the value. - minorticklen - Sets the length in pixels of minor step tick - marks - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Set the padding of the slider component along - each side. - steps - A tuple of - plotly.graph_objects.layout.slider.Step - instances or dicts with compatible properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), - sets the default property values to use for - elements of layout.slider.steps - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the - slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - plotly.graph_objects.layout.slider.Transition - instance or dict with compatible properties - visible - Determines whether or not the slider is - visible. - x - Sets the x position (in normalized coordinates) - of the slider. - xanchor - Sets the slider's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the slider. - yanchor - Sets the slider's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the range selector. + The 'y0' property accepts values of any type Returns ------- - tuple[plotly.graph_objs.layout.Slider] + Any """ - return self["sliders"] + return self["y0"] - @sliders.setter - def sliders(self, val): - self["sliders"] = val + @y0.setter + def y0(self, val): + self["y0"] = val - # sliderdefaults - # -------------- + # yaxis + # ----- @property - def sliderdefaults(self): + def yaxis(self): """ - When used in a template (as - layout.template.layout.sliderdefaults), sets the default - property values to use for elements of layout.sliders - - The 'sliderdefaults' property is an instance of Slider - that may be specified as: - - An instance of plotly.graph_objs.layout.Slider - - A dict of string/value properties that will be passed - to the Slider constructor + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. - Supported dict properties: + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- - plotly.graph_objs.layout.Slider + str """ - return self["sliderdefaults"] + return self["yaxis"] - @sliderdefaults.setter - def sliderdefaults(self, val): - self["sliderdefaults"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # spikedistance - # ------------- + # ysrc + # ---- @property - def spikedistance(self): + def ysrc(self): """ - Sets the default distance (in pixels) to look for data to draw - spikelines to (-1 means no cutoff, 0 means no looking for - data). As with hoverdistance, distance does not apply to area- - like objects. In addition, some objects can be hovered on but - will not generate spikelines, such as scatter fills. + Sets the source reference on plot.ly for y . - The 'spikedistance' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int + str """ - return self["spikedistance"] + return self["ysrc"] - @spikedistance.setter - def spikedistance(self, val): - self["spikedistance"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # sunburstcolorway - # ---------------- + # type + # ---- @property - def sunburstcolorway(self): - """ - Sets the default sunburst slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new list - here it can still be extended with lighter and darker colors, - see `extendsunburstcolors`. - - The 'sunburstcolorway' property is a colorlist that may be specified - as a tuple, list, one-dimensional numpy array, or pandas Series of valid - color strings - - Returns - ------- - list - """ - return self["sunburstcolorway"] - - @sunburstcolorway.setter - def sunburstcolorway(self, val): - self["sunburstcolorway"] = val + def type(self): + return self._props["type"] - # template - # -------- + # property parent name + # -------------------- @property - def template(self): - """ - Default attributes to be applied to the plot. This should be a - dict with format: `{'layout': layoutTemplate, 'data': - {trace_type: [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the structure of - `figure.layout` and `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` (e.g. 'scatter'). - Alternatively, this may be specified as an instance of - plotly.graph_objs.layout.Template. Trace templates are applied - cyclically to traces of each type. Container arrays (eg - `annotations`) have special handling: An object ending in - `defaults` (eg `annotationdefaults`) is applied to each array - item. But if an item has a `templateitemname` key we look in - the template array for an item with matching `name` and apply - that instead. If no matching `name` is found we mark the item - invisible. Any named template item not referenced is appended - to the end of the array, so this can be used to add a watermark - annotation or a logo image, for example. To omit one of these - items on the plot, make an item with matching - `templateitemname` and `visible: false`. - - The 'template' property is an instance of Template - that may be specified as: - - An instance of plotly.graph_objs.layout.Template - - A dict of string/value properties that will be passed - to the Template constructor - - Supported dict properties: - - data - plotly.graph_objects.layout.template.Data - instance or dict with compatible properties - layout - plotly.graph_objects.Layout instance or dict - with compatible properties - - - The name of a registered template where current registered templates - are stored in the plotly.io.templates configuration object. The names - of all registered templates can be retrieved with: - >>> import plotly.io as pio - >>> list(pio.templates) - - A string containing multiple registered template names, joined on '+' - characters (e.g. 'template1+template2'). In this case the resulting - template is computed by merging together the collection of registered - templates - - Returns - ------- - plotly.graph_objs.layout.Template - """ - return self["template"] - - @template.setter - def template(self, val): - self["template"] = val + def _parent_path_str(self): + return "" - # ternary - # ------- + # Self properties description + # --------------------------- @property - def ternary(self): + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + plotly.graph_objects.waterfall.Connector instance or + dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + decreasing + plotly.graph_objects.waterfall.Decreasing instance or + dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.waterfall.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `initial`, `delta` and `final`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + increasing + plotly.graph_objects.waterfall.Increasing instance or + dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on plot.ly for measure . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on plot.ly for offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + plotly.graph_objects.waterfall.Stream instance or dict + with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on plot.ly for textposition + . + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `initial`, + `delta`, `final` and `label`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + totals + plotly.graph_objects.waterfall.Totals instance or dict + with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on plot.ly for width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . """ - The 'ternary' property is an instance of Ternary - that may be specified as: - - An instance of plotly.graph_objs.layout.Ternary - - A dict of string/value properties that will be passed - to the Ternary constructor - - Supported dict properties: - - aaxis - plotly.graph_objects.layout.ternary.Aaxis - instance or dict with compatible properties - baxis - plotly.graph_objects.layout.ternary.Baxis - instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - plotly.graph_objects.layout.ternary.Caxis - instance or dict with compatible properties - domain - plotly.graph_objects.layout.ternary.Domain - instance or dict with compatible properties - sum - The number each triplet should sum to, and the - maximum range of each axis - uirevision - Controls persistence of user-driven changes in - axis `min` and `title`, if not overridden in - the individual axes. Defaults to - `layout.uirevision`. - Returns - ------- - plotly.graph_objs.layout.Ternary + def __init__( + self, + arg=None, + alignmentgroup=None, + base=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + decreasing=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + insidetextanchor=None, + insidetextfont=None, + legendgroup=None, + measure=None, + measuresrc=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + totals=None, + uid=None, + uirevision=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + **kwargs + ): """ - return self["ternary"] - - @ternary.setter - def ternary(self, val): - self["ternary"] = val + Construct a new Waterfall object + + Draws waterfall trace which is useful graph to displays the + contribution of various elements (either positive or negative) + in a bar chart. The data visualized by the span of the bars is + set in `y` if `orientation` is set th "v" (the default) and the + labels are set in `x`. By setting `orientation` to "h", the + roles are interchanged. - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of plotly.graph_objs.layout.Title - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets the title font. Note that the title's font - used to be customized by the now deprecated - `titlefont` attribute. - pad - Sets the padding of the title. Each padding - value only applies when the corresponding - `xanchor`/`yanchor` value is set accordingly. - E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined - automatically. Padding is muted if the - respective anchor value is "middle*/*center". - text - Sets the plot's title. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 - (right). - xanchor - Sets the title's horizontal alignment with - respect to its x position. "left" means that - the title starts at x, "right" means that the - title ends at x and "center" means that the - title's center is at x. "auto" divides `xref` - by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 - (top). "auto" places the baseline of the title - onto the vertical center of the top margin. - yanchor - Sets the title's vertical alignment with - respect to its y position. "top" means that the - title's cap line is at y, "bottom" means that - the title's baseline is at y and "middle" means - that the title's midline is at y. "auto" - divides `yref` by three and calculates the - `yanchor` value automatically based on the - value of `y`. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - - Returns - ------- - plotly.graph_objs.layout.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont - # --------- - @property - def titlefont(self): - """ - Deprecated: Please use layout.title.font instead. Sets the - title font. Note that the title's font used to be customized by - the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of plotly.graph_objs.layout.title.Font - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Waterfall + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + plotly.graph_objects.waterfall.Connector instance or + dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + decreasing + plotly.graph_objects.waterfall.Decreasing instance or + dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.waterfall.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `initial`, `delta` and `final`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + increasing + plotly.graph_objects.waterfall.Increasing instance or + dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on plot.ly for measure . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on plot.ly for offset . + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + plotly.graph_objects.waterfall.Stream instance or dict + with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on plot.ly for textposition + . + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `initial`, + `delta`, `final` and `label`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + totals + plotly.graph_objects.waterfall.Totals instance or dict + with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on plot.ly for width . + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . Returns ------- - + Waterfall """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val + super(Waterfall, self).__init__("waterfall") - # transition - # ---------- - @property - def transition(self): - """ - Sets transition options used during Plotly.react updates. - - The 'transition' property is an instance of Transition - that may be specified as: - - An instance of plotly.graph_objs.layout.Transition - - A dict of string/value properties that will be passed - to the Transition constructor - - Supported dict properties: - - duration - The duration of the transition, in - milliseconds. If equal to zero, updates are - synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or - traces smoothly transitions during updates that - make both traces and layout change. + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Waterfall +constructor must be a dict or +an instance of plotly.graph_objs.Waterfall""" + ) - Returns - ------- - plotly.graph_objs.layout.Transition - """ - return self["transition"] + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) - @transition.setter - def transition(self, val): - self["transition"] = val + # Import validators + # ----------------- + from plotly.validators import waterfall as v_waterfall - # uirevision - # ---------- - @property - def uirevision(self): - """ - Used to allow user interactions with the plot to persist after - `Plotly.react` calls that are unaware of these interactions. If - `uirevision` is omitted, or if it is given and it changed from - the previous `Plotly.react` call, the exact new figure is used. - If `uirevision` is truthy and did NOT change, any attribute - that has been affected by user interactions and did not receive - a different value in the new figure will keep the interaction - value. `layout.uirevision` attribute serves as the default for - `uirevision` attributes in various sub-containers. For finer - control you can set these sub-attributes directly. For example, - if your app separately controls the data on the x and y axes - you might set `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y data is changed, - you can update `yaxis.uirevision=*quantity*` and the y axis - range will reset but the x axis range will retain any user- - driven zoom. - - The 'uirevision' property accepts values of any type + # Initialize validators + # --------------------- + self._validators["alignmentgroup"] = v_waterfall.AlignmentgroupValidator() + self._validators["base"] = v_waterfall.BaseValidator() + self._validators["cliponaxis"] = v_waterfall.CliponaxisValidator() + self._validators["connector"] = v_waterfall.ConnectorValidator() + self._validators["constraintext"] = v_waterfall.ConstraintextValidator() + self._validators["customdata"] = v_waterfall.CustomdataValidator() + self._validators["customdatasrc"] = v_waterfall.CustomdatasrcValidator() + self._validators["decreasing"] = v_waterfall.DecreasingValidator() + self._validators["dx"] = v_waterfall.DxValidator() + self._validators["dy"] = v_waterfall.DyValidator() + self._validators["hoverinfo"] = v_waterfall.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_waterfall.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_waterfall.HoverlabelValidator() + self._validators["hovertemplate"] = v_waterfall.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_waterfall.HovertemplatesrcValidator() + self._validators["hovertext"] = v_waterfall.HovertextValidator() + self._validators["hovertextsrc"] = v_waterfall.HovertextsrcValidator() + self._validators["ids"] = v_waterfall.IdsValidator() + self._validators["idssrc"] = v_waterfall.IdssrcValidator() + self._validators["increasing"] = v_waterfall.IncreasingValidator() + self._validators["insidetextanchor"] = v_waterfall.InsidetextanchorValidator() + self._validators["insidetextfont"] = v_waterfall.InsidetextfontValidator() + self._validators["legendgroup"] = v_waterfall.LegendgroupValidator() + self._validators["measure"] = v_waterfall.MeasureValidator() + self._validators["measuresrc"] = v_waterfall.MeasuresrcValidator() + self._validators["meta"] = v_waterfall.MetaValidator() + self._validators["metasrc"] = v_waterfall.MetasrcValidator() + self._validators["name"] = v_waterfall.NameValidator() + self._validators["offset"] = v_waterfall.OffsetValidator() + self._validators["offsetgroup"] = v_waterfall.OffsetgroupValidator() + self._validators["offsetsrc"] = v_waterfall.OffsetsrcValidator() + self._validators["opacity"] = v_waterfall.OpacityValidator() + self._validators["orientation"] = v_waterfall.OrientationValidator() + self._validators["outsidetextfont"] = v_waterfall.OutsidetextfontValidator() + self._validators["selectedpoints"] = v_waterfall.SelectedpointsValidator() + self._validators["showlegend"] = v_waterfall.ShowlegendValidator() + self._validators["stream"] = v_waterfall.StreamValidator() + self._validators["text"] = v_waterfall.TextValidator() + self._validators["textangle"] = v_waterfall.TextangleValidator() + self._validators["textfont"] = v_waterfall.TextfontValidator() + self._validators["textinfo"] = v_waterfall.TextinfoValidator() + self._validators["textposition"] = v_waterfall.TextpositionValidator() + self._validators["textpositionsrc"] = v_waterfall.TextpositionsrcValidator() + self._validators["textsrc"] = v_waterfall.TextsrcValidator() + self._validators["texttemplate"] = v_waterfall.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_waterfall.TexttemplatesrcValidator() + self._validators["totals"] = v_waterfall.TotalsValidator() + self._validators["uid"] = v_waterfall.UidValidator() + self._validators["uirevision"] = v_waterfall.UirevisionValidator() + self._validators["visible"] = v_waterfall.VisibleValidator() + self._validators["width"] = v_waterfall.WidthValidator() + self._validators["widthsrc"] = v_waterfall.WidthsrcValidator() + self._validators["x"] = v_waterfall.XValidator() + self._validators["x0"] = v_waterfall.X0Validator() + self._validators["xaxis"] = v_waterfall.XAxisValidator() + self._validators["xsrc"] = v_waterfall.XsrcValidator() + self._validators["y"] = v_waterfall.YValidator() + self._validators["y0"] = v_waterfall.Y0Validator() + self._validators["yaxis"] = v_waterfall.YAxisValidator() + self._validators["ysrc"] = v_waterfall.YsrcValidator() - Returns - ------- - Any - """ - return self["uirevision"] + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v + _v = arg.pop("base", None) + self["base"] = base if base is not None else _v + _v = arg.pop("cliponaxis", None) + self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v + _v = arg.pop("connector", None) + self["connector"] = connector if connector is not None else _v + _v = arg.pop("constraintext", None) + self["constraintext"] = constraintext if constraintext is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("decreasing", None) + self["decreasing"] = decreasing if decreasing is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("increasing", None) + self["increasing"] = increasing if increasing is not None else _v + _v = arg.pop("insidetextanchor", None) + self["insidetextanchor"] = ( + insidetextanchor if insidetextanchor is not None else _v + ) + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("measure", None) + self["measure"] = measure if measure is not None else _v + _v = arg.pop("measuresrc", None) + self["measuresrc"] = measuresrc if measuresrc is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("offset", None) + self["offset"] = offset if offset is not None else _v + _v = arg.pop("offsetgroup", None) + self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v + _v = arg.pop("offsetsrc", None) + self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v + _v = arg.pop("outsidetextfont", None) + self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textangle", None) + self["textangle"] = textangle if textangle is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textinfo", None) + self["textinfo"] = textinfo if textinfo is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("totals", None) + self["totals"] = totals if totals is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + _v = arg.pop("width", None) + self["width"] = width if width is not None else _v + _v = arg.pop("widthsrc", None) + self["widthsrc"] = widthsrc if widthsrc is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - # updatemenus - # ----------- - @property - def updatemenus(self): - """ - The 'updatemenus' property is a tuple of instances of - Updatemenu that may be specified as: - - A list or tuple of instances of plotly.graph_objs.layout.Updatemenu - - A list or tuple of dicts of string/value properties that - will be passed to the Updatemenu constructor - - Supported dict properties: - - active - Determines which button (by index starting from - 0) is considered active. - bgcolor - Sets the background color of the update menu - buttons. - bordercolor - Sets the color of the border enclosing the - update menu. - borderwidth - Sets the width (in px) of the border enclosing - the update menu. - buttons - A tuple of - plotly.graph_objects.layout.updatemenu.Button - instances or dicts with compatible properties - buttondefaults - When used in a template (as layout.template.lay - out.updatemenu.buttondefaults), sets the - default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons - are laid out, whether in a dropdown menu or a - row/column of buttons. For `left` and `up`, the - buttons will still appear in left-to-right or - top-to-bottom order respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Sets the padding around the buttons or dropdown - menu. - showactive - Highlights active dropdown item or active - button if true. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible - via a dropdown menu or whether the buttons are - stacked horizontally or vertically - visible - Determines whether or not the update menu is - visible. - x - Sets the x position (in normalized coordinates) - of the update menu. - xanchor - Sets the update menu's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the update menu. - yanchor - Sets the update menu's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the range - selector. + self._props["type"] = "waterfall" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="waterfall", val="waterfall" + ) + arg.pop("type", None) - Returns - ------- - tuple[plotly.graph_objs.layout.Updatemenu] - """ - return self["updatemenus"] + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - @updatemenus.setter - def updatemenus(self, val): - self["updatemenus"] = val + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - # updatemenudefaults - # ------------------ - @property - def updatemenudefaults(self): - """ - When used in a template (as - layout.template.layout.updatemenudefaults), sets the default - property values to use for elements of layout.updatemenus - - The 'updatemenudefaults' property is an instance of Updatemenu - that may be specified as: - - An instance of plotly.graph_objs.layout.Updatemenu - - A dict of string/value properties that will be passed - to the Updatemenu constructor - - Supported dict properties: - Returns - ------- - plotly.graph_objs.layout.Updatemenu - """ - return self["updatemenudefaults"] +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - @updatemenudefaults.setter - def updatemenudefaults(self, val): - self["updatemenudefaults"] = val - # violingap - # --------- +class Volume(_BaseTraceType): + + # autocolorscale + # -------------- @property - def violingap(self): + def autocolorscale(self): """ - Sets the gap (in plot fraction) between violins of adjacent - location coordinates. Has no effect on traces that have "width" - set. + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'violingap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - int|float + bool """ - return self["violingap"] + return self["autocolorscale"] - @violingap.setter - def violingap(self, val): - self["violingap"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # violingroupgap - # -------------- + # caps + # ---- @property - def violingroupgap(self): + def caps(self): """ - Sets the gap (in plot fraction) between violins of the same - location coordinate. Has no effect on traces that have "width" - set. + The 'caps' property is an instance of Caps + that may be specified as: + - An instance of plotly.graph_objs.volume.Caps + - A dict of string/value properties that will be passed + to the Caps constructor - The 'violingroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + Supported dict properties: + + x + plotly.graph_objects.volume.caps.X instance or + dict with compatible properties + y + plotly.graph_objects.volume.caps.Y instance or + dict with compatible properties + z + plotly.graph_objects.volume.caps.Z instance or + dict with compatible properties Returns ------- - int|float + plotly.graph_objs.volume.Caps """ - return self["violingroupgap"] + return self["caps"] - @violingroupgap.setter - def violingroupgap(self, val): - self["violingroupgap"] = val + @caps.setter + def caps(self, val): + self["caps"] = val - # violinmode - # ---------- + # cauto + # ----- @property - def violinmode(self): + def cauto(self): """ - Determines how violins at the same location coordinate are - displayed on the graph. If "group", the violins are plotted - next to one another centered around the shared location. If - "overlay", the violins are plotted over one another, you might - need to set "opacity" to see them multiple violins. Has no - effect on traces that have "width" set. + Determines whether or not the color domain is computed with + respect to the input data (here `value`) or the bounds set in + `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. - The 'violinmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['group', 'overlay'] + The 'cauto' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["violinmode"] + return self["cauto"] - @violinmode.setter - def violinmode(self, val): - self["violinmode"] = val + @cauto.setter + def cauto(self, val): + self["cauto"] = val - # waterfallgap - # ------------ + # cmax + # ---- @property - def waterfallgap(self): + def cmax(self): """ - Sets the gap (in plot fraction) between bars of adjacent - location coordinates. + Sets the upper bound of the color domain. Value should have the + same units as `value` and if set, `cmin` must be set as well. - The 'waterfallgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'cmax' property is a number and may be specified as: + - An int or float Returns ------- int|float """ - return self["waterfallgap"] + return self["cmax"] - @waterfallgap.setter - def waterfallgap(self, val): - self["waterfallgap"] = val + @cmax.setter + def cmax(self, val): + self["cmax"] = val - # waterfallgroupgap - # ----------------- + # cmid + # ---- @property - def waterfallgroupgap(self): + def cmid(self): """ - Sets the gap (in plot fraction) between bars of the same - location coordinate. + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `value`. Has no effect when `cauto` is `false`. - The 'waterfallgroupgap' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'cmid' property is a number and may be specified as: + - An int or float Returns ------- int|float """ - return self["waterfallgroupgap"] + return self["cmid"] - @waterfallgroupgap.setter - def waterfallgroupgap(self, val): - self["waterfallgroupgap"] = val + @cmid.setter + def cmid(self, val): + self["cmid"] = val - # waterfallmode - # ------------- + # cmin + # ---- @property - def waterfallmode(self): + def cmin(self): """ - Determines how bars at the same location coordinate are - displayed on the graph. With "group", the bars are plotted next - to one another centered around the shared location. With - "overlay", the bars are plotted over one another, you might - need to an "opacity" to see multiple bars. + Sets the lower bound of the color domain. Value should have the + same units as `value` and if set, `cmax` must be set as well. - The 'waterfallmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['group', 'overlay'] + The 'cmin' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["waterfallmode"] + return self["cmin"] - @waterfallmode.setter - def waterfallmode(self, val): - self["waterfallmode"] = val + @cmin.setter + def cmin(self, val): + self["cmin"] = val - # width - # ----- + # coloraxis + # --------- @property - def width(self): + def coloraxis(self): """ - Sets the plot's width (in px). + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. - The 'width' property is a number and may be specified as: - - An int or float in the interval [10, inf] + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) Returns ------- - int|float + str """ - return self["width"] + return self["coloraxis"] - @width.setter - def width(self, val): - self["width"] = val + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # xaxis - # ----- + # colorbar + # -------- @property - def xaxis(self): + def colorbar(self): """ - The 'xaxis' property is an instance of XAxis + The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.layout.XAxis + - An instance of plotly.graph_objs.volume.ColorBar - A dict of string/value properties that will be passed - to the XAxis constructor + to the ColorBar constructor Supported dict properties: - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on plot.ly for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range" (default), - or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or @@ -3517,157 +2652,34 @@ def xaxis(self): 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - rangeselector - plotly.graph_objects.layout.xaxis.Rangeselector - instance or dict with compatible properties - rangeslider - plotly.graph_objects.layout.xaxis.Rangeslider - instance or dict with compatible properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. separatethousands If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest showticklabels Determines whether or not the tick labels are drawn. @@ -3679,31 +2691,16 @@ def xaxis(self): "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is @@ -3723,7 +2720,7 @@ def xaxis(self): tickcolor Sets the tick color. tickfont - Sets the tick font. + Sets the color bar's tick label font tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very @@ -3739,14 +2736,14 @@ def xaxis(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.layout.xaxis.Ti - ckformatstop instances or dicts with compatible - properties + A tuple of plotly.graph_objects.volume.colorbar + .Tickformatstop instances or dicts with + compatible properties tickformatstopdefaults - When used in a template (as layout.template.lay - out.xaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.xaxis.tickformatstops + When used in a template (as layout.template.dat + a.volume.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of volume.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -3767,13 +2764,6 @@ def xaxis(self): "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. ticksuffix Sets a tick label suffix. ticktext @@ -3794,1392 +2784,3957 @@ def xaxis(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.layout.xaxis.Title + plotly.graph_objects.volume.colorbar.Title instance or dict with compatible properties titlefont - Deprecated: Please use layout.xaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be customized by the - now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. + Deprecated: Please use + volume.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + volume.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - plotly.graph_objs.layout.XAxis + plotly.graph_objs.volume.ColorBar """ - return self["xaxis"] + return self["colorbar"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # yaxis - # ----- + # colorscale + # ---------- @property - def yaxis(self): + def colorscale(self): """ - The 'yaxis' property is an instance of YAxis + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # contour + # ------- + @property + def contour(self): + """ + The 'contour' property is an instance of Contour that may be specified as: - - An instance of plotly.graph_objs.layout.YAxis + - An instance of plotly.graph_objs.volume.Contour - A dict of string/value properties that will be passed - to the YAxis constructor + to the Contour constructor Supported dict properties: - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on plot.ly for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean or median of all the values. color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range" (default), - or by decreasing the "domain". - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.layout.yaxis.Ti - ckformatstop instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.yaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. + + Returns + ------- + plotly.graph_objs.volume.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on plot.ly for customdata . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # flatshading + # ----------- + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on plot.ly for hoverinfo . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.volume.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.layout.yaxis.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use layout.yaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be customized by the - now deprecated `titlefont` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - plotly.graph_objs.layout.YAxis + plotly.graph_objs.volume.Hoverlabel """ - return self["yaxis"] + return self["hoverlabel"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # property parent name - # -------------------- + # hovertemplate + # ------------- @property - def _parent_path_str(self): - return "" + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - angularaxis - plotly.graph_objects.layout.AngularAxis instance or - dict with compatible properties - annotations - A tuple of plotly.graph_objects.layout.Annotation - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), sets the - default property values to use for elements of - layout.annotations - autosize - Determines whether or not a layout width or height that - has been left undefined by the user is initialized on - each relayout. Note that, regardless of this attribute, - an undefined layout width or height is always - initialized on the first call to plot. - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - barmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "relative", the bars - are stacked on top of one another, with negative values - below the axis, positive values above With "group", the - bars are plotted next to one another centered around - the shared location. With "overlay", the bars are - plotted over one another, you might need to an - "opacity" to see multiple bars. - barnorm - Sets the normalization for bar traces on the graph. - With "fraction", the value of each bar is divided by - the sum of all values at that location coordinate. - "percent" is the same but multiplied by 100 to show - percentages. - boxgap - Sets the gap (in plot fraction) between boxes of - adjacent location coordinates. Has no effect on traces - that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes of the - same location coordinate. Has no effect on traces that - have "width" set. - boxmode - Determines how boxes at the same location coordinate - are displayed on the graph. If "group", the boxes are - plotted next to one another centered around the shared - location. If "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see them - multiple boxes. Has no effect on traces that have - "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout the plot. - clickmode - Determines the mode of single click interactions. - "event" is the default value and emits the - `plotly_click` event. In addition this mode emits the - `plotly_selected` event in drag modes "lasso" and - "select", but with no event data attached (kept for - compatibility reasons). The "select" flag enables - selecting single data points via click. This mode also - supports persistent selections, meaning that pressing - Shift while clicking, adds to / subtracts from an - existing selection. "select" with `hovermode`: "x" can - be confusing, consider explicitly setting `hovermode`: - "closest" when using this feature. Selection events are - sent accordingly as long as "event" flag is set as - well. When the "event" flag is missing, `plotly_click` - and `plotly_selected` events are not fired. + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on plot.ly for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # isomax + # ------ + @property + def isomax(self): + """ + Sets the maximum boundary for iso-surface plot. + + The 'isomax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomax"] + + @isomax.setter + def isomax(self, val): + self["isomax"] = val + + # isomin + # ------ + @property + def isomin(self): + """ + Sets the minimum boundary for iso-surface plot. + + The 'isomin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomin"] + + @isomin.setter + def isomin(self, val): + self["isomin"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of plotly.graph_objs.volume.Lighting + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. + + Returns + ------- + plotly.graph_objs.volume.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of plotly.graph_objs.volume.Lightposition + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. + + Returns + ------- + plotly.graph_objs.volume.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on plot.ly for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # opacityscale + # ------------ + @property + def opacityscale(self): + """ + Sets the opacityscale. The opacityscale must be an array + containing arrays mapping a normalized value to an opacity + value. At minimum, a mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], [0.5, 0.2], [1, + 1]]` means that higher/lower values would have higher opacity + values and those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette name string of + the following list: 'min', 'max', 'extremes' and 'uniform'. The + default is 'uniform'. + + The 'opacityscale' property accepts values of any type + + Returns + ------- + Any + """ + return self["opacityscale"] + + @opacityscale.setter + def opacityscale(self, val): + self["opacityscale"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene + # ----- + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # slices + # ------ + @property + def slices(self): + """ + The 'slices' property is an instance of Slices + that may be specified as: + - An instance of plotly.graph_objs.volume.Slices + - A dict of string/value properties that will be passed + to the Slices constructor + + Supported dict properties: + + x + plotly.graph_objects.volume.slices.X instance + or dict with compatible properties + y + plotly.graph_objects.volume.slices.Y instance + or dict with compatible properties + z + plotly.graph_objects.volume.slices.Z instance + or dict with compatible properties + + Returns + ------- + plotly.graph_objs.volume.Slices + """ + return self["slices"] + + @slices.setter + def slices(self, val): + self["slices"] = val + + # spaceframe + # ---------- + @property + def spaceframe(self): + """ + The 'spaceframe' property is an instance of Spaceframe + that may be specified as: + - An instance of plotly.graph_objs.volume.Spaceframe + - A dict of string/value properties that will be passed + to the Spaceframe constructor + + Supported dict properties: + + fill + Sets the fill ratio of the `spaceframe` + elements. The default fill value is 1 meaning + that they are entirely shaded. Applying a + `fill` ratio less than one would allow the + creation of openings parallel to the edges. + show + Displays/hides tetrahedron shapes between + minimum and maximum iso-values. Often useful + when either caps or surfaces are disabled or + filled with values less than 1. + + Returns + ------- + plotly.graph_objs.volume.Spaceframe + """ + return self["spaceframe"] + + @spaceframe.setter + def spaceframe(self, val): + self["spaceframe"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.volume.Stream + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. + + Returns + ------- + plotly.graph_objs.volume.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # surface + # ------- + @property + def surface(self): + """ + The 'surface' property is an instance of Surface + that may be specified as: + - An instance of plotly.graph_objs.volume.Surface + - A dict of string/value properties that will be passed + to the Surface constructor + + Supported dict properties: + + count + Sets the number of iso-surfaces between minimum + and maximum iso-values. By default this value + is 2 meaning that only minimum and maximum + surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The + default fill value of the surface is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is + `all` meaning that the rest of surface elements + would be shaded. The check options (either 1 or + 2) could be used to draw half of the squares on + the surface. Using various combinations of + capital `A`, `B`, `C`, `D` and `E` may also be + used to reduce the number of triangles on the + iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and + maximum iso-values. + + Returns + ------- + plotly.graph_objs.volume.Surface + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # value + # ----- + @property + def value(self): + """ + Sets the 4th dimension (value) of the vertices. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valuesrc + # -------- + @property + def valuesrc(self): + """ + Sets the source reference on plot.ly for value . + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the X coordinates of the vertices on X axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the Y coordinates of the vertices on Y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on plot.ly for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the Z coordinates of the vertices on Z axis. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + plotly.graph_objects.volume.Caps instance or dict with + compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.volume.ColorBar instance or dict + with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + plotly.graph_objects.volume.Contour instance or dict + with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.volume.Hoverlabel instance or dict + with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + lighting + plotly.graph_objects.volume.Lighting instance or dict + with compatible properties + lightposition + plotly.graph_objects.volume.Lightposition instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + plotly.graph_objects.volume.Slices instance or dict + with compatible properties + spaceframe + plotly.graph_objects.volume.Spaceframe instance or dict + with compatible properties + stream + plotly.graph_objects.volume.Stream instance or dict + with compatible properties + surface + plotly.graph_objects.volume.Surface instance or dict + with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on plot.ly for value . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on plot.ly for z . + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuesrc=None, + visible=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Volume object + + Draws volume trace between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Volume + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + plotly.graph_objects.volume.Caps instance or dict with + compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. coloraxis - plotly.graph_objects.layout.Coloraxis instance or dict + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.volume.ColorBar instance or dict with compatible properties colorscale - plotly.graph_objects.layout.Colorscale instance or dict + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + plotly.graph_objects.volume.Contour instance or dict with compatible properties - colorway - Sets the default trace colors. - datarevision - If provided, a changed value tells `Plotly.react` that - one or more data arrays has changed. This way you can - modify arrays in-place rather than making a complete - new copy for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are being - treated as immutable, thus any data array with a - different identity from its predecessor contains new - data. - direction - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the direction corresponding to - positive angles in legacy polar charts. - dragmode - Determines the mode of drag interactions. "select" and - "lasso" apply only to scatter traces with markers or - text. "orbit" and "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than trace names - and axis titles. Defaults to `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether given - by `funnelareacolorway` or inherited from `colorway`) - will be extended to three times its original length by - first repeating every color 20% lighter then each color - 20% darker. This is intended to reduce the likelihood - of reusing the same color when you have many slices, - but you can set `false` to disable. Colors provided in - the trace, using `marker.colors`, are never extended. - extendpiecolors - If `true`, the pie slice colors (whether given by - `piecolorway` or inherited from `colorway`) will be - extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether given by - `sunburstcolorway` or inherited from `colorway`) will - be extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - font - Sets the global font. Note that fonts used in traces - and other layout components inherit from the global - font. - funnelareacolorway - Sets the default funnelarea slice colors. Defaults to - the main `colorway` used for trace colors. If you - specify a new list here it can still be extended with - lighter and darker colors, see - `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - funnelmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "group", the bars - are plotted next to one another centered around the - shared location. With "overlay", the bars are plotted - over one another, you might need to an "opacity" to see - multiple bars. - geo - plotly.graph_objects.layout.Geo instance or dict with - compatible properties - grid - plotly.graph_objects.layout.Grid instance or dict with - compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart analog of - visible:'legendonly' but it can contain many labels, - and can simultaneously hide slices from several - pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on plot.ly for hiddenlabels - . - hidesources - Determines whether or not a text link citing the data - source is placed at the bottom-right cored of the - figure. Has only an effect only on graphs that have - been generated via forked graphs from the plotly - service (at https://plot.ly or on-premise). - hoverdistance - Sets the default distance (in pixels) to look for data - to add hover labels (-1 means no cutoff, 0 means no - looking for data). This is only a real distance for - hovering on point-like objects, like scatter points. - For area-like objects (bars, scatter fills, etc) - hovering is on inside the area and off outside, but - these objects will not supersede hover on point-like - objects in case of conflict. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.layout.Hoverlabel instance or dict - with compatible properties - hovermode - Determines the mode of hover interactions. If - `clickmode` includes the "select" flag, `hovermode` - defaults to "closest". If `clickmode` lacks the - "select" flag, it defaults to "x" or "y" (depending on - the trace's `orientation` value) for plots based on - cartesian coordinates. For anything else the default - value is "closest". - images - A tuple of plotly.graph_objects.layout.Image instances - or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the default - property values to use for elements of layout.images - legend - plotly.graph_objects.layout.Legend instance or dict - with compatible properties - mapbox - plotly.graph_objects.layout.Mapbox instance or dict + plotly.graph_objects.volume.Hoverlabel instance or dict with compatible properties - margin - plotly.graph_objects.layout.Margin instance or dict + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + lighting + plotly.graph_objects.volume.Lighting instance or dict with compatible properties + lightposition + plotly.graph_objects.volume.Lightposition instance or + dict with compatible properties meta - Assigns extra meta information that can be used in - various `text` attributes. Attributes such as the - graph, axis and colorbar `title.text`, annotation - `text` `trace.name` in legend items, `rangeselector`, - `updatemenues` and `sliders` `label` text all support - `meta`. One can access `meta` fields using template - strings: `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an object - for example `{key: value}` which can be accessed - %{meta[key]}. + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. metasrc Sets the source reference on plot.ly for meta . - modebar - plotly.graph_objects.layout.Modebar instance or dict + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + plotly.graph_objects.volume.Slices instance or dict with compatible properties - orientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Rotates the entire polar by the given - angle in legacy polar charts. - paper_bgcolor - Sets the color of paper where the graph is drawn. - piecolorway - Sets the default pie slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new - list here it can still be extended with lighter and - darker colors, see `extendpiecolors`. - plot_bgcolor - Sets the color of plotting area in-between x and y - axes. - polar - plotly.graph_objects.layout.Polar instance or dict with - compatible properties - radialaxis - plotly.graph_objects.layout.RadialAxis instance or dict + spaceframe + plotly.graph_objects.volume.Spaceframe instance or dict with compatible properties - scene - plotly.graph_objects.layout.Scene instance or dict with - compatible properties - selectdirection - When "dragmode" is set to "select", this limits the - selection of the drag to horizontal, vertical or - diagonal. "h" only allows horizontal selection, "v" - only vertical, "d" only diagonal and "any" sets no - limit. - selectionrevision - Controls persistence of user-driven changes in selected - points from all traces. - separators - Sets the decimal and thousand separators. For example, - *. * puts a '.' before decimals and a space between - thousands. In English locales, dflt is ".," but other - locales may alter this default. - shapes - A tuple of plotly.graph_objects.layout.Shape instances - or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the default - property values to use for elements of layout.shapes - showlegend - Determines whether or not a legend is drawn. Default is - `true` if there is a trace to show and any of these: a) - Two or more traces would by default be shown in the - legend. b) One pie trace is shown in the legend. c) One - trace is explicitly given with `showlegend: true`. - sliders - A tuple of plotly.graph_objects.layout.Slider instances - or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets the - default property values to use for elements of - layout.sliders - spikedistance - Sets the default distance (in pixels) to look for data - to draw spikelines to (-1 means no cutoff, 0 means no - looking for data). As with hoverdistance, distance does - not apply to area-like objects. In addition, some - objects can be hovered on but will not generate - spikelines, such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. Defaults to the - main `colorway` used for trace colors. If you specify a - new list here it can still be extended with lighter and - darker colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. This - should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: [traceTemplate, - ...], ...}}` where `layoutTemplate` is a dict matching - the structure of `figure.layout` and `traceTemplate` is - a dict matching the structure of the trace with type - `trace_type` (e.g. 'scatter'). Alternatively, this may - be specified as an instance of - plotly.graph_objs.layout.Template. Trace templates are - applied cyclically to traces of each type. Container - arrays (eg `annotations`) have special handling: An - object ending in `defaults` (eg `annotationdefaults`) - is applied to each array item. But if an item has a - `templateitemname` key we look in the template array - for an item with matching `name` and apply that - instead. If no matching `name` is found we mark the - item invisible. Any named template item not referenced - is appended to the end of the array, so this can be - used to add a watermark annotation or a logo image, for - example. To omit one of these items on the plot, make - an item with matching `templateitemname` and `visible: - false`. - ternary - plotly.graph_objects.layout.Ternary instance or dict + stream + plotly.graph_objects.volume.Stream instance or dict with compatible properties - title - plotly.graph_objects.layout.Title instance or dict with - compatible properties - titlefont - Deprecated: Please use layout.title.font instead. Sets - the title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - transition - Sets transition options used during Plotly.react - updates. + surface + plotly.graph_objects.volume.Surface instance or dict + with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. uirevision - Used to allow user interactions with the plot to - persist after `Plotly.react` calls that are unaware of - these interactions. If `uirevision` is omitted, or if - it is given and it changed from the previous - `Plotly.react` call, the exact new figure is used. If - `uirevision` is truthy and did NOT change, any - attribute that has been affected by user interactions - and did not receive a different value in the new figure - will keep the interaction value. `layout.uirevision` - attribute serves as the default for `uirevision` - attributes in various sub-containers. For finer control - you can set these sub-attributes directly. For example, - if your app separately controls the data on the x and y - axes you might set `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y data is - changed, you can update `yaxis.uirevision=*quantity*` - and the y axis range will reset but the x axis range - will retain any user-driven zoom. - updatemenus - A tuple of plotly.graph_objects.layout.Updatemenu - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), sets the - default property values to use for elements of - layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins of - adjacent location coordinates. Has no effect on traces - that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins of the - same location coordinate. Has no effect on traces that - have "width" set. - violinmode - Determines how violins at the same location coordinate - are displayed on the graph. If "group", the violins are - plotted next to one another centered around the shared - location. If "overlay", the violins are plotted over - one another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces that - have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - waterfallmode - Determines how bars at the same location coordinate are - displayed on the graph. With "group", the bars are - plotted next to one another centered around the shared - location. With "overlay", the bars are plotted over one - another, you might need to an "opacity" to see multiple - bars. - width - Sets the plot's width (in px). - xaxis - plotly.graph_objects.layout.XAxis instance or dict with - compatible properties - yaxis - plotly.graph_objects.layout.YAxis instance or dict with - compatible properties + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on plot.ly for value . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on plot.ly for z . + + Returns + ------- + Volume + """ + super(Volume, self).__init__("volume") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Volume +constructor must be a dict or +an instance of plotly.graph_objs.Volume""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators import volume as v_volume + + # Initialize validators + # --------------------- + self._validators["autocolorscale"] = v_volume.AutocolorscaleValidator() + self._validators["caps"] = v_volume.CapsValidator() + self._validators["cauto"] = v_volume.CautoValidator() + self._validators["cmax"] = v_volume.CmaxValidator() + self._validators["cmid"] = v_volume.CmidValidator() + self._validators["cmin"] = v_volume.CminValidator() + self._validators["coloraxis"] = v_volume.ColoraxisValidator() + self._validators["colorbar"] = v_volume.ColorBarValidator() + self._validators["colorscale"] = v_volume.ColorscaleValidator() + self._validators["contour"] = v_volume.ContourValidator() + self._validators["customdata"] = v_volume.CustomdataValidator() + self._validators["customdatasrc"] = v_volume.CustomdatasrcValidator() + self._validators["flatshading"] = v_volume.FlatshadingValidator() + self._validators["hoverinfo"] = v_volume.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_volume.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_volume.HoverlabelValidator() + self._validators["hovertemplate"] = v_volume.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_volume.HovertemplatesrcValidator() + self._validators["hovertext"] = v_volume.HovertextValidator() + self._validators["hovertextsrc"] = v_volume.HovertextsrcValidator() + self._validators["ids"] = v_volume.IdsValidator() + self._validators["idssrc"] = v_volume.IdssrcValidator() + self._validators["isomax"] = v_volume.IsomaxValidator() + self._validators["isomin"] = v_volume.IsominValidator() + self._validators["lighting"] = v_volume.LightingValidator() + self._validators["lightposition"] = v_volume.LightpositionValidator() + self._validators["meta"] = v_volume.MetaValidator() + self._validators["metasrc"] = v_volume.MetasrcValidator() + self._validators["name"] = v_volume.NameValidator() + self._validators["opacity"] = v_volume.OpacityValidator() + self._validators["opacityscale"] = v_volume.OpacityscaleValidator() + self._validators["reversescale"] = v_volume.ReversescaleValidator() + self._validators["scene"] = v_volume.SceneValidator() + self._validators["showscale"] = v_volume.ShowscaleValidator() + self._validators["slices"] = v_volume.SlicesValidator() + self._validators["spaceframe"] = v_volume.SpaceframeValidator() + self._validators["stream"] = v_volume.StreamValidator() + self._validators["surface"] = v_volume.SurfaceValidator() + self._validators["text"] = v_volume.TextValidator() + self._validators["textsrc"] = v_volume.TextsrcValidator() + self._validators["uid"] = v_volume.UidValidator() + self._validators["uirevision"] = v_volume.UirevisionValidator() + self._validators["value"] = v_volume.ValueValidator() + self._validators["valuesrc"] = v_volume.ValuesrcValidator() + self._validators["visible"] = v_volume.VisibleValidator() + self._validators["x"] = v_volume.XValidator() + self._validators["xsrc"] = v_volume.XsrcValidator() + self._validators["y"] = v_volume.YValidator() + self._validators["ysrc"] = v_volume.YsrcValidator() + self._validators["z"] = v_volume.ZValidator() + self._validators["zsrc"] = v_volume.ZsrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("caps", None) + self["caps"] = caps if caps is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("contour", None) + self["contour"] = contour if contour is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("flatshading", None) + self["flatshading"] = flatshading if flatshading is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("isomax", None) + self["isomax"] = isomax if isomax is not None else _v + _v = arg.pop("isomin", None) + self["isomin"] = isomin if isomin is not None else _v + _v = arg.pop("lighting", None) + self["lighting"] = lighting if lighting is not None else _v + _v = arg.pop("lightposition", None) + self["lightposition"] = lightposition if lightposition is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("opacityscale", None) + self["opacityscale"] = opacityscale if opacityscale is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("slices", None) + self["slices"] = slices if slices is not None else _v + _v = arg.pop("spaceframe", None) + self["spaceframe"] = spaceframe if spaceframe is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("surface", None) + self["surface"] = surface if surface is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("value", None) + self["value"] = value if value is not None else _v + _v = arg.pop("valuesrc", None) + self["valuesrc"] = valuesrc if valuesrc is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v + + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator + + self._props["type"] = "volume" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="volume", val="volume" + ) + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Violin(_BaseTraceType): + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # bandwidth + # --------- + @property + def bandwidth(self): + """ + Sets the bandwidth used to compute the kernel density estimate. + By default, the bandwidth is determined by Silverman's rule of + thumb. + + The 'bandwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["bandwidth"] + + @bandwidth.setter + def bandwidth(self, val): + self["bandwidth"] = val + + # box + # --- + @property + def box(self): + """ + The 'box' property is an instance of Box + that may be specified as: + - An instance of plotly.graph_objs.violin.Box + - A dict of string/value properties that will be passed + to the Box constructor + + Supported dict properties: + + fillcolor + Sets the inner box plot fill color. + line + plotly.graph_objects.violin.box.Line instance + or dict with compatible properties + visible + Determines if an miniature box plot is drawn + inside the violins. + width + Sets the width of the inner box plots relative + to the violins' width. For example, with 1, the + inner box plots are as wide as the violins. + + Returns + ------- + plotly.graph_objs.violin.Box + """ + return self["box"] + + @box.setter + def box(self, val): + self["box"] = val + + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on plot.ly for customdata . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + # hoverinfo + # --------- + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + # hoverinfosrc + # ------------ + @property + def hoverinfosrc(self): + """ + Sets the source reference on plot.ly for hoverinfo . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.violin.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . + + Returns + ------- + plotly.graph_objs.violin.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual violins or sample + points or the kernel density estimate or any combination of + them? + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['violins', 'points', 'kde'] joined with '+' characters + (e.g. 'violins+points') + OR exactly one of ['all'] (e.g. 'all') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on plot.ly for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # jitter + # ------ + @property + def jitter(self): + """ + Sets the amount of jitter in the sample points drawn. If 0, the + sample points align along the distribution axis. If 1, the + sample points are drawn in a random jitter of width equal to + the width of the violins. + + The 'jitter' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["jitter"] + + @jitter.setter + def jitter(self, val): + self["jitter"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.violin.Line + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of line bounding the violin(s). + width + Sets the width (in px) of line bounding the + violin(s). + + Returns + ------- + plotly.graph_objs.violin.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.violin.Marker + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + line + plotly.graph_objects.violin.marker.Line + instance or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + plotly.graph_objs.violin.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # meanline + # -------- + @property + def meanline(self): + """ + The 'meanline' property is an instance of Meanline + that may be specified as: + - An instance of plotly.graph_objs.violin.Meanline + - A dict of string/value properties that will be passed + to the Meanline constructor + + Supported dict properties: + + color + Sets the mean line color. + visible + Determines if a line corresponding to the + sample's mean is shown inside the violins. If + `box.visible` is turned on, the mean line is + drawn inside the inner box. Otherwise, the mean + line is drawn from one side of the violin to + other. + width + Sets the mean line width. + + Returns + ------- + plotly.graph_objs.violin.Meanline + """ + return self["meanline"] + + @meanline.setter + def meanline(self, val): + self["meanline"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on plot.ly for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. For violin traces, the name will also be used for + the position coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis is categorical. + Note that the trace name is also used as a default value for + attribute `scalegroup` (please see its description for + details). + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the violin(s). If "v" ("h"), the + distribution is visualized along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # pointpos + # -------- + @property + def pointpos(self): + """ + Sets the position of the sample points in relation to the + violins. If 0, the sample points are places over the center of + the violins. Positive (negative) values correspond to positions + to the right (left) for vertical violins and above (below) for + horizontal violins. + + The 'pointpos' property is a number and may be specified as: + - An int or float in the interval [-2, 2] + + Returns + ------- + int|float + """ + return self["pointpos"] + + @pointpos.setter + def pointpos(self, val): + self["pointpos"] = val + + # points + # ------ + @property + def points(self): + """ + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier points + are shown and points either less than 4*Q1-3*Q3 or greater than + 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all + sample points are shown If False, only the violins are shown + with no sample points + + The 'points' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'outliers', 'suspectedoutliers', False] + + Returns + ------- + Any + """ + return self["points"] + + @points.setter + def points(self, val): + self["points"] = val + + # scalegroup + # ---------- + @property + def scalegroup(self): + """ + If there are multiple violins that should be sized according to + to some metric (see `scalemode`), link them by providing a non- + empty group id here shared by every trace in the same group. If + a violin's `width` is undefined, `scalegroup` will default to + the trace's name. In this case, violins with the same names + will be linked together + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + # scalemode + # --------- + @property + def scalemode(self): + """ + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number of + sample points makingup each violin. + + The 'scalemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['width', 'count'] + + Returns + ------- + Any + """ + return self["scalemode"] + + @scalemode.setter + def scalemode(self, val): + self["scalemode"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.violin.Selected + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + plotly.graph_objects.violin.selected.Marker + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.violin.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # side + # ---- + @property + def side(self): + """ + Determines on which side of the position value the density + function making up one half of a violin is plotted. Useful when + comparing two violin traces under "overlay" mode, where one + trace has `side` set to "positive" and the other to "negative". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['both', 'positive', 'negative'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # span + # ---- + @property + def span(self): + """ + Sets the span in data space for which the density function will + be computed. Has an effect only when `spanmode` is set to + "manual". + + The 'span' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'span[0]' property accepts values of any type + (1) The 'span[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["span"] + + @span.setter + def span(self, val): + self["span"] = val + + # spanmode + # -------- + @property + def spanmode(self): + """ + Sets the method by which the span in data space where the + density function will be computed. "soft" means the span goes + from the sample's minimum value minus two bandwidths to the + sample's maximum value plus two bandwidths. "hard" means the + span goes from the sample's minimum to its maximum value. For + custom span settings, use mode "manual" and fill in the `span` + attribute. + + The 'spanmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['soft', 'hard', 'manual'] + + Returns + ------- + Any + """ + return self["spanmode"] + + @spanmode.setter + def spanmode(self, val): + self["spanmode"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.violin.Stream + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. + + Returns + ------- + plotly.graph_objs.violin.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each sample value. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.violin.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.violin.unselected.Marker + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.violin.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the violin in data coordinates. If 0 (default + value) the width is automatically selected based on the + positions of other violin traces in the same subplot. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # x + # - + @property + def x(self): + """ + Sets the x sample data or coordinates. See overview for more + info. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Sets the x coordinate of the box. See overview for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y sample data or coordinates. See overview for more + info. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Sets the y coordinate of the box. See overview for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) - _mapped_properties = {"titlefont": ("title", "font")} + Returns + ------- + str + """ + return self["yaxis"] - def __init__( - self, - arg=None, - angularaxis=None, - annotations=None, - annotationdefaults=None, - autosize=None, - bargap=None, - bargroupgap=None, - barmode=None, - barnorm=None, - boxgap=None, - boxgroupgap=None, - boxmode=None, - calendar=None, - clickmode=None, - coloraxis=None, - colorscale=None, - colorway=None, - datarevision=None, - direction=None, - dragmode=None, - editrevision=None, - extendfunnelareacolors=None, - extendpiecolors=None, - extendsunburstcolors=None, - font=None, - funnelareacolorway=None, - funnelgap=None, - funnelgroupgap=None, - funnelmode=None, - geo=None, - grid=None, - height=None, - hiddenlabels=None, - hiddenlabelssrc=None, - hidesources=None, - hoverdistance=None, - hoverlabel=None, - hovermode=None, - images=None, - imagedefaults=None, - legend=None, - mapbox=None, - margin=None, - meta=None, - metasrc=None, - modebar=None, - orientation=None, - paper_bgcolor=None, - piecolorway=None, - plot_bgcolor=None, - polar=None, - radialaxis=None, - scene=None, - selectdirection=None, - selectionrevision=None, - separators=None, - shapes=None, - shapedefaults=None, - showlegend=None, - sliders=None, - sliderdefaults=None, - spikedistance=None, - sunburstcolorway=None, - template=None, - ternary=None, - title=None, - titlefont=None, - transition=None, - uirevision=None, - updatemenus=None, - updatemenudefaults=None, - violingap=None, - violingroupgap=None, - violinmode=None, - waterfallgap=None, - waterfallgroupgap=None, - waterfallmode=None, - width=None, - xaxis=None, - yaxis=None, - **kwargs - ): + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ysrc + # ---- + @property + def ysrc(self): """ - Construct a new Layout object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Layout - angularaxis - plotly.graph_objects.layout.AngularAxis instance or - dict with compatible properties - annotations - A tuple of plotly.graph_objects.layout.Annotation - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), sets the - default property values to use for elements of - layout.annotations - autosize - Determines whether or not a layout width or height that - has been left undefined by the user is initialized on - each relayout. Note that, regardless of this attribute, - an undefined layout width or height is always - initialized on the first call to plot. - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - barmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "relative", the bars - are stacked on top of one another, with negative values - below the axis, positive values above With "group", the - bars are plotted next to one another centered around - the shared location. With "overlay", the bars are - plotted over one another, you might need to an - "opacity" to see multiple bars. - barnorm - Sets the normalization for bar traces on the graph. - With "fraction", the value of each bar is divided by - the sum of all values at that location coordinate. - "percent" is the same but multiplied by 100 to show - percentages. - boxgap - Sets the gap (in plot fraction) between boxes of - adjacent location coordinates. Has no effect on traces - that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes of the - same location coordinate. Has no effect on traces that - have "width" set. - boxmode - Determines how boxes at the same location coordinate - are displayed on the graph. If "group", the boxes are - plotted next to one another centered around the shared - location. If "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see them - multiple boxes. Has no effect on traces that have - "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout the plot. - clickmode - Determines the mode of single click interactions. - "event" is the default value and emits the - `plotly_click` event. In addition this mode emits the - `plotly_selected` event in drag modes "lasso" and - "select", but with no event data attached (kept for - compatibility reasons). The "select" flag enables - selecting single data points via click. This mode also - supports persistent selections, meaning that pressing - Shift while clicking, adds to / subtracts from an - existing selection. "select" with `hovermode`: "x" can - be confusing, consider explicitly setting `hovermode`: - "closest" when using this feature. Selection events are - sent accordingly as long as "event" flag is set as - well. When the "event" flag is missing, `plotly_click` - and `plotly_selected` events are not fired. - coloraxis - plotly.graph_objects.layout.Coloraxis instance or dict - with compatible properties - colorscale - plotly.graph_objects.layout.Colorscale instance or dict + Sets the source reference on plot.ly for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + plotly.graph_objects.violin.Box instance or dict with + compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.violin.Hoverlabel instance or dict with compatible properties - colorway - Sets the default trace colors. - datarevision - If provided, a changed value tells `Plotly.react` that - one or more data arrays has changed. This way you can - modify arrays in-place rather than making a complete - new copy for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are being - treated as immutable, thus any data array with a - different identity from its predecessor contains new - data. - direction - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Sets the direction corresponding to - positive angles in legacy polar charts. - dragmode - Determines the mode of drag interactions. "select" and - "lasso" apply only to scatter traces with markers or - text. "orbit" and "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than trace names - and axis titles. Defaults to `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether given - by `funnelareacolorway` or inherited from `colorway`) - will be extended to three times its original length by - first repeating every color 20% lighter then each color - 20% darker. This is intended to reduce the likelihood - of reusing the same color when you have many slices, - but you can set `false` to disable. Colors provided in - the trace, using `marker.colors`, are never extended. - extendpiecolors - If `true`, the pie slice colors (whether given by - `piecolorway` or inherited from `colorway`) will be - extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether given by - `sunburstcolorway` or inherited from `colorway`) will - be extended to three times its original length by first - repeating every color 20% lighter then each color 20% - darker. This is intended to reduce the likelihood of - reusing the same color when you have many slices, but - you can set `false` to disable. Colors provided in the - trace, using `marker.colors`, are never extended. - font - Sets the global font. Note that fonts used in traces - and other layout components inherit from the global - font. - funnelareacolorway - Sets the default funnelarea slice colors. Defaults to - the main `colorway` used for trace colors. If you - specify a new list here it can still be extended with - lighter and darker colors, see - `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - funnelmode - Determines how bars at the same location coordinate are - displayed on the graph. With "stack", the bars are - stacked on top of one another With "group", the bars - are plotted next to one another centered around the - shared location. With "overlay", the bars are plotted - over one another, you might need to an "opacity" to see - multiple bars. - geo - plotly.graph_objects.layout.Geo instance or dict with + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.violin.Line instance or dict with compatible properties - grid - plotly.graph_objects.layout.Grid instance or dict with + marker + plotly.graph_objects.violin.Marker instance or dict + with compatible properties + meanline + plotly.graph_objects.violin.Meanline instance or dict + with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number + of sample points makingup each violin. + selected + plotly.graph_objects.violin.Selected instance or dict + with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + plotly.graph_objects.violin.Stream instance or dict + with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + plotly.graph_objects.violin.Unselected instance or dict + with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate of the box. See overview for more + info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate of the box. See overview for more + info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + bandwidth=None, + box=None, + customdata=None, + customdatasrc=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legendgroup=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + **kwargs + ): + """ + Construct a new Violin object + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Violin + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + plotly.graph_objects.violin.Box instance or dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart analog of - visible:'legendonly' but it can contain many labels, - and can simultaneously hide slices from several - pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on plot.ly for hiddenlabels - . - hidesources - Determines whether or not a text link citing the data - source is placed at the bottom-right cored of the - figure. Has only an effect only on graphs that have - been generated via forked graphs from the plotly - service (at https://plot.ly or on-premise). - hoverdistance - Sets the default distance (in pixels) to look for data - to add hover labels (-1 means no cutoff, 0 means no - looking for data). This is only a real distance for - hovering on point-like objects, like scatter points. - For area-like objects (bars, scatter fills, etc) - hovering is on inside the area and off outside, but - these objects will not supersede hover on point-like - objects in case of conflict. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.layout.Hoverlabel instance or dict - with compatible properties - hovermode - Determines the mode of hover interactions. If - `clickmode` includes the "select" flag, `hovermode` - defaults to "closest". If `clickmode` lacks the - "select" flag, it defaults to "x" or "y" (depending on - the trace's `orientation` value) for plots based on - cartesian coordinates. For anything else the default - value is "closest". - images - A tuple of plotly.graph_objects.layout.Image instances - or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the default - property values to use for elements of layout.images - legend - plotly.graph_objects.layout.Legend instance or dict + plotly.graph_objects.violin.Hoverlabel instance or dict with compatible properties - mapbox - plotly.graph_objects.layout.Mapbox instance or dict + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.violin.Line instance or dict with + compatible properties + marker + plotly.graph_objects.violin.Marker instance or dict with compatible properties - margin - plotly.graph_objects.layout.Margin instance or dict + meanline + plotly.graph_objects.violin.Meanline instance or dict with compatible properties meta - Assigns extra meta information that can be used in - various `text` attributes. Attributes such as the - graph, axis and colorbar `title.text`, annotation - `text` `trace.name` in legend items, `rangeselector`, - `updatemenues` and `sliders` `label` text all support - `meta`. One can access `meta` fields using template - strings: `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an object - for example `{key: value}` which can be accessed - %{meta[key]}. + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. metasrc Sets the source reference on plot.ly for meta . - modebar - plotly.graph_objects.layout.Modebar instance or dict - with compatible properties + name + Sets the trace name. The trace name appear as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. orientation - Legacy polar charts are deprecated! Please switch to - "polar" subplots. Rotates the entire polar by the given - angle in legacy polar charts. - paper_bgcolor - Sets the color of paper where the graph is drawn. - piecolorway - Sets the default pie slice colors. Defaults to the main - `colorway` used for trace colors. If you specify a new - list here it can still be extended with lighter and - darker colors, see `extendpiecolors`. - plot_bgcolor - Sets the color of plotting area in-between x and y - axes. - polar - plotly.graph_objects.layout.Polar instance or dict with - compatible properties - radialaxis - plotly.graph_objects.layout.RadialAxis instance or dict + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number + of sample points makingup each violin. + selected + plotly.graph_objects.violin.Selected instance or dict with compatible properties - scene - plotly.graph_objects.layout.Scene instance or dict with - compatible properties - selectdirection - When "dragmode" is set to "select", this limits the - selection of the drag to horizontal, vertical or - diagonal. "h" only allows horizontal selection, "v" - only vertical, "d" only diagonal and "any" sets no - limit. - selectionrevision - Controls persistence of user-driven changes in selected - points from all traces. - separators - Sets the decimal and thousand separators. For example, - *. * puts a '.' before decimals and a space between - thousands. In English locales, dflt is ".," but other - locales may alter this default. - shapes - A tuple of plotly.graph_objects.layout.Shape instances - or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the default - property values to use for elements of layout.shapes + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showlegend - Determines whether or not a legend is drawn. Default is - `true` if there is a trace to show and any of these: a) - Two or more traces would by default be shown in the - legend. b) One pie trace is shown in the legend. c) One - trace is explicitly given with `showlegend: true`. - sliders - A tuple of plotly.graph_objects.layout.Slider instances - or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets the - default property values to use for elements of - layout.sliders - spikedistance - Sets the default distance (in pixels) to look for data - to draw spikelines to (-1 means no cutoff, 0 means no - looking for data). As with hoverdistance, distance does - not apply to area-like objects. In addition, some - objects can be hovered on but will not generate - spikelines, such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. Defaults to the - main `colorway` used for trace colors. If you specify a - new list here it can still be extended with lighter and - darker colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. This - should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: [traceTemplate, - ...], ...}}` where `layoutTemplate` is a dict matching - the structure of `figure.layout` and `traceTemplate` is - a dict matching the structure of the trace with type - `trace_type` (e.g. 'scatter'). Alternatively, this may - be specified as an instance of - plotly.graph_objs.layout.Template. Trace templates are - applied cyclically to traces of each type. Container - arrays (eg `annotations`) have special handling: An - object ending in `defaults` (eg `annotationdefaults`) - is applied to each array item. But if an item has a - `templateitemname` key we look in the template array - for an item with matching `name` and apply that - instead. If no matching `name` is found we mark the - item invisible. Any named template item not referenced - is appended to the end of the array, so this can be - used to add a watermark annotation or a logo image, for - example. To omit one of these items on the plot, make - an item with matching `templateitemname` and `visible: - false`. - ternary - plotly.graph_objects.layout.Ternary instance or dict + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + plotly.graph_objects.violin.Stream instance or dict with compatible properties - title - plotly.graph_objects.layout.Title instance or dict with - compatible properties - titlefont - Deprecated: Please use layout.title.font instead. Sets - the title font. Note that the title's font used to be - customized by the now deprecated `titlefont` attribute. - transition - Sets transition options used during Plotly.react - updates. - uirevision - Used to allow user interactions with the plot to - persist after `Plotly.react` calls that are unaware of - these interactions. If `uirevision` is omitted, or if - it is given and it changed from the previous - `Plotly.react` call, the exact new figure is used. If - `uirevision` is truthy and did NOT change, any - attribute that has been affected by user interactions - and did not receive a different value in the new figure - will keep the interaction value. `layout.uirevision` - attribute serves as the default for `uirevision` - attributes in various sub-containers. For finer control - you can set these sub-attributes directly. For example, - if your app separately controls the data on the x and y - axes you might set `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y data is - changed, you can update `yaxis.uirevision=*quantity*` - and the y axis range will reset but the x axis range - will retain any user-driven zoom. - updatemenus - A tuple of plotly.graph_objects.layout.Updatemenu - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), sets the - default property values to use for elements of - layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins of - adjacent location coordinates. Has no effect on traces - that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins of the - same location coordinate. Has no effect on traces that - have "width" set. - violinmode - Determines how violins at the same location coordinate - are displayed on the graph. If "group", the violins are - plotted next to one another centered around the shared - location. If "overlay", the violins are plotted over - one another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces that - have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of the - same location coordinate. - waterfallmode - Determines how bars at the same location coordinate are - displayed on the graph. With "group", the bars are - plotted next to one another centered around the shared - location. With "overlay", the bars are plotted over one - another, you might need to an "opacity" to see multiple - bars. + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + plotly.graph_objects.violin.Unselected instance or dict + with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). width - Sets the plot's width (in px). + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate of the box. See overview for more + info. xaxis - plotly.graph_objects.layout.XAxis instance or dict with - compatible properties + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate of the box. See overview for more + info. yaxis - plotly.graph_objects.layout.YAxis instance or dict with - compatible properties + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . Returns ------- - Layout + Violin """ - super(Layout, self).__init__("layout") + super(Violin, self).__init__("violin") # Validate arg # ------------ @@ -5192,9 +6747,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Layout +The first argument to the plotly.graph_objs.Violin constructor must be a dict or -an instance of plotly.graph_objs.Layout""" +an instance of plotly.graph_objs.Violin""" ) # Handle skip_invalid @@ -5203,829 +6758,1146 @@ def __init__( # Import validators # ----------------- - from plotly.validators import layout as v_layout + from plotly.validators import violin as v_violin # Initialize validators # --------------------- - self._validators["angularaxis"] = v_layout.AngularAxisValidator() - self._validators["annotations"] = v_layout.AnnotationsValidator() - self._validators["annotationdefaults"] = v_layout.AnnotationValidator() - self._validators["autosize"] = v_layout.AutosizeValidator() - self._validators["bargap"] = v_layout.BargapValidator() - self._validators["bargroupgap"] = v_layout.BargroupgapValidator() - self._validators["barmode"] = v_layout.BarmodeValidator() - self._validators["barnorm"] = v_layout.BarnormValidator() - self._validators["boxgap"] = v_layout.BoxgapValidator() - self._validators["boxgroupgap"] = v_layout.BoxgroupgapValidator() - self._validators["boxmode"] = v_layout.BoxmodeValidator() - self._validators["calendar"] = v_layout.CalendarValidator() - self._validators["clickmode"] = v_layout.ClickmodeValidator() - self._validators["coloraxis"] = v_layout.ColoraxisValidator() - self._validators["colorscale"] = v_layout.ColorscaleValidator() - self._validators["colorway"] = v_layout.ColorwayValidator() - self._validators["datarevision"] = v_layout.DatarevisionValidator() - self._validators["direction"] = v_layout.DirectionValidator() - self._validators["dragmode"] = v_layout.DragmodeValidator() - self._validators["editrevision"] = v_layout.EditrevisionValidator() - self._validators[ - "extendfunnelareacolors" - ] = v_layout.ExtendfunnelareacolorsValidator() - self._validators["extendpiecolors"] = v_layout.ExtendpiecolorsValidator() - self._validators[ - "extendsunburstcolors" - ] = v_layout.ExtendsunburstcolorsValidator() - self._validators["font"] = v_layout.FontValidator() - self._validators["funnelareacolorway"] = v_layout.FunnelareacolorwayValidator() - self._validators["funnelgap"] = v_layout.FunnelgapValidator() - self._validators["funnelgroupgap"] = v_layout.FunnelgroupgapValidator() - self._validators["funnelmode"] = v_layout.FunnelmodeValidator() - self._validators["geo"] = v_layout.GeoValidator() - self._validators["grid"] = v_layout.GridValidator() - self._validators["height"] = v_layout.HeightValidator() - self._validators["hiddenlabels"] = v_layout.HiddenlabelsValidator() - self._validators["hiddenlabelssrc"] = v_layout.HiddenlabelssrcValidator() - self._validators["hidesources"] = v_layout.HidesourcesValidator() - self._validators["hoverdistance"] = v_layout.HoverdistanceValidator() - self._validators["hoverlabel"] = v_layout.HoverlabelValidator() - self._validators["hovermode"] = v_layout.HovermodeValidator() - self._validators["images"] = v_layout.ImagesValidator() - self._validators["imagedefaults"] = v_layout.ImageValidator() - self._validators["legend"] = v_layout.LegendValidator() - self._validators["mapbox"] = v_layout.MapboxValidator() - self._validators["margin"] = v_layout.MarginValidator() - self._validators["meta"] = v_layout.MetaValidator() - self._validators["metasrc"] = v_layout.MetasrcValidator() - self._validators["modebar"] = v_layout.ModebarValidator() - self._validators["orientation"] = v_layout.OrientationValidator() - self._validators["paper_bgcolor"] = v_layout.PaperBgcolorValidator() - self._validators["piecolorway"] = v_layout.PiecolorwayValidator() - self._validators["plot_bgcolor"] = v_layout.PlotBgcolorValidator() - self._validators["polar"] = v_layout.PolarValidator() - self._validators["radialaxis"] = v_layout.RadialAxisValidator() - self._validators["scene"] = v_layout.SceneValidator() - self._validators["selectdirection"] = v_layout.SelectdirectionValidator() - self._validators["selectionrevision"] = v_layout.SelectionrevisionValidator() - self._validators["separators"] = v_layout.SeparatorsValidator() - self._validators["shapes"] = v_layout.ShapesValidator() - self._validators["shapedefaults"] = v_layout.ShapeValidator() - self._validators["showlegend"] = v_layout.ShowlegendValidator() - self._validators["sliders"] = v_layout.SlidersValidator() - self._validators["sliderdefaults"] = v_layout.SliderValidator() - self._validators["spikedistance"] = v_layout.SpikedistanceValidator() - self._validators["sunburstcolorway"] = v_layout.SunburstcolorwayValidator() - self._validators["template"] = v_layout.TemplateValidator() - self._validators["ternary"] = v_layout.TernaryValidator() - self._validators["title"] = v_layout.TitleValidator() - self._validators["transition"] = v_layout.TransitionValidator() - self._validators["uirevision"] = v_layout.UirevisionValidator() - self._validators["updatemenus"] = v_layout.UpdatemenusValidator() - self._validators["updatemenudefaults"] = v_layout.UpdatemenuValidator() - self._validators["violingap"] = v_layout.ViolingapValidator() - self._validators["violingroupgap"] = v_layout.ViolingroupgapValidator() - self._validators["violinmode"] = v_layout.ViolinmodeValidator() - self._validators["waterfallgap"] = v_layout.WaterfallgapValidator() - self._validators["waterfallgroupgap"] = v_layout.WaterfallgroupgapValidator() - self._validators["waterfallmode"] = v_layout.WaterfallmodeValidator() - self._validators["width"] = v_layout.WidthValidator() - self._validators["xaxis"] = v_layout.XAxisValidator() - self._validators["yaxis"] = v_layout.YAxisValidator() + self._validators["alignmentgroup"] = v_violin.AlignmentgroupValidator() + self._validators["bandwidth"] = v_violin.BandwidthValidator() + self._validators["box"] = v_violin.BoxValidator() + self._validators["customdata"] = v_violin.CustomdataValidator() + self._validators["customdatasrc"] = v_violin.CustomdatasrcValidator() + self._validators["fillcolor"] = v_violin.FillcolorValidator() + self._validators["hoverinfo"] = v_violin.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_violin.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_violin.HoverlabelValidator() + self._validators["hoveron"] = v_violin.HoveronValidator() + self._validators["hovertemplate"] = v_violin.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_violin.HovertemplatesrcValidator() + self._validators["hovertext"] = v_violin.HovertextValidator() + self._validators["hovertextsrc"] = v_violin.HovertextsrcValidator() + self._validators["ids"] = v_violin.IdsValidator() + self._validators["idssrc"] = v_violin.IdssrcValidator() + self._validators["jitter"] = v_violin.JitterValidator() + self._validators["legendgroup"] = v_violin.LegendgroupValidator() + self._validators["line"] = v_violin.LineValidator() + self._validators["marker"] = v_violin.MarkerValidator() + self._validators["meanline"] = v_violin.MeanlineValidator() + self._validators["meta"] = v_violin.MetaValidator() + self._validators["metasrc"] = v_violin.MetasrcValidator() + self._validators["name"] = v_violin.NameValidator() + self._validators["offsetgroup"] = v_violin.OffsetgroupValidator() + self._validators["opacity"] = v_violin.OpacityValidator() + self._validators["orientation"] = v_violin.OrientationValidator() + self._validators["pointpos"] = v_violin.PointposValidator() + self._validators["points"] = v_violin.PointsValidator() + self._validators["scalegroup"] = v_violin.ScalegroupValidator() + self._validators["scalemode"] = v_violin.ScalemodeValidator() + self._validators["selected"] = v_violin.SelectedValidator() + self._validators["selectedpoints"] = v_violin.SelectedpointsValidator() + self._validators["showlegend"] = v_violin.ShowlegendValidator() + self._validators["side"] = v_violin.SideValidator() + self._validators["span"] = v_violin.SpanValidator() + self._validators["spanmode"] = v_violin.SpanmodeValidator() + self._validators["stream"] = v_violin.StreamValidator() + self._validators["text"] = v_violin.TextValidator() + self._validators["textsrc"] = v_violin.TextsrcValidator() + self._validators["uid"] = v_violin.UidValidator() + self._validators["uirevision"] = v_violin.UirevisionValidator() + self._validators["unselected"] = v_violin.UnselectedValidator() + self._validators["visible"] = v_violin.VisibleValidator() + self._validators["width"] = v_violin.WidthValidator() + self._validators["x"] = v_violin.XValidator() + self._validators["x0"] = v_violin.X0Validator() + self._validators["xaxis"] = v_violin.XAxisValidator() + self._validators["xsrc"] = v_violin.XsrcValidator() + self._validators["y"] = v_violin.YValidator() + self._validators["y0"] = v_violin.Y0Validator() + self._validators["yaxis"] = v_violin.YAxisValidator() + self._validators["ysrc"] = v_violin.YsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("angularaxis", None) - self["angularaxis"] = angularaxis if angularaxis is not None else _v - _v = arg.pop("annotations", None) - self["annotations"] = annotations if annotations is not None else _v - _v = arg.pop("annotationdefaults", None) - self["annotationdefaults"] = ( - annotationdefaults if annotationdefaults is not None else _v - ) - _v = arg.pop("autosize", None) - self["autosize"] = autosize if autosize is not None else _v - _v = arg.pop("bargap", None) - self["bargap"] = bargap if bargap is not None else _v - _v = arg.pop("bargroupgap", None) - self["bargroupgap"] = bargroupgap if bargroupgap is not None else _v - _v = arg.pop("barmode", None) - self["barmode"] = barmode if barmode is not None else _v - _v = arg.pop("barnorm", None) - self["barnorm"] = barnorm if barnorm is not None else _v - _v = arg.pop("boxgap", None) - self["boxgap"] = boxgap if boxgap is not None else _v - _v = arg.pop("boxgroupgap", None) - self["boxgroupgap"] = boxgroupgap if boxgroupgap is not None else _v - _v = arg.pop("boxmode", None) - self["boxmode"] = boxmode if boxmode is not None else _v - _v = arg.pop("calendar", None) - self["calendar"] = calendar if calendar is not None else _v - _v = arg.pop("clickmode", None) - self["clickmode"] = clickmode if clickmode is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("colorway", None) - self["colorway"] = colorway if colorway is not None else _v - _v = arg.pop("datarevision", None) - self["datarevision"] = datarevision if datarevision is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("dragmode", None) - self["dragmode"] = dragmode if dragmode is not None else _v - _v = arg.pop("editrevision", None) - self["editrevision"] = editrevision if editrevision is not None else _v - _v = arg.pop("extendfunnelareacolors", None) - self["extendfunnelareacolors"] = ( - extendfunnelareacolors if extendfunnelareacolors is not None else _v - ) - _v = arg.pop("extendpiecolors", None) - self["extendpiecolors"] = extendpiecolors if extendpiecolors is not None else _v - _v = arg.pop("extendsunburstcolors", None) - self["extendsunburstcolors"] = ( - extendsunburstcolors if extendsunburstcolors is not None else _v - ) - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("funnelareacolorway", None) - self["funnelareacolorway"] = ( - funnelareacolorway if funnelareacolorway is not None else _v - ) - _v = arg.pop("funnelgap", None) - self["funnelgap"] = funnelgap if funnelgap is not None else _v - _v = arg.pop("funnelgroupgap", None) - self["funnelgroupgap"] = funnelgroupgap if funnelgroupgap is not None else _v - _v = arg.pop("funnelmode", None) - self["funnelmode"] = funnelmode if funnelmode is not None else _v - _v = arg.pop("geo", None) - self["geo"] = geo if geo is not None else _v - _v = arg.pop("grid", None) - self["grid"] = grid if grid is not None else _v - _v = arg.pop("height", None) - self["height"] = height if height is not None else _v - _v = arg.pop("hiddenlabels", None) - self["hiddenlabels"] = hiddenlabels if hiddenlabels is not None else _v - _v = arg.pop("hiddenlabelssrc", None) - self["hiddenlabelssrc"] = hiddenlabelssrc if hiddenlabelssrc is not None else _v - _v = arg.pop("hidesources", None) - self["hidesources"] = hidesources if hidesources is not None else _v - _v = arg.pop("hoverdistance", None) - self["hoverdistance"] = hoverdistance if hoverdistance is not None else _v + _v = arg.pop("alignmentgroup", None) + self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v + _v = arg.pop("bandwidth", None) + self["bandwidth"] = bandwidth if bandwidth is not None else _v + _v = arg.pop("box", None) + self["box"] = box if box is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovermode", None) - self["hovermode"] = hovermode if hovermode is not None else _v - _v = arg.pop("images", None) - self["images"] = images if images is not None else _v - _v = arg.pop("imagedefaults", None) - self["imagedefaults"] = imagedefaults if imagedefaults is not None else _v - _v = arg.pop("legend", None) - self["legend"] = legend if legend is not None else _v - _v = arg.pop("mapbox", None) - self["mapbox"] = mapbox if mapbox is not None else _v - _v = arg.pop("margin", None) - self["margin"] = margin if margin is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("jitter", None) + self["jitter"] = jitter if jitter is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v + _v = arg.pop("meanline", None) + self["meanline"] = meanline if meanline is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("modebar", None) - self["modebar"] = modebar if modebar is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("offsetgroup", None) + self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("orientation", None) self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("paper_bgcolor", None) - self["paper_bgcolor"] = paper_bgcolor if paper_bgcolor is not None else _v - _v = arg.pop("piecolorway", None) - self["piecolorway"] = piecolorway if piecolorway is not None else _v - _v = arg.pop("plot_bgcolor", None) - self["plot_bgcolor"] = plot_bgcolor if plot_bgcolor is not None else _v - _v = arg.pop("polar", None) - self["polar"] = polar if polar is not None else _v - _v = arg.pop("radialaxis", None) - self["radialaxis"] = radialaxis if radialaxis is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("selectdirection", None) - self["selectdirection"] = selectdirection if selectdirection is not None else _v - _v = arg.pop("selectionrevision", None) - self["selectionrevision"] = ( - selectionrevision if selectionrevision is not None else _v - ) - _v = arg.pop("separators", None) - self["separators"] = separators if separators is not None else _v - _v = arg.pop("shapes", None) - self["shapes"] = shapes if shapes is not None else _v - _v = arg.pop("shapedefaults", None) - self["shapedefaults"] = shapedefaults if shapedefaults is not None else _v + _v = arg.pop("pointpos", None) + self["pointpos"] = pointpos if pointpos is not None else _v + _v = arg.pop("points", None) + self["points"] = points if points is not None else _v + _v = arg.pop("scalegroup", None) + self["scalegroup"] = scalegroup if scalegroup is not None else _v + _v = arg.pop("scalemode", None) + self["scalemode"] = scalemode if scalemode is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("sliders", None) - self["sliders"] = sliders if sliders is not None else _v - _v = arg.pop("sliderdefaults", None) - self["sliderdefaults"] = sliderdefaults if sliderdefaults is not None else _v - _v = arg.pop("spikedistance", None) - self["spikedistance"] = spikedistance if spikedistance is not None else _v - _v = arg.pop("sunburstcolorway", None) - self["sunburstcolorway"] = ( - sunburstcolorway if sunburstcolorway is not None else _v - ) - _v = arg.pop("template", None) - _v = template if template is not None else _v - if _v is not None: - self["template"] = _v - _v = arg.pop("ternary", None) - self["ternary"] = ternary if ternary is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("transition", None) - self["transition"] = transition if transition is not None else _v + _v = arg.pop("side", None) + self["side"] = side if side is not None else _v + _v = arg.pop("span", None) + self["span"] = span if span is not None else _v + _v = arg.pop("spanmode", None) + self["spanmode"] = spanmode if spanmode is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("updatemenus", None) - self["updatemenus"] = updatemenus if updatemenus is not None else _v - _v = arg.pop("updatemenudefaults", None) - self["updatemenudefaults"] = ( - updatemenudefaults if updatemenudefaults is not None else _v - ) - _v = arg.pop("violingap", None) - self["violingap"] = violingap if violingap is not None else _v - _v = arg.pop("violingroupgap", None) - self["violingroupgap"] = violingroupgap if violingroupgap is not None else _v - _v = arg.pop("violinmode", None) - self["violinmode"] = violinmode if violinmode is not None else _v - _v = arg.pop("waterfallgap", None) - self["waterfallgap"] = waterfallgap if waterfallgap is not None else _v - _v = arg.pop("waterfallgroupgap", None) - self["waterfallgroupgap"] = ( - waterfallgroupgap if waterfallgroupgap is not None else _v - ) - _v = arg.pop("waterfallmode", None) - self["waterfallmode"] = waterfallmode if waterfallmode is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v _v = arg.pop("width", None) self["width"] = width if width is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator + + self._props["type"] = "violin" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="violin", val="violin" + ) + arg.pop("type", None) # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Treemap(_BaseTraceType): + + # branchvalues + # ------------ + @property + def branchvalues(self): + """ + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. + + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] + + Returns + ------- + Any + """ + return self["branchvalues"] + + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val + + # count + # ----- + @property + def count(self): + """ + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. + + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') + + Returns + ------- + Any + """ + return self["count"] + @count.setter + def count(self, val): + self["count"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # customdata + # ---------- + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + Returns + ------- + numpy.ndarray + """ + return self["customdata"] -class Waterfall(_BaseTraceType): + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # alignmentgroup - # -------------- + # customdatasrc + # ------------- @property - def alignmentgroup(self): + def customdatasrc(self): """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. + Sets the source reference on plot.ly for customdata . - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["alignmentgroup"] + return self["customdatasrc"] - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # base - # ---- + # domain + # ------ @property - def base(self): + def domain(self): """ - Sets where the bar base is drawn (in position axis units). + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.treemap.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'base' property is a number and may be specified as: - - An int or float + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this treemap trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap + trace (in plot fraction). + y + Sets the vertical domain of this treemap trace + (in plot fraction). Returns ------- - int|float + plotly.graph_objs.treemap.Domain """ - return self["base"] + return self["domain"] - @base.setter - def base(self, val): - self["base"] = val + @domain.setter + def domain(self, val): + self["domain"] = val - # cliponaxis - # ---------- + # hoverinfo + # --------- @property - def cliponaxis(self): + def hoverinfo(self): """ - Determines whether the text nodes are clipped about the subplot - axes. To show the text nodes above axis lines and tick labels, - make sure to set `xaxis.layer` and `yaxis.layer` to *below - traces*. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'cliponaxis' property must be specified as a bool - (either True, or False) + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - bool + Any|numpy.ndarray """ - return self["cliponaxis"] + return self["hoverinfo"] - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # connector - # --------- + # hoverinfosrc + # ------------ @property - def connector(self): + def hoverinfosrc(self): """ - The 'connector' property is an instance of Connector + Sets the source reference on plot.ly for hoverinfo . + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.waterfall.Connector + - An instance of plotly.graph_objs.treemap.Hoverlabel - A dict of string/value properties that will be passed - to the Connector constructor + to the Hoverlabel constructor Supported dict properties: - line - plotly.graph_objects.waterfall.connector.Line - instance or dict with compatible properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - plotly.graph_objs.waterfall.Connector + plotly.graph_objs.treemap.Hoverlabel """ - return self["connector"] + return self["hoverlabel"] - @connector.setter - def connector(self, val): - self["connector"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # constraintext + # hovertemplate # ------------- @property - def constraintext(self): + def hovertemplate(self): """ - Constrain the size of text inside or outside a bar to be no - larger than the bar itself. + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry` and `percentParent`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. - The 'constraintext' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'both', 'none'] + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + str|numpy.ndarray """ - return self["constraintext"] + return self["hovertemplate"] - @constraintext.setter - def constraintext(self, val): - self["constraintext"] = val + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val - # customdata - # ---------- + # hovertemplatesrc + # ---------------- @property - def customdata(self): + def hovertemplatesrc(self): """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + Sets the source reference on plot.ly for hovertemplate . - The 'customdata' property is an array that may be specified as a tuple, + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["customdata"] + return self["ids"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @ids.setter + def ids(self, val): + self["ids"] = val - # customdatasrc - # ------------- + # idssrc + # ------ @property - def customdatasrc(self): + def idssrc(self): """ - Sets the source reference on plot.ly for customdata . + Sets the source reference on plot.ly for ids . - The 'customdatasrc' property must be specified as a string or + The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["customdatasrc"] + return self["idssrc"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # decreasing - # ---------- + # insidetextfont + # -------------- @property - def decreasing(self): + def insidetextfont(self): """ - The 'decreasing' property is an instance of Decreasing + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont that may be specified as: - - An instance of plotly.graph_objs.waterfall.Decreasing + - An instance of plotly.graph_objs.treemap.Insidetextfont - A dict of string/value properties that will be passed - to the Decreasing constructor + to the Insidetextfont constructor Supported dict properties: - marker - plotly.graph_objects.waterfall.decreasing.Marke - r instance or dict with compatible properties + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - plotly.graph_objs.waterfall.Decreasing + plotly.graph_objs.treemap.Insidetextfont """ - return self["decreasing"] + return self["insidetextfont"] - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val - # dx - # -- + # labels + # ------ @property - def dx(self): + def labels(self): """ - Sets the x coordinate step. See `x0` for more info. + Sets the labels of each of the sectors. - The 'dx' property is a number and may be specified as: - - An int or float + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on plot.ly for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + # level + # ----- + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.treemap.Marker + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.treemap.marker.ColorBar + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on plot.ly for + colors . + depthfade + Determines if the sector colors are faded + towards the background from the leaves up to + the headers. This option is unavailable when a + `colorscale` is present, defaults to false when + `marker.colors` is set, but otherwise defaults + to true. When set to "reversed", the fading + direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated + colors while the leaves are faded towards the + background color. + line + plotly.graph_objects.treemap.marker.Line + instance or dict with compatible properties + pad + plotly.graph_objects.treemap.marker.Pad + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. Returns ------- - int|float + plotly.graph_objs.treemap.Marker """ - return self["dx"] + return self["marker"] - @dx.setter - def dx(self, val): - self["dx"] = val + @marker.setter + def marker(self, val): + self["marker"] = val - # dy - # -- + # maxdepth + # -------- @property - def dy(self): + def maxdepth(self): """ - Sets the y coordinate step. See `y0` for more info. + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. - The 'dy' property is a number and may be specified as: - - An int or float + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) Returns ------- - int|float + int """ - return self["dy"] + return self["maxdepth"] - @dy.setter - def dy(self, val): - self["dy"] = val + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val - # hoverinfo - # --------- + # meta + # ---- @property - def hoverinfo(self): + def meta(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['name', 'x', 'y', 'text', 'initial', 'delta', 'final'] joined with '+' characters - (e.g. 'name+x') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'meta' property accepts values of any type Returns ------- Any|numpy.ndarray """ - return self["hoverinfo"] + return self["meta"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # hoverinfosrc - # ------------ + # metasrc + # ------- @property - def hoverinfosrc(self): + def metasrc(self): """ - Sets the source reference on plot.ly for hoverinfo . + Sets the source reference on plot.ly for meta . - The 'hoverinfosrc' property must be specified as a string or + The 'metasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["hoverinfosrc"] + return self["metasrc"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # hoverlabel - # ---------- + # name + # ---- @property - def hoverlabel(self): + def name(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.waterfall.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor + Sets the trace name. The trace name appear as the legend item + and on hover. - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.waterfall.Hoverlabel + str """ - return self["hoverlabel"] + return self["name"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @name.setter + def name(self, val): + self["name"] = val - # hovertemplate - # ------------- + # opacity + # ------- @property - def hovertemplate(self): + def opacity(self): """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `initial`, `delta` and `final`. Anything contained in - tag `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. + Sets the opacity of the trace. - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - str|numpy.ndarray + int|float """ - return self["hovertemplate"] + return self["opacity"] - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val + @opacity.setter + def opacity(self, val): + self["opacity"] = val - # hovertemplatesrc - # ---------------- + # outsidetextfont + # --------------- @property - def hovertemplatesrc(self): + def outsidetextfont(self): """ - Sets the source reference on plot.ly for hovertemplate . + Sets the font used for `textinfo` lying outside the sector. - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of plotly.graph_objs.treemap.Outsidetextfont + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - str + plotly.graph_objs.treemap.Outsidetextfont """ - return self["hovertemplatesrc"] + return self["outsidetextfont"] - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val - # hovertext - # --------- + # parents + # ------- @property - def hovertext(self): + def parents(self): """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ - return self["hovertext"] + return self["parents"] - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val + @parents.setter + def parents(self, val): + self["parents"] = val - # hovertextsrc - # ------------ + # parentssrc + # ---------- @property - def hovertextsrc(self): + def parentssrc(self): """ - Sets the source reference on plot.ly for hovertext . + Sets the source reference on plot.ly for parents . - The 'hovertextsrc' property must be specified as a string or + The 'parentssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["hovertextsrc"] + return self["parentssrc"] - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val - # ids - # --- + # pathbar + # ------- @property - def ids(self): + def pathbar(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + The 'pathbar' property is an instance of Pathbar + that may be specified as: + - An instance of plotly.graph_objs.treemap.Pathbar + - A dict of string/value properties that will be passed + to the Pathbar constructor - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + edgeshape + Determines which shape is used for edges + between `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used + with 3 pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. + outside the trace `domain` and with one pixel + gap. Returns ------- - numpy.ndarray + plotly.graph_objs.treemap.Pathbar """ - return self["ids"] + return self["pathbar"] - @ids.setter - def ids(self, val): - self["ids"] = val + @pathbar.setter + def pathbar(self, val): + self["pathbar"] = val - # idssrc + # stream # ------ @property - def idssrc(self): - """ - Sets the source reference on plot.ly for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # increasing - # ---------- - @property - def increasing(self): + def stream(self): """ - The 'increasing' property is an instance of Increasing + The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.waterfall.Increasing + - An instance of plotly.graph_objs.treemap.Stream - A dict of string/value properties that will be passed - to the Increasing constructor + to the Stream constructor Supported dict properties: - marker - plotly.graph_objects.waterfall.increasing.Marke - r instance or dict with compatible properties + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - plotly.graph_objs.waterfall.Increasing + plotly.graph_objs.treemap.Stream """ - return self["increasing"] + return self["stream"] - @increasing.setter - def increasing(self, val): - self["increasing"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # insidetextanchor - # ---------------- + # text + # ---- @property - def insidetextanchor(self): + def text(self): """ - Determines if texts are kept at center or start/end points in - `textposition` "inside" mode. + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. - The 'insidetextanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['end', 'middle', 'start'] + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["insidetextanchor"] + return self["text"] - @insidetextanchor.setter - def insidetextanchor(self, val): - self["insidetextanchor"] = val + @text.setter + def text(self, val): + self["text"] = val - # insidetextfont - # -------------- + # textfont + # -------- @property - def insidetextfont(self): + def textfont(self): """ - Sets the font used for `text` lying inside the bar. + Sets the font used for `textinfo`. - The 'insidetextfont' property is an instance of Insidetextfont + The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.waterfall.Insidetextfont + - An instance of plotly.graph_objs.treemap.Textfont - A dict of string/value properties that will be passed - to the Insidetextfont constructor + to the Textfont constructor Supported dict properties: @@ -6061,909 +7933,1617 @@ def insidetextfont(self): Returns ------- - plotly.graph_objs.waterfall.Insidetextfont + plotly.graph_objs.treemap.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Sets the positions of the `text` elements. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + + Returns + ------- + Any + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` and + `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str """ - return self["insidetextfont"] + return self["texttemplatesrc"] - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # legendgroup - # ----------- + # tiling + # ------ @property - def legendgroup(self): + def tiling(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + The 'tiling' property is an instance of Tiling + that may be specified as: + - An instance of plotly.graph_objs.treemap.Tiling + - A dict of string/value properties that will be passed + to the Tiling constructor - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + flip + Determines if the positions obtained from + solver are flipped on each axis. + packing + Determines d3 treemap solver. For more info + please refer to + https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, + according to https://github.com/d3/d3-hierarchy + /blob/master/README.md#squarify_ratio this + option specifies the desired aspect ratio of + the generated rectangles. The ratio must be + specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the + ratio; for example, a ratio of two will attempt + to produce a mixture of rectangles whose + width:height ratio is either 2:1 or 1:2. When + using "squarify", unlike d3 which uses the + Golden Ratio i.e. 1.618034, Plotly applies 1 to + increase squares in treemap layouts. Returns ------- - str + plotly.graph_objs.treemap.Tiling """ - return self["legendgroup"] + return self["tiling"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @tiling.setter + def tiling(self, val): + self["tiling"] = val - # measure - # ------- + # uid + # --- @property - def measure(self): + def uid(self): """ - An array containing types of values. By default the values are - considered as 'relative'. However; it is possible to use - 'total' to compute the sums. Also 'absolute' could be applied - to reset the computed total or to declare an initial value - where needed. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'measure' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - numpy.ndarray + str """ - return self["measure"] + return self["uid"] - @measure.setter - def measure(self, val): - self["measure"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # measuresrc + # uirevision # ---------- @property - def measuresrc(self): + def uirevision(self): """ - Sets the source reference on plot.ly for measure . + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'measuresrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uirevision' property accepts values of any type Returns ------- - str + Any """ - return self["measuresrc"] + return self["uirevision"] - @measuresrc.setter - def measuresrc(self, val): - self["measuresrc"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # meta - # ---- + # values + # ------ @property - def meta(self): + def values(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. - The 'meta' property accepts values of any type + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any|numpy.ndarray + numpy.ndarray """ - return self["meta"] + return self["values"] - @meta.setter - def meta(self, val): - self["meta"] = val + @values.setter + def values(self, val): + self["values"] = val - # metasrc - # ------- + # valuessrc + # --------- @property - def metasrc(self): + def valuessrc(self): """ - Sets the source reference on plot.ly for meta . + Sets the source reference on plot.ly for values . - The 'metasrc' property must be specified as a string or + The 'valuessrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["metasrc"] + return self["valuessrc"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val - # name - # ---- + # visible + # ------- @property - def name(self): + def visible(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["name"] + return self["visible"] - @name.setter - def name(self, val): - self["name"] = val + @visible.setter + def visible(self, val): + self["visible"] = val - # offset - # ------ + # type + # ---- @property - def offset(self): + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + domain + plotly.graph_objects.treemap.Domain instance or dict + with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.treemap.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for labels . + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + plotly.graph_objects.treemap.Marker instance or dict + with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for parents . + pathbar + plotly.graph_objects.treemap.Pathbar instance or dict + with compatible properties + stream + plotly.graph_objects.treemap.Stream instance or dict + with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tiling + plotly.graph_objects.treemap.Tiling instance or dict + with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on plot.ly for values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). """ - Shifts the position where the bar is drawn (in position axis - units). In "group" barmode, traces that set "offset" will be - excluded and drawn in "overlay" mode instead. - - The 'offset' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above + + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): + """ + Construct a new Treemap object + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Treemap + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + domain + plotly.graph_objects.treemap.Domain instance or dict + with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.treemap.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for labels . + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + plotly.graph_objects.treemap.Marker instance or dict + with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for parents . + pathbar + plotly.graph_objects.treemap.Pathbar instance or dict + with compatible properties + stream + plotly.graph_objects.treemap.Stream instance or dict + with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tiling + plotly.graph_objects.treemap.Tiling instance or dict + with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on plot.ly for values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). Returns ------- - int|float|numpy.ndarray + Treemap """ - return self["offset"] + super(Treemap, self).__init__("treemap") - @offset.setter - def offset(self, val): - self["offset"] = val + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Treemap +constructor must be a dict or +an instance of plotly.graph_objs.Treemap""" + ) - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) - Returns - ------- - str - """ - return self["offsetgroup"] + # Import validators + # ----------------- + from plotly.validators import treemap as v_treemap - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val + # Initialize validators + # --------------------- + self._validators["branchvalues"] = v_treemap.BranchvaluesValidator() + self._validators["count"] = v_treemap.CountValidator() + self._validators["customdata"] = v_treemap.CustomdataValidator() + self._validators["customdatasrc"] = v_treemap.CustomdatasrcValidator() + self._validators["domain"] = v_treemap.DomainValidator() + self._validators["hoverinfo"] = v_treemap.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_treemap.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_treemap.HoverlabelValidator() + self._validators["hovertemplate"] = v_treemap.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_treemap.HovertemplatesrcValidator() + self._validators["hovertext"] = v_treemap.HovertextValidator() + self._validators["hovertextsrc"] = v_treemap.HovertextsrcValidator() + self._validators["ids"] = v_treemap.IdsValidator() + self._validators["idssrc"] = v_treemap.IdssrcValidator() + self._validators["insidetextfont"] = v_treemap.InsidetextfontValidator() + self._validators["labels"] = v_treemap.LabelsValidator() + self._validators["labelssrc"] = v_treemap.LabelssrcValidator() + self._validators["level"] = v_treemap.LevelValidator() + self._validators["marker"] = v_treemap.MarkerValidator() + self._validators["maxdepth"] = v_treemap.MaxdepthValidator() + self._validators["meta"] = v_treemap.MetaValidator() + self._validators["metasrc"] = v_treemap.MetasrcValidator() + self._validators["name"] = v_treemap.NameValidator() + self._validators["opacity"] = v_treemap.OpacityValidator() + self._validators["outsidetextfont"] = v_treemap.OutsidetextfontValidator() + self._validators["parents"] = v_treemap.ParentsValidator() + self._validators["parentssrc"] = v_treemap.ParentssrcValidator() + self._validators["pathbar"] = v_treemap.PathbarValidator() + self._validators["stream"] = v_treemap.StreamValidator() + self._validators["text"] = v_treemap.TextValidator() + self._validators["textfont"] = v_treemap.TextfontValidator() + self._validators["textinfo"] = v_treemap.TextinfoValidator() + self._validators["textposition"] = v_treemap.TextpositionValidator() + self._validators["textsrc"] = v_treemap.TextsrcValidator() + self._validators["texttemplate"] = v_treemap.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_treemap.TexttemplatesrcValidator() + self._validators["tiling"] = v_treemap.TilingValidator() + self._validators["uid"] = v_treemap.UidValidator() + self._validators["uirevision"] = v_treemap.UirevisionValidator() + self._validators["values"] = v_treemap.ValuesValidator() + self._validators["valuessrc"] = v_treemap.ValuessrcValidator() + self._validators["visible"] = v_treemap.VisibleValidator() - # offsetsrc - # --------- - @property - def offsetsrc(self): - """ - Sets the source reference on plot.ly for offset . - - The 'offsetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("branchvalues", None) + self["branchvalues"] = branchvalues if branchvalues is not None else _v + _v = arg.pop("count", None) + self["count"] = count if count is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v + _v = arg.pop("labels", None) + self["labels"] = labels if labels is not None else _v + _v = arg.pop("labelssrc", None) + self["labelssrc"] = labelssrc if labelssrc is not None else _v + _v = arg.pop("level", None) + self["level"] = level if level is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v + _v = arg.pop("maxdepth", None) + self["maxdepth"] = maxdepth if maxdepth is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("outsidetextfont", None) + self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v + _v = arg.pop("parents", None) + self["parents"] = parents if parents is not None else _v + _v = arg.pop("parentssrc", None) + self["parentssrc"] = parentssrc if parentssrc is not None else _v + _v = arg.pop("pathbar", None) + self["pathbar"] = pathbar if pathbar is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textinfo", None) + self["textinfo"] = textinfo if textinfo is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("tiling", None) + self["tiling"] = tiling if tiling is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("values", None) + self["values"] = values if values is not None else _v + _v = arg.pop("valuessrc", None) + self["valuessrc"] = valuessrc if valuessrc is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v - Returns - ------- - str - """ - return self["offsetsrc"] + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - @offsetsrc.setter - def offsetsrc(self, val): - self["offsetsrc"] = val + self._props["type"] = "treemap" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="treemap", val="treemap" + ) + arg.pop("type", None) - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - Returns - ------- - int|float - """ - return self["opacity"] + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - @opacity.setter - def opacity(self, val): - self["opacity"] = val - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the bars. With "v" ("h"), the value of - the each bar spans along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - Any - """ - return self["orientation"] - @orientation.setter - def orientation(self, val): - self["orientation"] = val +class Table(_BaseTraceType): - # outsidetextfont - # --------------- + # cells + # ----- @property - def outsidetextfont(self): + def cells(self): """ - Sets the font used for `text` lying outside the bar. - - The 'outsidetextfont' property is an instance of Outsidetextfont + The 'cells' property is an instance of Cells that may be specified as: - - An instance of plotly.graph_objs.waterfall.Outsidetextfont + - An instance of plotly.graph_objs.table.Cells - A dict of string/value properties that will be passed - to the Outsidetextfont constructor + to the Cells constructor Supported dict properties: - color - - colorsrc - Sets the source reference on plot.ly for color + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans more two or more lines (i.e. `text` + contains one or more
HTML tags) or if an + explicit width is set to override the text + width. + alignsrc + Sets the source reference on plot.ly for align . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc + fill + plotly.graph_objects.table.cells.Fill instance + or dict with compatible properties + font + plotly.graph_objects.table.cells.Font instance + or dict with compatible properties + format + Sets the cell value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.waterfall.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.waterfall.Stream - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. - - Returns - ------- - plotly.graph_objs.waterfall.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + format . + height + The height of cells. + line + plotly.graph_objects.table.cells.Line instance + or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on plot.ly for + prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on plot.ly for + suffix . + values + Cell values. `values[m][n]` represents the + value of the `n`th point in column `m`, + therefore the `values[m]` vector length for all + columns must be the same (longer vectors will + be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on plot.ly for + values . Returns ------- - str|numpy.ndarray + plotly.graph_objs.table.Cells """ - return self["text"] + return self["cells"] - @text.setter - def text(self, val): - self["text"] = val + @cells.setter + def cells(self, val): + self["cells"] = val - # textangle - # --------- + # columnorder + # ----------- @property - def textangle(self): + def columnorder(self): """ - Sets the angle of the tick labels with respect to the bar. For - example, a `tickangle` of -90 draws the tick labels vertically. - With "auto" the texts may automatically be rotated to fit with - the maximum size in bars. + Specifies the rendered order of the data columns; for example, + a value `2` at position `0` means that column index `0` in the + data will be rendered as the third column, as columns have an + index base of zero. - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). + The 'columnorder' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["textangle"] + return self["columnorder"] - @textangle.setter - def textangle(self, val): - self["textangle"] = val + @columnorder.setter + def columnorder(self, val): + self["columnorder"] = val - # textfont - # -------- + # columnordersrc + # -------------- @property - def textfont(self): + def columnordersrc(self): """ - Sets the font used for `text`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of plotly.graph_objs.waterfall.Textfont - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size + Sets the source reference on plot.ly for columnorder . - sizesrc - Sets the source reference on plot.ly for size - . + The 'columnordersrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.waterfall.Textfont + str """ - return self["textfont"] + return self["columnordersrc"] - @textfont.setter - def textfont(self, val): - self["textfont"] = val + @columnordersrc.setter + def columnordersrc(self, val): + self["columnordersrc"] = val - # textinfo - # -------- + # columnwidth + # ----------- @property - def textinfo(self): + def columnwidth(self): """ - Determines which trace information appear on the graph. In the - case of having multiple waterfalls, totals are computed - separately (per trace). + The width of columns expressed as a ratio. Columns fill the + available width in proportion of their specified column widths. - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'initial', 'delta', 'final'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') + The 'columnwidth' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + int|float|numpy.ndarray """ - return self["textinfo"] + return self["columnwidth"] - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val + @columnwidth.setter + def columnwidth(self, val): + self["columnwidth"] = val - # textposition - # ------------ + # columnwidthsrc + # -------------- @property - def textposition(self): + def columnwidthsrc(self): """ - Specifies the location of the `text`. "inside" positions `text` - inside, next to the bar end (rotated and scaled if needed). - "outside" positions `text` outside, next to the bar end (scaled - if needed), unless there is another bar stacked on this one, - then the text gets pushed inside. "auto" tries to position - `text` inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. + Sets the source reference on plot.ly for columnwidth . - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above + The 'columnwidthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any|numpy.ndarray + str """ - return self["textposition"] + return self["columnwidthsrc"] - @textposition.setter - def textposition(self, val): - self["textposition"] = val + @columnwidthsrc.setter + def columnwidthsrc(self, val): + self["columnwidthsrc"] = val - # textpositionsrc - # --------------- + # customdata + # ---------- @property - def textpositionsrc(self): + def customdata(self): """ - Sets the source reference on plot.ly for textposition . + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["textpositionsrc"] + return self["customdata"] - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # textsrc - # ------- + # customdatasrc + # ------------- @property - def textsrc(self): + def customdatasrc(self): """ - Sets the source reference on plot.ly for text . + Sets the source reference on plot.ly for customdata . - The 'textsrc' property must be specified as a string or + The 'customdatasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["textsrc"] + return self["customdatasrc"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # totals + # domain # ------ @property - def totals(self): + def domain(self): """ - The 'totals' property is an instance of Totals + The 'domain' property is an instance of Domain that may be specified as: - - An instance of plotly.graph_objs.waterfall.Totals + - An instance of plotly.graph_objs.table.Domain - A dict of string/value properties that will be passed - to the Totals constructor + to the Domain constructor Supported dict properties: - marker - plotly.graph_objects.waterfall.totals.Marker - instance or dict with compatible properties + column + If there is a layout grid, use the domain for + this column in the grid for this table trace . + row + If there is a layout grid, use the domain for + this row in the grid for this table trace . + x + Sets the horizontal domain of this table trace + (in plot fraction). + y + Sets the vertical domain of this table trace + (in plot fraction). Returns ------- - plotly.graph_objs.waterfall.Totals + plotly.graph_objs.table.Domain """ - return self["totals"] + return self["domain"] - @totals.setter - def totals(self, val): - self["totals"] = val + @domain.setter + def domain(self, val): + self["domain"] = val - # uid - # --- + # header + # ------ @property - def uid(self): + def header(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + The 'header' property is an instance of Header + that may be specified as: + - An instance of plotly.graph_objs.table.Header + - A dict of string/value properties that will be passed + to the Header constructor - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans more two or more lines (i.e. `text` + contains one or more
HTML tags) or if an + explicit width is set to override the text + width. + alignsrc + Sets the source reference on plot.ly for align + . + fill + plotly.graph_objects.table.header.Fill instance + or dict with compatible properties + font + plotly.graph_objects.table.header.Font instance + or dict with compatible properties + format + Sets the cell value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + formatsrc + Sets the source reference on plot.ly for + format . + height + The height of cells. + line + plotly.graph_objects.table.header.Line instance + or dict with compatible properties + prefix + Prefix for cell values. + prefixsrc + Sets the source reference on plot.ly for + prefix . + suffix + Suffix for cell values. + suffixsrc + Sets the source reference on plot.ly for + suffix . + values + Header cell values. `values[m][n]` represents + the value of the `n`th point in column `m`, + therefore the `values[m]` vector length for all + columns must be the same (longer vectors will + be truncated). Each value must be a finite + number or a string. + valuessrc + Sets the source reference on plot.ly for + values . Returns ------- - str + plotly.graph_objs.table.Header """ - return self["uid"] + return self["header"] - @uid.setter - def uid(self, val): - self["uid"] = val + @header.setter + def header(self, val): + self["header"] = val - # uirevision - # ---------- + # hoverinfo + # --------- @property - def uirevision(self): + def hoverinfo(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'uirevision' property accepts values of any type + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - Any + Any|numpy.ndarray """ - return self["uirevision"] + return self["hoverinfo"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # visible - # ------- + # hoverinfosrc + # ------------ @property - def visible(self): + def hoverinfosrc(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the source reference on plot.ly for hoverinfo . - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["visible"] + return self["hoverinfosrc"] - @visible.setter - def visible(self, val): - self["visible"] = val + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val - # width - # ----- + # hoverlabel + # ---------- @property - def width(self): + def hoverlabel(self): """ - Sets the bar width (in position axis units). + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.table.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - int|float|numpy.ndarray + plotly.graph_objs.table.Hoverlabel """ - return self["width"] + return self["hoverlabel"] - @width.setter - def width(self, val): - self["width"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # widthsrc - # -------- + # ids + # --- @property - def widthsrc(self): + def ids(self): """ - Sets the source reference on plot.ly for width . + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["widthsrc"] + return self["ids"] - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val + @ids.setter + def ids(self, val): + self["ids"] = val - # x - # - + # idssrc + # ------ @property - def x(self): + def idssrc(self): """ - Sets the x coordinates. + Sets the source reference on plot.ly for ids . - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - numpy.ndarray + str """ - return self["x"] + return self["idssrc"] - @x.setter - def x(self, val): - self["x"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # x0 - # -- + # meta + # ---- @property - def x0(self): + def meta(self): """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'x0' property accepts values of any type + The 'meta' property accepts values of any type Returns ------- - Any + Any|numpy.ndarray """ - return self["x0"] + return self["meta"] - @x0.setter - def x0(self, val): - self["x0"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # xaxis - # ----- + # metasrc + # ------- @property - def xaxis(self): + def metasrc(self): """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + Sets the source reference on plot.ly for meta . - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["xaxis"] + return self["metasrc"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # xsrc + # name # ---- @property - def xsrc(self): + def name(self): """ - Sets the source reference on plot.ly for x . + Sets the trace name. The trace name appear as the legend item + and on hover. - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["xsrc"] + return self["name"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @name.setter + def name(self, val): + self["name"] = val - # y - # - + # stream + # ------ @property - def y(self): + def stream(self): """ - Sets the y coordinates. + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.table.Stream + - A dict of string/value properties that will be passed + to the Stream constructor - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - numpy.ndarray + plotly.graph_objs.table.Stream """ - return self["y"] + return self["stream"] - @y.setter - def y(self, val): - self["y"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # y0 - # -- + # uid + # --- @property - def y0(self): + def uid(self): """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'y0' property accepts values of any type + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - Any + str """ - return self["y0"] + return self["uid"] - @y0.setter - def y0(self, val): - self["y0"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # yaxis - # ----- + # uirevision + # ---------- @property - def yaxis(self): + def uirevision(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'uirevision' property accepts values of any type Returns ------- - str + Any """ - return self["yaxis"] + return self["uirevision"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # ysrc - # ---- + # visible + # ------- @property - def ysrc(self): + def visible(self): """ - Sets the source reference on plot.ly for y . + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["ysrc"] + return self["visible"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @visible.setter + def visible(self, val): + self["visible"] = val # type # ---- @@ -6982,25 +9562,22 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - plotly.graph_objects.waterfall.Connector instance or - dict with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. + cells + plotly.graph_objects.table.Cells instance or dict with + compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on plot.ly for columnorder . + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on plot.ly for columnwidth . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -7008,13 +9585,12 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - decreasing - plotly.graph_objects.waterfall.Decreasing instance or - dict with compatible properties - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. + domain + plotly.graph_objects.table.Domain instance or dict with + compatible properties + header + plotly.graph_objects.table.Header instance or dict with + compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -7023,65 +9599,14 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.waterfall.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `initial`, `delta` and `final`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + plotly.graph_objects.table.Hoverlabel instance or dict + with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - increasing - plotly.graph_objects.waterfall.Increasing instance or - dict with compatible properties - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - measure - An array containing types of values. By default the - values are considered as 'relative'. However; it is - possible to use 'total' to compute the sums. Also - 'absolute' could be applied to reset the computed total - or to declare an initial value where needed. - measuresrc - Sets the source reference on plot.ly for measure . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -7100,75 +9625,9 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on plot.ly for offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. stream - plotly.graph_objects.waterfall.Stream instance or dict - with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple waterfalls, totals are - computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . - totals - plotly.graph_objects.waterfall.Totals instance or dict - with compatible properties + plotly.graph_objects.table.Stream instance or dict with + compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -7196,135 +9655,64 @@ def _prop_descriptions(self): "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on plot.ly for width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . """ def __init__( self, arg=None, - alignmentgroup=None, - base=None, - cliponaxis=None, - connector=None, - constraintext=None, + cells=None, + columnorder=None, + columnordersrc=None, + columnwidth=None, + columnwidthsrc=None, customdata=None, customdatasrc=None, - decreasing=None, - dx=None, - dy=None, + domain=None, + header=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, ids=None, idssrc=None, - increasing=None, - insidetextanchor=None, - insidetextfont=None, - legendgroup=None, - measure=None, - measuresrc=None, meta=None, metasrc=None, name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - totals=None, uid=None, uirevision=None, visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, **kwargs ): """ - Construct a new Waterfall object + Construct a new Table object - Draws waterfall trace which is useful graph to displays the - contribution of various elements (either positive or negative) - in a bar chart. The data visualized by the span of the bars is - set in `y` if `orientation` is set th "v" (the default) and the - labels are set in `x`. By setting `orientation` to "h", the - roles are interchanged. + Table view for detailed data viewing. The data are arranged in + a grid of rows and columns. Most styling can be specified for + columns, rows or individual cells. Table is using a column- + major order, ie. the grid is represented as a vector of column + vectors. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Waterfall - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - plotly.graph_objects.waterfall.Connector instance or - dict with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. + an instance of plotly.graph_objs.Table + cells + plotly.graph_objects.table.Cells instance or dict with + compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on plot.ly for columnorder . + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on plot.ly for columnwidth . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -7332,13 +9720,12 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - decreasing - plotly.graph_objects.waterfall.Decreasing instance or - dict with compatible properties - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. + domain + plotly.graph_objects.table.Domain instance or dict with + compatible properties + header + plotly.graph_objects.table.Header instance or dict with + compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -7347,65 +9734,14 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.waterfall.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `initial`, `delta` and `final`. - Anything contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + plotly.graph_objects.table.Hoverlabel instance or dict + with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - increasing - plotly.graph_objects.waterfall.Increasing instance or - dict with compatible properties - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - measure - An array containing types of values. By default the - values are considered as 'relative'. However; it is - possible to use 'total' to compute the sums. Also - 'absolute' could be applied to reset the computed total - or to declare an initial value where needed. - measuresrc - Sets the source reference on plot.ly for measure . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -7424,75 +9760,9 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on plot.ly for offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. stream - plotly.graph_objects.waterfall.Stream instance or dict - with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple waterfalls, totals are - computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . - totals - plotly.graph_objects.waterfall.Totals instance or dict - with compatible properties + plotly.graph_objects.table.Stream instance or dict with + compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -7520,42 +9790,12 @@ def __init__( "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on plot.ly for width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . Returns ------- - Waterfall + Table """ - super(Waterfall, self).__init__("waterfall") + super(Table, self).__init__("table") # Validate arg # ------------ @@ -7568,9 +9808,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Waterfall +The first argument to the plotly.graph_objs.Table constructor must be a dict or -an instance of plotly.graph_objs.Waterfall""" +an instance of plotly.graph_objs.Table""" ) # Handle skip_invalid @@ -7579,199 +9819,84 @@ def __init__( # Import validators # ----------------- - from plotly.validators import waterfall as v_waterfall + from plotly.validators import table as v_table # Initialize validators # --------------------- - self._validators["alignmentgroup"] = v_waterfall.AlignmentgroupValidator() - self._validators["base"] = v_waterfall.BaseValidator() - self._validators["cliponaxis"] = v_waterfall.CliponaxisValidator() - self._validators["connector"] = v_waterfall.ConnectorValidator() - self._validators["constraintext"] = v_waterfall.ConstraintextValidator() - self._validators["customdata"] = v_waterfall.CustomdataValidator() - self._validators["customdatasrc"] = v_waterfall.CustomdatasrcValidator() - self._validators["decreasing"] = v_waterfall.DecreasingValidator() - self._validators["dx"] = v_waterfall.DxValidator() - self._validators["dy"] = v_waterfall.DyValidator() - self._validators["hoverinfo"] = v_waterfall.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_waterfall.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_waterfall.HoverlabelValidator() - self._validators["hovertemplate"] = v_waterfall.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_waterfall.HovertemplatesrcValidator() - self._validators["hovertext"] = v_waterfall.HovertextValidator() - self._validators["hovertextsrc"] = v_waterfall.HovertextsrcValidator() - self._validators["ids"] = v_waterfall.IdsValidator() - self._validators["idssrc"] = v_waterfall.IdssrcValidator() - self._validators["increasing"] = v_waterfall.IncreasingValidator() - self._validators["insidetextanchor"] = v_waterfall.InsidetextanchorValidator() - self._validators["insidetextfont"] = v_waterfall.InsidetextfontValidator() - self._validators["legendgroup"] = v_waterfall.LegendgroupValidator() - self._validators["measure"] = v_waterfall.MeasureValidator() - self._validators["measuresrc"] = v_waterfall.MeasuresrcValidator() - self._validators["meta"] = v_waterfall.MetaValidator() - self._validators["metasrc"] = v_waterfall.MetasrcValidator() - self._validators["name"] = v_waterfall.NameValidator() - self._validators["offset"] = v_waterfall.OffsetValidator() - self._validators["offsetgroup"] = v_waterfall.OffsetgroupValidator() - self._validators["offsetsrc"] = v_waterfall.OffsetsrcValidator() - self._validators["opacity"] = v_waterfall.OpacityValidator() - self._validators["orientation"] = v_waterfall.OrientationValidator() - self._validators["outsidetextfont"] = v_waterfall.OutsidetextfontValidator() - self._validators["selectedpoints"] = v_waterfall.SelectedpointsValidator() - self._validators["showlegend"] = v_waterfall.ShowlegendValidator() - self._validators["stream"] = v_waterfall.StreamValidator() - self._validators["text"] = v_waterfall.TextValidator() - self._validators["textangle"] = v_waterfall.TextangleValidator() - self._validators["textfont"] = v_waterfall.TextfontValidator() - self._validators["textinfo"] = v_waterfall.TextinfoValidator() - self._validators["textposition"] = v_waterfall.TextpositionValidator() - self._validators["textpositionsrc"] = v_waterfall.TextpositionsrcValidator() - self._validators["textsrc"] = v_waterfall.TextsrcValidator() - self._validators["totals"] = v_waterfall.TotalsValidator() - self._validators["uid"] = v_waterfall.UidValidator() - self._validators["uirevision"] = v_waterfall.UirevisionValidator() - self._validators["visible"] = v_waterfall.VisibleValidator() - self._validators["width"] = v_waterfall.WidthValidator() - self._validators["widthsrc"] = v_waterfall.WidthsrcValidator() - self._validators["x"] = v_waterfall.XValidator() - self._validators["x0"] = v_waterfall.X0Validator() - self._validators["xaxis"] = v_waterfall.XAxisValidator() - self._validators["xsrc"] = v_waterfall.XsrcValidator() - self._validators["y"] = v_waterfall.YValidator() - self._validators["y0"] = v_waterfall.Y0Validator() - self._validators["yaxis"] = v_waterfall.YAxisValidator() - self._validators["ysrc"] = v_waterfall.YsrcValidator() + self._validators["cells"] = v_table.CellsValidator() + self._validators["columnorder"] = v_table.ColumnorderValidator() + self._validators["columnordersrc"] = v_table.ColumnordersrcValidator() + self._validators["columnwidth"] = v_table.ColumnwidthValidator() + self._validators["columnwidthsrc"] = v_table.ColumnwidthsrcValidator() + self._validators["customdata"] = v_table.CustomdataValidator() + self._validators["customdatasrc"] = v_table.CustomdatasrcValidator() + self._validators["domain"] = v_table.DomainValidator() + self._validators["header"] = v_table.HeaderValidator() + self._validators["hoverinfo"] = v_table.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_table.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_table.HoverlabelValidator() + self._validators["ids"] = v_table.IdsValidator() + self._validators["idssrc"] = v_table.IdssrcValidator() + self._validators["meta"] = v_table.MetaValidator() + self._validators["metasrc"] = v_table.MetasrcValidator() + self._validators["name"] = v_table.NameValidator() + self._validators["stream"] = v_table.StreamValidator() + self._validators["uid"] = v_table.UidValidator() + self._validators["uirevision"] = v_table.UirevisionValidator() + self._validators["visible"] = v_table.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("base", None) - self["base"] = base if base is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connector", None) - self["connector"] = connector if connector is not None else _v - _v = arg.pop("constraintext", None) - self["constraintext"] = constraintext if constraintext is not None else _v + _v = arg.pop("cells", None) + self["cells"] = cells if cells is not None else _v + _v = arg.pop("columnorder", None) + self["columnorder"] = columnorder if columnorder is not None else _v + _v = arg.pop("columnordersrc", None) + self["columnordersrc"] = columnordersrc if columnordersrc is not None else _v + _v = arg.pop("columnwidth", None) + self["columnwidth"] = columnwidth if columnwidth is not None else _v + _v = arg.pop("columnwidthsrc", None) + self["columnwidthsrc"] = columnwidthsrc if columnwidthsrc is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v + _v = arg.pop("header", None) + self["header"] = header if header is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v - _v = arg.pop("insidetextanchor", None) - self["insidetextanchor"] = ( - insidetextanchor if insidetextanchor is not None else _v - ) - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("measure", None) - self["measure"] = measure if measure is not None else _v - _v = arg.pop("measuresrc", None) - self["measuresrc"] = measuresrc if measuresrc is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("offsetsrc", None) - self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("totals", None) - self["totals"] = totals if totals is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "waterfall" + self._props["type"] = "table" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="waterfall", val="waterfall" + plotly_name="type", parent_name="table", val="table" ) arg.pop("type", None) @@ -7788,7 +9913,7 @@ def __init__( import copy as _copy -class Volume(_BaseTraceType): +class Surface(_BaseTraceType): # autocolorscale # -------------- @@ -7815,48 +9940,15 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # caps - # ---- - @property - def caps(self): - """ - The 'caps' property is an instance of Caps - that may be specified as: - - An instance of plotly.graph_objs.volume.Caps - - A dict of string/value properties that will be passed - to the Caps constructor - - Supported dict properties: - - x - plotly.graph_objects.volume.caps.X instance or - dict with compatible properties - y - plotly.graph_objects.volume.caps.Y instance or - dict with compatible properties - z - plotly.graph_objects.volume.caps.Z instance or - dict with compatible properties - - Returns - ------- - plotly.graph_objs.volume.Caps - """ - return self["caps"] - - @caps.setter - def caps(self, val): - self["caps"] = val - # cauto # ----- @property def cauto(self): """ Determines whether or not the color domain is computed with - respect to the input data (here `value`) or the bounds set in - `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` - are set by the user. + respect to the input data (here z or surfacecolor) or the + bounds set in `cmin` and `cmax` Defaults to `false` when + `cmin` and `cmax` are set by the user. The 'cauto' property must be specified as a bool (either True, or False) @@ -7877,7 +9969,8 @@ def cauto(self, val): def cmax(self): """ Sets the upper bound of the color domain. Value should have the - same units as `value` and if set, `cmin` must be set as well. + same units as z or surfacecolor and if set, `cmin` must be set + as well. The 'cmax' property is a number and may be specified as: - An int or float @@ -7899,7 +9992,8 @@ def cmid(self): """ Sets the mid-point of the color domain by scaling `cmin` and/or `cmax` to be equidistant to this point. Value should have the - same units as `value`. Has no effect when `cauto` is `false`. + same units as z or surfacecolor. Has no effect when `cauto` is + `false`. The 'cmid' property is a number and may be specified as: - An int or float @@ -7920,7 +10014,8 @@ def cmid(self, val): def cmin(self): """ Sets the lower bound of the color domain. Value should have the - same units as `value` and if set, `cmax` must be set as well. + same units as z or surfacecolor and if set, `cmax` must be set + as well. The 'cmin' property is a number and may be specified as: - An int or float @@ -7969,7 +10064,7 @@ def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.volume.ColorBar + - An instance of plotly.graph_objs.surface.ColorBar - A dict of string/value properties that will be passed to the ColorBar constructor @@ -8101,14 +10196,14 @@ def colorbar(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.volume.colorbar - .Tickformatstop instances or dicts with + A tuple of plotly.graph_objects.surface.colorba + r.Tickformatstop instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.dat - a.volume.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of volume.colorbar.tickformatstops + a.surface.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of surface.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -8149,17 +10244,17 @@ def colorbar(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.volume.colorbar.Title + plotly.graph_objects.surface.colorbar.Title instance or dict with compatible properties titlefont Deprecated: Please use - volume.colorbar.title.font instead. Sets this + surface.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. titleside Deprecated: Please use - volume.colorbar.title.side instead. Determines + surface.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated @@ -8188,7 +10283,7 @@ def colorbar(self): Returns ------- - plotly.graph_objs.volume.ColorBar + plotly.graph_objs.surface.ColorBar """ return self["colorbar"] @@ -8247,36 +10342,59 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contour - # ------- + # connectgaps + # ----------- @property - def contour(self): + def connectgaps(self): """ - The 'contour' property is an instance of Contour + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # contours + # -------- + @property + def contours(self): + """ + The 'contours' property is an instance of Contours that may be specified as: - - An instance of plotly.graph_objs.volume.Contour + - An instance of plotly.graph_objs.surface.Contours - A dict of string/value properties that will be passed - to the Contour constructor + to the Contours constructor Supported dict properties: - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. + x + plotly.graph_objects.surface.contours.X + instance or dict with compatible properties + y + plotly.graph_objects.surface.contours.Y + instance or dict with compatible properties + z + plotly.graph_objects.surface.contours.Z + instance or dict with compatible properties Returns ------- - plotly.graph_objs.volume.Contour + plotly.graph_objs.surface.Contours """ - return self["contour"] + return self["contours"] - @contour.setter - def contour(self, val): - self["contour"] = val + @contours.setter + def contours(self, val): + self["contours"] = val # customdata # ---------- @@ -8321,27 +10439,27 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # flatshading + # hidesurface # ----------- @property - def flatshading(self): + def hidesurface(self): """ - Determines whether or not normal smoothing is applied to the - meshes, creating meshes with an angular, low-poly look via flat - reflections. + Determines whether or not a surface is drawn. For example, set + `hidesurface` to False `contours.x.show` to True and + `contours.y.show` to True to draw a wire frame plot. - The 'flatshading' property must be specified as a bool + The 'hidesurface' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["flatshading"] + return self["hidesurface"] - @flatshading.setter - def flatshading(self, val): - self["flatshading"] = val + @hidesurface.setter + def hidesurface(self, val): + self["hidesurface"] = val # hoverinfo # --------- @@ -8396,7 +10514,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.volume.Hoverlabel + - An instance of plotly.graph_objs.surface.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -8440,7 +10558,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.volume.Hoverlabel + plotly.graph_objs.surface.Hoverlabel """ return self["hoverlabel"] @@ -8460,7 +10578,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -8589,46 +10711,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # isomax - # ------ - @property - def isomax(self): - """ - Sets the maximum boundary for iso-surface plot. - - The 'isomax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["isomax"] - - @isomax.setter - def isomax(self, val): - self["isomax"] = val - - # isomin - # ------ - @property - def isomin(self): - """ - Sets the minimum boundary for iso-surface plot. - - The 'isomin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["isomin"] - - @isomin.setter - def isomin(self, val): - self["isomin"] = val - # lighting # -------- @property @@ -8636,7 +10718,7 @@ def lighting(self): """ The 'lighting' property is an instance of Lighting that may be specified as: - - An instance of plotly.graph_objs.volume.Lighting + - An instance of plotly.graph_objs.surface.Lighting - A dict of string/value properties that will be passed to the Lighting constructor @@ -8648,9 +10730,6 @@ def lighting(self): diffuse Represents the extent that incident rays are reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. fresnel Represents the reflectance as a dependency of the viewing angle; e.g. paper is reflective @@ -8663,13 +10742,10 @@ def lighting(self): specular Represents the level that incident rays are reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. Returns ------- - plotly.graph_objs.volume.Lighting + plotly.graph_objs.surface.Lighting """ return self["lighting"] @@ -8684,7 +10760,7 @@ def lightposition(self): """ The 'lightposition' property is an instance of Lightposition that may be specified as: - - An instance of plotly.graph_objs.volume.Lightposition + - An instance of plotly.graph_objs.surface.Lightposition - A dict of string/value properties that will be passed to the Lightposition constructor @@ -8702,7 +10778,7 @@ def lightposition(self): Returns ------- - plotly.graph_objs.volume.Lightposition + plotly.graph_objs.surface.Lightposition """ return self["lightposition"] @@ -8805,33 +10881,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacityscale - # ------------ - @property - def opacityscale(self): - """ - Sets the opacityscale. The opacityscale must be an array - containing arrays mapping a normalized value to an opacity - value. At minimum, a mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], [0.5, 0.2], [1, - 1]]` means that higher/lower values would have higher opacity - values and those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette name string of - the following list: 'min', 'max', 'extremes' and 'uniform'. The - default is 'uniform'. - - The 'opacityscale' property accepts values of any type - - Returns - ------- - Any - """ - return self["opacityscale"] - - @opacityscale.setter - def opacityscale(self, val): - self["opacityscale"] = val - # reversescale # ------------ @property @@ -8900,74 +10949,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # slices - # ------ - @property - def slices(self): - """ - The 'slices' property is an instance of Slices - that may be specified as: - - An instance of plotly.graph_objs.volume.Slices - - A dict of string/value properties that will be passed - to the Slices constructor - - Supported dict properties: - - x - plotly.graph_objects.volume.slices.X instance - or dict with compatible properties - y - plotly.graph_objects.volume.slices.Y instance - or dict with compatible properties - z - plotly.graph_objects.volume.slices.Z instance - or dict with compatible properties - - Returns - ------- - plotly.graph_objs.volume.Slices - """ - return self["slices"] - - @slices.setter - def slices(self, val): - self["slices"] = val - - # spaceframe - # ---------- - @property - def spaceframe(self): - """ - The 'spaceframe' property is an instance of Spaceframe - that may be specified as: - - An instance of plotly.graph_objs.volume.Spaceframe - - A dict of string/value properties that will be passed - to the Spaceframe constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 1 meaning - that they are entirely shaded. Applying a - `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. - - Returns - ------- - plotly.graph_objs.volume.Spaceframe - """ - return self["spaceframe"] - - @spaceframe.setter - def spaceframe(self, val): - self["spaceframe"] = val - # stream # ------ @property @@ -8975,7 +10956,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.volume.Stream + - An instance of plotly.graph_objs.surface.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -8993,7 +10974,7 @@ def stream(self): Returns ------- - plotly.graph_objs.volume.Stream + plotly.graph_objs.surface.Stream """ return self["stream"] @@ -9001,62 +10982,53 @@ def stream(self): def stream(self, val): self["stream"] = val - # surface - # ------- + # surfacecolor + # ------------ @property - def surface(self): + def surfacecolor(self): """ - The 'surface' property is an instance of Surface - that may be specified as: - - An instance of plotly.graph_objs.volume.Surface - - A dict of string/value properties that will be passed - to the Surface constructor + Sets the surface color values, used for setting a color scale + independent of `z`. - Supported dict properties: - - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. + The 'surfacecolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.volume.Surface + numpy.ndarray """ - return self["surface"] + return self["surfacecolor"] - @surface.setter - def surface(self, val): - self["surface"] = val + @surfacecolor.setter + def surfacecolor(self, val): + self["surfacecolor"] = val + + # surfacecolorsrc + # --------------- + @property + def surfacecolorsrc(self): + """ + Sets the source reference on plot.ly for surfacecolor . + + The 'surfacecolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["surfacecolorsrc"] + + @surfacecolorsrc.setter + def surfacecolorsrc(self, val): + self["surfacecolorsrc"] = val # text # ---- @property def text(self): """ - Sets the text elements associated with the vertices. If trace + Sets the text elements associated with each z value. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. @@ -9150,46 +11122,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # value - # ----- - @property - def value(self): - """ - Sets the 4th dimension (value) of the vertices. - - The 'value' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["value"] - - @value.setter - def value(self, val): - self["value"] = val - - # valuesrc - # -------- - @property - def valuesrc(self): - """ - Sets the source reference on plot.ly for value . - - The 'valuesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["valuesrc"] - - @valuesrc.setter - def valuesrc(self, val): - self["valuesrc"] = val - # visible # ------- @property @@ -9218,7 +11150,7 @@ def visible(self, val): @property def x(self): """ - Sets the X coordinates of the vertices on X axis. + Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -9233,6 +11165,30 @@ def x(self): def x(self, val): self["x"] = val + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + # xsrc # ---- @property @@ -9256,22 +11212,46 @@ def xsrc(self, val): # y # - @property - def y(self): + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): """ - Sets the Y coordinates of the vertices on Y axis. + Sets the calendar system to use with `y` date data. - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - numpy.ndarray + Any """ - return self["y"] + return self["ycalendar"] - @y.setter - def y(self, val): - self["y"] = val + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val # ysrc # ---- @@ -9298,7 +11278,7 @@ def ysrc(self, val): @property def z(self): """ - Sets the Z coordinates of the vertices on Z axis. + Sets the z coordinates. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -9313,6 +11293,30 @@ def z(self): def z(self, val): self["z"] = val + # zcalendar + # --------- + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + # zsrc # ---- @property @@ -9357,27 +11361,24 @@ def _prop_descriptions(self): `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - caps - plotly.graph_objects.volume.Caps instance or dict with - compatible properties cauto Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. cmax Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. cmid Sets the mid-point of the color domain by scaling `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. cmin Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -9386,7 +11387,7 @@ def _prop_descriptions(self): `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.volume.ColorBar instance or dict + plotly.graph_objects.surface.ColorBar instance or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array @@ -9400,8 +11401,11 @@ def _prop_descriptions(self): string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - plotly.graph_objects.volume.Contour instance or dict + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + plotly.graph_objects.surface.Contours instance or dict with compatible properties customdata Assigns extra data each datum. This may be useful when @@ -9410,10 +11414,11 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -9422,8 +11427,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.volume.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.surface.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -9432,7 +11437,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -9455,15 +11465,11 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. lighting - plotly.graph_objects.volume.Lighting instance or dict + plotly.graph_objects.surface.Lighting instance or dict with compatible properties lightposition - plotly.graph_objects.volume.Lightposition instance or + plotly.graph_objects.surface.Lightposition instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -9491,17 +11497,6 @@ def _prop_descriptions(self): transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be an - array containing arrays mapping a normalized value to - an opacity value. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For example, - `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and those in - the middle would be more transparent Alternatively, - `opacityscale` may be a palette name string of the - following list: 'min', 'max', 'extremes' and 'uniform'. - The default is 'uniform'. reversescale Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and @@ -9515,20 +11510,17 @@ def _prop_descriptions(self): showscale Determines whether or not a colorbar is displayed for this trace. - slices - plotly.graph_objects.volume.Slices instance or dict - with compatible properties - spaceframe - plotly.graph_objects.volume.Spaceframe instance or dict - with compatible properties stream - plotly.graph_objects.volume.Stream instance or dict - with compatible properties - surface - plotly.graph_objects.volume.Surface instance or dict + plotly.graph_objects.surface.Stream instance or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on plot.ly for surfacecolor + . text - Sets the text elements associated with the vertices. If + Sets the text elements associated with each z value. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. @@ -9556,25 +11548,27 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on plot.ly for value . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x - Sets the X coordinates of the vertices on X axis. + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. xsrc Sets the source reference on plot.ly for x . y - Sets the Y coordinates of the vertices on Y axis. + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . z - Sets the Z coordinates of the vertices on Z axis. + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. zsrc Sets the source reference on plot.ly for z . """ @@ -9583,7 +11577,6 @@ def __init__( self, arg=None, autocolorscale=None, - caps=None, cauto=None, cmax=None, cmid=None, @@ -9591,10 +11584,11 @@ def __init__( coloraxis=None, colorbar=None, colorscale=None, - contour=None, + connectgaps=None, + contours=None, customdata=None, customdatasrc=None, - flatshading=None, + hidesurface=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -9604,52 +11598,52 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - isomax=None, - isomin=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, - opacityscale=None, reversescale=None, scene=None, showscale=None, - slices=None, - spaceframe=None, stream=None, - surface=None, + surfacecolor=None, + surfacecolorsrc=None, text=None, textsrc=None, uid=None, uirevision=None, - value=None, - valuesrc=None, visible=None, x=None, + xcalendar=None, xsrc=None, y=None, + ycalendar=None, ysrc=None, z=None, + zcalendar=None, zsrc=None, **kwargs ): """ - Construct a new Volume object + Construct a new Surface object - Draws volume trace between iso-min and iso-max values with - coordinates given by four 1-dimensional arrays containing the - `value`, `x`, `y` and `z` of every vertex of a uniform or non- - uniform 3-D grid. Horizontal or vertical slices, caps as well - as spaceframe between iso-min and iso-max values could also be - drawn using this trace. + The data the describes the coordinates of the surface is set in + `z`. Data in `z` should be a 2D list. Coordinates in `x` and + `y` can either be 1D lists or 2D lists (e.g. to graph + parametric surfaces). If not provided in `x` and `y`, the x and + y coordinates are assumed to be linear starting at 0 with a + unit step. The color scale corresponds to the `z` values by + default. For custom color scales, use `surfacecolor` which + should be a 2D list, where its bounds can be controlled using + `cmin` and `cmax`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Volume + an instance of plotly.graph_objs.Surface autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -9657,27 +11651,24 @@ def __init__( `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - caps - plotly.graph_objects.volume.Caps instance or dict with - compatible properties cauto Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. cmax Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. cmid Sets the mid-point of the color domain by scaling `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. cmin Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -9686,7 +11677,7 @@ def __init__( `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.volume.ColorBar instance or dict + plotly.graph_objects.surface.ColorBar instance or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array @@ -9700,8 +11691,11 @@ def __init__( string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - plotly.graph_objects.volume.Contour instance or dict + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + plotly.graph_objects.surface.Contours instance or dict with compatible properties customdata Assigns extra data each datum. This may be useful when @@ -9710,10 +11704,11 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -9722,8 +11717,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.volume.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.surface.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -9732,7 +11727,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -9755,15 +11755,11 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. lighting - plotly.graph_objects.volume.Lighting instance or dict + plotly.graph_objects.surface.Lighting instance or dict with compatible properties lightposition - plotly.graph_objects.volume.Lightposition instance or + plotly.graph_objects.surface.Lightposition instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -9791,17 +11787,6 @@ def __init__( transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be an - array containing arrays mapping a normalized value to - an opacity value. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For example, - `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and those in - the middle would be more transparent Alternatively, - `opacityscale` may be a palette name string of the - following list: 'min', 'max', 'extremes' and 'uniform'. - The default is 'uniform'. reversescale Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and @@ -9815,20 +11800,17 @@ def __init__( showscale Determines whether or not a colorbar is displayed for this trace. - slices - plotly.graph_objects.volume.Slices instance or dict - with compatible properties - spaceframe - plotly.graph_objects.volume.Spaceframe instance or dict - with compatible properties stream - plotly.graph_objects.volume.Stream instance or dict - with compatible properties - surface - plotly.graph_objects.volume.Surface instance or dict + plotly.graph_objects.surface.Stream instance or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on plot.ly for surfacecolor + . text - Sets the text elements associated with the vertices. If + Sets the text elements associated with each z value. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. @@ -9856,33 +11838,35 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on plot.ly for value . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x - Sets the X coordinates of the vertices on X axis. + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. xsrc Sets the source reference on plot.ly for x . y - Sets the Y coordinates of the vertices on Y axis. + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . z - Sets the Z coordinates of the vertices on Z axis. + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. zsrc Sets the source reference on plot.ly for z . Returns ------- - Volume + Surface """ - super(Volume, self).__init__("volume") + super(Surface, self).__init__("surface") # Validate arg # ------------ @@ -9895,9 +11879,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Volume +The first argument to the plotly.graph_objs.Surface constructor must be a dict or -an instance of plotly.graph_objs.Volume""" +an instance of plotly.graph_objs.Surface""" ) # Handle skip_invalid @@ -9906,68 +11890,63 @@ def __init__( # Import validators # ----------------- - from plotly.validators import volume as v_volume + from plotly.validators import surface as v_surface # Initialize validators # --------------------- - self._validators["autocolorscale"] = v_volume.AutocolorscaleValidator() - self._validators["caps"] = v_volume.CapsValidator() - self._validators["cauto"] = v_volume.CautoValidator() - self._validators["cmax"] = v_volume.CmaxValidator() - self._validators["cmid"] = v_volume.CmidValidator() - self._validators["cmin"] = v_volume.CminValidator() - self._validators["coloraxis"] = v_volume.ColoraxisValidator() - self._validators["colorbar"] = v_volume.ColorBarValidator() - self._validators["colorscale"] = v_volume.ColorscaleValidator() - self._validators["contour"] = v_volume.ContourValidator() - self._validators["customdata"] = v_volume.CustomdataValidator() - self._validators["customdatasrc"] = v_volume.CustomdatasrcValidator() - self._validators["flatshading"] = v_volume.FlatshadingValidator() - self._validators["hoverinfo"] = v_volume.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_volume.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_volume.HoverlabelValidator() - self._validators["hovertemplate"] = v_volume.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_volume.HovertemplatesrcValidator() - self._validators["hovertext"] = v_volume.HovertextValidator() - self._validators["hovertextsrc"] = v_volume.HovertextsrcValidator() - self._validators["ids"] = v_volume.IdsValidator() - self._validators["idssrc"] = v_volume.IdssrcValidator() - self._validators["isomax"] = v_volume.IsomaxValidator() - self._validators["isomin"] = v_volume.IsominValidator() - self._validators["lighting"] = v_volume.LightingValidator() - self._validators["lightposition"] = v_volume.LightpositionValidator() - self._validators["meta"] = v_volume.MetaValidator() - self._validators["metasrc"] = v_volume.MetasrcValidator() - self._validators["name"] = v_volume.NameValidator() - self._validators["opacity"] = v_volume.OpacityValidator() - self._validators["opacityscale"] = v_volume.OpacityscaleValidator() - self._validators["reversescale"] = v_volume.ReversescaleValidator() - self._validators["scene"] = v_volume.SceneValidator() - self._validators["showscale"] = v_volume.ShowscaleValidator() - self._validators["slices"] = v_volume.SlicesValidator() - self._validators["spaceframe"] = v_volume.SpaceframeValidator() - self._validators["stream"] = v_volume.StreamValidator() - self._validators["surface"] = v_volume.SurfaceValidator() - self._validators["text"] = v_volume.TextValidator() - self._validators["textsrc"] = v_volume.TextsrcValidator() - self._validators["uid"] = v_volume.UidValidator() - self._validators["uirevision"] = v_volume.UirevisionValidator() - self._validators["value"] = v_volume.ValueValidator() - self._validators["valuesrc"] = v_volume.ValuesrcValidator() - self._validators["visible"] = v_volume.VisibleValidator() - self._validators["x"] = v_volume.XValidator() - self._validators["xsrc"] = v_volume.XsrcValidator() - self._validators["y"] = v_volume.YValidator() - self._validators["ysrc"] = v_volume.YsrcValidator() - self._validators["z"] = v_volume.ZValidator() - self._validators["zsrc"] = v_volume.ZsrcValidator() + self._validators["autocolorscale"] = v_surface.AutocolorscaleValidator() + self._validators["cauto"] = v_surface.CautoValidator() + self._validators["cmax"] = v_surface.CmaxValidator() + self._validators["cmid"] = v_surface.CmidValidator() + self._validators["cmin"] = v_surface.CminValidator() + self._validators["coloraxis"] = v_surface.ColoraxisValidator() + self._validators["colorbar"] = v_surface.ColorBarValidator() + self._validators["colorscale"] = v_surface.ColorscaleValidator() + self._validators["connectgaps"] = v_surface.ConnectgapsValidator() + self._validators["contours"] = v_surface.ContoursValidator() + self._validators["customdata"] = v_surface.CustomdataValidator() + self._validators["customdatasrc"] = v_surface.CustomdatasrcValidator() + self._validators["hidesurface"] = v_surface.HidesurfaceValidator() + self._validators["hoverinfo"] = v_surface.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_surface.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_surface.HoverlabelValidator() + self._validators["hovertemplate"] = v_surface.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_surface.HovertemplatesrcValidator() + self._validators["hovertext"] = v_surface.HovertextValidator() + self._validators["hovertextsrc"] = v_surface.HovertextsrcValidator() + self._validators["ids"] = v_surface.IdsValidator() + self._validators["idssrc"] = v_surface.IdssrcValidator() + self._validators["lighting"] = v_surface.LightingValidator() + self._validators["lightposition"] = v_surface.LightpositionValidator() + self._validators["meta"] = v_surface.MetaValidator() + self._validators["metasrc"] = v_surface.MetasrcValidator() + self._validators["name"] = v_surface.NameValidator() + self._validators["opacity"] = v_surface.OpacityValidator() + self._validators["reversescale"] = v_surface.ReversescaleValidator() + self._validators["scene"] = v_surface.SceneValidator() + self._validators["showscale"] = v_surface.ShowscaleValidator() + self._validators["stream"] = v_surface.StreamValidator() + self._validators["surfacecolor"] = v_surface.SurfacecolorValidator() + self._validators["surfacecolorsrc"] = v_surface.SurfacecolorsrcValidator() + self._validators["text"] = v_surface.TextValidator() + self._validators["textsrc"] = v_surface.TextsrcValidator() + self._validators["uid"] = v_surface.UidValidator() + self._validators["uirevision"] = v_surface.UirevisionValidator() + self._validators["visible"] = v_surface.VisibleValidator() + self._validators["x"] = v_surface.XValidator() + self._validators["xcalendar"] = v_surface.XcalendarValidator() + self._validators["xsrc"] = v_surface.XsrcValidator() + self._validators["y"] = v_surface.YValidator() + self._validators["ycalendar"] = v_surface.YcalendarValidator() + self._validators["ysrc"] = v_surface.YsrcValidator() + self._validators["z"] = v_surface.ZValidator() + self._validators["zcalendar"] = v_surface.ZcalendarValidator() + self._validators["zsrc"] = v_surface.ZsrcValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop("autocolorscale", None) self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("caps", None) - self["caps"] = caps if caps is not None else _v _v = arg.pop("cauto", None) self["cauto"] = cauto if cauto is not None else _v _v = arg.pop("cmax", None) @@ -9982,14 +11961,16 @@ def __init__( self["colorbar"] = colorbar if colorbar is not None else _v _v = arg.pop("colorscale", None) self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v + _v = arg.pop("connectgaps", None) + self["connectgaps"] = connectgaps if connectgaps is not None else _v + _v = arg.pop("contours", None) + self["contours"] = contours if contours is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("flatshading", None) - self["flatshading"] = flatshading if flatshading is not None else _v + _v = arg.pop("hidesurface", None) + self["hidesurface"] = hidesurface if hidesurface is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -10010,10 +11991,6 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("isomax", None) - self["isomax"] = isomax if isomax is not None else _v - _v = arg.pop("isomin", None) - self["isomin"] = isomin if isomin is not None else _v _v = arg.pop("lighting", None) self["lighting"] = lighting if lighting is not None else _v _v = arg.pop("lightposition", None) @@ -10026,22 +12003,18 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("opacityscale", None) - self["opacityscale"] = opacityscale if opacityscale is not None else _v _v = arg.pop("reversescale", None) self["reversescale"] = reversescale if reversescale is not None else _v _v = arg.pop("scene", None) self["scene"] = scene if scene is not None else _v _v = arg.pop("showscale", None) self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("slices", None) - self["slices"] = slices if slices is not None else _v - _v = arg.pop("spaceframe", None) - self["spaceframe"] = spaceframe if spaceframe is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("surface", None) - self["surface"] = surface if surface is not None else _v + _v = arg.pop("surfacecolor", None) + self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v + _v = arg.pop("surfacecolorsrc", None) + self["surfacecolorsrc"] = surfacecolorsrc if surfacecolorsrc is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) @@ -10050,22 +12023,24 @@ def __init__( self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valuesrc", None) - self["valuesrc"] = valuesrc if valuesrc is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v _v = arg.pop("z", None) self["z"] = z if z is not None else _v + _v = arg.pop("zcalendar", None) + self["zcalendar"] = zcalendar if zcalendar is not None else _v _v = arg.pop("zsrc", None) self["zsrc"] = zsrc if zsrc is not None else _v @@ -10073,9 +12048,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "volume" + self._props["type"] = "surface" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="volume", val="volume" + plotly_name="type", parent_name="surface", val="surface" ) arg.pop("type", None) @@ -10092,88 +12067,57 @@ def __init__( import copy as _copy -class Violin(_BaseTraceType): - - # alignmentgroup - # -------------- - @property - def alignmentgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. - - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["alignmentgroup"] - - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val +class Sunburst(_BaseTraceType): - # bandwidth - # --------- + # branchvalues + # ------------ @property - def bandwidth(self): + def branchvalues(self): """ - Sets the bandwidth used to compute the kernel density estimate. - By default, the bandwidth is determined by Silverman's rule of - thumb. + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. - The 'bandwidth' property is a number and may be specified as: - - An int or float in the interval [0, inf] + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] Returns ------- - int|float + Any """ - return self["bandwidth"] + return self["branchvalues"] - @bandwidth.setter - def bandwidth(self, val): - self["bandwidth"] = val + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val - # box - # --- + # count + # ----- @property - def box(self): + def count(self): """ - The 'box' property is an instance of Box - that may be specified as: - - An instance of plotly.graph_objs.violin.Box - - A dict of string/value properties that will be passed - to the Box constructor + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. - Supported dict properties: - - fillcolor - Sets the inner box plot fill color. - line - plotly.graph_objects.violin.box.Line instance - or dict with compatible properties - visible - Determines if an miniature box plot is drawn - inside the violins. - width - Sets the width of the inner box plots relative - to the violins' width. For example, with 1, the - inner box plots are as wide as the violins. + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') Returns ------- - plotly.graph_objs.violin.Box + Any """ - return self["box"] + return self["count"] - @box.setter - def box(self, val): - self["box"] = val + @count.setter + def count(self, val): + self["count"] = val # customdata # ---------- @@ -10218,66 +12162,42 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fillcolor - # --------- + # domain + # ------ @property - def fillcolor(self): + def domain(self): """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.sunburst.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this sunburst trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this sunburst trace . + x + Sets the horizontal domain of this sunburst + trace (in plot fraction). + y + Sets the vertical domain of this sunburst trace + (in plot fraction). Returns ------- - str + plotly.graph_objs.sunburst.Domain """ - return self["fillcolor"] + return self["domain"] - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val + @domain.setter + def domain(self, val): + self["domain"] = val # hoverinfo # --------- @@ -10290,8 +12210,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -10332,7 +12252,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.violin.Hoverlabel + - An instance of plotly.graph_objs.sunburst.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -10376,7 +12296,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.violin.Hoverlabel + plotly.graph_objs.sunburst.Hoverlabel """ return self["hoverlabel"] @@ -10384,31 +12304,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual violins or sample - points or the kernel density estimate or any combination of - them? - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['violins', 'points', 'kde'] joined with '+' characters - (e.g. 'violins+points') - OR exactly one of ['all'] (e.g. 'all') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - # hovertemplate # ------------- @property @@ -10421,15 +12316,20 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. + variables `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry` and `percentParent`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. The 'hovertemplate' property is a string and must be specified as: - A string @@ -10471,7 +12371,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Same as `text`. + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -10537,2397 +12441,2870 @@ def idssrc(self): """ Sets the source reference on plot.ly for ids . - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of plotly.graph_objs.sunburst.Insidetextfont + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.sunburst.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # labels + # ------ + @property + def labels(self): + """ + Sets the labels of each of the sectors. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on plot.ly for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + # leaf + # ---- + @property + def leaf(self): + """ + The 'leaf' property is an instance of Leaf + that may be specified as: + - An instance of plotly.graph_objs.sunburst.Leaf + - A dict of string/value properties that will be passed + to the Leaf constructor + + Supported dict properties: + + opacity + Sets the opacity of the leaves. With colorscale + it is defaulted to 1; otherwise it is defaulted + to 0.7 + + Returns + ------- + plotly.graph_objs.sunburst.Leaf + """ + return self["leaf"] + + @leaf.setter + def leaf(self, val): + self["leaf"] = val + + # level + # ----- + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.sunburst.Marker + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.sunburst.marker.ColorBar + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on plot.ly for + colors . + line + plotly.graph_objects.sunburst.marker.Line + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. + + Returns + ------- + plotly.graph_objs.sunburst.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + # maxdepth + # -------- + @property + def maxdepth(self): + """ + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. + + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["maxdepth"] + + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val + + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on plot.ly for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of plotly.graph_objs.sunburst.Outsidetextfont + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - str + plotly.graph_objs.sunburst.Outsidetextfont """ - return self["idssrc"] + return self["outsidetextfont"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val - # jitter - # ------ + # parents + # ------- @property - def jitter(self): + def parents(self): """ - Sets the amount of jitter in the sample points drawn. If 0, the - sample points align along the distribution axis. If 1, the - sample points are drawn in a random jitter of width equal to - the width of the violins. + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. - The 'jitter' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["jitter"] + return self["parents"] - @jitter.setter - def jitter(self, val): - self["jitter"] = val + @parents.setter + def parents(self, val): + self["parents"] = val - # legendgroup - # ----------- + # parentssrc + # ---------- @property - def legendgroup(self): + def parentssrc(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + Sets the source reference on plot.ly for parents . - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'parentssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["legendgroup"] + return self["parentssrc"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val - # line - # ---- + # stream + # ------ @property - def line(self): + def stream(self): """ - The 'line' property is an instance of Line + The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.violin.Line + - An instance of plotly.graph_objs.sunburst.Stream - A dict of string/value properties that will be passed - to the Line constructor + to the Stream constructor Supported dict properties: - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the - violin(s). + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - plotly.graph_objs.violin.Line + plotly.graph_objs.sunburst.Stream """ - return self["line"] + return self["stream"] - @line.setter - def line(self, val): - self["line"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # marker - # ------ + # text + # ---- @property - def marker(self): + def text(self): """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of plotly.graph_objs.violin.Marker - - A dict of string/value properties that will be passed - to the Marker constructor + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. - Supported dict properties: - - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - plotly.graph_objects.violin.marker.Line - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.violin.Marker + numpy.ndarray """ - return self["marker"] + return self["text"] - @marker.setter - def marker(self, val): - self["marker"] = val + @text.setter + def text(self, val): + self["text"] = val - # meanline + # textfont # -------- @property - def meanline(self): + def textfont(self): """ - The 'meanline' property is an instance of Meanline + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.violin.Meanline + - An instance of plotly.graph_objs.sunburst.Textfont - A dict of string/value properties that will be passed - to the Meanline constructor + to the Textfont constructor Supported dict properties: color - Sets the mean line color. - visible - Determines if a line corresponding to the - sample's mean is shown inside the violins. If - `box.visible` is turned on, the mean line is - drawn inside the inner box. Otherwise, the mean - line is drawn from one side of the violin to - other. - width - Sets the mean line width. + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - plotly.graph_objs.violin.Meanline + plotly.graph_objs.sunburst.Textfont """ - return self["meanline"] + return self["textfont"] - @meanline.setter - def meanline(self, val): - self["meanline"] = val + @textfont.setter + def textfont(self, val): + self["textfont"] = val - # meta - # ---- + # textinfo + # -------- @property - def meta(self): + def textinfo(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Determines which trace information appear on the graph. - The 'meta' property accepts values of any type + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') Returns ------- - Any|numpy.ndarray + Any """ - return self["meta"] + return self["textinfo"] - @meta.setter - def meta(self, val): - self["meta"] = val + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val - # metasrc + # textsrc # ------- @property - def metasrc(self): + def textsrc(self): """ - Sets the source reference on plot.ly for meta . + Sets the source reference on plot.ly for text . - The 'metasrc' property must be specified as a string or + The 'textsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["metasrc"] + return self["textsrc"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # name - # ---- + # texttemplate + # ------------ @property - def name(self): + def texttemplate(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. For violin traces, the name will also be used for - the position coordinate, if `x` and `x0` (`y` and `y0` if - horizontal) are missing and the position axis is categorical. - Note that the trace name is also used as a default value for - attribute `scalegroup` (please see its description for - details). - - The 'name' property is a string and must be specified as: + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` and + `value`. + + The 'texttemplate' property is a string and must be specified as: - A string - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ - return self["name"] + return self["texttemplate"] - @name.setter - def name(self, val): - self["name"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # offsetgroup - # ----------- + # texttemplatesrc + # --------------- @property - def offsetgroup(self): + def texttemplatesrc(self): """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. + Sets the source reference on plot.ly for texttemplate . - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["offsetgroup"] + return self["texttemplatesrc"] - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # opacity - # ------- + # uid + # --- @property - def opacity(self): + def uid(self): """ - Sets the opacity of the trace. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - int|float + str """ - return self["opacity"] + return self["uid"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # orientation - # ----------- + # uirevision + # ---------- @property - def orientation(self): + def uirevision(self): """ - Sets the orientation of the violin(s). If "v" ("h"), the - distribution is visualized along the vertical (horizontal). + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] + The 'uirevision' property accepts values of any type Returns ------- Any """ - return self["orientation"] + return self["uirevision"] - @orientation.setter - def orientation(self, val): - self["orientation"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # pointpos - # -------- + # values + # ------ @property - def pointpos(self): + def values(self): """ - Sets the position of the sample points in relation to the - violins. If 0, the sample points are places over the center of - the violins. Positive (negative) values correspond to positions - to the right (left) for vertical violins and above (below) for - horizontal violins. + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. - The 'pointpos' property is a number and may be specified as: - - An int or float in the interval [-2, 2] + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["pointpos"] + return self["values"] - @pointpos.setter - def pointpos(self, val): - self["pointpos"] = val + @values.setter + def values(self, val): + self["values"] = val - # points - # ------ + # valuessrc + # --------- @property - def points(self): + def valuessrc(self): """ - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier points - are shown and points either less than 4*Q1-3*Q3 or greater than - 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all - sample points are shown If False, only the violins are shown - with no sample points + Sets the source reference on plot.ly for values . - The 'points' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['all', 'outliers', 'suspectedoutliers', False] + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["points"] + return self["valuessrc"] - @points.setter - def points(self, val): - self["points"] = val + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val - # scalegroup - # ---------- + # visible + # ------- @property - def scalegroup(self): + def visible(self): """ - If there are multiple violins that should be sized according to - to some metric (see `scalemode`), link them by providing a non- - empty group id here shared by every trace in the same group. If - a violin's `width` is undefined, `scalegroup` will default to - the trace's name. In this case, violins with the same names - will be linked together + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'scalegroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["scalegroup"] + return self["visible"] - @scalegroup.setter - def scalegroup(self, val): - self["scalegroup"] = val + @visible.setter + def visible(self, val): + self["visible"] = val - # scalemode - # --------- + # type + # ---- @property - def scalemode(self): + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + domain + plotly.graph_objects.sunburst.Domain instance or dict + with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.sunburst.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for labels . + leaf + plotly.graph_objects.sunburst.Leaf instance or dict + with compatible properties + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + plotly.graph_objects.sunburst.Marker instance or dict + with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for parents . + stream + plotly.graph_objects.sunburst.Stream instance or dict + with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on plot.ly for values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). """ - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number of - sample points makingup each violin. - - The 'scalemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['width', 'count'] - Returns - ------- - Any + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + leaf=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs + ): """ - return self["scalemode"] - - @scalemode.setter - def scalemode(self, val): - self["scalemode"] = val + Construct a new Sunburst object + + Visualize hierarchal data spanning outward radially from root + to leaves. The sunburst sectors are determined by the entries + in "labels" or "ids" and in "parents". - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.violin.Selected - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - plotly.graph_objects.violin.selected.Marker - instance or dict with compatible properties + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Sunburst + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + domain + plotly.graph_objects.sunburst.Domain instance or dict + with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.sunburst.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for labels . + leaf + plotly.graph_objects.sunburst.Leaf instance or dict + with compatible properties + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + plotly.graph_objects.sunburst.Marker instance or dict + with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for parents . + stream + plotly.graph_objects.sunburst.Stream instance or dict + with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on plot.ly for values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). Returns ------- - plotly.graph_objs.violin.Selected + Sunburst """ - return self["selected"] + super(Sunburst, self).__init__("sunburst") - @selected.setter - def selected(self, val): - self["selected"] = val + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Sunburst +constructor must be a dict or +an instance of plotly.graph_objs.Sunburst""" + ) - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) - Returns - ------- - Any - """ - return self["selectedpoints"] + # Import validators + # ----------------- + from plotly.validators import sunburst as v_sunburst - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + # Initialize validators + # --------------------- + self._validators["branchvalues"] = v_sunburst.BranchvaluesValidator() + self._validators["count"] = v_sunburst.CountValidator() + self._validators["customdata"] = v_sunburst.CustomdataValidator() + self._validators["customdatasrc"] = v_sunburst.CustomdatasrcValidator() + self._validators["domain"] = v_sunburst.DomainValidator() + self._validators["hoverinfo"] = v_sunburst.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_sunburst.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_sunburst.HoverlabelValidator() + self._validators["hovertemplate"] = v_sunburst.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_sunburst.HovertemplatesrcValidator() + self._validators["hovertext"] = v_sunburst.HovertextValidator() + self._validators["hovertextsrc"] = v_sunburst.HovertextsrcValidator() + self._validators["ids"] = v_sunburst.IdsValidator() + self._validators["idssrc"] = v_sunburst.IdssrcValidator() + self._validators["insidetextfont"] = v_sunburst.InsidetextfontValidator() + self._validators["labels"] = v_sunburst.LabelsValidator() + self._validators["labelssrc"] = v_sunburst.LabelssrcValidator() + self._validators["leaf"] = v_sunburst.LeafValidator() + self._validators["level"] = v_sunburst.LevelValidator() + self._validators["marker"] = v_sunburst.MarkerValidator() + self._validators["maxdepth"] = v_sunburst.MaxdepthValidator() + self._validators["meta"] = v_sunburst.MetaValidator() + self._validators["metasrc"] = v_sunburst.MetasrcValidator() + self._validators["name"] = v_sunburst.NameValidator() + self._validators["opacity"] = v_sunburst.OpacityValidator() + self._validators["outsidetextfont"] = v_sunburst.OutsidetextfontValidator() + self._validators["parents"] = v_sunburst.ParentsValidator() + self._validators["parentssrc"] = v_sunburst.ParentssrcValidator() + self._validators["stream"] = v_sunburst.StreamValidator() + self._validators["text"] = v_sunburst.TextValidator() + self._validators["textfont"] = v_sunburst.TextfontValidator() + self._validators["textinfo"] = v_sunburst.TextinfoValidator() + self._validators["textsrc"] = v_sunburst.TextsrcValidator() + self._validators["texttemplate"] = v_sunburst.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_sunburst.TexttemplatesrcValidator() + self._validators["uid"] = v_sunburst.UidValidator() + self._validators["uirevision"] = v_sunburst.UirevisionValidator() + self._validators["values"] = v_sunburst.ValuesValidator() + self._validators["valuessrc"] = v_sunburst.ValuessrcValidator() + self._validators["visible"] = v_sunburst.VisibleValidator() - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("branchvalues", None) + self["branchvalues"] = branchvalues if branchvalues is not None else _v + _v = arg.pop("count", None) + self["count"] = count if count is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v + _v = arg.pop("labels", None) + self["labels"] = labels if labels is not None else _v + _v = arg.pop("labelssrc", None) + self["labelssrc"] = labelssrc if labelssrc is not None else _v + _v = arg.pop("leaf", None) + self["leaf"] = leaf if leaf is not None else _v + _v = arg.pop("level", None) + self["level"] = level if level is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v + _v = arg.pop("maxdepth", None) + self["maxdepth"] = maxdepth if maxdepth is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("outsidetextfont", None) + self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v + _v = arg.pop("parents", None) + self["parents"] = parents if parents is not None else _v + _v = arg.pop("parentssrc", None) + self["parentssrc"] = parentssrc if parentssrc is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textinfo", None) + self["textinfo"] = textinfo if textinfo is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("values", None) + self["values"] = values if values is not None else _v + _v = arg.pop("valuessrc", None) + self["valuessrc"] = valuessrc if valuessrc is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v - Returns - ------- - bool - """ - return self["showlegend"] + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + self._props["type"] = "sunburst" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="sunburst", val="sunburst" + ) + arg.pop("type", None) - # side - # ---- - @property - def side(self): - """ - Determines on which side of the position value the density - function making up one half of a violin is plotted. Useful when - comparing two violin traces under "overlay" mode, where one - trace has `side` set to "positive" and the other to "negative". - - The 'side' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['both', 'positive', 'negative'] + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - Returns - ------- - Any - """ - return self["side"] + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - @side.setter - def side(self, val): - self["side"] = val - # span - # ---- - @property - def span(self): - """ - Sets the span in data space for which the density function will - be computed. Has an effect only when `spanmode` is set to - "manual". - - The 'span' property is an info array that may be specified as: - - * a list or tuple of 2 elements where: - (0) The 'span[0]' property accepts values of any type - (1) The 'span[1]' property accepts values of any type +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - list - """ - return self["span"] - @span.setter - def span(self, val): - self["span"] = val +class Streamtube(_BaseTraceType): - # spanmode - # -------- + # autocolorscale + # -------------- @property - def spanmode(self): + def autocolorscale(self): """ - Sets the method by which the span in data space where the - density function will be computed. "soft" means the span goes - from the sample's minimum value minus two bandwidths to the - sample's maximum value plus two bandwidths. "hard" means the - span goes from the sample's minimum to its maximum value. For - custom span settings, use mode "manual" and fill in the `span` - attribute. + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'spanmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['soft', 'hard', 'manual'] + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["spanmode"] + return self["autocolorscale"] - @spanmode.setter - def spanmode(self, val): - self["spanmode"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # stream - # ------ + # cauto + # ----- @property - def stream(self): + def cauto(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.violin.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Determines whether or not the color domain is computed with + respect to the input data (here u/v/w norm) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'cauto' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.violin.Stream + bool """ - return self["stream"] + return self["cauto"] - @stream.setter - def stream(self, val): - self["stream"] = val + @cauto.setter + def cauto(self, val): + self["cauto"] = val - # text + # cmax # ---- @property - def text(self): + def cmax(self): """ - Sets the text elements associated with each sample value. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Sets the upper bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmin` must be set as + well. - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'cmax' property is a number and may be specified as: + - An int or float Returns ------- - str|numpy.ndarray + int|float """ - return self["text"] + return self["cmax"] - @text.setter - def text(self, val): - self["text"] = val + @cmax.setter + def cmax(self, val): + self["cmax"] = val - # textsrc - # ------- + # cmid + # ---- @property - def textsrc(self): + def cmid(self): """ - Sets the source reference on plot.ly for text . + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as u/v/w norm. Has no effect when `cauto` is + `false`. - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'cmid' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["textsrc"] + return self["cmid"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @cmid.setter + def cmid(self, val): + self["cmid"] = val - # uid - # --- + # cmin + # ---- @property - def uid(self): + def cmin(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Sets the lower bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmax` must be set as + well. - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'cmin' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["uid"] + return self["cmin"] - @uid.setter - def uid(self, val): - self["uid"] = val + @cmin.setter + def cmin(self, val): + self["cmin"] = val - # uirevision - # ---------- + # coloraxis + # --------- @property - def uirevision(self): + def coloraxis(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. - The 'uirevision' property accepts values of any type + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) Returns ------- - Any + str """ - return self["uirevision"] + return self["coloraxis"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # unselected - # ---------- + # colorbar + # -------- @property - def unselected(self): + def colorbar(self): """ - The 'unselected' property is an instance of Unselected + The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.violin.Unselected + - An instance of plotly.graph_objs.streamtube.ColorBar - A dict of string/value properties that will be passed - to the Unselected constructor + to the ColorBar constructor Supported dict properties: - marker - plotly.graph_objects.violin.unselected.Marker + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.streamtube.colo + rbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.streamtube.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of streamtube.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.streamtube.colorbar.Title instance or dict with compatible properties + titlefont + Deprecated: Please use + streamtube.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + streamtube.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - plotly.graph_objs.violin.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any + plotly.graph_objs.streamtube.ColorBar """ - return self["visible"] + return self["colorbar"] - @visible.setter - def visible(self, val): - self["visible"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # width - # ----- + # colorscale + # ---------- @property - def width(self): + def colorscale(self): """ - Sets the width of the violin in data coordinates. If 0 (default - value) the width is automatically selected based on the - positions of other violin traces in the same subplot. + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- - int|float + str """ - return self["width"] + return self["colorscale"] - @width.setter - def width(self, val): - self["width"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # x - # - + # customdata + # ---------- @property - def x(self): + def customdata(self): """ - Sets the x sample data or coordinates. See overview for more - info. + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'x' property is an array that may be specified as a tuple, + The 'customdata' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Sets the x coordinate of the box. See overview for more info. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] + return self["customdata"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # xsrc - # ---- + # customdatasrc + # ------------- @property - def xsrc(self): + def customdatasrc(self): """ - Sets the source reference on plot.ly for x . + Sets the source reference on plot.ly for customdata . - The 'xsrc' property must be specified as a string or + The 'customdatasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y sample data or coordinates. See overview for more - info. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Sets the y coordinate of the box. See overview for more info. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] + return self["customdatasrc"] - @y0.setter - def y0(self, val): - self["y0"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # yaxis - # ----- + # hoverinfo + # --------- @property - def yaxis(self): + def hoverinfo(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - str + Any|numpy.ndarray """ - return self["yaxis"] + return self["hoverinfo"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # ysrc - # ---- + # hoverinfosrc + # ------------ @property - def ysrc(self): + def hoverinfosrc(self): """ - Sets the source reference on plot.ly for y . + Sets the source reference on plot.ly for hoverinfo . - The 'ysrc' property must be specified as a string or + The 'hoverinfosrc' property must be specified as a string or as a plotly.grid_objs.Column object - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - bandwidth - Sets the bandwidth used to compute the kernel density - estimate. By default, the bandwidth is determined by - Silverman's rule of thumb. - box - plotly.graph_objects.violin.Box instance or dict with - compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.violin.Hoverlabel instance or dict - with compatible properties - hoveron - Do the hover effects highlight individual violins or - sample points or the kernel density estimate or any - combination of them? - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the violins. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.violin.Line instance or dict with - compatible properties - marker - plotly.graph_objects.violin.Marker instance or dict - with compatible properties - meanline - plotly.graph_objects.violin.Meanline instance or dict - with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. For violin traces, the name - will also be used for the position coordinate, if `x` - and `x0` (`y` and `y0` if horizontal) are missing and - the position axis is categorical. Note that the trace - name is also used as a default value for attribute - `scalegroup` (please see its description for details). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" ("h"), - the distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the violins. If 0, the sample points are places over - the center of the violins. Positive (negative) values - correspond to positions to the right (left) for - vertical violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the violins are shown with no sample - points - scalegroup - If there are multiple violins that should be sized - according to to some metric (see `scalemode`), link - them by providing a non-empty group id here shared by - every trace in the same group. If a violin's `width` is - undefined, `scalegroup` will default to the trace's - name. In this case, violins with the same names will be - linked together - scalemode - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number - of sample points makingup each violin. - selected - plotly.graph_objects.violin.Selected instance or dict - with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - side - Determines on which side of the position value the - density function making up one half of a violin is - plotted. Useful when comparing two violin traces under - "overlay" mode, where one trace has `side` set to - "positive" and the other to "negative". - span - Sets the span in data space for which the density - function will be computed. Has an effect only when - `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space where - the density function will be computed. "soft" means the - span goes from the sample's minimum value minus two - bandwidths to the sample's maximum value plus two - bandwidths. "hard" means the span goes from the - sample's minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the `span` - attribute. - stream - plotly.graph_objects.violin.Stream instance or dict - with compatible properties - text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.violin.Unselected instance or dict - with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the width of the violin in data coordinates. If 0 - (default value) the width is automatically selected - based on the positions of other violin traces in the - same subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate of the box. See overview for more - info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate of the box. See overview for more - info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . + Returns + ------- + str """ + return self["hoverinfosrc"] - def __init__( - self, - arg=None, - alignmentgroup=None, - bandwidth=None, - box=None, - customdata=None, - customdatasrc=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legendgroup=None, - line=None, - marker=None, - meanline=None, - meta=None, - metasrc=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - points=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, - **kwargs - ): + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + # hoverlabel + # ---------- + @property + def hoverlabel(self): """ - Construct a new Violin object - - In vertical (horizontal) violin plots, statistics are computed - using `y` (`x`) values. By supplying an `x` (`y`) array, one - violin per distinct x (y) value is drawn If no `x` (`y`) list - is provided, a single violin is drawn. That violin position is - then positioned with with `name` or with `x0` (`y0`) if - provided. + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.streamtube.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Violin - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - bandwidth - Sets the bandwidth used to compute the kernel density - estimate. By default, the bandwidth is determined by - Silverman's rule of thumb. - box - plotly.graph_objects.violin.Box instance or dict with - compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.violin.Hoverlabel instance or dict - with compatible properties - hoveron - Do the hover effects highlight individual violins or - sample points or the kernel density estimate or any - combination of them? - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the violins. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.violin.Line instance or dict with - compatible properties - marker - plotly.graph_objects.violin.Marker instance or dict - with compatible properties - meanline - plotly.graph_objects.violin.Meanline instance or dict - with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. For violin traces, the name - will also be used for the position coordinate, if `x` - and `x0` (`y` and `y0` if horizontal) are missing and - the position axis is categorical. Note that the trace - name is also used as a default value for attribute - `scalegroup` (please see its description for details). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" ("h"), - the distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the violins. If 0, the sample points are places over - the center of the violins. Positive (negative) values - correspond to positions to the right (left) for - vertical violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the violins are shown with no sample - points - scalegroup - If there are multiple violins that should be sized - according to to some metric (see `scalemode`), link - them by providing a non-empty group id here shared by - every trace in the same group. If a violin's `width` is - undefined, `scalegroup` will default to the trace's - name. In this case, violins with the same names will be - linked together - scalemode - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number - of sample points makingup each violin. - selected - plotly.graph_objects.violin.Selected instance or dict - with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - side - Determines on which side of the position value the - density function making up one half of a violin is - plotted. Useful when comparing two violin traces under - "overlay" mode, where one trace has `side` set to - "positive" and the other to "negative". - span - Sets the span in data space for which the density - function will be computed. Has an effect only when - `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space where - the density function will be computed. "soft" means the - span goes from the sample's minimum value minus two - bandwidths to the sample's maximum value plus two - bandwidths. "hard" means the span goes from the - sample's minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the `span` - attribute. - stream - plotly.graph_objects.violin.Stream instance or dict - with compatible properties - text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.violin.Unselected instance or dict - with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the width of the violin in data coordinates. If 0 - (default value) the width is automatically selected - based on the positions of other violin traces in the - same subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate of the box. See overview for more - info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate of the box. See overview for more - info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . + Returns + ------- + plotly.graph_objs.streamtube.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, + `norm` and `divergence`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on plot.ly for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of plotly.graph_objs.streamtube.Lighting + - A dict of string/value properties that will be passed + to the Lighting constructor + + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. Returns ------- - Violin + plotly.graph_objs.streamtube.Lighting """ - super(Violin, self).__init__("violin") + return self["lighting"] - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Violin -constructor must be a dict or -an instance of plotly.graph_objs.Violin""" - ) + @lighting.setter + def lighting(self, val): + self["lighting"] = val - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) + # lightposition + # ------------- + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of plotly.graph_objs.streamtube.Lightposition + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. - # Import validators - # ----------------- - from plotly.validators import violin as v_violin + Returns + ------- + plotly.graph_objs.streamtube.Lightposition + """ + return self["lightposition"] - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_violin.AlignmentgroupValidator() - self._validators["bandwidth"] = v_violin.BandwidthValidator() - self._validators["box"] = v_violin.BoxValidator() - self._validators["customdata"] = v_violin.CustomdataValidator() - self._validators["customdatasrc"] = v_violin.CustomdatasrcValidator() - self._validators["fillcolor"] = v_violin.FillcolorValidator() - self._validators["hoverinfo"] = v_violin.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_violin.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_violin.HoverlabelValidator() - self._validators["hoveron"] = v_violin.HoveronValidator() - self._validators["hovertemplate"] = v_violin.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_violin.HovertemplatesrcValidator() - self._validators["hovertext"] = v_violin.HovertextValidator() - self._validators["hovertextsrc"] = v_violin.HovertextsrcValidator() - self._validators["ids"] = v_violin.IdsValidator() - self._validators["idssrc"] = v_violin.IdssrcValidator() - self._validators["jitter"] = v_violin.JitterValidator() - self._validators["legendgroup"] = v_violin.LegendgroupValidator() - self._validators["line"] = v_violin.LineValidator() - self._validators["marker"] = v_violin.MarkerValidator() - self._validators["meanline"] = v_violin.MeanlineValidator() - self._validators["meta"] = v_violin.MetaValidator() - self._validators["metasrc"] = v_violin.MetasrcValidator() - self._validators["name"] = v_violin.NameValidator() - self._validators["offsetgroup"] = v_violin.OffsetgroupValidator() - self._validators["opacity"] = v_violin.OpacityValidator() - self._validators["orientation"] = v_violin.OrientationValidator() - self._validators["pointpos"] = v_violin.PointposValidator() - self._validators["points"] = v_violin.PointsValidator() - self._validators["scalegroup"] = v_violin.ScalegroupValidator() - self._validators["scalemode"] = v_violin.ScalemodeValidator() - self._validators["selected"] = v_violin.SelectedValidator() - self._validators["selectedpoints"] = v_violin.SelectedpointsValidator() - self._validators["showlegend"] = v_violin.ShowlegendValidator() - self._validators["side"] = v_violin.SideValidator() - self._validators["span"] = v_violin.SpanValidator() - self._validators["spanmode"] = v_violin.SpanmodeValidator() - self._validators["stream"] = v_violin.StreamValidator() - self._validators["text"] = v_violin.TextValidator() - self._validators["textsrc"] = v_violin.TextsrcValidator() - self._validators["uid"] = v_violin.UidValidator() - self._validators["uirevision"] = v_violin.UirevisionValidator() - self._validators["unselected"] = v_violin.UnselectedValidator() - self._validators["visible"] = v_violin.VisibleValidator() - self._validators["width"] = v_violin.WidthValidator() - self._validators["x"] = v_violin.XValidator() - self._validators["x0"] = v_violin.X0Validator() - self._validators["xaxis"] = v_violin.XAxisValidator() - self._validators["xsrc"] = v_violin.XsrcValidator() - self._validators["y"] = v_violin.YValidator() - self._validators["y0"] = v_violin.Y0Validator() - self._validators["yaxis"] = v_violin.YAxisValidator() - self._validators["ysrc"] = v_violin.YsrcValidator() + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("bandwidth", None) - self["bandwidth"] = bandwidth if bandwidth is not None else _v - _v = arg.pop("box", None) - self["box"] = box if box is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("jitter", None) - self["jitter"] = jitter if jitter is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meanline", None) - self["meanline"] = meanline if meanline is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("pointpos", None) - self["pointpos"] = pointpos if pointpos is not None else _v - _v = arg.pop("points", None) - self["points"] = points if points is not None else _v - _v = arg.pop("scalegroup", None) - self["scalegroup"] = scalegroup if scalegroup is not None else _v - _v = arg.pop("scalemode", None) - self["scalemode"] = scalemode if scalemode is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("side", None) - self["side"] = side if side is not None else _v - _v = arg.pop("span", None) - self["span"] = span if span is not None else _v - _v = arg.pop("spanmode", None) - self["spanmode"] = spanmode if spanmode is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v + # maxdisplayed + # ------------ + @property + def maxdisplayed(self): + """ + The maximum number of displayed segments in a streamtube. + + The 'maxdisplayed' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + int + """ + return self["maxdisplayed"] - self._props["type"] = "violin" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="violin", val="violin" - ) - arg.pop("type", None) + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # meta + # ---- + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + @meta.setter + def meta(self, val): + self["meta"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # metasrc + # ------- + @property + def metasrc(self): + """ + Sets the source reference on plot.ly for meta . + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + Returns + ------- + str + """ + return self["metasrc"] -class Table(_BaseTraceType): + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # cells + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # scene # ----- @property - def cells(self): + def scene(self): """ - The 'cells' property is an instance of Cells - that may be specified as: - - An instance of plotly.graph_objs.table.Cells - - A dict of string/value properties that will be passed - to the Cells constructor + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans more two or more lines (i.e. `text` - contains one or more
HTML tags) or if an - explicit width is set to override the text - width. - alignsrc - Sets the source reference on plot.ly for align - . - fill - plotly.graph_objects.table.cells.Fill instance - or dict with compatible properties - font - plotly.graph_objects.table.cells.Font instance - or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on plot.ly for - format . - height - The height of cells. - line - plotly.graph_objects.table.cells.Line instance - or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on plot.ly for - prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on plot.ly for - suffix . - values - Cell values. `values[m][n]` represents the - value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on plot.ly for - values . + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) Returns ------- - plotly.graph_objs.table.Cells + str """ - return self["cells"] + return self["scene"] - @cells.setter - def cells(self, val): - self["cells"] = val + @scene.setter + def scene(self, val): + self["scene"] = val - # columnorder - # ----------- + # showscale + # --------- @property - def columnorder(self): + def showscale(self): """ - Specifies the rendered order of the data columns; for example, - a value `2` at position `0` means that column index `0` in the - data will be rendered as the third column, as columns have an - index base of zero. + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # sizeref + # ------- + @property + def sizeref(self): + """ + The scaling factor for the streamtubes. The default is 1, which + avoids two max divergence tubes from touching at adjacent + starting positions. - The 'columnorder' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'sizeref' property is a number and may be specified as: + - An int or float in the interval [0, inf] Returns ------- - numpy.ndarray + int|float """ - return self["columnorder"] + return self["sizeref"] - @columnorder.setter - def columnorder(self, val): - self["columnorder"] = val + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val - # columnordersrc - # -------------- + # starts + # ------ @property - def columnordersrc(self): + def starts(self): """ - Sets the source reference on plot.ly for columnorder . + The 'starts' property is an instance of Starts + that may be specified as: + - An instance of plotly.graph_objs.streamtube.Starts + - A dict of string/value properties that will be passed + to the Starts constructor - The 'columnordersrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + x + Sets the x components of the starting position + of the streamtubes + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y components of the starting position + of the streamtubes + ysrc + Sets the source reference on plot.ly for y . + z + Sets the z components of the starting position + of the streamtubes + zsrc + Sets the source reference on plot.ly for z . Returns ------- - str + plotly.graph_objs.streamtube.Starts """ - return self["columnordersrc"] + return self["starts"] - @columnordersrc.setter - def columnordersrc(self, val): - self["columnordersrc"] = val + @starts.setter + def starts(self, val): + self["starts"] = val - # columnwidth - # ----------- + # stream + # ------ @property - def columnwidth(self): + def stream(self): """ - The width of columns expressed as a ratio. Columns fill the - available width in proportion of their specified column widths. + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.streamtube.Stream + - A dict of string/value properties that will be passed + to the Stream constructor - The 'columnwidth' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - int|float|numpy.ndarray + plotly.graph_objs.streamtube.Stream """ - return self["columnwidth"] + return self["stream"] - @columnwidth.setter - def columnwidth(self, val): - self["columnwidth"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # columnwidthsrc - # -------------- + # text + # ---- @property - def columnwidthsrc(self): + def text(self): """ - Sets the source reference on plot.ly for columnwidth . + Sets a text element associated with this trace. If trace + `hoverinfo` contains a "text" flag, this text element will be + seen in all hover labels. Note that streamtube traces do not + support array `text` values. - The 'columnwidthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["columnwidthsrc"] + return self["text"] - @columnwidthsrc.setter - def columnwidthsrc(self, val): - self["columnwidthsrc"] = val + @text.setter + def text(self, val): + self["text"] = val - # customdata - # ---------- + # u + # - @property - def customdata(self): + def u(self): """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + Sets the x components of the vector field. - The 'customdata' property is an array that may be specified as a tuple, + The 'u' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["customdata"] + return self["u"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @u.setter + def u(self, val): + self["u"] = val - # customdatasrc - # ------------- + # uid + # --- @property - def customdatasrc(self): + def uid(self): """ - Sets the source reference on plot.ly for customdata . + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["customdatasrc"] + return self["uid"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # domain - # ------ + # uirevision + # ---------- @property - def domain(self): + def uirevision(self): """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.table.Domain - - A dict of string/value properties that will be passed - to the Domain constructor + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this table trace . - row - If there is a layout grid, use the domain for - this row in the grid for this table trace . - x - Sets the horizontal domain of this table trace - (in plot fraction). - y - Sets the vertical domain of this table trace - (in plot fraction). + The 'uirevision' property accepts values of any type Returns ------- - plotly.graph_objs.table.Domain + Any """ - return self["domain"] + return self["uirevision"] - @domain.setter - def domain(self, val): - self["domain"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # header - # ------ + # usrc + # ---- @property - def header(self): + def usrc(self): """ - The 'header' property is an instance of Header - that may be specified as: - - An instance of plotly.graph_objs.table.Header - - A dict of string/value properties that will be passed - to the Header constructor + Sets the source reference on plot.ly for u . - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans more two or more lines (i.e. `text` - contains one or more
HTML tags) or if an - explicit width is set to override the text - width. - alignsrc - Sets the source reference on plot.ly for align - . - fill - plotly.graph_objects.table.header.Fill instance - or dict with compatible properties - font - plotly.graph_objects.table.header.Font instance - or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - formatsrc - Sets the source reference on plot.ly for - format . - height - The height of cells. - line - plotly.graph_objects.table.header.Line instance - or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on plot.ly for - prefix . - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on plot.ly for - suffix . - values - Header cell values. `values[m][n]` represents - the value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on plot.ly for - values . + The 'usrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.table.Header + str """ - return self["header"] + return self["usrc"] - @header.setter - def header(self, val): - self["header"] = val + @usrc.setter + def usrc(self, val): + self["usrc"] = val - # hoverinfo - # --------- + # v + # - @property - def hoverinfo(self): + def v(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Sets the y components of the vector field. - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'v' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any|numpy.ndarray + numpy.ndarray """ - return self["hoverinfo"] + return self["v"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @v.setter + def v(self, val): + self["v"] = val - # hoverinfosrc - # ------------ + # visible + # ------- @property - def hoverinfosrc(self): + def visible(self): """ - Sets the source reference on plot.ly for hoverinfo . + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["hoverinfosrc"] + return self["visible"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @visible.setter + def visible(self, val): + self["visible"] = val - # hoverlabel - # ---------- + # vsrc + # ---- @property - def hoverlabel(self): + def vsrc(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.table.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor + Sets the source reference on plot.ly for v . - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + The 'vsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.table.Hoverlabel + str """ - return self["hoverlabel"] + return self["vsrc"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @vsrc.setter + def vsrc(self, val): + self["vsrc"] = val - # ids - # --- + # w + # - @property - def ids(self): + def w(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + Sets the z components of the vector field. - The 'ids' property is an array that may be specified as a tuple, + The 'w' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["ids"] + return self["w"] - @ids.setter - def ids(self, val): - self["ids"] = val + @w.setter + def w(self, val): + self["w"] = val - # idssrc - # ------ + # wsrc + # ---- @property - def idssrc(self): + def wsrc(self): """ - Sets the source reference on plot.ly for ids . + Sets the source reference on plot.ly for w . - The 'idssrc' property must be specified as a string or + The 'wsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] + return self["wsrc"] - @meta.setter - def meta(self, val): - self["meta"] = val + @wsrc.setter + def wsrc(self, val): + self["wsrc"] = val - # metasrc - # ------- + # x + # - @property - def metasrc(self): + def x(self): """ - Sets the source reference on plot.ly for meta . + Sets the x coordinates of the vector field. - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["metasrc"] + return self["x"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @x.setter + def x(self, val): + self["x"] = val - # name + # xsrc # ---- @property - def name(self): + def xsrc(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Sets the source reference on plot.ly for x . - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["name"] + return self["xsrc"] - @name.setter - def name(self, val): - self["name"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # stream - # ------ + # y + # - @property - def stream(self): + def y(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.table.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Sets the y coordinates of the vector field. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.table.Stream + numpy.ndarray """ - return self["stream"] + return self["y"] - @stream.setter - def stream(self, val): - self["stream"] = val + @y.setter + def y(self, val): + self["y"] = val - # uid - # --- + # ysrc + # ---- @property - def uid(self): + def ysrc(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Sets the source reference on plot.ly for y . - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["uid"] + return self["ysrc"] - @uid.setter - def uid(self, val): - self["uid"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # uirevision - # ---------- + # z + # - @property - def uirevision(self): + def z(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Sets the z coordinates of the vector field. - The 'uirevision' property accepts values of any type + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["uirevision"] + return self["z"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @z.setter + def z(self, val): + self["z"] = val - # visible - # ------- + # zsrc + # ---- @property - def visible(self): + def zsrc(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the source reference on plot.ly for z . - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["visible"] + return self["zsrc"] - @visible.setter - def visible(self, val): - self["visible"] = val + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val # type # ---- @@ -12946,22 +15323,53 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - cells - plotly.graph_objects.table.Cells instance or dict with - compatible properties - columnorder - Specifies the rendered order of the data columns; for - example, a value `2` at position `0` means that column - index `0` in the data will be rendered as the third - column, as columns have an index base of zero. - columnordersrc - Sets the source reference on plot.ly for columnorder . - columnwidth - The width of columns expressed as a ratio. Columns fill - the available width in proportion of their specified - column widths. - columnwidthsrc - Sets the source reference on plot.ly for columnwidth . + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.streamtube.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -12969,12 +15377,6 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - domain - plotly.graph_objects.table.Domain instance or dict with - compatible properties - header - plotly.graph_objects.table.Header instance or dict with - compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -12983,14 +15385,53 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.table.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.streamtube.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `tubex`, `tubey`, `tubez`, + `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + lighting + plotly.graph_objects.streamtube.Lighting instance or + dict with compatible properties + lightposition + plotly.graph_objects.streamtube.Lightposition instance + or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -13009,9 +15450,44 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + plotly.graph_objects.streamtube.Starts instance or dict + with compatible properties stream - plotly.graph_objects.table.Stream instance or dict with - compatible properties + plotly.graph_objects.streamtube.Stream instance or dict + with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -13034,69 +15510,152 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + usrc + Sets the source reference on plot.ly for u . + v + Sets the y components of the vector field. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + vsrc + Sets the source reference on plot.ly for v . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on plot.ly for w . + x + Sets the x coordinates of the vector field. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates of the vector field. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the z coordinates of the vector field. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - cells=None, - columnorder=None, - columnordersrc=None, - columnwidth=None, - columnwidthsrc=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, customdata=None, customdatasrc=None, - domain=None, - header=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, ids=None, idssrc=None, + lighting=None, + lightposition=None, + maxdisplayed=None, meta=None, metasrc=None, name=None, + opacity=None, + reversescale=None, + scene=None, + showscale=None, + sizeref=None, + starts=None, stream=None, + text=None, + u=None, uid=None, uirevision=None, + usrc=None, + v=None, visible=None, + vsrc=None, + w=None, + wsrc=None, + x=None, + xsrc=None, + y=None, + ysrc=None, + z=None, + zsrc=None, **kwargs ): """ - Construct a new Table object + Construct a new Streamtube object - Table view for detailed data viewing. The data are arranged in - a grid of rows and columns. Most styling can be specified for - columns, rows or individual cells. Table is using a column- - major order, ie. the grid is represented as a vector of column - vectors. + Use a streamtube trace to visualize flow in a vector field. + Specify a vector field using 6 1D arrays of equal length, 3 + position arrays `x`, `y` and `z` and 3 vector component arrays + `u`, `v`, and `w`. By default, the tubes' starting positions + will be cut from the vector field's x-z plane at its minimum y + value. To specify your own starting position, use attributes + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Table - cells - plotly.graph_objects.table.Cells instance or dict with - compatible properties - columnorder - Specifies the rendered order of the data columns; for - example, a value `2` at position `0` means that column - index `0` in the data will be rendered as the third - column, as columns have an index base of zero. - columnordersrc - Sets the source reference on plot.ly for columnorder . - columnwidth - The width of columns expressed as a ratio. Columns fill - the available width in proportion of their specified - column widths. - columnwidthsrc - Sets the source reference on plot.ly for columnwidth . + an instance of plotly.graph_objs.Streamtube + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.streamtube.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -13104,12 +15663,6 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - domain - plotly.graph_objects.table.Domain instance or dict with - compatible properties - header - plotly.graph_objects.table.Header instance or dict with - compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -13118,14 +15671,53 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.table.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.streamtube.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `tubex`, `tubey`, `tubez`, + `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. + Anything contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + lighting + plotly.graph_objects.streamtube.Lighting instance or + dict with compatible properties + lightposition + plotly.graph_objects.streamtube.Lightposition instance + or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -13144,9 +15736,44 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + plotly.graph_objects.streamtube.Starts instance or dict + with compatible properties stream - plotly.graph_objects.table.Stream instance or dict with - compatible properties + plotly.graph_objects.streamtube.Stream instance or dict + with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -13169,17 +15796,39 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + usrc + Sets the source reference on plot.ly for u . + v + Sets the y components of the vector field. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + vsrc + Sets the source reference on plot.ly for v . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on plot.ly for w . + x + Sets the x coordinates of the vector field. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates of the vector field. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the z coordinates of the vector field. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Table + Streamtube """ - super(Table, self).__init__("table") + super(Streamtube, self).__init__("streamtube") # Validate arg # ------------ @@ -13192,9 +15841,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Table +The first argument to the plotly.graph_objs.Streamtube constructor must be a dict or -an instance of plotly.graph_objs.Table""" +an instance of plotly.graph_objs.Streamtube""" ) # Handle skip_invalid @@ -13203,582 +15852,181 @@ def __init__( # Import validators # ----------------- - from plotly.validators import table as v_table + from plotly.validators import streamtube as v_streamtube # Initialize validators # --------------------- - self._validators["cells"] = v_table.CellsValidator() - self._validators["columnorder"] = v_table.ColumnorderValidator() - self._validators["columnordersrc"] = v_table.ColumnordersrcValidator() - self._validators["columnwidth"] = v_table.ColumnwidthValidator() - self._validators["columnwidthsrc"] = v_table.ColumnwidthsrcValidator() - self._validators["customdata"] = v_table.CustomdataValidator() - self._validators["customdatasrc"] = v_table.CustomdatasrcValidator() - self._validators["domain"] = v_table.DomainValidator() - self._validators["header"] = v_table.HeaderValidator() - self._validators["hoverinfo"] = v_table.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_table.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_table.HoverlabelValidator() - self._validators["ids"] = v_table.IdsValidator() - self._validators["idssrc"] = v_table.IdssrcValidator() - self._validators["meta"] = v_table.MetaValidator() - self._validators["metasrc"] = v_table.MetasrcValidator() - self._validators["name"] = v_table.NameValidator() - self._validators["stream"] = v_table.StreamValidator() - self._validators["uid"] = v_table.UidValidator() - self._validators["uirevision"] = v_table.UirevisionValidator() - self._validators["visible"] = v_table.VisibleValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cells", None) - self["cells"] = cells if cells is not None else _v - _v = arg.pop("columnorder", None) - self["columnorder"] = columnorder if columnorder is not None else _v - _v = arg.pop("columnordersrc", None) - self["columnordersrc"] = columnordersrc if columnordersrc is not None else _v - _v = arg.pop("columnwidth", None) - self["columnwidth"] = columnwidth if columnwidth is not None else _v - _v = arg.pop("columnwidthsrc", None) - self["columnwidthsrc"] = columnwidthsrc if columnwidthsrc is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("header", None) - self["header"] = header if header is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "table" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="table", val="table" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Surface(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here z or surfacecolor) or the - bounds set in `cmin` and `cmax` Defaults to `false` when - `cmin` and `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as z or surfacecolor and if set, `cmin` must be set - as well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as z or surfacecolor. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as z or surfacecolor and if set, `cmax` must be set - as well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.surface.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.surface.colorba - r.Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.surface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of surface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.surface.colorbar.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use - surface.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - surface.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.surface.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val + self._validators["autocolorscale"] = v_streamtube.AutocolorscaleValidator() + self._validators["cauto"] = v_streamtube.CautoValidator() + self._validators["cmax"] = v_streamtube.CmaxValidator() + self._validators["cmid"] = v_streamtube.CmidValidator() + self._validators["cmin"] = v_streamtube.CminValidator() + self._validators["coloraxis"] = v_streamtube.ColoraxisValidator() + self._validators["colorbar"] = v_streamtube.ColorBarValidator() + self._validators["colorscale"] = v_streamtube.ColorscaleValidator() + self._validators["customdata"] = v_streamtube.CustomdataValidator() + self._validators["customdatasrc"] = v_streamtube.CustomdatasrcValidator() + self._validators["hoverinfo"] = v_streamtube.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_streamtube.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_streamtube.HoverlabelValidator() + self._validators["hovertemplate"] = v_streamtube.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_streamtube.HovertemplatesrcValidator() + self._validators["hovertext"] = v_streamtube.HovertextValidator() + self._validators["ids"] = v_streamtube.IdsValidator() + self._validators["idssrc"] = v_streamtube.IdssrcValidator() + self._validators["lighting"] = v_streamtube.LightingValidator() + self._validators["lightposition"] = v_streamtube.LightpositionValidator() + self._validators["maxdisplayed"] = v_streamtube.MaxdisplayedValidator() + self._validators["meta"] = v_streamtube.MetaValidator() + self._validators["metasrc"] = v_streamtube.MetasrcValidator() + self._validators["name"] = v_streamtube.NameValidator() + self._validators["opacity"] = v_streamtube.OpacityValidator() + self._validators["reversescale"] = v_streamtube.ReversescaleValidator() + self._validators["scene"] = v_streamtube.SceneValidator() + self._validators["showscale"] = v_streamtube.ShowscaleValidator() + self._validators["sizeref"] = v_streamtube.SizerefValidator() + self._validators["starts"] = v_streamtube.StartsValidator() + self._validators["stream"] = v_streamtube.StreamValidator() + self._validators["text"] = v_streamtube.TextValidator() + self._validators["u"] = v_streamtube.UValidator() + self._validators["uid"] = v_streamtube.UidValidator() + self._validators["uirevision"] = v_streamtube.UirevisionValidator() + self._validators["usrc"] = v_streamtube.UsrcValidator() + self._validators["v"] = v_streamtube.VValidator() + self._validators["visible"] = v_streamtube.VisibleValidator() + self._validators["vsrc"] = v_streamtube.VsrcValidator() + self._validators["w"] = v_streamtube.WValidator() + self._validators["wsrc"] = v_streamtube.WsrcValidator() + self._validators["x"] = v_streamtube.XValidator() + self._validators["xsrc"] = v_streamtube.XsrcValidator() + self._validators["y"] = v_streamtube.YValidator() + self._validators["ysrc"] = v_streamtube.YsrcValidator() + self._validators["z"] = v_streamtube.ZValidator() + self._validators["zsrc"] = v_streamtube.ZsrcValidator() - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("lighting", None) + self["lighting"] = lighting if lighting is not None else _v + _v = arg.pop("lightposition", None) + self["lightposition"] = lightposition if lightposition is not None else _v + _v = arg.pop("maxdisplayed", None) + self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("sizeref", None) + self["sizeref"] = sizeref if sizeref is not None else _v + _v = arg.pop("starts", None) + self["starts"] = starts if starts is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("u", None) + self["u"] = u if u is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("usrc", None) + self["usrc"] = usrc if usrc is not None else _v + _v = arg.pop("v", None) + self["v"] = v if v is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + _v = arg.pop("vsrc", None) + self["vsrc"] = vsrc if vsrc is not None else _v + _v = arg.pop("w", None) + self["w"] = w if w is not None else _v + _v = arg.pop("wsrc", None) + self["wsrc"] = wsrc if wsrc is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v - Returns - ------- - str - """ - return self["colorscale"] + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + self._props["type"] = "streamtube" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="streamtube", val="streamtube" + ) + arg.pop("type", None) - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data are filled in. - - The 'connectgaps' property must be specified as a bool - (either True, or False) + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - Returns - ------- - bool - """ - return self["connectgaps"] + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of plotly.graph_objs.surface.Contours - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - x - plotly.graph_objects.surface.contours.X - instance or dict with compatible properties - y - plotly.graph_objects.surface.contours.Y - instance or dict with compatible properties - z - plotly.graph_objects.surface.contours.Z - instance or dict with compatible properties +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - plotly.graph_objs.surface.Contours - """ - return self["contours"] - @contours.setter - def contours(self, val): - self["contours"] = val +class Splom(_BaseTraceType): # customdata # ---------- @@ -13823,27 +16071,120 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hidesurface - # ----------- + # diagonal + # -------- @property - def hidesurface(self): + def diagonal(self): """ - Determines whether or not a surface is drawn. For example, set - `hidesurface` to False `contours.x.show` to True and - `contours.y.show` to True to draw a wire frame plot. + The 'diagonal' property is an instance of Diagonal + that may be specified as: + - An instance of plotly.graph_objs.splom.Diagonal + - A dict of string/value properties that will be passed + to the Diagonal constructor - The 'hidesurface' property must be specified as a bool - (either True, or False) + Supported dict properties: + + visible + Determines whether or not subplots on the + diagonal are displayed. Returns ------- - bool + plotly.graph_objs.splom.Diagonal """ - return self["hidesurface"] + return self["diagonal"] - @hidesurface.setter - def hidesurface(self, val): - self["hidesurface"] = val + @diagonal.setter + def diagonal(self, val): + self["diagonal"] = val + + # dimensions + # ---------- + @property + def dimensions(self): + """ + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.splom.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Supported dict properties: + + axis + plotly.graph_objects.splom.dimension.Axis + instance or dict with compatible properties + label + Sets the label corresponding to this splom + dimension. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + values + Sets the dimension values to be plotted. + valuessrc + Sets the source reference on plot.ly for + values . + visible + Determines whether or not this dimension is + shown on the graph. Note that even visible + false dimension contribute to the default grid + generate by this splom trace. + + Returns + ------- + tuple[plotly.graph_objs.splom.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + # dimensiondefaults + # ----------------- + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the default + property values to use for elements of splom.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of plotly.graph_objs.splom.Dimension + - A dict of string/value properties that will be passed + to the Dimension constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.splom.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val # hoverinfo # --------- @@ -13898,7 +16239,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.surface.Hoverlabel + - An instance of plotly.graph_objs.splom.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -13942,7 +16283,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.surface.Hoverlabel + plotly.graph_objs.splom.Hoverlabel """ return self["hoverlabel"] @@ -13962,7 +16303,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -14091,80 +16436,174 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lighting - # -------- + # legendgroup + # ----------- @property - def lighting(self): + def legendgroup(self): """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of plotly.graph_objs.surface.Lighting - - A dict of string/value properties that will be passed - to the Lighting constructor + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.surface.Lighting + str """ - return self["lighting"] + return self["legendgroup"] - @lighting.setter - def lighting(self, val): - self["lighting"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # lightposition - # ------------- + # marker + # ------ @property - def lightposition(self): + def marker(self): """ - The 'lightposition' property is an instance of Lightposition + The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.surface.Lightposition + - An instance of plotly.graph_objs.splom.Marker - A dict of string/value properties that will be passed - to the Lightposition constructor + to the Marker constructor Supported dict properties: - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.splom.marker.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . + line + plotly.graph_objects.splom.marker.Line instance + or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on plot.ly for size + . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on plot.ly for + symbol . Returns ------- - plotly.graph_objs.surface.Lightposition + plotly.graph_objs.splom.Marker """ - return self["lightposition"] + return self["marker"] - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val + @marker.setter + def marker(self, val): + self["marker"] = val # meta # ---- @@ -14241,12 +16680,7 @@ def name(self, val): @property def opacity(self): """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. + Sets the opacity of the trace. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] @@ -14261,73 +16695,119 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ + # selected + # -------- @property - def reversescale(self): + def selected(self): """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.splom.Selected + - A dict of string/value properties that will be passed + to the Selected constructor - The 'reversescale' property must be specified as a bool + Supported dict properties: + + marker + plotly.graph_objects.splom.selected.Marker + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.splom.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["reversescale"] + return self["showlegend"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val - # scene - # ----- + # showlowerhalf + # ------------- @property - def scene(self): + def showlowerhalf(self): """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. + Determines whether or not subplots on the lower half from the + diagonal are displayed. - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + The 'showlowerhalf' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["scene"] + return self["showlowerhalf"] - @scene.setter - def scene(self, val): - self["scene"] = val + @showlowerhalf.setter + def showlowerhalf(self, val): + self["showlowerhalf"] = val - # showscale - # --------- + # showupperhalf + # ------------- @property - def showscale(self): + def showupperhalf(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Determines whether or not subplots on the upper half from the + diagonal are displayed. - The 'showscale' property must be specified as a bool + The 'showupperhalf' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["showscale"] + return self["showupperhalf"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @showupperhalf.setter + def showupperhalf(self, val): + self["showupperhalf"] = val # stream # ------ @@ -14336,7 +16816,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.surface.Stream + - An instance of plotly.graph_objs.splom.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -14354,7 +16834,7 @@ def stream(self): Returns ------- - plotly.graph_objs.surface.Stream + plotly.graph_objs.splom.Stream """ return self["stream"] @@ -14362,55 +16842,15 @@ def stream(self): def stream(self, val): self["stream"] = val - # surfacecolor - # ------------ - @property - def surfacecolor(self): - """ - Sets the surface color values, used for setting a color scale - independent of `z`. - - The 'surfacecolor' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["surfacecolor"] - - @surfacecolor.setter - def surfacecolor(self, val): - self["surfacecolor"] = val - - # surfacecolorsrc - # --------------- - @property - def surfacecolorsrc(self): - """ - Sets the source reference on plot.ly for surfacecolor . - - The 'surfacecolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["surfacecolorsrc"] - - @surfacecolorsrc.setter - def surfacecolorsrc(self, val): - self["surfacecolorsrc"] = val - # text # ---- @property def text(self): """ - Sets the text elements associated with each z value. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. + Sets text elements associated with each (x,y) pair to appear on + hover. If a single string, the same string appears over all the + data points. If an array of string, the items are mapped in + order to the this trace's (x,y) coordinates. The 'text' property is a string and must be specified as: - A string @@ -14502,6 +16942,33 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.splom.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.splom.unselected.Marker + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.splom.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + # visible # ------- @property @@ -14525,197 +16992,63 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on plot.ly for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on plot.ly for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # z - # - - @property - def z(self): - """ - Sets the z coordinates. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zcalendar - # --------- + # xaxes + # ----- @property - def zcalendar(self): + def xaxes(self): """ - Sets the calendar system to use with `z` date data. + Sets the list of x axes corresponding to dimensions of this + splom trace. By default, a splom will match the first N xaxes + where N is the number of input dimensions. Note that, in case + where `diagonal.visible` is false and `showupperhalf` or + `showlowerhalf` is false, this splom trace will generate one + less x-axis and one less y-axis. - The 'zcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'xaxes' property is an info array that may be specified as: + * a list of elements where: + The 'xaxes[i]' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - Any + list """ - return self["zcalendar"] + return self["xaxes"] - @zcalendar.setter - def zcalendar(self, val): - self["zcalendar"] = val + @xaxes.setter + def xaxes(self, val): + self["xaxes"] = val - # zsrc - # ---- + # yaxes + # ----- @property - def zsrc(self): + def yaxes(self): """ - Sets the source reference on plot.ly for z . + Sets the list of y axes corresponding to dimensions of this + splom trace. By default, a splom will match the first N yaxes + where N is the number of input dimensions. Note that, in case + where `diagonal.visible` is false and `showupperhalf` or + `showlowerhalf` is false, this splom trace will generate one + less x-axis and one less y-axis. - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'yaxes' property is an info array that may be specified as: + * a list of elements where: + The 'yaxes[i]' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- - str + list """ - return self["zsrc"] + return self["yaxes"] - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val + @yaxes.setter + def yaxes(self, val): + self["yaxes"] = val # type # ---- @@ -14723,70 +17056,17 @@ def zsrc(self, val): def type(self): return self._props["type"] - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here z or surfacecolor) - or the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as z or surfacecolor. - Has no effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.surface.ColorBar instance or dict - with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. - contours - plotly.graph_objects.surface.Contours instance or dict - with compatible properties + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -14794,11 +17074,17 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - hidesurface - Determines whether or not a surface is drawn. For - example, set `hidesurface` to False `contours.x.show` - to True and `contours.y.show` to True to draw a wire - frame plot. + diagonal + plotly.graph_objects.splom.Diagonal instance or dict + with compatible properties + dimensions + A tuple of plotly.graph_objects.splom.Dimension + instances or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -14807,8 +17093,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.surface.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.splom.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -14817,7 +17103,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -14840,12 +17131,13 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lighting - plotly.graph_objects.surface.Lighting instance or dict - with compatible properties - lightposition - plotly.graph_objects.surface.Lightposition instance or - dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + plotly.graph_objects.splom.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -14865,40 +17157,35 @@ def _prop_descriptions(self): Sets the trace name. The trace name appear as the legend item and on hover. opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - plotly.graph_objects.surface.Stream instance or dict + Sets the opacity of the trace. + selected + plotly.graph_objects.splom.Selected instance or dict with compatible properties - surfacecolor - Sets the surface color values, used for setting a color - scale independent of `z`. - surfacecolorsrc - Sets the source reference on plot.ly for surfacecolor - . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + plotly.graph_objects.splom.Stream instance or dict with + compatible properties text - Sets the text elements associated with each z value. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. textsrc Sets the source reference on plot.ly for text . uid @@ -14923,47 +17210,40 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.splom.Unselected instance or dict + with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on plot.ly for z . + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. """ def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, customdata=None, customdatasrc=None, - hidesurface=None, + diagonal=None, + dimensions=None, + dimensiondefaults=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -14973,105 +17253,44 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - lighting=None, - lightposition=None, + legendgroup=None, + marker=None, meta=None, metasrc=None, name=None, opacity=None, - reversescale=None, - scene=None, - showscale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showlowerhalf=None, + showupperhalf=None, stream=None, - surfacecolor=None, - surfacecolorsrc=None, text=None, textsrc=None, uid=None, uirevision=None, + unselected=None, visible=None, - x=None, - xcalendar=None, - xsrc=None, - y=None, - ycalendar=None, - ysrc=None, - z=None, - zcalendar=None, - zsrc=None, + xaxes=None, + yaxes=None, **kwargs ): """ - Construct a new Surface object + Construct a new Splom object - The data the describes the coordinates of the surface is set in - `z`. Data in `z` should be a 2D list. Coordinates in `x` and - `y` can either be 1D lists or 2D lists (e.g. to graph - parametric surfaces). If not provided in `x` and `y`, the x and - y coordinates are assumed to be linear starting at 0 with a - unit step. The color scale corresponds to the `z` values by - default. For custom color scales, use `surfacecolor` which - should be a 2D list, where its bounds can be controlled using - `cmin` and `cmax`. + Splom traces generate scatter plot matrix visualizations. Each + splom `dimensions` items correspond to a generated axis. Values + for each of those dimensions are set in `dimensions[i].values`. + Splom traces support all `scattergl` marker style attributes. + Specify `layout.grid` attributes and/or layout x-axis and + y-axis attributes for more control over the axis positioning + and style. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Surface - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here z or surfacecolor) - or the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as z or surfacecolor. - Has no effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as z or surfacecolor and if set, - `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.surface.ColorBar instance or dict - with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. - contours - plotly.graph_objects.surface.Contours instance or dict - with compatible properties + an instance of plotly.graph_objs.Splom customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -15079,11 +17298,17 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - hidesurface - Determines whether or not a surface is drawn. For - example, set `hidesurface` to False `contours.x.show` - to True and `contours.y.show` to True to draw a wire - frame plot. + diagonal + plotly.graph_objects.splom.Diagonal instance or dict + with compatible properties + dimensions + A tuple of plotly.graph_objects.splom.Dimension + instances or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -15092,8 +17317,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.surface.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.splom.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -15102,7 +17327,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -15125,12 +17355,13 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lighting - plotly.graph_objects.surface.Lighting instance or dict - with compatible properties - lightposition - plotly.graph_objects.surface.Lightposition instance or - dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + plotly.graph_objects.splom.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -15150,40 +17381,35 @@ def __init__( Sets the trace name. The trace name appear as the legend item and on hover. opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - plotly.graph_objects.surface.Stream instance or dict + Sets the opacity of the trace. + selected + plotly.graph_objects.splom.Selected instance or dict with compatible properties - surfacecolor - Sets the surface color values, used for setting a color - scale independent of `z`. - surfacecolorsrc - Sets the source reference on plot.ly for surfacecolor - . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + plotly.graph_objects.splom.Stream instance or dict with + compatible properties text - Sets the text elements associated with each z value. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. textsrc Sets the source reference on plot.ly for text . uid @@ -15208,35 +17434,36 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.splom.Unselected instance or dict + with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on plot.ly for z . + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. Returns ------- - Surface + Splom """ - super(Surface, self).__init__("surface") + super(Splom, self).__init__("splom") # Validate arg # ------------ @@ -15249,9 +17476,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Surface +The first argument to the plotly.graph_objs.Splom constructor must be a dict or -an instance of plotly.graph_objs.Surface""" +an instance of plotly.graph_objs.Splom""" ) # Handle skip_invalid @@ -15260,87 +17487,59 @@ def __init__( # Import validators # ----------------- - from plotly.validators import surface as v_surface + from plotly.validators import splom as v_splom # Initialize validators # --------------------- - self._validators["autocolorscale"] = v_surface.AutocolorscaleValidator() - self._validators["cauto"] = v_surface.CautoValidator() - self._validators["cmax"] = v_surface.CmaxValidator() - self._validators["cmid"] = v_surface.CmidValidator() - self._validators["cmin"] = v_surface.CminValidator() - self._validators["coloraxis"] = v_surface.ColoraxisValidator() - self._validators["colorbar"] = v_surface.ColorBarValidator() - self._validators["colorscale"] = v_surface.ColorscaleValidator() - self._validators["connectgaps"] = v_surface.ConnectgapsValidator() - self._validators["contours"] = v_surface.ContoursValidator() - self._validators["customdata"] = v_surface.CustomdataValidator() - self._validators["customdatasrc"] = v_surface.CustomdatasrcValidator() - self._validators["hidesurface"] = v_surface.HidesurfaceValidator() - self._validators["hoverinfo"] = v_surface.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_surface.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_surface.HoverlabelValidator() - self._validators["hovertemplate"] = v_surface.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_surface.HovertemplatesrcValidator() - self._validators["hovertext"] = v_surface.HovertextValidator() - self._validators["hovertextsrc"] = v_surface.HovertextsrcValidator() - self._validators["ids"] = v_surface.IdsValidator() - self._validators["idssrc"] = v_surface.IdssrcValidator() - self._validators["lighting"] = v_surface.LightingValidator() - self._validators["lightposition"] = v_surface.LightpositionValidator() - self._validators["meta"] = v_surface.MetaValidator() - self._validators["metasrc"] = v_surface.MetasrcValidator() - self._validators["name"] = v_surface.NameValidator() - self._validators["opacity"] = v_surface.OpacityValidator() - self._validators["reversescale"] = v_surface.ReversescaleValidator() - self._validators["scene"] = v_surface.SceneValidator() - self._validators["showscale"] = v_surface.ShowscaleValidator() - self._validators["stream"] = v_surface.StreamValidator() - self._validators["surfacecolor"] = v_surface.SurfacecolorValidator() - self._validators["surfacecolorsrc"] = v_surface.SurfacecolorsrcValidator() - self._validators["text"] = v_surface.TextValidator() - self._validators["textsrc"] = v_surface.TextsrcValidator() - self._validators["uid"] = v_surface.UidValidator() - self._validators["uirevision"] = v_surface.UirevisionValidator() - self._validators["visible"] = v_surface.VisibleValidator() - self._validators["x"] = v_surface.XValidator() - self._validators["xcalendar"] = v_surface.XcalendarValidator() - self._validators["xsrc"] = v_surface.XsrcValidator() - self._validators["y"] = v_surface.YValidator() - self._validators["ycalendar"] = v_surface.YcalendarValidator() - self._validators["ysrc"] = v_surface.YsrcValidator() - self._validators["z"] = v_surface.ZValidator() - self._validators["zcalendar"] = v_surface.ZcalendarValidator() - self._validators["zsrc"] = v_surface.ZsrcValidator() + self._validators["customdata"] = v_splom.CustomdataValidator() + self._validators["customdatasrc"] = v_splom.CustomdatasrcValidator() + self._validators["diagonal"] = v_splom.DiagonalValidator() + self._validators["dimensions"] = v_splom.DimensionsValidator() + self._validators["dimensiondefaults"] = v_splom.DimensionValidator() + self._validators["hoverinfo"] = v_splom.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_splom.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_splom.HoverlabelValidator() + self._validators["hovertemplate"] = v_splom.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_splom.HovertemplatesrcValidator() + self._validators["hovertext"] = v_splom.HovertextValidator() + self._validators["hovertextsrc"] = v_splom.HovertextsrcValidator() + self._validators["ids"] = v_splom.IdsValidator() + self._validators["idssrc"] = v_splom.IdssrcValidator() + self._validators["legendgroup"] = v_splom.LegendgroupValidator() + self._validators["marker"] = v_splom.MarkerValidator() + self._validators["meta"] = v_splom.MetaValidator() + self._validators["metasrc"] = v_splom.MetasrcValidator() + self._validators["name"] = v_splom.NameValidator() + self._validators["opacity"] = v_splom.OpacityValidator() + self._validators["selected"] = v_splom.SelectedValidator() + self._validators["selectedpoints"] = v_splom.SelectedpointsValidator() + self._validators["showlegend"] = v_splom.ShowlegendValidator() + self._validators["showlowerhalf"] = v_splom.ShowlowerhalfValidator() + self._validators["showupperhalf"] = v_splom.ShowupperhalfValidator() + self._validators["stream"] = v_splom.StreamValidator() + self._validators["text"] = v_splom.TextValidator() + self._validators["textsrc"] = v_splom.TextsrcValidator() + self._validators["uid"] = v_splom.UidValidator() + self._validators["uirevision"] = v_splom.UirevisionValidator() + self._validators["unselected"] = v_splom.UnselectedValidator() + self._validators["visible"] = v_splom.VisibleValidator() + self._validators["xaxes"] = v_splom.XaxesValidator() + self._validators["yaxes"] = v_splom.YaxesValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hidesurface", None) - self["hidesurface"] = hidesurface if hidesurface is not None else _v + _v = arg.pop("diagonal", None) + self["diagonal"] = diagonal if diagonal is not None else _v + _v = arg.pop("dimensions", None) + self["dimensions"] = dimensions if dimensions is not None else _v + _v = arg.pop("dimensiondefaults", None) + self["dimensiondefaults"] = ( + dimensiondefaults if dimensiondefaults is not None else _v + ) _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -15359,12 +17558,12 @@ def __init__( self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) @@ -15373,18 +17572,18 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("showlowerhalf", None) + self["showlowerhalf"] = showlowerhalf if showlowerhalf is not None else _v + _v = arg.pop("showupperhalf", None) + self["showupperhalf"] = showupperhalf if showupperhalf is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("surfacecolor", None) - self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v - _v = arg.pop("surfacecolorsrc", None) - self["surfacecolorsrc"] = surfacecolorsrc if surfacecolorsrc is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) @@ -15393,34 +17592,22 @@ def __init__( self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zcalendar", None) - self["zcalendar"] = zcalendar if zcalendar is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v + _v = arg.pop("xaxes", None) + self["xaxes"] = xaxes if xaxes is not None else _v + _v = arg.pop("yaxes", None) + self["yaxes"] = yaxes if yaxes is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "surface" + self._props["type"] = "splom" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="surface", val="surface" + plotly_name="type", parent_name="splom", val="splom" ) arg.pop("type", None) @@ -15437,33 +17624,180 @@ def __init__( import copy as _copy -class Sunburst(_BaseTraceType): +class Scatterternary(_BaseTraceType): - # branchvalues - # ------------ + # a + # - @property - def branchvalues(self): + def a(self): """ - Determines how the items in `values` are summed. When set to - "total", items in `values` are taken to be value of all its - descendants. When set to "remainder", items in `values` - corresponding to the root and the branches sectors are taken to - be the extra part not part of the sum of the values at their - leaves. + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. - The 'branchvalues' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['remainder', 'total'] + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["branchvalues"] + return self["a"] - @branchvalues.setter - def branchvalues(self, val): - self["branchvalues"] = val + @a.setter + def a(self, val): + self["a"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on plot.ly for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # b + # - + @property + def b(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on plot.ly for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + # c + # - + @property + def c(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'c' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["c"] + + @c.setter + def c(self, val): + self["c"] = val + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # csrc + # ---- + @property + def csrc(self): + """ + Sets the source reference on plot.ly for c . + + The 'csrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["csrc"] + + @csrc.setter + def csrc(self, val): + self["csrc"] = val # customdata # ---------- @@ -15508,42 +17842,95 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ + # fill + # ---- @property - def domain(self): + def fill(self): """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.sunburst.Domain - - A dict of string/value properties that will be passed - to the Domain constructor + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterternary has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this sunburst trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst - trace (in plot fraction). - y - Sets the vertical domain of this sunburst trace - (in plot fraction). + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] Returns ------- - plotly.graph_objs.sunburst.Domain + Any """ - return self["domain"] + return self["fill"] - @domain.setter - def domain(self, val): - self["domain"] = val + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val # hoverinfo # --------- @@ -15556,8 +17943,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['label', 'text', 'value', 'name'] joined with '+' characters - (e.g. 'label+text') + - Any combination of ['a', 'b', 'c', 'text', 'name'] joined with '+' characters + (e.g. 'a+b') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -15598,7 +17985,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.sunburst.Hoverlabel + - An instance of plotly.graph_objs.scatterternary.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -15642,7 +18029,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.sunburst.Hoverlabel + plotly.graph_objs.scatterternary.Hoverlabel """ return self["hoverlabel"] @@ -15650,6 +18037,31 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + # hovertemplate # ------------- @property @@ -15662,7 +18074,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -15712,11 +18128,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. + Sets hover text elements associated with each (a,b,c) point. If + a single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b,c). To be seen, trace + `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -15795,149 +18211,71 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of plotly.graph_objs.sunburst.Insidetextfont - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.sunburst.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # labels - # ------ - @property - def labels(self): - """ - Sets the labels of each of the sunburst sectors. - - The 'labels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["labels"] - - @labels.setter - def labels(self, val): - self["labels"] = val - - # labelssrc - # --------- + # legendgroup + # ----------- @property - def labelssrc(self): + def legendgroup(self): """ - Sets the source reference on plot.ly for labels . + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - The 'labelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["labelssrc"] + return self["legendgroup"] - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # leaf + # line # ---- @property - def leaf(self): - """ - The 'leaf' property is an instance of Leaf - that may be specified as: - - An instance of plotly.graph_objs.sunburst.Leaf - - A dict of string/value properties that will be passed - to the Leaf constructor - - Supported dict properties: - - opacity - Sets the opacity of the leaves. - - Returns - ------- - plotly.graph_objs.sunburst.Leaf - """ - return self["leaf"] - - @leaf.setter - def leaf(self, val): - self["leaf"] = val - - # level - # ----- - @property - def level(self): + def line(self): """ - Sets the level from which this sunburst trace hierarchy is - rendered. Set `level` to `''` to start the sunburst from the - root node in the hierarchy. Must be an "id" if `ids` is filled - in, otherwise plotly attempts to find a matching item in - `labels`. + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.scatterternary.Line + - A dict of string/value properties that will be passed + to the Line constructor - The 'level' property accepts values of any type + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). Returns ------- - Any + plotly.graph_objs.scatterternary.Line """ - return self["level"] + return self["line"] - @level.setter - def level(self, val): - self["level"] = val + @line.setter + def line(self, val): + self["line"] = val # marker # ------ @@ -15946,26 +18284,146 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.sunburst.Marker + - An instance of plotly.graph_objs.scatterternary.Marker - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: - colors - Sets the color of each sector of this sunburst - chart. If not specified, the default trace - color set is used to pick the sector colors. - colorssrc - Sets the source reference on plot.ly for - colors . + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.scatterternary.marker.Colo + rBar instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . + gradient + plotly.graph_objects.scatterternary.marker.Grad + ient instance or dict with compatible + properties line - plotly.graph_objects.sunburst.marker.Line + plotly.graph_objects.scatterternary.marker.Line instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on plot.ly for size + . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on plot.ly for + symbol . Returns ------- - plotly.graph_objs.sunburst.Marker + plotly.graph_objs.scatterternary.Marker """ return self["marker"] @@ -15973,28 +18431,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # maxdepth - # -------- - @property - def maxdepth(self): - """ - Sets the number of rendered sunburst rings from any given - `level`. Set `maxdepth` to "-1" to render all the levels in the - hierarchy. - - The 'maxdepth' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - - Returns - ------- - int - """ - return self["maxdepth"] - - @maxdepth.setter - def maxdepth(self, val): - self["maxdepth"] = val - # meta # ---- @property @@ -16043,6 +18479,34 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + # name # ---- @property @@ -16085,105 +18549,82 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outsidetextfont - # --------------- + # selected + # -------- @property - def outsidetextfont(self): + def selected(self): """ - Sets the font used for `textinfo` lying outside the sector. - - The 'outsidetextfont' property is an instance of Outsidetextfont + The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.sunburst.Outsidetextfont + - An instance of plotly.graph_objs.scatterternary.Selected - A dict of string/value properties that will be passed - to the Outsidetextfont constructor + to the Selected constructor Supported dict properties: - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . + marker + plotly.graph_objects.scatterternary.selected.Ma + rker instance or dict with compatible + properties + textfont + plotly.graph_objects.scatterternary.selected.Te + xtfont instance or dict with compatible + properties Returns ------- - plotly.graph_objs.sunburst.Outsidetextfont + plotly.graph_objs.scatterternary.Selected """ - return self["outsidetextfont"] + return self["selected"] - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val + @selected.setter + def selected(self, val): + self["selected"] = val - # parents - # ------- + # selectedpoints + # -------------- @property - def parents(self): + def selectedpoints(self): """ - Sets the parent sectors for each of the sunburst sectors. Empty - string items '' are understood to reference the root node in - the hierarchy. If `ids` is filled, `parents` items are - understood to be "ids" themselves. When `ids` is not set, - plotly attempts to find matching items in `labels`, but beware - they must be unique. + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. - The 'parents' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'selectedpoints' property accepts values of any type Returns ------- - numpy.ndarray + Any """ - return self["parents"] + return self["selectedpoints"] - @parents.setter - def parents(self, val): - self["parents"] = val + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val - # parentssrc + # showlegend # ---------- @property - def parentssrc(self): + def showlegend(self): """ - Sets the source reference on plot.ly for parents . + Determines whether or not an item corresponding to this trace + is shown in the legend. - The 'parentssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'showlegend' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["parentssrc"] + return self["showlegend"] - @parentssrc.setter - def parentssrc(self, val): - self["parentssrc"] = val + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val # stream # ------ @@ -16192,7 +18633,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.sunburst.Stream + - An instance of plotly.graph_objs.scatterternary.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -16210,7 +18651,7 @@ def stream(self): Returns ------- - plotly.graph_objs.sunburst.Stream + plotly.graph_objs.scatterternary.Stream """ return self["stream"] @@ -16218,23 +18659,75 @@ def stream(self): def stream(self, val): self["stream"] = val + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + ternary subplot. If "ternary" (the default value), the data + refer to `layout.ternary`. If "ternary2", the data refer to + `layout.ternary2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'ternary', that may be specified as the string 'ternary' + optionally followed by an integer >= 1 + (e.g. 'ternary', 'ternary1', 'ternary2', 'ternary3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # sum + # --- + @property + def sum(self): + """ + The number each triplet should sum to, if only two of `a`, `b`, + and `c` are provided. This overrides `ternary.sum` to + normalize this specific trace, but does not affect the values + displayed on the axes. 0 (or missing) means to use + ternary.sum + + The 'sum' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sum"] + + @sum.setter + def sum(self, val): + self["sum"] = val + # text # ---- @property def text(self): """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. + Sets text elements associated with each (a,b,c) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b,c). If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["text"] @@ -16247,11 +18740,11 @@ def text(self, val): @property def textfont(self): """ - Sets the font used for `textinfo`. + Sets the text font. The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.sunburst.Textfont + - An instance of plotly.graph_objs.scatterternary.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -16289,7 +18782,7 @@ def textfont(self): Returns ------- - plotly.graph_objs.sunburst.Textfont + plotly.graph_objs.scatterternary.Textfont """ return self["textfont"] @@ -16297,28 +18790,50 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- + # textposition + # ------------ @property - def textinfo(self): + def textposition(self): """ - Determines which trace information appear on the graph. + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + Any|numpy.ndarray """ - return self["textinfo"] + return self["textposition"] - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on plot.ly for textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val # textsrc # ------- @@ -16340,6 +18855,61 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `a`, `b`, `c` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + # uid # --- @property @@ -16395,46 +18965,37 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ - @property - def values(self): - """ - Sets the values associated with each of the sunburst sectors. - Use with `branchvalues` to determine how the values are summed. - - The 'values' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["values"] - - @values.setter - def values(self, val): - self["values"] = val - - # valuessrc - # --------- + # unselected + # ---------- @property - def valuessrc(self): + def unselected(self): """ - Sets the source reference on plot.ly for values . + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.scatterternary.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + marker + plotly.graph_objects.scatterternary.unselected. + Marker instance or dict with compatible + properties + textfont + plotly.graph_objects.scatterternary.unselected. + Textfont instance or dict with compatible + properties Returns ------- - str + plotly.graph_objs.scatterternary.Unselected """ - return self["valuessrc"] + return self["unselected"] - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val + @unselected.setter + def unselected(self, val): + self["unselected"] = val # visible # ------- @@ -16476,13 +19037,39 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - branchvalues - Determines how the items in `values` are summed. When - set to "total", items in `values` are taken to be value - of all its descendants. When set to "remainder", items - in `values` corresponding to the root and the branches - sectors are taken to be the extra part not part of the - sum of the values at their leaves. + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on plot.ly for a . + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on plot.ly for b . + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on plot.ly for c . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -16490,9 +19077,21 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - domain - plotly.graph_objects.sunburst.Domain instance or dict - with compatible properties + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -16501,8 +19100,14 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.sunburst.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.scatterternary.Hoverlabel instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -16511,7 +19116,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -16525,11 +19135,12 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -16538,29 +19149,16 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - labels - Sets the labels of each of the sunburst sectors. - labelssrc - Sets the source reference on plot.ly for labels . - leaf - plotly.graph_objects.sunburst.Leaf instance or dict - with compatible properties - level - Sets the level from which this sunburst trace hierarchy - is rendered. Set `level` to `''` to start the sunburst - from the root node in the hierarchy. Must be an "id" if - `ids` is filled in, otherwise plotly attempts to find a - matching item in `labels`. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.scatterternary.Line instance or + dict with compatible properties marker - plotly.graph_objects.sunburst.Marker instance or dict - with compatible properties - maxdepth - Sets the number of rendered sunburst rings from any - given `level`. Set `maxdepth` to "-1" to render all the - levels in the hierarchy. + plotly.graph_objects.scatterternary.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -16576,39 +19174,84 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. - parents - Sets the parent sectors for each of the sunburst - sectors. Empty string items '' are understood to - reference the root node in the hierarchy. If `ids` is - filled, `parents` items are understood to be "ids" - themselves. When `ids` is not set, plotly attempts to - find matching items in `labels`, but beware they must - be unique. - parentssrc - Sets the source reference on plot.ly for parents . + selected + plotly.graph_objects.scatterternary.Selected instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.sunburst.Stream instance or dict - with compatible properties + plotly.graph_objects.scatterternary.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b`, `c` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -16631,12 +19274,9 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - values - Sets the values associated with each of the sunburst - sectors. Use with `branchvalues` to determine how the - values are summed. - valuessrc - Sets the source reference on plot.ly for values . + unselected + plotly.graph_objects.scatterternary.Unselected instance + or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -16647,64 +19287,100 @@ def _prop_descriptions(self): def __init__( self, arg=None, - branchvalues=None, + a=None, + asrc=None, + b=None, + bsrc=None, + c=None, + cliponaxis=None, + connectgaps=None, + csrc=None, customdata=None, customdatasrc=None, - domain=None, + fill=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - leaf=None, - level=None, + legendgroup=None, + line=None, marker=None, - maxdepth=None, meta=None, metasrc=None, + mode=None, name=None, opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, + selected=None, + selectedpoints=None, + showlegend=None, stream=None, + subplot=None, + sum=None, text=None, textfont=None, - textinfo=None, + textposition=None, + textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, - values=None, - valuessrc=None, + unselected=None, visible=None, **kwargs ): """ - Construct a new Sunburst object + Construct a new Scatterternary object - Visualize hierarchal data spanning outward radially from root - to leaves. The sunburst sectors are determined by the entries - in "labels" or "ids" and in "parents". + Provides similar functionality to the "scatter" type but on a + ternary phase diagram. The data is provided by at least two + arrays out of `a`, `b`, `c` triplets. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Sunburst - branchvalues - Determines how the items in `values` are summed. When - set to "total", items in `values` are taken to be value - of all its descendants. When set to "remainder", items - in `values` corresponding to the root and the branches - sectors are taken to be the extra part not part of the - sum of the values at their leaves. + an instance of plotly.graph_objs.Scatterternary + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on plot.ly for a . + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on plot.ly for b . + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on plot.ly for c . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -16712,9 +19388,21 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - domain - plotly.graph_objects.sunburst.Domain instance or dict - with compatible properties + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -16723,8 +19411,14 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.sunburst.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.scatterternary.Hoverlabel instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -16733,7 +19427,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -16747,11 +19446,12 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -16760,29 +19460,16 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - labels - Sets the labels of each of the sunburst sectors. - labelssrc - Sets the source reference on plot.ly for labels . - leaf - plotly.graph_objects.sunburst.Leaf instance or dict - with compatible properties - level - Sets the level from which this sunburst trace hierarchy - is rendered. Set `level` to `''` to start the sunburst - from the root node in the hierarchy. Must be an "id" if - `ids` is filled in, otherwise plotly attempts to find a - matching item in `labels`. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.scatterternary.Line instance or + dict with compatible properties marker - plotly.graph_objects.sunburst.Marker instance or dict - with compatible properties - maxdepth - Sets the number of rendered sunburst rings from any - given `level`. Set `maxdepth` to "-1" to render all the - levels in the hierarchy. + plotly.graph_objects.scatterternary.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -16798,39 +19485,84 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. - parents - Sets the parent sectors for each of the sunburst - sectors. Empty string items '' are understood to - reference the root node in the hierarchy. If `ids` is - filled, `parents` items are understood to be "ids" - themselves. When `ids` is not set, plotly attempts to - find matching items in `labels`, but beware they must - be unique. - parentssrc - Sets the source reference on plot.ly for parents . + selected + plotly.graph_objects.scatterternary.Selected instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.sunburst.Stream instance or dict - with compatible properties + plotly.graph_objects.scatterternary.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b`, `c` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -16853,12 +19585,9 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - values - Sets the values associated with each of the sunburst - sectors. Use with `branchvalues` to determine how the - values are summed. - valuessrc - Sets the source reference on plot.ly for values . + unselected + plotly.graph_objects.scatterternary.Unselected instance + or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -16867,9 +19596,9 @@ def __init__( Returns ------- - Sunburst + Scatterternary """ - super(Sunburst, self).__init__("sunburst") + super(Scatterternary, self).__init__("scatterternary") # Validate arg # ------------ @@ -16882,9 +19611,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Sunburst +The first argument to the plotly.graph_objs.Scatterternary constructor must be a dict or -an instance of plotly.graph_objs.Sunburst""" +an instance of plotly.graph_objs.Scatterternary""" ) # Handle skip_invalid @@ -16893,64 +19622,98 @@ def __init__( # Import validators # ----------------- - from plotly.validators import sunburst as v_sunburst + from plotly.validators import scatterternary as v_scatterternary # Initialize validators # --------------------- - self._validators["branchvalues"] = v_sunburst.BranchvaluesValidator() - self._validators["customdata"] = v_sunburst.CustomdataValidator() - self._validators["customdatasrc"] = v_sunburst.CustomdatasrcValidator() - self._validators["domain"] = v_sunburst.DomainValidator() - self._validators["hoverinfo"] = v_sunburst.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_sunburst.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_sunburst.HoverlabelValidator() - self._validators["hovertemplate"] = v_sunburst.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_sunburst.HovertemplatesrcValidator() - self._validators["hovertext"] = v_sunburst.HovertextValidator() - self._validators["hovertextsrc"] = v_sunburst.HovertextsrcValidator() - self._validators["ids"] = v_sunburst.IdsValidator() - self._validators["idssrc"] = v_sunburst.IdssrcValidator() - self._validators["insidetextfont"] = v_sunburst.InsidetextfontValidator() - self._validators["labels"] = v_sunburst.LabelsValidator() - self._validators["labelssrc"] = v_sunburst.LabelssrcValidator() - self._validators["leaf"] = v_sunburst.LeafValidator() - self._validators["level"] = v_sunburst.LevelValidator() - self._validators["marker"] = v_sunburst.MarkerValidator() - self._validators["maxdepth"] = v_sunburst.MaxdepthValidator() - self._validators["meta"] = v_sunburst.MetaValidator() - self._validators["metasrc"] = v_sunburst.MetasrcValidator() - self._validators["name"] = v_sunburst.NameValidator() - self._validators["opacity"] = v_sunburst.OpacityValidator() - self._validators["outsidetextfont"] = v_sunburst.OutsidetextfontValidator() - self._validators["parents"] = v_sunburst.ParentsValidator() - self._validators["parentssrc"] = v_sunburst.ParentssrcValidator() - self._validators["stream"] = v_sunburst.StreamValidator() - self._validators["text"] = v_sunburst.TextValidator() - self._validators["textfont"] = v_sunburst.TextfontValidator() - self._validators["textinfo"] = v_sunburst.TextinfoValidator() - self._validators["textsrc"] = v_sunburst.TextsrcValidator() - self._validators["uid"] = v_sunburst.UidValidator() - self._validators["uirevision"] = v_sunburst.UirevisionValidator() - self._validators["values"] = v_sunburst.ValuesValidator() - self._validators["valuessrc"] = v_sunburst.ValuessrcValidator() - self._validators["visible"] = v_sunburst.VisibleValidator() + self._validators["a"] = v_scatterternary.AValidator() + self._validators["asrc"] = v_scatterternary.AsrcValidator() + self._validators["b"] = v_scatterternary.BValidator() + self._validators["bsrc"] = v_scatterternary.BsrcValidator() + self._validators["c"] = v_scatterternary.CValidator() + self._validators["cliponaxis"] = v_scatterternary.CliponaxisValidator() + self._validators["connectgaps"] = v_scatterternary.ConnectgapsValidator() + self._validators["csrc"] = v_scatterternary.CsrcValidator() + self._validators["customdata"] = v_scatterternary.CustomdataValidator() + self._validators["customdatasrc"] = v_scatterternary.CustomdatasrcValidator() + self._validators["fill"] = v_scatterternary.FillValidator() + self._validators["fillcolor"] = v_scatterternary.FillcolorValidator() + self._validators["hoverinfo"] = v_scatterternary.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scatterternary.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scatterternary.HoverlabelValidator() + self._validators["hoveron"] = v_scatterternary.HoveronValidator() + self._validators["hovertemplate"] = v_scatterternary.HovertemplateValidator() + self._validators[ + "hovertemplatesrc" + ] = v_scatterternary.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scatterternary.HovertextValidator() + self._validators["hovertextsrc"] = v_scatterternary.HovertextsrcValidator() + self._validators["ids"] = v_scatterternary.IdsValidator() + self._validators["idssrc"] = v_scatterternary.IdssrcValidator() + self._validators["legendgroup"] = v_scatterternary.LegendgroupValidator() + self._validators["line"] = v_scatterternary.LineValidator() + self._validators["marker"] = v_scatterternary.MarkerValidator() + self._validators["meta"] = v_scatterternary.MetaValidator() + self._validators["metasrc"] = v_scatterternary.MetasrcValidator() + self._validators["mode"] = v_scatterternary.ModeValidator() + self._validators["name"] = v_scatterternary.NameValidator() + self._validators["opacity"] = v_scatterternary.OpacityValidator() + self._validators["selected"] = v_scatterternary.SelectedValidator() + self._validators["selectedpoints"] = v_scatterternary.SelectedpointsValidator() + self._validators["showlegend"] = v_scatterternary.ShowlegendValidator() + self._validators["stream"] = v_scatterternary.StreamValidator() + self._validators["subplot"] = v_scatterternary.SubplotValidator() + self._validators["sum"] = v_scatterternary.SumValidator() + self._validators["text"] = v_scatterternary.TextValidator() + self._validators["textfont"] = v_scatterternary.TextfontValidator() + self._validators["textposition"] = v_scatterternary.TextpositionValidator() + self._validators[ + "textpositionsrc" + ] = v_scatterternary.TextpositionsrcValidator() + self._validators["textsrc"] = v_scatterternary.TextsrcValidator() + self._validators["texttemplate"] = v_scatterternary.TexttemplateValidator() + self._validators[ + "texttemplatesrc" + ] = v_scatterternary.TexttemplatesrcValidator() + self._validators["uid"] = v_scatterternary.UidValidator() + self._validators["uirevision"] = v_scatterternary.UirevisionValidator() + self._validators["unselected"] = v_scatterternary.UnselectedValidator() + self._validators["visible"] = v_scatterternary.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("branchvalues", None) - self["branchvalues"] = branchvalues if branchvalues is not None else _v + _v = arg.pop("a", None) + self["a"] = a if a is not None else _v + _v = arg.pop("asrc", None) + self["asrc"] = asrc if asrc is not None else _v + _v = arg.pop("b", None) + self["b"] = b if b is not None else _v + _v = arg.pop("bsrc", None) + self["bsrc"] = bsrc if bsrc is not None else _v + _v = arg.pop("c", None) + self["c"] = c if c is not None else _v + _v = arg.pop("cliponaxis", None) + self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v + _v = arg.pop("connectgaps", None) + self["connectgaps"] = connectgaps if connectgaps is not None else _v + _v = arg.pop("csrc", None) + self["csrc"] = csrc if csrc is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v + _v = arg.pop("fill", None) + self["fill"] = fill if fill is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -16965,52 +19728,54 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v - _v = arg.pop("leaf", None) - self["leaf"] = leaf if leaf is not None else _v - _v = arg.pop("level", None) - self["level"] = level if level is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v - _v = arg.pop("maxdepth", None) - self["maxdepth"] = maxdepth if maxdepth is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("mode", None) + self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("parents", None) - self["parents"] = parents if parents is not None else _v - _v = arg.pop("parentssrc", None) - self["parentssrc"] = parentssrc if parentssrc is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("subplot", None) + self["subplot"] = subplot if subplot is not None else _v + _v = arg.pop("sum", None) + self["sum"] = sum if sum is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v @@ -17018,9 +19783,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "sunburst" + self._props["type"] = "scatterternary" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="sunburst", val="sunburst" + plotly_name="type", parent_name="scatterternary", val="scatterternary" ) arg.pop("type", None) @@ -17037,434 +19802,28 @@ def __init__( import copy as _copy -class Streamtube(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here u/v/w norm) or the bounds set - in `cmin` and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmin` must be set as - well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as u/v/w norm. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmax` must be set as - well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.streamtube.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.streamtube.colo - rbar.Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.streamtube.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of streamtube.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.streamtube.colorbar.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use - streamtube.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - streamtube.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.streamtube.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val +class Scatterpolargl(_BaseTraceType): - # colorscale - # ---------- + # connectgaps + # ----------- @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["colorscale"] + return self["connectgaps"] - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val # customdata # ---------- @@ -17509,6 +19868,149 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val + # dr + # -- + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + # dtheta + # ------ + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + # hoverinfo # --------- @property @@ -17520,8 +20022,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -17562,7 +20064,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.streamtube.Hoverlabel + - An instance of plotly.graph_objs.scatterpolargl.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -17606,7 +20108,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.streamtube.Hoverlabel + plotly.graph_objs.scatterpolargl.Hoverlabel """ return self["hoverlabel"] @@ -17626,16 +20128,19 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, - `norm` and `divergence`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. The 'hovertemplate' property is a string and must be specified as: - A string @@ -17677,15 +20182,20 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Same as `text`. + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ return self["hovertext"] @@ -17693,6 +20203,26 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + # ids # --- @property @@ -17735,107 +20265,208 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lighting - # -------- + # legendgroup + # ----------- @property - def lighting(self): + def legendgroup(self): """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of plotly.graph_objs.streamtube.Lighting - - A dict of string/value properties that will be passed - to the Lighting constructor + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.streamtube.Lighting + str """ - return self["lighting"] + return self["legendgroup"] - @lighting.setter - def lighting(self, val): - self["lighting"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # lightposition - # ------------- + # line + # ---- @property - def lightposition(self): + def line(self): """ - The 'lightposition' property is an instance of Lightposition + The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.streamtube.Lightposition + - An instance of plotly.graph_objs.scatterpolargl.Line - A dict of string/value properties that will be passed - to the Lightposition constructor + to the Line constructor Supported dict properties: - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. + color + Sets the line color. + dash + Sets the style of the lines. + shape + Determines the line shape. The values + correspond to step-wise line shapes. + width + Sets the line width (in px). Returns ------- - plotly.graph_objs.streamtube.Lightposition + plotly.graph_objs.scatterpolargl.Line """ - return self["lightposition"] + return self["line"] - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val + @line.setter + def line(self, val): + self["line"] = val - # maxdisplayed - # ------------ + # marker + # ------ @property - def maxdisplayed(self): + def marker(self): """ - The maximum number of displayed segments in a streamtube. + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.scatterpolargl.Marker + - A dict of string/value properties that will be passed + to the Marker constructor - The 'maxdisplayed' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.scatterpolargl.marker.Colo + rBar instance or dict with compatible + properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . + line + plotly.graph_objects.scatterpolargl.marker.Line + instance or dict with compatible properties + opacity + Sets the marker opacity. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + size + Sets the marker size (in px). + sizemin + Has an effect only if `marker.size` is set to a + numerical array. Sets the minimum size (in px) + of the rendered marker points. + sizemode + Has an effect only if `marker.size` is set to a + numerical array. Sets the rule for which the + data in `size` is converted to pixels. + sizeref + Has an effect only if `marker.size` is set to a + numerical array. Sets the scale factor used to + determine the rendered size of marker points. + Use with `sizemin` and `sizemode`. + sizesrc + Sets the source reference on plot.ly for size + . + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + symbolsrc + Sets the source reference on plot.ly for + symbol . Returns ------- - int + plotly.graph_objs.scatterpolargl.Marker """ - return self["maxdisplayed"] + return self["marker"] - @maxdisplayed.setter - def maxdisplayed(self, val): - self["maxdisplayed"] = val + @marker.setter + def marker(self, val): + self["marker"] = val # meta # ---- @@ -17885,6 +20516,34 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + # name # ---- @property @@ -17912,12 +20571,7 @@ def name(self, val): @property def opacity(self): """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. + Sets the opacity of the trace. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] @@ -17932,134 +20586,143 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ + # r + # - @property - def reversescale(self): + def r(self): """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # r0 + # -- + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. - The 'reversescale' property must be specified as a bool - (either True, or False) + The 'r0' property accepts values of any type Returns ------- - bool + Any """ - return self["reversescale"] + return self["r0"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @r0.setter + def r0(self, val): + self["r0"] = val - # scene - # ----- + # rsrc + # ---- @property - def scene(self): + def rsrc(self): """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. + Sets the source reference on plot.ly for r . - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["scene"] + return self["rsrc"] - @scene.setter - def scene(self, val): - self["scene"] = val + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val - # showscale - # --------- + # selected + # -------- @property - def showscale(self): + def selected(self): """ - Determines whether or not a colorbar is displayed for this - trace. + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.scatterpolargl.Selected + - A dict of string/value properties that will be passed + to the Selected constructor - The 'showscale' property must be specified as a bool - (either True, or False) + Supported dict properties: + + marker + plotly.graph_objects.scatterpolargl.selected.Ma + rker instance or dict with compatible + properties + textfont + plotly.graph_objects.scatterpolargl.selected.Te + xtfont instance or dict with compatible + properties Returns ------- - bool + plotly.graph_objs.scatterpolargl.Selected """ - return self["showscale"] + return self["selected"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @selected.setter + def selected(self, val): + self["selected"] = val - # sizeref - # ------- + # selectedpoints + # -------------- @property - def sizeref(self): + def selectedpoints(self): """ - The scaling factor for the streamtubes. The default is 1, which - avoids two max divergence tubes from touching at adjacent - starting positions. + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. - The 'sizeref' property is a number and may be specified as: - - An int or float in the interval [0, inf] + The 'selectedpoints' property accepts values of any type Returns ------- - int|float + Any """ - return self["sizeref"] + return self["selectedpoints"] - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val - # starts - # ------ + # showlegend + # ---------- @property - def starts(self): + def showlegend(self): """ - The 'starts' property is an instance of Starts - that may be specified as: - - An instance of plotly.graph_objs.streamtube.Starts - - A dict of string/value properties that will be passed - to the Starts constructor + Determines whether or not an item corresponding to this trace + is shown in the legend. - Supported dict properties: - - x - Sets the x components of the starting position - of the streamtubes - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y components of the starting position - of the streamtubes - ysrc - Sets the source reference on plot.ly for y . - z - Sets the z components of the starting position - of the streamtubes - zsrc - Sets the source reference on plot.ly for z . + The 'showlegend' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.streamtube.Starts + bool """ - return self["starts"] + return self["showlegend"] - @starts.setter - def starts(self, val): - self["starts"] = val + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val # stream # ------ @@ -18068,7 +20731,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.streamtube.Stream + - An instance of plotly.graph_objs.scatterpolargl.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -18086,7 +20749,7 @@ def stream(self): Returns ------- - plotly.graph_objs.streamtube.Stream + plotly.graph_objs.scatterpolargl.Stream """ return self["stream"] @@ -18094,23 +20757,51 @@ def stream(self): def stream(self, val): self["stream"] = val + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as the string 'polar' + optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + # text # ---- @property def text(self): """ - Sets a text element associated with this trace. If trace - `hoverinfo` contains a "text" flag, this text element will be - seen in all hover labels. Note that streamtube traces do not - support array `text` values. + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ return self["text"] @@ -18118,323 +20809,373 @@ def text(self): def text(self, val): self["text"] = val - # u - # - + # textfont + # -------- @property - def u(self): + def textfont(self): """ - Sets the x components of the vector field. + Sets the text font. - The 'u' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["u"] - - @u.setter - def u(self, val): - self["u"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of plotly.graph_objs.scatterpolargl.Textfont + - A dict of string/value properties that will be passed + to the Textfont constructor - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - str + plotly.graph_objs.scatterpolargl.Textfont """ - return self["uid"] + return self["textfont"] - @uid.setter - def uid(self, val): - self["uid"] = val + @textfont.setter + def textfont(self, val): + self["textfont"] = val - # uirevision - # ---------- + # textposition + # ------------ @property - def uirevision(self): + def textposition(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. - The 'uirevision' property accepts values of any type + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + Any|numpy.ndarray """ - return self["uirevision"] + return self["textposition"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @textposition.setter + def textposition(self, val): + self["textposition"] = val - # usrc - # ---- + # textpositionsrc + # --------------- @property - def usrc(self): + def textpositionsrc(self): """ - Sets the source reference on plot.ly for u . + Sets the source reference on plot.ly for textposition . - The 'usrc' property must be specified as a string or + The 'textpositionsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["usrc"] + return self["textpositionsrc"] - @usrc.setter - def usrc(self, val): - self["usrc"] = val + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val - # v - # - + # textsrc + # ------- @property - def v(self): + def textsrc(self): """ - Sets the y components of the vector field. + Sets the source reference on plot.ly for text . - The 'v' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - numpy.ndarray + str """ - return self["v"] + return self["textsrc"] - @v.setter - def v(self, val): - self["v"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # visible - # ------- + # texttemplate + # ------------ @property - def visible(self): + def texttemplate(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + str|numpy.ndarray """ - return self["visible"] + return self["texttemplate"] - @visible.setter - def visible(self, val): - self["visible"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # vsrc - # ---- + # texttemplatesrc + # --------------- @property - def vsrc(self): + def texttemplatesrc(self): """ - Sets the source reference on plot.ly for v . + Sets the source reference on plot.ly for texttemplate . - The 'vsrc' property must be specified as a string or + The 'texttemplatesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["vsrc"] + return self["texttemplatesrc"] - @vsrc.setter - def vsrc(self, val): - self["vsrc"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # w - # - + # theta + # ----- @property - def w(self): + def theta(self): """ - Sets the z components of the vector field. + Sets the angular coordinates - The 'w' property is an array that may be specified as a tuple, + The 'theta' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["w"] + return self["theta"] - @w.setter - def w(self, val): - self["w"] = val + @theta.setter + def theta(self, val): + self["theta"] = val - # wsrc - # ---- + # theta0 + # ------ @property - def wsrc(self): + def theta0(self): """ - Sets the source reference on plot.ly for w . + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. - The 'wsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'theta0' property accepts values of any type Returns ------- - str + Any """ - return self["wsrc"] + return self["theta0"] - @wsrc.setter - def wsrc(self, val): - self["wsrc"] = val + @theta0.setter + def theta0(self, val): + self["theta0"] = val - # x - # - + # thetasrc + # -------- @property - def x(self): + def thetasrc(self): """ - Sets the x coordinates of the vector field. + Sets the source reference on plot.ly for theta . - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - numpy.ndarray + str """ - return self["x"] + return self["thetasrc"] - @x.setter - def x(self, val): - self["x"] = val + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val - # xsrc - # ---- + # thetaunit + # --------- @property - def xsrc(self): + def thetaunit(self): """ - Sets the source reference on plot.ly for x . + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] Returns ------- - str + Any """ - return self["xsrc"] + return self["thetaunit"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val - # y - # - + # uid + # --- @property - def y(self): + def uid(self): """ - Sets the y coordinates of the vector field. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - numpy.ndarray + str """ - return self["y"] + return self["uid"] - @y.setter - def y(self, val): - self["y"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # ysrc - # ---- + # uirevision + # ---------- @property - def ysrc(self): + def uirevision(self): """ - Sets the source reference on plot.ly for y . + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uirevision' property accepts values of any type Returns ------- - str + Any """ - return self["ysrc"] + return self["uirevision"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # z - # - + # unselected + # ---------- @property - def z(self): + def unselected(self): """ - Sets the z coordinates of the vector field. + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.scatterpolargl.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + marker + plotly.graph_objects.scatterpolargl.unselected. + Marker instance or dict with compatible + properties + textfont + plotly.graph_objects.scatterpolargl.unselected. + Textfont instance or dict with compatible + properties Returns ------- - numpy.ndarray + plotly.graph_objs.scatterpolargl.Unselected """ - return self["z"] + return self["unselected"] - @z.setter - def z(self, val): - self["z"] = val + @unselected.setter + def unselected(self, val): + self["unselected"] = val - # zsrc - # ---- + # visible + # ------- @property - def zsrc(self): + def visible(self): """ - Sets the source reference on plot.ly for z . + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["zsrc"] + return self["visible"] - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val + @visible.setter + def visible(self, val): + self["visible"] = val # type # ---- @@ -18453,53 +21194,9 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.streamtube.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -18507,6 +21204,39 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -18515,8 +21245,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.streamtube.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.scatterpolargl.Hoverlabel instance + or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -18525,38 +21255,49 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `tubex`, `tubey`, `tubez`, - `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. - Anything contained in tag `` is displayed in the - secondary box, for example + available. Anything contained in tag `` is + displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lighting - plotly.graph_objects.streamtube.Lighting instance or + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.scatterpolargl.Line instance or + dict with compatible properties + marker + plotly.graph_objects.scatterpolargl.Marker instance or dict with compatible properties - lightposition - plotly.graph_objects.streamtube.Lightposition instance - or dict with compatible properties - maxdisplayed - The maximum number of displayed segments in a - streamtube. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -18572,47 +21313,96 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - sizeref - The scaling factor for the streamtubes. The default is - 1, which avoids two max divergence tubes from touching - at adjacent starting positions. - starts - plotly.graph_objects.streamtube.Starts instance or dict - with compatible properties + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on plot.ly for r . + selected + plotly.graph_objects.scatterpolargl.Selected instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.streamtube.Stream instance or dict - with compatible properties + plotly.graph_objects.scatterpolargl.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. text - Sets a text element associated with this trace. If - trace `hoverinfo` contains a "text" flag, this text - element will be seen in all hover labels. Note that - streamtube traces do not support array `text` values. - u - Sets the x components of the vector field. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on plot.ly for theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -18635,150 +21425,86 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - usrc - Sets the source reference on plot.ly for u . - v - Sets the y components of the vector field. + unselected + plotly.graph_objects.scatterpolargl.Unselected instance + or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - vsrc - Sets the source reference on plot.ly for v . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on plot.ly for w . - x - Sets the x coordinates of the vector field. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates of the vector field. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the z coordinates of the vector field. - zsrc - Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, + connectgaps=None, customdata=None, customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, + hovertextsrc=None, ids=None, idssrc=None, - lighting=None, - lightposition=None, - maxdisplayed=None, + legendgroup=None, + line=None, + marker=None, meta=None, metasrc=None, + mode=None, name=None, opacity=None, - reversescale=None, - scene=None, - showscale=None, - sizeref=None, - starts=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, stream=None, + subplot=None, text=None, - u=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, uid=None, uirevision=None, - usrc=None, - v=None, + unselected=None, visible=None, - vsrc=None, - w=None, - wsrc=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, **kwargs ): """ - Construct a new Streamtube object + Construct a new Scatterpolargl object - Use a streamtube trace to visualize flow in a vector field. - Specify a vector field using 6 1D arrays of equal length, 3 - position arrays `x`, `y` and `z` and 3 vector component arrays - `u`, `v`, and `w`. By default, the tubes' starting positions - will be cut from the vector field's x-z plane at its minimum y - value. To specify your own starting position, use attributes - `starts.x`, `starts.y` and `starts.z`. + The scatterpolargl trace type encompasses line charts, scatter + charts, and bubble charts in polar coordinates using the WebGL + plotting engine. The data visualized as scatter point or lines + is set in `r` (radial) and `theta` (angular) coordinates Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Streamtube - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.streamtube.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. + an instance of plotly.graph_objs.Scatterpolargl + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -18786,6 +21512,39 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -18794,8 +21553,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.streamtube.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.scatterpolargl.Hoverlabel instance + or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -18804,38 +21563,49 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `tubex`, `tubey`, `tubez`, - `tubeu`, `tubev`, `tubew`, `norm` and `divergence`. - Anything contained in tag `` is displayed in the - secondary box, for example + available. Anything contained in tag `` is + displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lighting - plotly.graph_objects.streamtube.Lighting instance or - dict with compatible properties - lightposition - plotly.graph_objects.streamtube.Lightposition instance - or dict with compatible properties - maxdisplayed - The maximum number of displayed segments in a - streamtube. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.scatterpolargl.Line instance or + dict with compatible properties + marker + plotly.graph_objects.scatterpolargl.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -18851,47 +21621,96 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - sizeref - The scaling factor for the streamtubes. The default is - 1, which avoids two max divergence tubes from touching - at adjacent starting positions. - starts - plotly.graph_objects.streamtube.Starts instance or dict - with compatible properties + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on plot.ly for r . + selected + plotly.graph_objects.scatterpolargl.Selected instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.streamtube.Stream instance or dict - with compatible properties + plotly.graph_objects.scatterpolargl.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. text - Sets a text element associated with this trace. If - trace `hoverinfo` contains a "text" flag, this text - element will be seen in all hover labels. Note that - streamtube traces do not support array `text` values. - u - Sets the x components of the vector field. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . + textsrc + Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on plot.ly for theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -18914,39 +21733,20 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - usrc - Sets the source reference on plot.ly for u . - v - Sets the y components of the vector field. + unselected + plotly.graph_objects.scatterpolargl.Unselected instance + or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - vsrc - Sets the source reference on plot.ly for v . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on plot.ly for w . - x - Sets the x coordinates of the vector field. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates of the vector field. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the z coordinates of the vector field. - zsrc - Sets the source reference on plot.ly for z . Returns ------- - Streamtube + Scatterpolargl """ - super(Streamtube, self).__init__("streamtube") + super(Scatterpolargl, self).__init__("scatterpolargl") # Validate arg # ------------ @@ -18959,9 +21759,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Streamtube +The first argument to the plotly.graph_objs.Scatterpolargl constructor must be a dict or -an instance of plotly.graph_objs.Streamtube""" +an instance of plotly.graph_objs.Scatterpolargl""" ) # Handle skip_invalid @@ -18970,80 +21770,80 @@ def __init__( # Import validators # ----------------- - from plotly.validators import streamtube as v_streamtube + from plotly.validators import scatterpolargl as v_scatterpolargl # Initialize validators # --------------------- - self._validators["autocolorscale"] = v_streamtube.AutocolorscaleValidator() - self._validators["cauto"] = v_streamtube.CautoValidator() - self._validators["cmax"] = v_streamtube.CmaxValidator() - self._validators["cmid"] = v_streamtube.CmidValidator() - self._validators["cmin"] = v_streamtube.CminValidator() - self._validators["coloraxis"] = v_streamtube.ColoraxisValidator() - self._validators["colorbar"] = v_streamtube.ColorBarValidator() - self._validators["colorscale"] = v_streamtube.ColorscaleValidator() - self._validators["customdata"] = v_streamtube.CustomdataValidator() - self._validators["customdatasrc"] = v_streamtube.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_streamtube.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_streamtube.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_streamtube.HoverlabelValidator() - self._validators["hovertemplate"] = v_streamtube.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_streamtube.HovertemplatesrcValidator() - self._validators["hovertext"] = v_streamtube.HovertextValidator() - self._validators["ids"] = v_streamtube.IdsValidator() - self._validators["idssrc"] = v_streamtube.IdssrcValidator() - self._validators["lighting"] = v_streamtube.LightingValidator() - self._validators["lightposition"] = v_streamtube.LightpositionValidator() - self._validators["maxdisplayed"] = v_streamtube.MaxdisplayedValidator() - self._validators["meta"] = v_streamtube.MetaValidator() - self._validators["metasrc"] = v_streamtube.MetasrcValidator() - self._validators["name"] = v_streamtube.NameValidator() - self._validators["opacity"] = v_streamtube.OpacityValidator() - self._validators["reversescale"] = v_streamtube.ReversescaleValidator() - self._validators["scene"] = v_streamtube.SceneValidator() - self._validators["showscale"] = v_streamtube.ShowscaleValidator() - self._validators["sizeref"] = v_streamtube.SizerefValidator() - self._validators["starts"] = v_streamtube.StartsValidator() - self._validators["stream"] = v_streamtube.StreamValidator() - self._validators["text"] = v_streamtube.TextValidator() - self._validators["u"] = v_streamtube.UValidator() - self._validators["uid"] = v_streamtube.UidValidator() - self._validators["uirevision"] = v_streamtube.UirevisionValidator() - self._validators["usrc"] = v_streamtube.UsrcValidator() - self._validators["v"] = v_streamtube.VValidator() - self._validators["visible"] = v_streamtube.VisibleValidator() - self._validators["vsrc"] = v_streamtube.VsrcValidator() - self._validators["w"] = v_streamtube.WValidator() - self._validators["wsrc"] = v_streamtube.WsrcValidator() - self._validators["x"] = v_streamtube.XValidator() - self._validators["xsrc"] = v_streamtube.XsrcValidator() - self._validators["y"] = v_streamtube.YValidator() - self._validators["ysrc"] = v_streamtube.YsrcValidator() - self._validators["z"] = v_streamtube.ZValidator() - self._validators["zsrc"] = v_streamtube.ZsrcValidator() + self._validators["connectgaps"] = v_scatterpolargl.ConnectgapsValidator() + self._validators["customdata"] = v_scatterpolargl.CustomdataValidator() + self._validators["customdatasrc"] = v_scatterpolargl.CustomdatasrcValidator() + self._validators["dr"] = v_scatterpolargl.DrValidator() + self._validators["dtheta"] = v_scatterpolargl.DthetaValidator() + self._validators["fill"] = v_scatterpolargl.FillValidator() + self._validators["fillcolor"] = v_scatterpolargl.FillcolorValidator() + self._validators["hoverinfo"] = v_scatterpolargl.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scatterpolargl.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scatterpolargl.HoverlabelValidator() + self._validators["hovertemplate"] = v_scatterpolargl.HovertemplateValidator() + self._validators[ + "hovertemplatesrc" + ] = v_scatterpolargl.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scatterpolargl.HovertextValidator() + self._validators["hovertextsrc"] = v_scatterpolargl.HovertextsrcValidator() + self._validators["ids"] = v_scatterpolargl.IdsValidator() + self._validators["idssrc"] = v_scatterpolargl.IdssrcValidator() + self._validators["legendgroup"] = v_scatterpolargl.LegendgroupValidator() + self._validators["line"] = v_scatterpolargl.LineValidator() + self._validators["marker"] = v_scatterpolargl.MarkerValidator() + self._validators["meta"] = v_scatterpolargl.MetaValidator() + self._validators["metasrc"] = v_scatterpolargl.MetasrcValidator() + self._validators["mode"] = v_scatterpolargl.ModeValidator() + self._validators["name"] = v_scatterpolargl.NameValidator() + self._validators["opacity"] = v_scatterpolargl.OpacityValidator() + self._validators["r"] = v_scatterpolargl.RValidator() + self._validators["r0"] = v_scatterpolargl.R0Validator() + self._validators["rsrc"] = v_scatterpolargl.RsrcValidator() + self._validators["selected"] = v_scatterpolargl.SelectedValidator() + self._validators["selectedpoints"] = v_scatterpolargl.SelectedpointsValidator() + self._validators["showlegend"] = v_scatterpolargl.ShowlegendValidator() + self._validators["stream"] = v_scatterpolargl.StreamValidator() + self._validators["subplot"] = v_scatterpolargl.SubplotValidator() + self._validators["text"] = v_scatterpolargl.TextValidator() + self._validators["textfont"] = v_scatterpolargl.TextfontValidator() + self._validators["textposition"] = v_scatterpolargl.TextpositionValidator() + self._validators[ + "textpositionsrc" + ] = v_scatterpolargl.TextpositionsrcValidator() + self._validators["textsrc"] = v_scatterpolargl.TextsrcValidator() + self._validators["texttemplate"] = v_scatterpolargl.TexttemplateValidator() + self._validators[ + "texttemplatesrc" + ] = v_scatterpolargl.TexttemplatesrcValidator() + self._validators["theta"] = v_scatterpolargl.ThetaValidator() + self._validators["theta0"] = v_scatterpolargl.Theta0Validator() + self._validators["thetasrc"] = v_scatterpolargl.ThetasrcValidator() + self._validators["thetaunit"] = v_scatterpolargl.ThetaunitValidator() + self._validators["uid"] = v_scatterpolargl.UidValidator() + self._validators["uirevision"] = v_scatterpolargl.UirevisionValidator() + self._validators["unselected"] = v_scatterpolargl.UnselectedValidator() + self._validators["visible"] = v_scatterpolargl.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("connectgaps", None) + self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("dr", None) + self["dr"] = dr if dr is not None else _v + _v = arg.pop("dtheta", None) + self["dtheta"] = dtheta if dtheta is not None else _v + _v = arg.pop("fill", None) + self["fill"] = fill if fill is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -19058,76 +21858,82 @@ def __init__( ) _v = arg.pop("hovertext", None) self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("maxdisplayed", None) - self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("mode", None) + self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v - _v = arg.pop("starts", None) - self["starts"] = starts if starts is not None else _v + _v = arg.pop("r", None) + self["r"] = r if r is not None else _v + _v = arg.pop("r0", None) + self["r0"] = r0 if r0 is not None else _v + _v = arg.pop("rsrc", None) + self["rsrc"] = rsrc if rsrc is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("subplot", None) + self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v - _v = arg.pop("u", None) - self["u"] = u if u is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("theta", None) + self["theta"] = theta if theta is not None else _v + _v = arg.pop("theta0", None) + self["theta0"] = theta0 if theta0 is not None else _v + _v = arg.pop("thetasrc", None) + self["thetasrc"] = thetasrc if thetasrc is not None else _v + _v = arg.pop("thetaunit", None) + self["thetaunit"] = thetaunit if thetaunit is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("usrc", None) - self["usrc"] = usrc if usrc is not None else _v - _v = arg.pop("v", None) - self["v"] = v if v is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("vsrc", None) - self["vsrc"] = vsrc if vsrc is not None else _v - _v = arg.pop("w", None) - self["w"] = w if w is not None else _v - _v = arg.pop("wsrc", None) - self["wsrc"] = wsrc if wsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "streamtube" + self._props["type"] = "scatterpolargl" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="streamtube", val="streamtube" + plotly_name="type", parent_name="scatterpolargl", val="scatterpolargl" ) arg.pop("type", None) @@ -19144,7 +21950,51 @@ def __init__( import copy as _copy -class Splom(_BaseTraceType): +class Scatterpolar(_BaseTraceType): + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val # customdata # ---------- @@ -19189,120 +22039,137 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # diagonal - # -------- + # dr + # -- @property - def diagonal(self): + def dr(self): """ - The 'diagonal' property is an instance of Diagonal - that may be specified as: - - An instance of plotly.graph_objs.splom.Diagonal - - A dict of string/value properties that will be passed - to the Diagonal constructor + Sets the r coordinate step. - Supported dict properties: - - visible - Determines whether or not subplots on the - diagonal are displayed. + The 'dr' property is a number and may be specified as: + - An int or float Returns ------- - plotly.graph_objs.splom.Diagonal + int|float """ - return self["diagonal"] + return self["dr"] - @diagonal.setter - def diagonal(self, val): - self["diagonal"] = val + @dr.setter + def dr(self, val): + self["dr"] = val - # dimensions - # ---------- + # dtheta + # ------ @property - def dimensions(self): + def dtheta(self): """ - The 'dimensions' property is a tuple of instances of - Dimension that may be specified as: - - A list or tuple of instances of plotly.graph_objs.splom.Dimension - - A list or tuple of dicts of string/value properties that - will be passed to the Dimension constructor + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. - Supported dict properties: - - axis - plotly.graph_objects.splom.dimension.Axis - instance or dict with compatible properties - label - Sets the label corresponding to this splom - dimension. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on plot.ly for - values . - visible - Determines whether or not this dimension is - shown on the graph. Note that even visible - false dimension contribute to the default grid - generate by this splom trace. + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + # fill + # ---- + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterpolar has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] Returns ------- - tuple[plotly.graph_objs.splom.Dimension] + Any """ - return self["dimensions"] + return self["fill"] - @dimensions.setter - def dimensions(self, val): - self["dimensions"] = val + @fill.setter + def fill(self, val): + self["fill"] = val - # dimensiondefaults - # ----------------- + # fillcolor + # --------- @property - def dimensiondefaults(self): + def fillcolor(self): """ - When used in a template (as - layout.template.data.splom.dimensiondefaults), sets the default - property values to use for elements of splom.dimensions - - The 'dimensiondefaults' property is an instance of Dimension - that may be specified as: - - An instance of plotly.graph_objs.splom.Dimension - - A dict of string/value properties that will be passed - to the Dimension constructor + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. - Supported dict properties: + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen Returns ------- - plotly.graph_objs.splom.Dimension + str """ - return self["dimensiondefaults"] + return self["fillcolor"] - @dimensiondefaults.setter - def dimensiondefaults(self, val): - self["dimensiondefaults"] = val + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val # hoverinfo # --------- @@ -19315,8 +22182,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -19357,7 +22224,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.splom.Hoverlabel + - An instance of plotly.graph_objs.scatterpolar.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -19401,7 +22268,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.splom.Hoverlabel + plotly.graph_objs.scatterpolar.Hoverlabel """ return self["hoverlabel"] @@ -19409,6 +22276,31 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + # hovertemplate # ------------- @property @@ -19421,7 +22313,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -19471,7 +22367,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Same as `text`. + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -19573,6 +22473,49 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.scatterpolar.Line + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). + width + Sets the line width (in px). + + Returns + ------- + plotly.graph_objs.scatterpolar.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + # marker # ------ @property @@ -19580,7 +22523,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.splom.Marker + - An instance of plotly.graph_objs.scatterpolar.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -19640,8 +22583,8 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.splom.marker.ColorBar - instance or dict with compatible properties + plotly.graph_objects.scatterpolar.marker.ColorB + ar instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The @@ -19661,9 +22604,15 @@ def marker(self): colorsrc Sets the source reference on plot.ly for color . + gradient + plotly.graph_objects.scatterpolar.marker.Gradie + nt instance or dict with compatible properties line - plotly.graph_objects.splom.marker.Line instance - or dict with compatible properties + plotly.graph_objects.scatterpolar.marker.Line + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. opacity Sets the marker opacity. opacitysrc @@ -19711,7 +22660,7 @@ def marker(self): Returns ------- - plotly.graph_objs.splom.Marker + plotly.graph_objs.scatterpolar.Marker """ return self["marker"] @@ -19767,6 +22716,34 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val + # mode + # ---- + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + # name # ---- @property @@ -19809,6 +22786,67 @@ def opacity(self): def opacity(self, val): self["opacity"] = val + # r + # - + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # r0 + # -- + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on plot.ly for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + # selected # -------- @property @@ -19816,19 +22854,23 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.splom.Selected + - An instance of plotly.graph_objs.scatterpolar.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.splom.selected.Marker - instance or dict with compatible properties + plotly.graph_objects.scatterpolar.selected.Mark + er instance or dict with compatible properties + textfont + plotly.graph_objects.scatterpolar.selected.Text + font instance or dict with compatible + properties Returns ------- - plotly.graph_objs.splom.Selected + plotly.graph_objs.scatterpolar.Selected """ return self["selected"] @@ -19881,125 +22923,348 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showlowerhalf - # ------------- + # stream + # ------ @property - def showlowerhalf(self): + def stream(self): """ - Determines whether or not subplots on the lower half from the - diagonal are displayed. + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.scatterpolar.Stream + - A dict of string/value properties that will be passed + to the Stream constructor - The 'showlowerhalf' property must be specified as a bool - (either True, or False) + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. + + Returns + ------- + plotly.graph_objs.scatterpolar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as the string 'polar' + optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of plotly.graph_objs.scatterpolar.Textfont + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.scatterpolar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on plot.ly for textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - bool + str """ - return self["showlowerhalf"] + return self["texttemplatesrc"] - @showlowerhalf.setter - def showlowerhalf(self, val): - self["showlowerhalf"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # showupperhalf - # ------------- + # theta + # ----- @property - def showupperhalf(self): + def theta(self): """ - Determines whether or not subplots on the upper half from the - diagonal are displayed. + Sets the angular coordinates - The 'showupperhalf' property must be specified as a bool - (either True, or False) + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - bool + numpy.ndarray """ - return self["showupperhalf"] + return self["theta"] - @showupperhalf.setter - def showupperhalf(self, val): - self["showupperhalf"] = val + @theta.setter + def theta(self, val): + self["theta"] = val - # stream + # theta0 # ------ @property - def stream(self): + def theta0(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.splom.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'theta0' property accepts values of any type Returns ------- - plotly.graph_objs.splom.Stream + Any """ - return self["stream"] + return self["theta0"] - @stream.setter - def stream(self, val): - self["stream"] = val + @theta0.setter + def theta0(self, val): + self["theta0"] = val - # text - # ---- + # thetasrc + # -------- @property - def text(self): + def thetasrc(self): """ - Sets text elements associated with each (x,y) pair to appear on - hover. If a single string, the same string appears over all the - data points. If an array of string, the items are mapped in - order to the this trace's (x,y) coordinates. + Sets the source reference on plot.ly for theta . - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - str|numpy.ndarray + str """ - return self["text"] + return self["thetasrc"] - @text.setter - def text(self, val): - self["text"] = val + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val - # textsrc - # ------- + # thetaunit + # --------- @property - def textsrc(self): + def thetaunit(self): """ - Sets the source reference on plot.ly for text . + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] Returns ------- - str + Any """ - return self["textsrc"] + return self["thetaunit"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val # uid # --- @@ -20063,19 +23328,24 @@ def unselected(self): """ The 'unselected' property is an instance of Unselected that may be specified as: - - An instance of plotly.graph_objs.splom.Unselected + - An instance of plotly.graph_objs.scatterpolar.Unselected - A dict of string/value properties that will be passed to the Unselected constructor Supported dict properties: marker - plotly.graph_objects.splom.unselected.Marker - instance or dict with compatible properties + plotly.graph_objects.scatterpolar.unselected.Ma + rker instance or dict with compatible + properties + textfont + plotly.graph_objects.scatterpolar.unselected.Te + xtfont instance or dict with compatible + properties Returns ------- - plotly.graph_objs.splom.Unselected + plotly.graph_objs.scatterpolar.Unselected """ return self["unselected"] @@ -20106,64 +23376,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # xaxes - # ----- - @property - def xaxes(self): - """ - Sets the list of x axes corresponding to dimensions of this - splom trace. By default, a splom will match the first N xaxes - where N is the number of input dimensions. Note that, in case - where `diagonal.visible` is false and `showupperhalf` or - `showlowerhalf` is false, this splom trace will generate one - less x-axis and one less y-axis. - - The 'xaxes' property is an info array that may be specified as: - * a list of elements where: - The 'xaxes[i]' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - list - """ - return self["xaxes"] - - @xaxes.setter - def xaxes(self, val): - self["xaxes"] = val - - # yaxes - # ----- - @property - def yaxes(self): - """ - Sets the list of y axes corresponding to dimensions of this - splom trace. By default, a splom will match the first N yaxes - where N is the number of input dimensions. Note that, in case - where `diagonal.visible` is false and `showupperhalf` or - `showlowerhalf` is false, this splom trace will generate one - less x-axis and one less y-axis. - - The 'yaxes' property is an info array that may be specified as: - * a list of elements where: - The 'yaxes[i]' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - list - """ - return self["yaxes"] - - @yaxes.setter - def yaxes(self, val): - self["yaxes"] = val - # type # ---- @property @@ -20181,6 +23393,15 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -20188,17 +23409,27 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - diagonal - plotly.graph_objects.splom.Diagonal instance or dict - with compatible properties - dimensions - A tuple of plotly.graph_objects.splom.Dimension - instances or dicts with compatible properties - dimensiondefaults - When used in a template (as - layout.template.data.splom.dimensiondefaults), sets the - default property values to use for elements of - splom.dimensions + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -20207,8 +23438,14 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.splom.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.scatterpolar.Hoverlabel instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -20217,7 +23454,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -20231,7 +23473,12 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -20244,9 +23491,12 @@ def _prop_descriptions(self): Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. + line + plotly.graph_objects.scatterpolar.Line instance or dict + with compatible properties marker - plotly.graph_objects.splom.Marker instance or dict with - compatible properties + plotly.graph_objects.scatterpolar.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -20262,14 +23512,29 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on plot.ly for r . selected - plotly.graph_objects.splom.Selected instance or dict - with compatible properties + plotly.graph_objects.scatterpolar.Selected instance or + dict with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -20280,23 +23545,63 @@ def _prop_descriptions(self): showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - showlowerhalf - Determines whether or not subplots on the lower half - from the diagonal are displayed. - showupperhalf - Determines whether or not subplots on the upper half - from the diagonal are displayed. stream - plotly.graph_objects.splom.Stream instance or dict with - compatible properties + plotly.graph_objects.scatterpolar.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. text - Sets text elements associated with each (x,y) pair to - appear on hover. If a single string, the same string - appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (x,y) coordinates. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on plot.ly for theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -20320,42 +23625,30 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.splom.Unselected instance or dict - with compatible properties + plotly.graph_objects.scatterpolar.Unselected instance + or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - xaxes - Sets the list of x axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N xaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. - yaxes - Sets the list of y axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N yaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. """ def __init__( self, arg=None, + cliponaxis=None, + connectgaps=None, customdata=None, customdatasrc=None, - diagonal=None, - dimensions=None, - dimensiondefaults=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, @@ -20363,43 +23656,63 @@ def __init__( ids=None, idssrc=None, legendgroup=None, + line=None, marker=None, meta=None, metasrc=None, + mode=None, name=None, opacity=None, + r=None, + r0=None, + rsrc=None, selected=None, selectedpoints=None, showlegend=None, - showlowerhalf=None, - showupperhalf=None, stream=None, + subplot=None, text=None, + textfont=None, + textposition=None, + textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, - xaxes=None, - yaxes=None, **kwargs ): """ - Construct a new Splom object + Construct a new Scatterpolar object - Splom traces generate scatter plot matrix visualizations. Each - splom `dimensions` items correspond to a generated axis. Values - for each of those dimensions are set in `dimensions[i].values`. - Splom traces support all `scattergl` marker style attributes. - Specify `layout.grid` attributes and/or layout x-axis and - y-axis attributes for more control over the axis positioning - and style. + The scatterpolar trace type encompasses line charts, scatter + charts, text charts, and bubble charts in polar coordinates. + The data visualized as scatter point or lines is set in `r` + (radial) and `theta` (angular) coordinates Text (appearing + either on the chart or on hover only) is via `text`. Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Splom + an instance of plotly.graph_objs.Scatterpolar + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -20407,17 +23720,27 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - diagonal - plotly.graph_objects.splom.Diagonal instance or dict - with compatible properties - dimensions - A tuple of plotly.graph_objects.splom.Dimension - instances or dicts with compatible properties - dimensiondefaults - When used in a template (as - layout.template.data.splom.dimensiondefaults), sets the - default property values to use for elements of - splom.dimensions + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -20426,8 +23749,14 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.splom.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.scatterpolar.Hoverlabel instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -20436,7 +23765,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -20450,7 +23784,12 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -20463,9 +23802,12 @@ def __init__( Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. + line + plotly.graph_objects.scatterpolar.Line instance or dict + with compatible properties marker - plotly.graph_objects.splom.Marker instance or dict with - compatible properties + plotly.graph_objects.scatterpolar.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -20481,14 +23823,29 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on plot.ly for r . selected - plotly.graph_objects.splom.Selected instance or dict - with compatible properties + plotly.graph_objects.scatterpolar.Selected instance or + dict with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -20499,23 +23856,63 @@ def __init__( showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - showlowerhalf - Determines whether or not subplots on the lower half - from the diagonal are displayed. - showupperhalf - Determines whether or not subplots on the upper half - from the diagonal are displayed. stream - plotly.graph_objects.splom.Stream instance or dict with - compatible properties + plotly.graph_objects.scatterpolar.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. text - Sets text elements associated with each (x,y) pair to - appear on hover. If a single string, the same string - appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (x,y) coordinates. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on plot.ly for theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -20539,35 +23936,19 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.splom.Unselected instance or dict - with compatible properties + plotly.graph_objects.scatterpolar.Unselected instance + or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - xaxes - Sets the list of x axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N xaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. - yaxes - Sets the list of y axes corresponding to dimensions of - this splom trace. By default, a splom will match the - first N yaxes where N is the number of input - dimensions. Note that, in case where `diagonal.visible` - is false and `showupperhalf` or `showlowerhalf` is - false, this splom trace will generate one less x-axis - and one less y-axis. Returns ------- - Splom + Scatterpolar """ - super(Splom, self).__init__("splom") + super(Scatterpolar, self).__init__("scatterpolar") # Validate arg # ------------ @@ -20580,9 +23961,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Splom +The first argument to the plotly.graph_objs.Scatterpolar constructor must be a dict or -an instance of plotly.graph_objs.Splom""" +an instance of plotly.graph_objs.Scatterpolar""" ) # Handle skip_invalid @@ -20591,65 +23972,88 @@ def __init__( # Import validators # ----------------- - from plotly.validators import splom as v_splom + from plotly.validators import scatterpolar as v_scatterpolar # Initialize validators # --------------------- - self._validators["customdata"] = v_splom.CustomdataValidator() - self._validators["customdatasrc"] = v_splom.CustomdatasrcValidator() - self._validators["diagonal"] = v_splom.DiagonalValidator() - self._validators["dimensions"] = v_splom.DimensionsValidator() - self._validators["dimensiondefaults"] = v_splom.DimensionValidator() - self._validators["hoverinfo"] = v_splom.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_splom.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_splom.HoverlabelValidator() - self._validators["hovertemplate"] = v_splom.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_splom.HovertemplatesrcValidator() - self._validators["hovertext"] = v_splom.HovertextValidator() - self._validators["hovertextsrc"] = v_splom.HovertextsrcValidator() - self._validators["ids"] = v_splom.IdsValidator() - self._validators["idssrc"] = v_splom.IdssrcValidator() - self._validators["legendgroup"] = v_splom.LegendgroupValidator() - self._validators["marker"] = v_splom.MarkerValidator() - self._validators["meta"] = v_splom.MetaValidator() - self._validators["metasrc"] = v_splom.MetasrcValidator() - self._validators["name"] = v_splom.NameValidator() - self._validators["opacity"] = v_splom.OpacityValidator() - self._validators["selected"] = v_splom.SelectedValidator() - self._validators["selectedpoints"] = v_splom.SelectedpointsValidator() - self._validators["showlegend"] = v_splom.ShowlegendValidator() - self._validators["showlowerhalf"] = v_splom.ShowlowerhalfValidator() - self._validators["showupperhalf"] = v_splom.ShowupperhalfValidator() - self._validators["stream"] = v_splom.StreamValidator() - self._validators["text"] = v_splom.TextValidator() - self._validators["textsrc"] = v_splom.TextsrcValidator() - self._validators["uid"] = v_splom.UidValidator() - self._validators["uirevision"] = v_splom.UirevisionValidator() - self._validators["unselected"] = v_splom.UnselectedValidator() - self._validators["visible"] = v_splom.VisibleValidator() - self._validators["xaxes"] = v_splom.XaxesValidator() - self._validators["yaxes"] = v_splom.YaxesValidator() + self._validators["cliponaxis"] = v_scatterpolar.CliponaxisValidator() + self._validators["connectgaps"] = v_scatterpolar.ConnectgapsValidator() + self._validators["customdata"] = v_scatterpolar.CustomdataValidator() + self._validators["customdatasrc"] = v_scatterpolar.CustomdatasrcValidator() + self._validators["dr"] = v_scatterpolar.DrValidator() + self._validators["dtheta"] = v_scatterpolar.DthetaValidator() + self._validators["fill"] = v_scatterpolar.FillValidator() + self._validators["fillcolor"] = v_scatterpolar.FillcolorValidator() + self._validators["hoverinfo"] = v_scatterpolar.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scatterpolar.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scatterpolar.HoverlabelValidator() + self._validators["hoveron"] = v_scatterpolar.HoveronValidator() + self._validators["hovertemplate"] = v_scatterpolar.HovertemplateValidator() + self._validators[ + "hovertemplatesrc" + ] = v_scatterpolar.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scatterpolar.HovertextValidator() + self._validators["hovertextsrc"] = v_scatterpolar.HovertextsrcValidator() + self._validators["ids"] = v_scatterpolar.IdsValidator() + self._validators["idssrc"] = v_scatterpolar.IdssrcValidator() + self._validators["legendgroup"] = v_scatterpolar.LegendgroupValidator() + self._validators["line"] = v_scatterpolar.LineValidator() + self._validators["marker"] = v_scatterpolar.MarkerValidator() + self._validators["meta"] = v_scatterpolar.MetaValidator() + self._validators["metasrc"] = v_scatterpolar.MetasrcValidator() + self._validators["mode"] = v_scatterpolar.ModeValidator() + self._validators["name"] = v_scatterpolar.NameValidator() + self._validators["opacity"] = v_scatterpolar.OpacityValidator() + self._validators["r"] = v_scatterpolar.RValidator() + self._validators["r0"] = v_scatterpolar.R0Validator() + self._validators["rsrc"] = v_scatterpolar.RsrcValidator() + self._validators["selected"] = v_scatterpolar.SelectedValidator() + self._validators["selectedpoints"] = v_scatterpolar.SelectedpointsValidator() + self._validators["showlegend"] = v_scatterpolar.ShowlegendValidator() + self._validators["stream"] = v_scatterpolar.StreamValidator() + self._validators["subplot"] = v_scatterpolar.SubplotValidator() + self._validators["text"] = v_scatterpolar.TextValidator() + self._validators["textfont"] = v_scatterpolar.TextfontValidator() + self._validators["textposition"] = v_scatterpolar.TextpositionValidator() + self._validators["textpositionsrc"] = v_scatterpolar.TextpositionsrcValidator() + self._validators["textsrc"] = v_scatterpolar.TextsrcValidator() + self._validators["texttemplate"] = v_scatterpolar.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scatterpolar.TexttemplatesrcValidator() + self._validators["theta"] = v_scatterpolar.ThetaValidator() + self._validators["theta0"] = v_scatterpolar.Theta0Validator() + self._validators["thetasrc"] = v_scatterpolar.ThetasrcValidator() + self._validators["thetaunit"] = v_scatterpolar.ThetaunitValidator() + self._validators["uid"] = v_scatterpolar.UidValidator() + self._validators["uirevision"] = v_scatterpolar.UirevisionValidator() + self._validators["unselected"] = v_scatterpolar.UnselectedValidator() + self._validators["visible"] = v_scatterpolar.VisibleValidator() # Populate data dict with properties # ---------------------------------- + _v = arg.pop("cliponaxis", None) + self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v + _v = arg.pop("connectgaps", None) + self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("diagonal", None) - self["diagonal"] = diagonal if diagonal is not None else _v - _v = arg.pop("dimensions", None) - self["dimensions"] = dimensions if dimensions is not None else _v - _v = arg.pop("dimensiondefaults", None) - self["dimensiondefaults"] = ( - dimensiondefaults if dimensiondefaults is not None else _v - ) + _v = arg.pop("dr", None) + self["dr"] = dr if dr is not None else _v + _v = arg.pop("dtheta", None) + self["dtheta"] = dtheta if dtheta is not None else _v + _v = arg.pop("fill", None) + self["fill"] = fill if fill is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -20666,32 +24070,58 @@ def __init__( self["idssrc"] = idssrc if idssrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("mode", None) + self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("r", None) + self["r"] = r if r is not None else _v + _v = arg.pop("r0", None) + self["r0"] = r0 if r0 is not None else _v + _v = arg.pop("rsrc", None) + self["rsrc"] = rsrc if rsrc is not None else _v _v = arg.pop("selected", None) self["selected"] = selected if selected is not None else _v _v = arg.pop("selectedpoints", None) self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showlowerhalf", None) - self["showlowerhalf"] = showlowerhalf if showlowerhalf is not None else _v - _v = arg.pop("showupperhalf", None) - self["showupperhalf"] = showupperhalf if showupperhalf is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("subplot", None) + self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("theta", None) + self["theta"] = theta if theta is not None else _v + _v = arg.pop("theta0", None) + self["theta0"] = theta0 if theta0 is not None else _v + _v = arg.pop("thetasrc", None) + self["thetasrc"] = thetasrc if thetasrc is not None else _v + _v = arg.pop("thetaunit", None) + self["thetaunit"] = thetaunit if thetaunit is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -20700,18 +24130,14 @@ def __init__( self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("xaxes", None) - self["xaxes"] = xaxes if xaxes is not None else _v - _v = arg.pop("yaxes", None) - self["yaxes"] = yaxes if yaxes is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "splom" + self._props["type"] = "scatterpolar" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="splom", val="splom" + plotly_name="type", parent_name="scatterpolar", val="scatterpolar" ) arg.pop("type", None) @@ -20728,139 +24154,32 @@ def __init__( import copy as _copy -class Scatterternary(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - Sets the quantity of component `a` in each data point. If `a`, - `b`, and `c` are all provided, they need not be normalized, - only the relative values matter. If only two arrays are - provided they must be normalized to match `ternary.sum`. - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on plot.ly for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val - - # b - # - - @property - def b(self): - """ - Sets the quantity of component `a` in each data point. If `a`, - `b`, and `c` are all provided, they need not be normalized, - only the relative values matter. If only two arrays are - provided they must be normalized to match `ternary.sum`. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val +class Scattermapbox(_BaseTraceType): - # bsrc - # ---- + # below + # ----- @property - def bsrc(self): + def below(self): """ - Sets the source reference on plot.ly for b . + Determines if this scattermapbox trace's layers are to be + inserted before the layer with the specified ID. By default, + scattermapbox layers are inserted above all the base layers. To + place the scattermapbox layers above every other layer, set + `below` to "''". - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["bsrc"] - - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val - - # c - # - - @property - def c(self): - """ - Sets the quantity of component `a` in each data point. If `a`, - `b`, and `c` are all provided, they need not be normalized, - only the relative values matter. If only two arrays are - provided they must be normalized to match `ternary.sum`. - - The 'c' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["c"] - - @c.setter - def c(self, val): - self["c"] = val - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether or not markers and text nodes are clipped - about the subplot axes. To show markers and text nodes above - axis lines and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] + return self["below"] - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val + @below.setter + def below(self, val): + self["below"] = val # connectgaps # ----------- @@ -20883,26 +24202,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # csrc - # ---- - @property - def csrc(self): - """ - Sets the source reference on plot.ly for c . - - The 'csrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["csrc"] - - @csrc.setter - def csrc(self, val): - self["csrc"] = val - # customdata # ---------- @property @@ -20952,18 +24251,12 @@ def customdatasrc(self, val): def fill(self): """ Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". scatterternary has a subset of the options - available to scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has gaps) into a - closed shape. "tonext" fills the space between two traces if - one completely encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is no trace before - it. "tonext" should not be used if one trace does not enclose - the other. + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. The 'fill' property is an enumeration that may be specified as: - One of the following enumeration values: - ['none', 'toself', 'tonext'] + ['none', 'toself'] Returns ------- @@ -21047,8 +24340,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['a', 'b', 'c', 'text', 'name'] joined with '+' characters - (e.g. 'a+b') + - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -21089,7 +24382,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Hoverlabel + - An instance of plotly.graph_objs.scattermapbox.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -21133,7 +24426,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scatterternary.Hoverlabel + plotly.graph_objs.scattermapbox.Hoverlabel """ return self["hoverlabel"] @@ -21141,31 +24434,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - # hovertemplate # ------------- @property @@ -21178,7 +24446,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -21228,10 +24500,10 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (a,b,c) point. If + Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b,c). To be seen, trace + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: @@ -21311,6 +24583,46 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val + # lat + # --- + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # latsrc + # ------ + @property + def latsrc(self): + """ + Sets the source reference on plot.ly for lat . + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + # legendgroup # ----------- @property @@ -21341,7 +24653,7 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Line + - An instance of plotly.graph_objs.scattermapbox.Line - A dict of string/value properties that will be passed to the Line constructor @@ -21349,27 +24661,12 @@ def line(self): color Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). width Sets the line width (in px). Returns ------- - plotly.graph_objs.scatterternary.Line + plotly.graph_objs.scattermapbox.Line """ return self["line"] @@ -21377,6 +24674,46 @@ def line(self): def line(self, val): self["line"] = val + # lon + # --- + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # lonsrc + # ------ + @property + def lonsrc(self): + """ + Sets the source reference on plot.ly for lon . + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + # marker # ------ @property @@ -21384,7 +24721,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Marker + - An instance of plotly.graph_objs.scattermapbox.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -21444,9 +24781,8 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.scatterternary.marker.Colo - rBar instance or dict with compatible - properties + plotly.graph_objects.scattermapbox.marker.Color + Bar instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The @@ -21466,16 +24802,6 @@ def marker(self): colorsrc Sets the source reference on plot.ly for color . - gradient - plotly.graph_objects.scatterternary.marker.Grad - ient instance or dict with compatible - properties - line - plotly.graph_objects.scatterternary.marker.Line - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. opacity Sets the marker opacity. opacitysrc @@ -21511,19 +24837,17 @@ def marker(self): Sets the source reference on plot.ly for size . symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. + Sets the marker symbol. Full list: + https://www.mapbox.com/maki-icons/ Note that + the array `marker.color` and `marker.size` are + only available for "circle" symbols. symbolsrc Sets the source reference on plot.ly for symbol . Returns ------- - plotly.graph_objs.scatterternary.Marker + plotly.graph_objs.scattermapbox.Marker """ return self["marker"] @@ -21587,9 +24911,7 @@ def mode(self): Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". + hover. The 'mode' property is a flaglist and may be specified as a string containing: @@ -21656,24 +24978,19 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Selected + - An instance of plotly.graph_objs.scattermapbox.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.scatterternary.selected.Ma - rker instance or dict with compatible - properties - textfont - plotly.graph_objects.scatterternary.selected.Te - xtfont instance or dict with compatible - properties + plotly.graph_objects.scattermapbox.selected.Mar + ker instance or dict with compatible properties Returns ------- - plotly.graph_objs.scatterternary.Selected + plotly.graph_objs.scattermapbox.Selected """ return self["selected"] @@ -21733,7 +25050,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Stream + - An instance of plotly.graph_objs.scattermapbox.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -21751,7 +25068,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scatterternary.Stream + plotly.graph_objs.scattermapbox.Stream """ return self["stream"] @@ -21765,14 +25082,14 @@ def stream(self, val): def subplot(self): """ Sets a reference between this trace's data coordinates and a - ternary subplot. If "ternary" (the default value), the data - refer to `layout.ternary`. If "ternary2", the data refer to - `layout.ternary2`, and so on. + mapbox subplot. If "mapbox" (the default value), the data refer + to `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. The 'subplot' property is an identifier of a particular - subplot, of type 'ternary', that may be specified as the string 'ternary' + subplot, of type 'mapbox', that may be specified as the string 'mapbox' optionally followed by an integer >= 1 - (e.g. 'ternary', 'ternary1', 'ternary2', 'ternary3', etc.) + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) Returns ------- @@ -21784,39 +25101,15 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # sum - # --- - @property - def sum(self): - """ - The number each triplet should sum to, if only two of `a`, `b`, - and `c` are provided. This overrides `ternary.sum` to - normalize this specific trace, but does not affect the values - displayed on the axes. 0 (or missing) means to use - ternary.sum - - The 'sum' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sum"] - - @sum.setter - def sum(self, val): - self["sum"] = val - # text # ---- @property def text(self): """ - Sets text elements associated with each (a,b,c) point. If a + Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b,c). If trace `hoverinfo` + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. @@ -21840,11 +25133,13 @@ def text(self, val): @property def textfont(self): """ - Sets the text font. + Sets the icon text font (color=mapbox.layer.paint.text-color, + size=mapbox.layer.layout.text-size). Has an effect only when + `type` is set to "symbol". The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Textfont + - An instance of plotly.graph_objs.scattermapbox.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -21852,9 +25147,6 @@ def textfont(self): color - colorsrc - Sets the source reference on plot.ly for color - . family HTML font family - the typeface that will be applied by the web browser. The web browser @@ -21871,18 +25163,11 @@ def textfont(self): Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . size - - sizesrc - Sets the source reference on plot.ly for size - . Returns ------- - plotly.graph_objs.scatterternary.Textfont + plotly.graph_objs.scattermapbox.Textfont """ return self["textfont"] @@ -21903,11 +25188,10 @@ def textposition(self): ['top left', 'top center', 'top right', 'middle left', 'middle center', 'middle right', 'bottom left', 'bottom center', 'bottom right'] - - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any|numpy.ndarray + Any """ return self["textposition"] @@ -21915,45 +25199,80 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- + # textsrc + # ------- @property - def textpositionsrc(self): + def textsrc(self): """ - Sets the source reference on plot.ly for textposition . + Sets the source reference on plot.ly for text . - The 'textpositionsrc' property must be specified as a string or + The 'textsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["textpositionsrc"] + return self["textsrc"] - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # textsrc - # ------- + # texttemplate + # ------------ @property - def textsrc(self): + def texttemplate(self): """ - Sets the source reference on plot.ly for text . + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . - The 'textsrc' property must be specified as a string or + The 'texttemplatesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["textsrc"] + return self["texttemplatesrc"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val # uid # --- @@ -22017,24 +25336,20 @@ def unselected(self): """ The 'unselected' property is an instance of Unselected that may be specified as: - - An instance of plotly.graph_objs.scatterternary.Unselected + - An instance of plotly.graph_objs.scattermapbox.Unselected - A dict of string/value properties that will be passed to the Unselected constructor Supported dict properties: marker - plotly.graph_objects.scatterternary.unselected. - Marker instance or dict with compatible - properties - textfont - plotly.graph_objects.scatterternary.unselected. - Textfont instance or dict with compatible + plotly.graph_objects.scattermapbox.unselected.M + arker instance or dict with compatible properties Returns ------- - plotly.graph_objs.scatterternary.Unselected + plotly.graph_objs.scattermapbox.Unselected """ return self["unselected"] @@ -22082,39 +25397,15 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - a - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - asrc - Sets the source reference on plot.ly for a . - b - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - bsrc - Sets the source reference on plot.ly for b . - c - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. - csrc - Sets the source reference on plot.ly for c . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -22124,15 +25415,9 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for customdata . fill Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line @@ -22145,14 +25430,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatterternary.Hoverlabel instance + plotly.graph_objects.scattermapbox.Hoverlabel instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -22161,7 +25440,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -22175,12 +25459,12 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (a,b,c) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b,c). - To be seen, trace `hoverinfo` must contain a "text" - flag. + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -22189,15 +25473,23 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scatterternary.Line instance or + plotly.graph_objects.scattermapbox.Line instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on plot.ly for lon . marker - plotly.graph_objects.scatterternary.Marker instance or + plotly.graph_objects.scattermapbox.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -22218,17 +25510,15 @@ def _prop_descriptions(self): Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". + `text` elements appear on hover. name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. selected - plotly.graph_objects.scatterternary.Selected instance - or dict with compatible properties + plotly.graph_objects.scattermapbox.Selected instance or + dict with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -22240,38 +25530,50 @@ def _prop_descriptions(self): Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatterternary.Stream instance or + plotly.graph_objects.scattermapbox.Stream instance or dict with compatible properties subplot Sets a reference between this trace's data coordinates - and a ternary subplot. If "ternary" (the default - value), the data refer to `layout.ternary`. If - "ternary2", the data refer to `layout.ternary2`, and so - on. - sum - The number each triplet should sum to, if only two of - `a`, `b`, and `c` are provided. This overrides - `ternary.sum` to normalize this specific trace, but - does not affect the values displayed on the axes. 0 (or - missing) means to use ternary.sum + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. text - Sets text elements associated with each (a,b,c) point. + Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all - the data points. If an array of strings, the items are - mapped in order to the the data points in (a,b,c). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. textfont - Sets the text font. + Sets the icon text font (color=mapbox.layer.paint.text- + color, size=mapbox.layer.layout.text-size). Has an + effect only when `type` is set to "symbol". textposition Sets the positions of the `text` elements with respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on plot.ly for textposition - . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -22295,7 +25597,7 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scatterternary.Unselected instance + plotly.graph_objects.scattermapbox.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If @@ -22307,14 +25609,8 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - asrc=None, - b=None, - bsrc=None, - c=None, - cliponaxis=None, + below=None, connectgaps=None, - csrc=None, customdata=None, customdatasrc=None, fill=None, @@ -22322,15 +25618,18 @@ def __init__( hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, + lat=None, + latsrc=None, legendgroup=None, line=None, + lon=None, + lonsrc=None, marker=None, meta=None, metasrc=None, @@ -22342,12 +25641,12 @@ def __init__( showlegend=None, stream=None, subplot=None, - sum=None, text=None, textfont=None, textposition=None, - textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -22355,50 +25654,26 @@ def __init__( **kwargs ): """ - Construct a new Scatterternary object + Construct a new Scattermapbox object - Provides similar functionality to the "scatter" type but on a - ternary phase diagram. The data is provided by at least two - arrays out of `a`, `b`, `c` triplets. + The data visualized as scatter point, lines or marker symbols + on a Mapbox GL geographic map is provided by longitude/latitude + pairs in `lon` and `lat`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scatterternary - a - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - asrc - Sets the source reference on plot.ly for a . - b - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - bsrc - Sets the source reference on plot.ly for b . - c - Sets the quantity of component `a` in each data point. - If `a`, `b`, and `c` are all provided, they need not be - normalized, only the relative values matter. If only - two arrays are provided they must be normalized to - match `ternary.sum`. - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. + an instance of plotly.graph_objs.Scattermapbox + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. - csrc - Sets the source reference on plot.ly for c . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -22408,15 +25683,9 @@ def __init__( Sets the source reference on plot.ly for customdata . fill Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line @@ -22429,14 +25698,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatterternary.Hoverlabel instance + plotly.graph_objects.scattermapbox.Hoverlabel instance or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -22445,7 +25708,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -22459,12 +25727,12 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (a,b,c) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b,c). - To be seen, trace `hoverinfo` must contain a "text" - flag. + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -22473,15 +25741,23 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scatterternary.Line instance or + plotly.graph_objects.scattermapbox.Line instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on plot.ly for lon . marker - plotly.graph_objects.scatterternary.Marker instance or + plotly.graph_objects.scattermapbox.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -22502,17 +25778,15 @@ def __init__( Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". + `text` elements appear on hover. name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. selected - plotly.graph_objects.scatterternary.Selected instance - or dict with compatible properties + plotly.graph_objects.scattermapbox.Selected instance or + dict with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -22524,38 +25798,50 @@ def __init__( Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatterternary.Stream instance or + plotly.graph_objects.scattermapbox.Stream instance or dict with compatible properties subplot Sets a reference between this trace's data coordinates - and a ternary subplot. If "ternary" (the default - value), the data refer to `layout.ternary`. If - "ternary2", the data refer to `layout.ternary2`, and so - on. - sum - The number each triplet should sum to, if only two of - `a`, `b`, and `c` are provided. This overrides - `ternary.sum` to normalize this specific trace, but - does not affect the values displayed on the axes. 0 (or - missing) means to use ternary.sum + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. text - Sets text elements associated with each (a,b,c) point. + Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all - the data points. If an array of strings, the items are - mapped in order to the the data points in (a,b,c). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. textfont - Sets the text font. + Sets the icon text font (color=mapbox.layer.paint.text- + color, size=mapbox.layer.layout.text-size). Has an + effect only when `type` is set to "symbol". textposition Sets the positions of the `text` elements with respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on plot.ly for textposition - . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -22579,7 +25865,7 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scatterternary.Unselected instance + plotly.graph_objects.scattermapbox.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If @@ -22589,9 +25875,9 @@ def __init__( Returns ------- - Scatterternary + Scattermapbox """ - super(Scatterternary, self).__init__("scatterternary") + super(Scattermapbox, self).__init__("scattermapbox") # Validate arg # ------------ @@ -22604,9 +25890,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scatterternary +The first argument to the plotly.graph_objs.Scattermapbox constructor must be a dict or -an instance of plotly.graph_objs.Scatterternary""" +an instance of plotly.graph_objs.Scattermapbox""" ) # Handle skip_invalid @@ -22615,78 +25901,61 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scatterternary as v_scatterternary + from plotly.validators import scattermapbox as v_scattermapbox # Initialize validators # --------------------- - self._validators["a"] = v_scatterternary.AValidator() - self._validators["asrc"] = v_scatterternary.AsrcValidator() - self._validators["b"] = v_scatterternary.BValidator() - self._validators["bsrc"] = v_scatterternary.BsrcValidator() - self._validators["c"] = v_scatterternary.CValidator() - self._validators["cliponaxis"] = v_scatterternary.CliponaxisValidator() - self._validators["connectgaps"] = v_scatterternary.ConnectgapsValidator() - self._validators["csrc"] = v_scatterternary.CsrcValidator() - self._validators["customdata"] = v_scatterternary.CustomdataValidator() - self._validators["customdatasrc"] = v_scatterternary.CustomdatasrcValidator() - self._validators["fill"] = v_scatterternary.FillValidator() - self._validators["fillcolor"] = v_scatterternary.FillcolorValidator() - self._validators["hoverinfo"] = v_scatterternary.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatterternary.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatterternary.HoverlabelValidator() - self._validators["hoveron"] = v_scatterternary.HoveronValidator() - self._validators["hovertemplate"] = v_scatterternary.HovertemplateValidator() + self._validators["below"] = v_scattermapbox.BelowValidator() + self._validators["connectgaps"] = v_scattermapbox.ConnectgapsValidator() + self._validators["customdata"] = v_scattermapbox.CustomdataValidator() + self._validators["customdatasrc"] = v_scattermapbox.CustomdatasrcValidator() + self._validators["fill"] = v_scattermapbox.FillValidator() + self._validators["fillcolor"] = v_scattermapbox.FillcolorValidator() + self._validators["hoverinfo"] = v_scattermapbox.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scattermapbox.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scattermapbox.HoverlabelValidator() + self._validators["hovertemplate"] = v_scattermapbox.HovertemplateValidator() self._validators[ "hovertemplatesrc" - ] = v_scatterternary.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatterternary.HovertextValidator() - self._validators["hovertextsrc"] = v_scatterternary.HovertextsrcValidator() - self._validators["ids"] = v_scatterternary.IdsValidator() - self._validators["idssrc"] = v_scatterternary.IdssrcValidator() - self._validators["legendgroup"] = v_scatterternary.LegendgroupValidator() - self._validators["line"] = v_scatterternary.LineValidator() - self._validators["marker"] = v_scatterternary.MarkerValidator() - self._validators["meta"] = v_scatterternary.MetaValidator() - self._validators["metasrc"] = v_scatterternary.MetasrcValidator() - self._validators["mode"] = v_scatterternary.ModeValidator() - self._validators["name"] = v_scatterternary.NameValidator() - self._validators["opacity"] = v_scatterternary.OpacityValidator() - self._validators["selected"] = v_scatterternary.SelectedValidator() - self._validators["selectedpoints"] = v_scatterternary.SelectedpointsValidator() - self._validators["showlegend"] = v_scatterternary.ShowlegendValidator() - self._validators["stream"] = v_scatterternary.StreamValidator() - self._validators["subplot"] = v_scatterternary.SubplotValidator() - self._validators["sum"] = v_scatterternary.SumValidator() - self._validators["text"] = v_scatterternary.TextValidator() - self._validators["textfont"] = v_scatterternary.TextfontValidator() - self._validators["textposition"] = v_scatterternary.TextpositionValidator() - self._validators[ - "textpositionsrc" - ] = v_scatterternary.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatterternary.TextsrcValidator() - self._validators["uid"] = v_scatterternary.UidValidator() - self._validators["uirevision"] = v_scatterternary.UirevisionValidator() - self._validators["unselected"] = v_scatterternary.UnselectedValidator() - self._validators["visible"] = v_scatterternary.VisibleValidator() + ] = v_scattermapbox.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scattermapbox.HovertextValidator() + self._validators["hovertextsrc"] = v_scattermapbox.HovertextsrcValidator() + self._validators["ids"] = v_scattermapbox.IdsValidator() + self._validators["idssrc"] = v_scattermapbox.IdssrcValidator() + self._validators["lat"] = v_scattermapbox.LatValidator() + self._validators["latsrc"] = v_scattermapbox.LatsrcValidator() + self._validators["legendgroup"] = v_scattermapbox.LegendgroupValidator() + self._validators["line"] = v_scattermapbox.LineValidator() + self._validators["lon"] = v_scattermapbox.LonValidator() + self._validators["lonsrc"] = v_scattermapbox.LonsrcValidator() + self._validators["marker"] = v_scattermapbox.MarkerValidator() + self._validators["meta"] = v_scattermapbox.MetaValidator() + self._validators["metasrc"] = v_scattermapbox.MetasrcValidator() + self._validators["mode"] = v_scattermapbox.ModeValidator() + self._validators["name"] = v_scattermapbox.NameValidator() + self._validators["opacity"] = v_scattermapbox.OpacityValidator() + self._validators["selected"] = v_scattermapbox.SelectedValidator() + self._validators["selectedpoints"] = v_scattermapbox.SelectedpointsValidator() + self._validators["showlegend"] = v_scattermapbox.ShowlegendValidator() + self._validators["stream"] = v_scattermapbox.StreamValidator() + self._validators["subplot"] = v_scattermapbox.SubplotValidator() + self._validators["text"] = v_scattermapbox.TextValidator() + self._validators["textfont"] = v_scattermapbox.TextfontValidator() + self._validators["textposition"] = v_scattermapbox.TextpositionValidator() + self._validators["textsrc"] = v_scattermapbox.TextsrcValidator() + self._validators["texttemplate"] = v_scattermapbox.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scattermapbox.TexttemplatesrcValidator() + self._validators["uid"] = v_scattermapbox.UidValidator() + self._validators["uirevision"] = v_scattermapbox.UirevisionValidator() + self._validators["unselected"] = v_scattermapbox.UnselectedValidator() + self._validators["visible"] = v_scattermapbox.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("c", None) - self["c"] = c if c is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v + _v = arg.pop("below", None) + self["below"] = below if below is not None else _v _v = arg.pop("connectgaps", None) self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("csrc", None) - self["csrc"] = csrc if csrc is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) @@ -22701,8 +25970,6 @@ def __init__( self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -22717,10 +25984,18 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("lat", None) + self["lat"] = lat if lat is not None else _v + _v = arg.pop("latsrc", None) + self["latsrc"] = latsrc if latsrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v _v = arg.pop("line", None) self["line"] = line if line is not None else _v + _v = arg.pop("lon", None) + self["lon"] = lon if lon is not None else _v + _v = arg.pop("lonsrc", None) + self["lonsrc"] = lonsrc if lonsrc is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) @@ -22743,18 +26018,18 @@ def __init__( self["stream"] = stream if stream is not None else _v _v = arg.pop("subplot", None) self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("sum", None) - self["sum"] = sum if sum is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) self["textfont"] = textfont if textfont is not None else _v _v = arg.pop("textposition", None) self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -22768,9 +26043,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scatterternary" + self._props["type"] = "scattermapbox" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatterternary", val="scatterternary" + plotly_name="type", parent_name="scattermapbox", val="scattermapbox" ) arg.pop("type", None) @@ -22787,7 +26062,7 @@ def __init__( import copy as _copy -class Scatterpolargl(_BaseTraceType): +class Scattergl(_BaseTraceType): # connectgaps # ----------- @@ -22853,47 +26128,205 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dr + # dx # -- @property - def dr(self): + def dx(self): """ - Sets the r coordinate step. + Sets the x coordinate step. See `x0` for more info. - The 'dr' property is a number and may be specified as: + The 'dx' property is a number and may be specified as: - An int or float Returns ------- int|float """ - return self["dr"] + return self["dx"] - @dr.setter - def dr(self, val): - self["dr"] = val + @dx.setter + def dx(self, val): + self["dx"] = val - # dtheta - # ------ + # dy + # -- @property - def dtheta(self): + def dy(self): """ - Sets the theta coordinate step. By default, the `dtheta` step - equals the subplot's period divided by the length of the `r` - coordinates. + Sets the y coordinate step. See `y0` for more info. - The 'dtheta' property is a number and may be specified as: + The 'dy' property is a number and may be specified as: - An int or float Returns ------- int|float """ - return self["dtheta"] + return self["dy"] - @dtheta.setter - def dtheta(self, val): - self["dtheta"] = val + @dy.setter + def dy(self, val): + self["dy"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of plotly.graph_objs.scattergl.ErrorX + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scattergl.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of plotly.graph_objs.scattergl.ErrorY + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scattergl.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val # fill # ---- @@ -23007,8 +26440,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters - (e.g. 'r+theta') + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -23049,7 +26482,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Hoverlabel + - An instance of plotly.graph_objs.scattergl.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -23093,7 +26526,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scatterpolargl.Hoverlabel + plotly.graph_objs.scattergl.Hoverlabel """ return self["hoverlabel"] @@ -23113,7 +26546,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -23276,7 +26713,7 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Line + - An instance of plotly.graph_objs.scattergl.Line - A dict of string/value properties that will be passed to the Line constructor @@ -23294,7 +26731,7 @@ def line(self): Returns ------- - plotly.graph_objs.scatterpolargl.Line + plotly.graph_objs.scattergl.Line """ return self["line"] @@ -23309,7 +26746,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Marker + - An instance of plotly.graph_objs.scattergl.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -23369,9 +26806,8 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.scatterpolargl.marker.Colo - rBar instance or dict with compatible - properties + plotly.graph_objects.scattergl.marker.ColorBar + instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The @@ -23392,7 +26828,7 @@ def marker(self): Sets the source reference on plot.ly for color . line - plotly.graph_objects.scatterpolargl.marker.Line + plotly.graph_objects.scattergl.marker.Line instance or dict with compatible properties opacity Sets the marker opacity. @@ -23441,7 +26877,7 @@ def marker(self): Returns ------- - plotly.graph_objs.scatterpolargl.Marker + plotly.graph_objs.scattergl.Marker """ return self["marker"] @@ -23502,12 +26938,7 @@ def metasrc(self, val): @property def mode(self): """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". + Determines the drawing mode for this scatter trace. The 'mode' property is a flaglist and may be specified as a string containing: @@ -23567,67 +26998,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # r - # - - @property - def r(self): - """ - Sets the radial coordinates - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # r0 - # -- - @property - def r0(self): - """ - Alternate to `r`. Builds a linear space of r coordinates. Use - with `dr` where `r0` is the starting coordinate and `dr` the - step. - - The 'r0' property accepts values of any type - - Returns - ------- - Any - """ - return self["r0"] - - @r0.setter - def r0(self, val): - self["r0"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on plot.ly for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - # selected # -------- @property @@ -23635,24 +27005,22 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Selected + - An instance of plotly.graph_objs.scattergl.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.scatterpolargl.selected.Ma - rker instance or dict with compatible - properties + plotly.graph_objects.scattergl.selected.Marker + instance or dict with compatible properties textfont - plotly.graph_objects.scatterpolargl.selected.Te - xtfont instance or dict with compatible - properties + plotly.graph_objects.scattergl.selected.Textfon + t instance or dict with compatible properties Returns ------- - plotly.graph_objs.scatterpolargl.Selected + plotly.graph_objs.scattergl.Selected """ return self["selected"] @@ -23712,7 +27080,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Stream + - An instance of plotly.graph_objs.scattergl.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -23730,7 +27098,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scatterpolargl.Stream + plotly.graph_objs.scattergl.Stream """ return self["stream"] @@ -23738,31 +27106,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - polar subplot. If "polar" (the default value), the data refer - to `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'polar', that may be specified as the string 'polar' - optionally followed by an integer >= 1 - (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - # text # ---- @property @@ -23799,7 +27142,7 @@ def textfont(self): The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Textfont + - An instance of plotly.graph_objs.scattergl.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -23837,7 +27180,7 @@ def textfont(self): Returns ------- - plotly.graph_objs.scatterpolargl.Textfont + plotly.graph_objs.scattergl.Textfont """ return self["textfont"] @@ -23910,88 +27253,60 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # theta - # ----- - @property - def theta(self): - """ - Sets the angular coordinates - - The 'theta' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["theta"] - - @theta.setter - def theta(self, val): - self["theta"] = val - - # theta0 - # ------ + # texttemplate + # ------------ @property - def theta0(self): + def texttemplate(self): """ - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the starting - coordinate and `dtheta` the step. - - The 'theta0' property accepts values of any type + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + str|numpy.ndarray """ - return self["theta0"] + return self["texttemplate"] - @theta0.setter - def theta0(self, val): - self["theta0"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # thetasrc - # -------- + # texttemplatesrc + # --------------- @property - def thetasrc(self): + def texttemplatesrc(self): """ - Sets the source reference on plot.ly for theta . + Sets the source reference on plot.ly for texttemplate . - The 'thetasrc' property must be specified as a string or + The 'texttemplatesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["thetasrc"] - - @thetasrc.setter - def thetasrc(self, val): - self["thetasrc"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the unit of input "theta" values. Has an effect only when - on "linear" angular axes. - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees', 'gradians'] + return self["texttemplatesrc"] - Returns - ------- - Any - """ - return self["thetaunit"] - - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val # uid # --- @@ -24040,68 +27355,286 @@ def uirevision(self): Returns ------- - Any + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.scattergl.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.scattergl.unselected.Marke + r instance or dict with compatible properties + textfont + plotly.graph_objects.scattergl.unselected.Textf + ont instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.scattergl.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str """ - return self["uirevision"] + return self["yaxis"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # unselected - # ---------- + # ycalendar + # --------- @property - def unselected(self): + def ycalendar(self): """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.scatterpolargl.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor + Sets the calendar system to use with `y` date data. - Supported dict properties: - - marker - plotly.graph_objects.scatterpolargl.unselected. - Marker instance or dict with compatible - properties - textfont - plotly.graph_objects.scatterpolargl.unselected. - Textfont instance or dict with compatible - properties + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - plotly.graph_objs.scatterpolargl.Unselected + Any """ - return self["unselected"] + return self["ycalendar"] - @unselected.setter - def unselected(self, val): - self["unselected"] = val + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val - # visible - # ------- + # ysrc + # ---- @property - def visible(self): + def ysrc(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the source reference on plot.ly for y . - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["visible"] + return self["ysrc"] - @visible.setter - def visible(self, val): - self["visible"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val # type # ---- @@ -24130,12 +27663,16 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + plotly.graph_objects.scattergl.ErrorX instance or dict + with compatible properties + error_y + plotly.graph_objects.scattergl.ErrorY instance or dict + with compatible properties fill Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets @@ -24171,8 +27708,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatterpolargl.Hoverlabel instance - or dict with compatible properties + plotly.graph_objects.scattergl.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -24181,7 +27718,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -24214,11 +27756,11 @@ def _prop_descriptions(self): the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scatterpolargl.Line instance or - dict with compatible properties + plotly.graph_objects.scattergl.Line instance or dict + with compatible properties marker - plotly.graph_objects.scatterpolargl.Marker instance or - dict with compatible properties + plotly.graph_objects.scattergl.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -24235,28 +27777,15 @@ def _prop_descriptions(self): metasrc Sets the source reference on plot.ly for meta . mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". + Determines the drawing mode for this scatter trace. name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on plot.ly for r . selected - plotly.graph_objects.scatterpolargl.Selected instance - or dict with compatible properties + plotly.graph_objects.scattergl.Selected instance or + dict with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -24268,13 +27797,8 @@ def _prop_descriptions(self): Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatterpolargl.Stream instance or - dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. + plotly.graph_objects.scattergl.Stream instance or dict + with compatible properties text Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the @@ -24293,17 +27817,25 @@ def _prop_descriptions(self): . textsrc Sets the source reference on plot.ly for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on plot.ly for theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -24327,13 +27859,43 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scatterpolargl.Unselected instance - or dict with compatible properties + plotly.graph_objects.scattergl.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . """ def __init__( @@ -24342,8 +27904,10 @@ def __init__( connectgaps=None, customdata=None, customdatasrc=None, - dr=None, - dtheta=None, + dx=None, + dy=None, + error_x=None, + error_y=None, fill=None, fillcolor=None, hoverinfo=None, @@ -24363,44 +27927,46 @@ def __init__( mode=None, name=None, opacity=None, - r=None, - r0=None, - rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, - subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, **kwargs ): """ - Construct a new Scatterpolargl object + Construct a new Scattergl object - The scatterpolargl trace type encompasses line charts, scatter - charts, and bubble charts in polar coordinates using the WebGL - plotting engine. The data visualized as scatter point or lines - is set in `r` (radial) and `theta` (angular) coordinates Bubble - charts are achieved by setting `marker.size` and/or - `marker.color` to numerical arrays. + The data visualized as scatter point or lines is set in `x` and + `y` using the WebGL plotting engine. Bubble charts are achieved + by setting `marker.size` and/or `marker.color` to a numerical + arrays. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scatterpolargl + an instance of plotly.graph_objs.Scattergl connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -24411,12 +27977,16 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + plotly.graph_objects.scattergl.ErrorX instance or dict + with compatible properties + error_y + plotly.graph_objects.scattergl.ErrorY instance or dict + with compatible properties fill Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets @@ -24452,8 +28022,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatterpolargl.Hoverlabel instance - or dict with compatible properties + plotly.graph_objects.scattergl.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -24462,7 +28032,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -24495,11 +28070,11 @@ def __init__( the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scatterpolargl.Line instance or - dict with compatible properties + plotly.graph_objects.scattergl.Line instance or dict + with compatible properties marker - plotly.graph_objects.scatterpolargl.Marker instance or - dict with compatible properties + plotly.graph_objects.scattergl.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -24516,28 +28091,15 @@ def __init__( metasrc Sets the source reference on plot.ly for meta . mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". + Determines the drawing mode for this scatter trace. name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on plot.ly for r . selected - plotly.graph_objects.scatterpolargl.Selected instance - or dict with compatible properties + plotly.graph_objects.scattergl.Selected instance or + dict with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -24549,13 +28111,8 @@ def __init__( Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatterpolargl.Stream instance or - dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. + plotly.graph_objects.scattergl.Stream instance or dict + with compatible properties text Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the @@ -24574,17 +28131,25 @@ def __init__( . textsrc Sets the source reference on plot.ly for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on plot.ly for theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -24608,19 +28173,49 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scatterpolargl.Unselected instance - or dict with compatible properties + plotly.graph_objects.scattergl.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . Returns ------- - Scatterpolargl + Scattergl """ - super(Scatterpolargl, self).__init__("scatterpolargl") + super(Scattergl, self).__init__("scattergl") # Validate arg # ------------ @@ -24633,9 +28228,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scatterpolargl +The first argument to the plotly.graph_objs.Scattergl constructor must be a dict or -an instance of plotly.graph_objs.Scatterpolargl""" +an instance of plotly.graph_objs.Scattergl""" ) # Handle skip_invalid @@ -24644,59 +28239,61 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scatterpolargl as v_scatterpolargl + from plotly.validators import scattergl as v_scattergl # Initialize validators # --------------------- - self._validators["connectgaps"] = v_scatterpolargl.ConnectgapsValidator() - self._validators["customdata"] = v_scatterpolargl.CustomdataValidator() - self._validators["customdatasrc"] = v_scatterpolargl.CustomdatasrcValidator() - self._validators["dr"] = v_scatterpolargl.DrValidator() - self._validators["dtheta"] = v_scatterpolargl.DthetaValidator() - self._validators["fill"] = v_scatterpolargl.FillValidator() - self._validators["fillcolor"] = v_scatterpolargl.FillcolorValidator() - self._validators["hoverinfo"] = v_scatterpolargl.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatterpolargl.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatterpolargl.HoverlabelValidator() - self._validators["hovertemplate"] = v_scatterpolargl.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scatterpolargl.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatterpolargl.HovertextValidator() - self._validators["hovertextsrc"] = v_scatterpolargl.HovertextsrcValidator() - self._validators["ids"] = v_scatterpolargl.IdsValidator() - self._validators["idssrc"] = v_scatterpolargl.IdssrcValidator() - self._validators["legendgroup"] = v_scatterpolargl.LegendgroupValidator() - self._validators["line"] = v_scatterpolargl.LineValidator() - self._validators["marker"] = v_scatterpolargl.MarkerValidator() - self._validators["meta"] = v_scatterpolargl.MetaValidator() - self._validators["metasrc"] = v_scatterpolargl.MetasrcValidator() - self._validators["mode"] = v_scatterpolargl.ModeValidator() - self._validators["name"] = v_scatterpolargl.NameValidator() - self._validators["opacity"] = v_scatterpolargl.OpacityValidator() - self._validators["r"] = v_scatterpolargl.RValidator() - self._validators["r0"] = v_scatterpolargl.R0Validator() - self._validators["rsrc"] = v_scatterpolargl.RsrcValidator() - self._validators["selected"] = v_scatterpolargl.SelectedValidator() - self._validators["selectedpoints"] = v_scatterpolargl.SelectedpointsValidator() - self._validators["showlegend"] = v_scatterpolargl.ShowlegendValidator() - self._validators["stream"] = v_scatterpolargl.StreamValidator() - self._validators["subplot"] = v_scatterpolargl.SubplotValidator() - self._validators["text"] = v_scatterpolargl.TextValidator() - self._validators["textfont"] = v_scatterpolargl.TextfontValidator() - self._validators["textposition"] = v_scatterpolargl.TextpositionValidator() - self._validators[ - "textpositionsrc" - ] = v_scatterpolargl.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatterpolargl.TextsrcValidator() - self._validators["theta"] = v_scatterpolargl.ThetaValidator() - self._validators["theta0"] = v_scatterpolargl.Theta0Validator() - self._validators["thetasrc"] = v_scatterpolargl.ThetasrcValidator() - self._validators["thetaunit"] = v_scatterpolargl.ThetaunitValidator() - self._validators["uid"] = v_scatterpolargl.UidValidator() - self._validators["uirevision"] = v_scatterpolargl.UirevisionValidator() - self._validators["unselected"] = v_scatterpolargl.UnselectedValidator() - self._validators["visible"] = v_scatterpolargl.VisibleValidator() + self._validators["connectgaps"] = v_scattergl.ConnectgapsValidator() + self._validators["customdata"] = v_scattergl.CustomdataValidator() + self._validators["customdatasrc"] = v_scattergl.CustomdatasrcValidator() + self._validators["dx"] = v_scattergl.DxValidator() + self._validators["dy"] = v_scattergl.DyValidator() + self._validators["error_x"] = v_scattergl.ErrorXValidator() + self._validators["error_y"] = v_scattergl.ErrorYValidator() + self._validators["fill"] = v_scattergl.FillValidator() + self._validators["fillcolor"] = v_scattergl.FillcolorValidator() + self._validators["hoverinfo"] = v_scattergl.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scattergl.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scattergl.HoverlabelValidator() + self._validators["hovertemplate"] = v_scattergl.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_scattergl.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scattergl.HovertextValidator() + self._validators["hovertextsrc"] = v_scattergl.HovertextsrcValidator() + self._validators["ids"] = v_scattergl.IdsValidator() + self._validators["idssrc"] = v_scattergl.IdssrcValidator() + self._validators["legendgroup"] = v_scattergl.LegendgroupValidator() + self._validators["line"] = v_scattergl.LineValidator() + self._validators["marker"] = v_scattergl.MarkerValidator() + self._validators["meta"] = v_scattergl.MetaValidator() + self._validators["metasrc"] = v_scattergl.MetasrcValidator() + self._validators["mode"] = v_scattergl.ModeValidator() + self._validators["name"] = v_scattergl.NameValidator() + self._validators["opacity"] = v_scattergl.OpacityValidator() + self._validators["selected"] = v_scattergl.SelectedValidator() + self._validators["selectedpoints"] = v_scattergl.SelectedpointsValidator() + self._validators["showlegend"] = v_scattergl.ShowlegendValidator() + self._validators["stream"] = v_scattergl.StreamValidator() + self._validators["text"] = v_scattergl.TextValidator() + self._validators["textfont"] = v_scattergl.TextfontValidator() + self._validators["textposition"] = v_scattergl.TextpositionValidator() + self._validators["textpositionsrc"] = v_scattergl.TextpositionsrcValidator() + self._validators["textsrc"] = v_scattergl.TextsrcValidator() + self._validators["texttemplate"] = v_scattergl.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scattergl.TexttemplatesrcValidator() + self._validators["uid"] = v_scattergl.UidValidator() + self._validators["uirevision"] = v_scattergl.UirevisionValidator() + self._validators["unselected"] = v_scattergl.UnselectedValidator() + self._validators["visible"] = v_scattergl.VisibleValidator() + self._validators["x"] = v_scattergl.XValidator() + self._validators["x0"] = v_scattergl.X0Validator() + self._validators["xaxis"] = v_scattergl.XAxisValidator() + self._validators["xcalendar"] = v_scattergl.XcalendarValidator() + self._validators["xsrc"] = v_scattergl.XsrcValidator() + self._validators["y"] = v_scattergl.YValidator() + self._validators["y0"] = v_scattergl.Y0Validator() + self._validators["yaxis"] = v_scattergl.YAxisValidator() + self._validators["ycalendar"] = v_scattergl.YcalendarValidator() + self._validators["ysrc"] = v_scattergl.YsrcValidator() # Populate data dict with properties # ---------------------------------- @@ -24706,10 +28303,14 @@ def __init__( self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dr", None) - self["dr"] = dr if dr is not None else _v - _v = arg.pop("dtheta", None) - self["dtheta"] = dtheta if dtheta is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v + _v = arg.pop("error_x", None) + self["error_x"] = error_x if error_x is not None else _v + _v = arg.pop("error_y", None) + self["error_y"] = error_y if error_y is not None else _v _v = arg.pop("fill", None) self["fill"] = fill if fill is not None else _v _v = arg.pop("fillcolor", None) @@ -24750,12 +28351,6 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("r0", None) - self["r0"] = r0 if r0 is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v _v = arg.pop("selected", None) self["selected"] = selected if selected is not None else _v _v = arg.pop("selectedpoints", None) @@ -24764,8 +28359,6 @@ def __init__( self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) @@ -24776,14 +28369,10 @@ def __init__( self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("theta", None) - self["theta"] = theta if theta is not None else _v - _v = arg.pop("theta0", None) - self["theta0"] = theta0 if theta0 is not None else _v - _v = arg.pop("thetasrc", None) - self["thetasrc"] = thetasrc if thetasrc is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -24792,14 +28381,34 @@ def __init__( self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scatterpolargl" + self._props["type"] = "scattergl" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatterpolargl", val="scatterpolargl" + plotly_name="type", parent_name="scattergl", val="scattergl" ) arg.pop("type", None) @@ -24816,30 +28425,7 @@ def __init__( import copy as _copy -class Scatterpolar(_BaseTraceType): - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether or not markers and text nodes are clipped - about the subplot axes. To show markers and text nodes above - axis lines and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val +class Scattergeo(_BaseTraceType): # connectgaps # ----------- @@ -24905,66 +28491,18 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dr - # -- - @property - def dr(self): - """ - Sets the r coordinate step. - - The 'dr' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dr"] - - @dr.setter - def dr(self, val): - self["dr"] = val - - # dtheta - # ------ - @property - def dtheta(self): - """ - Sets the theta coordinate step. By default, the `dtheta` step - equals the subplot's period divided by the length of the `r` - coordinates. - - The 'dtheta' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtheta"] - - @dtheta.setter - def dtheta(self, val): - self["dtheta"] = val - # fill # ---- @property def fill(self): """ Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". scatterpolar has a subset of the options - available to scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has gaps) into a - closed shape. "tonext" fills the space between two traces if - one completely encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is no trace before - it. "tonext" should not be used if one trace does not enclose - the other. + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. The 'fill' property is an enumeration that may be specified as: - One of the following enumeration values: - ['none', 'toself', 'tonext'] + ['none', 'toself'] Returns ------- @@ -25037,6 +28575,31 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val + # geo + # --- + @property + def geo(self): + """ + Sets a reference between this trace's geospatial coordinates + and a geographic map. If "geo" (the default value), the + geospatial coordinates refer to `layout.geo`. If "geo2", the + geospatial coordinates refer to `layout.geo2`, and so on. + + The 'geo' property is an identifier of a particular + subplot, of type 'geo', that may be specified as the string 'geo' + optionally followed by an integer >= 1 + (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + + Returns + ------- + str + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + # hoverinfo # --------- @property @@ -25048,8 +28611,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters - (e.g. 'r+theta') + - Any combination of ['lon', 'lat', 'location', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -25090,7 +28653,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Hoverlabel + - An instance of plotly.graph_objs.scattergeo.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -25134,7 +28697,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scatterpolar.Hoverlabel + plotly.graph_objs.scattergeo.Hoverlabel """ return self["hoverlabel"] @@ -25142,31 +28705,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - # hovertemplate # ------------- @property @@ -25179,7 +28717,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -25229,11 +28771,12 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (lon,lat) pair or + item in `locations`. If a single string, the same string + appears over all the data points. If an array of string, the + items are mapped in order to the this trace's (lon,lat) or + `locations` coordinates. To be seen, trace `hoverinfo` must + contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -25312,6 +28855,46 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val + # lat + # --- + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + # latsrc + # ------ + @property + def latsrc(self): + """ + Sets the source reference on plot.ly for lat . + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + # legendgroup # ----------- @property @@ -25342,7 +28925,7 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Line + - An instance of plotly.graph_objs.scattergeo.Line - A dict of string/value properties that will be passed to the Line constructor @@ -25355,22 +28938,12 @@ def line(self): type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). width Sets the line width (in px). Returns ------- - plotly.graph_objs.scatterpolar.Line + plotly.graph_objs.scattergeo.Line """ return self["line"] @@ -25378,6 +28951,110 @@ def line(self): def line(self, val): self["line"] = val + # locationmode + # ------------ + @property + def locationmode(self): + """ + Determines the set of locations used to match entries in + `locations` to regions on the map. + + The 'locationmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['ISO-3', 'USA-states', 'country names'] + + Returns + ------- + Any + """ + return self["locationmode"] + + @locationmode.setter + def locationmode(self, val): + self["locationmode"] = val + + # locations + # --------- + @property + def locations(self): + """ + Sets the coordinates via location IDs or names. Coordinates + correspond to the centroid of each location given. See + `locationmode` for more info. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on plot.ly for locations . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # lon + # --- + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + # lonsrc + # ------ + @property + def lonsrc(self): + """ + Sets the source reference on plot.ly for lon . + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + # marker # ------ @property @@ -25385,7 +29062,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Marker + - An instance of plotly.graph_objs.scattergeo.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -25445,8 +29122,8 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.scatterpolar.marker.ColorB - ar instance or dict with compatible properties + plotly.graph_objects.scattergeo.marker.ColorBar + instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The @@ -25467,14 +29144,11 @@ def marker(self): Sets the source reference on plot.ly for color . gradient - plotly.graph_objects.scatterpolar.marker.Gradie - nt instance or dict with compatible properties + plotly.graph_objects.scattergeo.marker.Gradient + instance or dict with compatible properties line - plotly.graph_objects.scatterpolar.marker.Line + plotly.graph_objects.scattergeo.marker.Line instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. opacity Sets the marker opacity. opacitysrc @@ -25522,7 +29196,7 @@ def marker(self): Returns ------- - plotly.graph_objs.scatterpolar.Marker + plotly.graph_objs.scattergeo.Marker """ return self["marker"] @@ -25648,67 +29322,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # r - # - - @property - def r(self): - """ - Sets the radial coordinates - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # r0 - # -- - @property - def r0(self): - """ - Alternate to `r`. Builds a linear space of r coordinates. Use - with `dr` where `r0` is the starting coordinate and `dr` the - step. - - The 'r0' property accepts values of any type - - Returns - ------- - Any - """ - return self["r0"] - - @r0.setter - def r0(self, val): - self["r0"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on plot.ly for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - # selected # -------- @property @@ -25716,23 +29329,22 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Selected + - An instance of plotly.graph_objs.scattergeo.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.scatterpolar.selected.Mark - er instance or dict with compatible properties + plotly.graph_objects.scattergeo.selected.Marker + instance or dict with compatible properties textfont - plotly.graph_objects.scatterpolar.selected.Text - font instance or dict with compatible - properties + plotly.graph_objects.scattergeo.selected.Textfo + nt instance or dict with compatible properties Returns ------- - plotly.graph_objs.scatterpolar.Selected + plotly.graph_objs.scattergeo.Selected """ return self["selected"] @@ -25792,7 +29404,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Stream + - An instance of plotly.graph_objs.scattergeo.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -25810,7 +29422,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scatterpolar.Stream + plotly.graph_objs.scattergeo.Stream """ return self["stream"] @@ -25818,42 +29430,18 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - polar subplot. If "polar" (the default value), the data refer - to `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'polar', that may be specified as the string 'polar' - optionally followed by an integer >= 1 - (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - # text # ---- @property def text(self): """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets text elements associated with each (lon,lat) pair or item + in `locations`. If a single string, the same string appears + over all the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) or `locations` + coordinates. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. The 'text' property is a string and must be specified as: - A string @@ -25879,7 +29467,7 @@ def textfont(self): The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Textfont + - An instance of plotly.graph_objs.scattergeo.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -25917,7 +29505,7 @@ def textfont(self): Returns ------- - plotly.graph_objs.scatterpolar.Textfont + plotly.graph_objs.scattergeo.Textfont """ return self["textfont"] @@ -25990,88 +29578,60 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # theta - # ----- - @property - def theta(self): - """ - Sets the angular coordinates - - The 'theta' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["theta"] - - @theta.setter - def theta(self, val): - self["theta"] = val - - # theta0 - # ------ + # texttemplate + # ------------ @property - def theta0(self): + def texttemplate(self): """ - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the starting - coordinate and `dtheta` the step. - - The 'theta0' property accepts values of any type + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon`, `location` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + str|numpy.ndarray """ - return self["theta0"] + return self["texttemplate"] - @theta0.setter - def theta0(self, val): - self["theta0"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # thetasrc - # -------- + # texttemplatesrc + # --------------- @property - def thetasrc(self): + def texttemplatesrc(self): """ - Sets the source reference on plot.ly for theta . + Sets the source reference on plot.ly for texttemplate . - The 'thetasrc' property must be specified as a string or + The 'texttemplatesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["thetasrc"] + return self["texttemplatesrc"] - @thetasrc.setter - def thetasrc(self, val): - self["thetasrc"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the unit of input "theta" values. Has an effect only when - on "linear" angular axes. - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees', 'gradians'] - - Returns - ------- - Any - """ - return self["thetaunit"] - - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val # uid # --- @@ -26135,24 +29695,23 @@ def unselected(self): """ The 'unselected' property is an instance of Unselected that may be specified as: - - An instance of plotly.graph_objs.scatterpolar.Unselected + - An instance of plotly.graph_objs.scattergeo.Unselected - A dict of string/value properties that will be passed to the Unselected constructor Supported dict properties: marker - plotly.graph_objects.scatterpolar.unselected.Ma - rker instance or dict with compatible - properties + plotly.graph_objects.scattergeo.unselected.Mark + er instance or dict with compatible properties textfont - plotly.graph_objects.scatterpolar.unselected.Te - xtfont instance or dict with compatible + plotly.graph_objects.scattergeo.unselected.Text + font instance or dict with compatible properties Returns ------- - plotly.graph_objs.scatterpolar.Unselected + plotly.graph_objs.scattergeo.Unselected """ return self["unselected"] @@ -26200,12 +29759,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -26216,27 +29769,21 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. fill Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterpolar has a subset of - the options available to scatter. "toself" connects the + `fillcolor` if not "none". "toself" connects the endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. + it has gaps) into a closed shape. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -26245,14 +29792,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatterpolar.Hoverlabel instance - or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". + plotly.graph_objects.scattergeo.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -26261,7 +29802,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -26275,12 +29821,12 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -26289,16 +29835,33 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scatterpolar.Line instance or dict + plotly.graph_objects.scattergeo.Line instance or dict with compatible properties + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on plot.ly for locations . + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on plot.ly for lon . marker - plotly.graph_objects.scatterpolar.Marker instance or - dict with compatible properties + plotly.graph_objects.scattergeo.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -26326,16 +29889,8 @@ def _prop_descriptions(self): legend item and on hover. opacity Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on plot.ly for r . selected - plotly.graph_objects.scatterpolar.Selected instance or + plotly.graph_objects.scattergeo.Selected instance or dict with compatible properties selectedpoints Array containing integer indices of selected points. @@ -26348,21 +29903,17 @@ def _prop_descriptions(self): Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatterpolar.Stream instance or - dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. + plotly.graph_objects.scattergeo.Stream instance or dict + with compatible properties text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. textfont Sets the text font. textposition @@ -26373,17 +29924,26 @@ def _prop_descriptions(self): . textsrc Sets the source reference on plot.ly for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on plot.ly for theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon`, + `location` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -26407,8 +29967,8 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scatterpolar.Unselected instance - or dict with compatible properties + plotly.graph_objects.scattergeo.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -26419,49 +29979,47 @@ def _prop_descriptions(self): def __init__( self, arg=None, - cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, - dr=None, - dtheta=None, fill=None, fillcolor=None, + geo=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, + lat=None, + latsrc=None, legendgroup=None, line=None, + locationmode=None, + locations=None, + locationssrc=None, + lon=None, + lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, - r=None, - r0=None, - rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, - subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -26469,27 +30027,18 @@ def __init__( **kwargs ): """ - Construct a new Scatterpolar object + Construct a new Scattergeo object - The scatterpolar trace type encompasses line charts, scatter - charts, text charts, and bubble charts in polar coordinates. - The data visualized as scatter point or lines is set in `r` - (radial) and `theta` (angular) coordinates Text (appearing - either on the chart or on hover only) is via `text`. Bubble - charts are achieved by setting `marker.size` and/or - `marker.color` to numerical arrays. + The data visualized as scatter point or lines on a geographic + map is provided either by longitude/latitude pairs in `lon` and + `lat` respectively or by geographic location IDs or names in + `locations`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scatterpolar - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. + an instance of plotly.graph_objs.Scattergeo connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -26500,27 +30049,21 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. fill Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterpolar has a subset of - the options available to scatter. "toself" connects the + `fillcolor` if not "none". "toself" connects the endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. + it has gaps) into a closed shape. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -26529,14 +30072,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatterpolar.Hoverlabel instance - or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". + plotly.graph_objects.scattergeo.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -26545,7 +30082,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -26559,12 +30101,12 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -26573,16 +30115,33 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scatterpolar.Line instance or dict + plotly.graph_objects.scattergeo.Line instance or dict with compatible properties + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on plot.ly for locations . + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on plot.ly for lon . marker - plotly.graph_objects.scatterpolar.Marker instance or - dict with compatible properties + plotly.graph_objects.scattergeo.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -26610,16 +30169,8 @@ def __init__( legend item and on hover. opacity Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on plot.ly for r . selected - plotly.graph_objects.scatterpolar.Selected instance or + plotly.graph_objects.scattergeo.Selected instance or dict with compatible properties selectedpoints Array containing integer indices of selected points. @@ -26632,21 +30183,17 @@ def __init__( Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatterpolar.Stream instance or - dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. + plotly.graph_objects.scattergeo.Stream instance or dict + with compatible properties text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. textfont Sets the text font. textposition @@ -26657,17 +30204,26 @@ def __init__( . textsrc Sets the source reference on plot.ly for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on plot.ly for theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon`, + `location` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -26691,8 +30247,8 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scatterpolar.Unselected instance - or dict with compatible properties + plotly.graph_objects.scattergeo.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -26701,9 +30257,9 @@ def __init__( Returns ------- - Scatterpolar + Scattergeo """ - super(Scatterpolar, self).__init__("scatterpolar") + super(Scattergeo, self).__init__("scattergeo") # Validate arg # ------------ @@ -26716,9 +30272,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scatterpolar +The first argument to the plotly.graph_objs.Scattergeo constructor must be a dict or -an instance of plotly.graph_objs.Scatterpolar""" +an instance of plotly.graph_objs.Scattergeo""" ) # Handle skip_invalid @@ -26727,86 +30283,76 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scatterpolar as v_scatterpolar + from plotly.validators import scattergeo as v_scattergeo # Initialize validators # --------------------- - self._validators["cliponaxis"] = v_scatterpolar.CliponaxisValidator() - self._validators["connectgaps"] = v_scatterpolar.ConnectgapsValidator() - self._validators["customdata"] = v_scatterpolar.CustomdataValidator() - self._validators["customdatasrc"] = v_scatterpolar.CustomdatasrcValidator() - self._validators["dr"] = v_scatterpolar.DrValidator() - self._validators["dtheta"] = v_scatterpolar.DthetaValidator() - self._validators["fill"] = v_scatterpolar.FillValidator() - self._validators["fillcolor"] = v_scatterpolar.FillcolorValidator() - self._validators["hoverinfo"] = v_scatterpolar.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatterpolar.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatterpolar.HoverlabelValidator() - self._validators["hoveron"] = v_scatterpolar.HoveronValidator() - self._validators["hovertemplate"] = v_scatterpolar.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scatterpolar.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatterpolar.HovertextValidator() - self._validators["hovertextsrc"] = v_scatterpolar.HovertextsrcValidator() - self._validators["ids"] = v_scatterpolar.IdsValidator() - self._validators["idssrc"] = v_scatterpolar.IdssrcValidator() - self._validators["legendgroup"] = v_scatterpolar.LegendgroupValidator() - self._validators["line"] = v_scatterpolar.LineValidator() - self._validators["marker"] = v_scatterpolar.MarkerValidator() - self._validators["meta"] = v_scatterpolar.MetaValidator() - self._validators["metasrc"] = v_scatterpolar.MetasrcValidator() - self._validators["mode"] = v_scatterpolar.ModeValidator() - self._validators["name"] = v_scatterpolar.NameValidator() - self._validators["opacity"] = v_scatterpolar.OpacityValidator() - self._validators["r"] = v_scatterpolar.RValidator() - self._validators["r0"] = v_scatterpolar.R0Validator() - self._validators["rsrc"] = v_scatterpolar.RsrcValidator() - self._validators["selected"] = v_scatterpolar.SelectedValidator() - self._validators["selectedpoints"] = v_scatterpolar.SelectedpointsValidator() - self._validators["showlegend"] = v_scatterpolar.ShowlegendValidator() - self._validators["stream"] = v_scatterpolar.StreamValidator() - self._validators["subplot"] = v_scatterpolar.SubplotValidator() - self._validators["text"] = v_scatterpolar.TextValidator() - self._validators["textfont"] = v_scatterpolar.TextfontValidator() - self._validators["textposition"] = v_scatterpolar.TextpositionValidator() - self._validators["textpositionsrc"] = v_scatterpolar.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatterpolar.TextsrcValidator() - self._validators["theta"] = v_scatterpolar.ThetaValidator() - self._validators["theta0"] = v_scatterpolar.Theta0Validator() - self._validators["thetasrc"] = v_scatterpolar.ThetasrcValidator() - self._validators["thetaunit"] = v_scatterpolar.ThetaunitValidator() - self._validators["uid"] = v_scatterpolar.UidValidator() - self._validators["uirevision"] = v_scatterpolar.UirevisionValidator() - self._validators["unselected"] = v_scatterpolar.UnselectedValidator() - self._validators["visible"] = v_scatterpolar.VisibleValidator() + self._validators["connectgaps"] = v_scattergeo.ConnectgapsValidator() + self._validators["customdata"] = v_scattergeo.CustomdataValidator() + self._validators["customdatasrc"] = v_scattergeo.CustomdatasrcValidator() + self._validators["fill"] = v_scattergeo.FillValidator() + self._validators["fillcolor"] = v_scattergeo.FillcolorValidator() + self._validators["geo"] = v_scattergeo.GeoValidator() + self._validators["hoverinfo"] = v_scattergeo.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scattergeo.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scattergeo.HoverlabelValidator() + self._validators["hovertemplate"] = v_scattergeo.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_scattergeo.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scattergeo.HovertextValidator() + self._validators["hovertextsrc"] = v_scattergeo.HovertextsrcValidator() + self._validators["ids"] = v_scattergeo.IdsValidator() + self._validators["idssrc"] = v_scattergeo.IdssrcValidator() + self._validators["lat"] = v_scattergeo.LatValidator() + self._validators["latsrc"] = v_scattergeo.LatsrcValidator() + self._validators["legendgroup"] = v_scattergeo.LegendgroupValidator() + self._validators["line"] = v_scattergeo.LineValidator() + self._validators["locationmode"] = v_scattergeo.LocationmodeValidator() + self._validators["locations"] = v_scattergeo.LocationsValidator() + self._validators["locationssrc"] = v_scattergeo.LocationssrcValidator() + self._validators["lon"] = v_scattergeo.LonValidator() + self._validators["lonsrc"] = v_scattergeo.LonsrcValidator() + self._validators["marker"] = v_scattergeo.MarkerValidator() + self._validators["meta"] = v_scattergeo.MetaValidator() + self._validators["metasrc"] = v_scattergeo.MetasrcValidator() + self._validators["mode"] = v_scattergeo.ModeValidator() + self._validators["name"] = v_scattergeo.NameValidator() + self._validators["opacity"] = v_scattergeo.OpacityValidator() + self._validators["selected"] = v_scattergeo.SelectedValidator() + self._validators["selectedpoints"] = v_scattergeo.SelectedpointsValidator() + self._validators["showlegend"] = v_scattergeo.ShowlegendValidator() + self._validators["stream"] = v_scattergeo.StreamValidator() + self._validators["text"] = v_scattergeo.TextValidator() + self._validators["textfont"] = v_scattergeo.TextfontValidator() + self._validators["textposition"] = v_scattergeo.TextpositionValidator() + self._validators["textpositionsrc"] = v_scattergeo.TextpositionsrcValidator() + self._validators["textsrc"] = v_scattergeo.TextsrcValidator() + self._validators["texttemplate"] = v_scattergeo.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scattergeo.TexttemplatesrcValidator() + self._validators["uid"] = v_scattergeo.UidValidator() + self._validators["uirevision"] = v_scattergeo.UirevisionValidator() + self._validators["unselected"] = v_scattergeo.UnselectedValidator() + self._validators["visible"] = v_scattergeo.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v _v = arg.pop("connectgaps", None) self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dr", None) - self["dr"] = dr if dr is not None else _v - _v = arg.pop("dtheta", None) - self["dtheta"] = dtheta if dtheta is not None else _v _v = arg.pop("fill", None) self["fill"] = fill if fill is not None else _v _v = arg.pop("fillcolor", None) self["fillcolor"] = fillcolor if fillcolor is not None else _v + _v = arg.pop("geo", None) + self["geo"] = geo if geo is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -26821,10 +30367,24 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("lat", None) + self["lat"] = lat if lat is not None else _v + _v = arg.pop("latsrc", None) + self["latsrc"] = latsrc if latsrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v _v = arg.pop("line", None) self["line"] = line if line is not None else _v + _v = arg.pop("locationmode", None) + self["locationmode"] = locationmode if locationmode is not None else _v + _v = arg.pop("locations", None) + self["locations"] = locations if locations is not None else _v + _v = arg.pop("locationssrc", None) + self["locationssrc"] = locationssrc if locationssrc is not None else _v + _v = arg.pop("lon", None) + self["lon"] = lon if lon is not None else _v + _v = arg.pop("lonsrc", None) + self["lonsrc"] = lonsrc if lonsrc is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) @@ -26837,12 +30397,6 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("r0", None) - self["r0"] = r0 if r0 is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v _v = arg.pop("selected", None) self["selected"] = selected if selected is not None else _v _v = arg.pop("selectedpoints", None) @@ -26851,8 +30405,6 @@ def __init__( self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) @@ -26863,14 +30415,10 @@ def __init__( self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("theta", None) - self["theta"] = theta if theta is not None else _v - _v = arg.pop("theta0", None) - self["theta0"] = theta0 if theta0 is not None else _v - _v = arg.pop("thetasrc", None) - self["thetasrc"] = thetasrc if thetasrc is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -26884,9 +30432,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scatterpolar" + self._props["type"] = "scattergeo" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatterpolar", val="scatterpolar" + plotly_name="type", parent_name="scattergeo", val="scattergeo" ) arg.pop("type", None) @@ -26903,20 +30451,98 @@ def __init__( import copy as _copy -class Scattermapbox(_BaseTraceType): +class Scattercarpet(_BaseTraceType): - # below - # ----- + # a + # - @property - def below(self): + def a(self): """ - Determines if this scattermapbox trace's layers are to be - inserted before the layer with the specified ID. By default, - scattermapbox layers are inserted above all the base layers. To - place the scattermapbox layers above every other layer, set - `below` to "''". + Sets the a-axis coordinates. - The 'below' property is a string and must be specified as: + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on plot.ly for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # b + # - + @property + def b(self): + """ + Sets the b-axis coordinates. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on plot.ly for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + # carpet + # ------ + @property + def carpet(self): + """ + An identifier for this carpet, so that `scattercarpet` and + `contourcarpet` traces can specify a carpet plot on which they + lie + + The 'carpet' property is a string and must be specified as: - A string - A number that will be converted to a string @@ -26924,11 +30550,11 @@ def below(self): ------- str """ - return self["below"] + return self["carpet"] - @below.setter - def below(self, val): - self["below"] = val + @carpet.setter + def carpet(self, val): + self["carpet"] = val # connectgaps # ----------- @@ -27000,12 +30626,18 @@ def customdatasrc(self, val): def fill(self): """ Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". "toself" connects the endpoints of the trace (or - each segment of the trace if it has gaps) into a closed shape. + if not "none". scatterternary has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. The 'fill' property is an enumeration that may be specified as: - One of the following enumeration values: - ['none', 'toself'] + ['none', 'toself', 'tonext'] Returns ------- @@ -27089,8 +30721,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters - (e.g. 'lon+lat') + - Any combination of ['a', 'b', 'text', 'name'] joined with '+' characters + (e.g. 'a+b') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -27131,7 +30763,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Hoverlabel + - An instance of plotly.graph_objs.scattercarpet.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -27175,7 +30807,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scattermapbox.Hoverlabel + plotly.graph_objs.scattercarpet.Hoverlabel """ return self["hoverlabel"] @@ -27183,6 +30815,31 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + # hovertemplate # ------------- @property @@ -27195,7 +30852,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -27245,11 +30906,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (lon,lat) pair If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (a,b) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b). To be seen, trace `hoverinfo` + must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -27328,46 +30989,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- - @property - def lat(self): - """ - Sets the latitude coordinates (in degrees North). - - The 'lat' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # latsrc - # ------ - @property - def latsrc(self): - """ - Sets the source reference on plot.ly for lat . - - The 'latsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["latsrc"] - - @latsrc.setter - def latsrc(self, val): - self["latsrc"] = val - # legendgroup # ----------- @property @@ -27398,7 +31019,7 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Line + - An instance of plotly.graph_objs.scattercarpet.Line - A dict of string/value properties that will be passed to the Line constructor @@ -27406,12 +31027,27 @@ def line(self): color Sets the line color. + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). width Sets the line width (in px). Returns ------- - plotly.graph_objs.scattermapbox.Line + plotly.graph_objs.scattercarpet.Line """ return self["line"] @@ -27419,46 +31055,6 @@ def line(self): def line(self, val): self["line"] = val - # lon - # --- - @property - def lon(self): - """ - Sets the longitude coordinates (in degrees East). - - The 'lon' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # lonsrc - # ------ - @property - def lonsrc(self): - """ - Sets the source reference on plot.ly for lon . - - The 'lonsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lonsrc"] - - @lonsrc.setter - def lonsrc(self, val): - self["lonsrc"] = val - # marker # ------ @property @@ -27466,7 +31062,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Marker + - An instance of plotly.graph_objs.scattercarpet.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -27526,7 +31122,7 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.scattermapbox.marker.Color + plotly.graph_objects.scattercarpet.marker.Color Bar instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in @@ -27547,6 +31143,15 @@ def marker(self): colorsrc Sets the source reference on plot.ly for color . + gradient + plotly.graph_objects.scattercarpet.marker.Gradi + ent instance or dict with compatible properties + line + plotly.graph_objects.scattercarpet.marker.Line + instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. opacity Sets the marker opacity. opacitysrc @@ -27582,17 +31187,19 @@ def marker(self): Sets the source reference on plot.ly for size . symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that - the array `marker.color` and `marker.size` are - only available for "circle" symbols. + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. symbolsrc Sets the source reference on plot.ly for symbol . Returns ------- - plotly.graph_objs.scattermapbox.Marker + plotly.graph_objs.scattercarpet.Marker """ return self["marker"] @@ -27656,7 +31263,9 @@ def mode(self): Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on - hover. + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". The 'mode' property is a flaglist and may be specified as a string containing: @@ -27723,19 +31332,23 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Selected + - An instance of plotly.graph_objs.scattercarpet.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.scattermapbox.selected.Mar + plotly.graph_objects.scattercarpet.selected.Mar ker instance or dict with compatible properties + textfont + plotly.graph_objects.scattercarpet.selected.Tex + tfont instance or dict with compatible + properties Returns ------- - plotly.graph_objs.scattermapbox.Selected + plotly.graph_objs.scattercarpet.Selected """ return self["selected"] @@ -27795,7 +31408,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Stream + - An instance of plotly.graph_objs.scattercarpet.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -27813,7 +31426,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scattermapbox.Stream + plotly.graph_objs.scattercarpet.Stream """ return self["stream"] @@ -27821,42 +31434,17 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - mapbox subplot. If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data refer to - `layout.mapbox2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'mapbox', that may be specified as the string 'mapbox' - optionally followed by an integer >= 1 - (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - # text # ---- @property def text(self): """ - Sets text elements associated with each (lon,lat) pair If a + Sets text elements associated with each (a,b) point. If a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. + points. If an array of strings, the items are mapped in order + to the the data points in (a,b). If trace `hoverinfo` contains + a "text" flag and "hovertext" is not set, these elements will + be seen in the hover labels. The 'text' property is a string and must be specified as: - A string @@ -27878,13 +31466,11 @@ def text(self, val): @property def textfont(self): """ - Sets the icon text font (color=mapbox.layer.paint.text-color, - size=mapbox.layer.layout.text-size). Has an effect only when - `type` is set to "symbol". + Sets the text font. The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Textfont + - An instance of plotly.graph_objs.scattercarpet.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -27892,6 +31478,9 @@ def textfont(self): color + colorsrc + Sets the source reference on plot.ly for color + . family HTML font family - the typeface that will be applied by the web browser. The web browser @@ -27908,11 +31497,18 @@ def textfont(self): Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - plotly.graph_objs.scattermapbox.Textfont + plotly.graph_objs.scattercarpet.Textfont """ return self["textfont"] @@ -27933,10 +31529,11 @@ def textposition(self): ['top left', 'top center', 'top right', 'middle left', 'middle center', 'middle right', 'bottom left', 'bottom center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + Any|numpy.ndarray """ return self["textposition"] @@ -27944,6 +31541,26 @@ def textposition(self): def textposition(self, val): self["textposition"] = val + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on plot.ly for textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + # textsrc # ------- @property @@ -27964,6 +31581,61 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `a`, `b` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + # uid # --- @property @@ -28026,20 +31698,24 @@ def unselected(self): """ The 'unselected' property is an instance of Unselected that may be specified as: - - An instance of plotly.graph_objs.scattermapbox.Unselected + - An instance of plotly.graph_objs.scattercarpet.Unselected - A dict of string/value properties that will be passed to the Unselected constructor Supported dict properties: marker - plotly.graph_objects.scattermapbox.unselected.M + plotly.graph_objects.scattercarpet.unselected.M arker instance or dict with compatible properties + textfont + plotly.graph_objects.scattercarpet.unselected.T + extfont instance or dict with compatible + properties Returns ------- - plotly.graph_objs.scattermapbox.Unselected + plotly.graph_objs.scattercarpet.Unselected """ return self["unselected"] @@ -28070,6 +31746,56 @@ def visible(self): def visible(self, val): self["visible"] = val + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + # type # ---- @property @@ -28087,12 +31813,18 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - below - Determines if this scattermapbox trace's layers are to - be inserted before the layer with the specified ID. By - default, scattermapbox layers are inserted above all - the base layers. To place the scattermapbox layers - above every other layer, set `below` to "''". + a + Sets the a-axis coordinates. + asrc + Sets the source reference on plot.ly for a . + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on plot.ly for b . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -28105,9 +31837,15 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for customdata . fill Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line @@ -28120,8 +31858,14 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scattermapbox.Hoverlabel instance + plotly.graph_objects.scattercarpet.Hoverlabel instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -28130,7 +31874,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -28144,12 +31893,11 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -28158,23 +31906,15 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scattermapbox.Line instance or + plotly.graph_objects.scattercarpet.Line instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on plot.ly for lon . marker - plotly.graph_objects.scattermapbox.Marker instance or + plotly.graph_objects.scattercarpet.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -28195,14 +31935,16 @@ def _prop_descriptions(self): Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. selected - plotly.graph_objects.scattermapbox.Selected instance or + plotly.graph_objects.scattercarpet.Selected instance or dict with compatible properties selectedpoints Array containing integer indices of selected points. @@ -28215,30 +31957,46 @@ def _prop_descriptions(self): Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scattermapbox.Stream instance or + plotly.graph_objects.scattercarpet.Stream instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textfont - Sets the icon text font (color=mapbox.layer.paint.text- - color, size=mapbox.layer.layout.text-size). Has an - effect only when `type` is set to "symbol". + Sets the text font. textposition Sets the positions of the `text` elements with respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b` and + `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -28262,19 +32020,33 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scattermapbox.Unselected instance + plotly.graph_objects.scattercarpet.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. """ def __init__( self, arg=None, - below=None, + a=None, + asrc=None, + b=None, + bsrc=None, + carpet=None, connectgaps=None, customdata=None, customdatasrc=None, @@ -28283,18 +32055,15 @@ def __init__( hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - lat=None, - latsrc=None, legendgroup=None, line=None, - lon=None, - lonsrc=None, marker=None, meta=None, metasrc=None, @@ -28305,35 +32074,44 @@ def __init__( selectedpoints=None, showlegend=None, stream=None, - subplot=None, text=None, textfont=None, textposition=None, + textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, + xaxis=None, + yaxis=None, **kwargs ): """ - Construct a new Scattermapbox object + Construct a new Scattercarpet object - The data visualized as scatter point, lines or marker symbols - on a Mapbox GL geographic map is provided by longitude/latitude - pairs in `lon` and `lat`. + Plots a scatter trace on either the first carpet axis or the + carpet axis with a matching `carpet` attribute. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scattermapbox - below - Determines if this scattermapbox trace's layers are to - be inserted before the layer with the specified ID. By - default, scattermapbox layers are inserted above all - the base layers. To place the scattermapbox layers - above every other layer, set `below` to "''". + an instance of plotly.graph_objs.Scattercarpet + a + Sets the a-axis coordinates. + asrc + Sets the source reference on plot.ly for a . + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on plot.ly for b . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -28346,9 +32124,15 @@ def __init__( Sets the source reference on plot.ly for customdata . fill Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line @@ -28361,8 +32145,14 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scattermapbox.Hoverlabel instance + plotly.graph_objects.scattercarpet.Hoverlabel instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -28371,7 +32161,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -28385,12 +32180,11 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -28399,23 +32193,15 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scattermapbox.Line instance or + plotly.graph_objects.scattercarpet.Line instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on plot.ly for lon . marker - plotly.graph_objects.scattermapbox.Marker instance or + plotly.graph_objects.scattercarpet.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -28436,14 +32222,16 @@ def __init__( Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. selected - plotly.graph_objects.scattermapbox.Selected instance or + plotly.graph_objects.scattercarpet.Selected instance or dict with compatible properties selectedpoints Array containing integer indices of selected points. @@ -28456,30 +32244,46 @@ def __init__( Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scattermapbox.Stream instance or + plotly.graph_objects.scattercarpet.Stream instance or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textfont - Sets the icon text font (color=mapbox.layer.paint.text- - color, size=mapbox.layer.layout.text-size). Has an - effect only when `type` is set to "symbol". + Sets the text font. textposition Sets the positions of the `text` elements with respects to the (x,y) coordinates. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b` and + `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -28503,19 +32307,29 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scattermapbox.Unselected instance + plotly.graph_objects.scattercarpet.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. Returns ------- - Scattermapbox + Scattercarpet """ - super(Scattermapbox, self).__init__("scattermapbox") + super(Scattercarpet, self).__init__("scattercarpet") # Validate arg # ------------ @@ -28528,9 +32342,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scattermapbox +The first argument to the plotly.graph_objs.Scattercarpet constructor must be a dict or -an instance of plotly.graph_objs.Scattermapbox""" +an instance of plotly.graph_objs.Scattercarpet""" ) # Handle skip_invalid @@ -28539,57 +32353,70 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scattermapbox as v_scattermapbox + from plotly.validators import scattercarpet as v_scattercarpet # Initialize validators # --------------------- - self._validators["below"] = v_scattermapbox.BelowValidator() - self._validators["connectgaps"] = v_scattermapbox.ConnectgapsValidator() - self._validators["customdata"] = v_scattermapbox.CustomdataValidator() - self._validators["customdatasrc"] = v_scattermapbox.CustomdatasrcValidator() - self._validators["fill"] = v_scattermapbox.FillValidator() - self._validators["fillcolor"] = v_scattermapbox.FillcolorValidator() - self._validators["hoverinfo"] = v_scattermapbox.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattermapbox.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattermapbox.HoverlabelValidator() - self._validators["hovertemplate"] = v_scattermapbox.HovertemplateValidator() + self._validators["a"] = v_scattercarpet.AValidator() + self._validators["asrc"] = v_scattercarpet.AsrcValidator() + self._validators["b"] = v_scattercarpet.BValidator() + self._validators["bsrc"] = v_scattercarpet.BsrcValidator() + self._validators["carpet"] = v_scattercarpet.CarpetValidator() + self._validators["connectgaps"] = v_scattercarpet.ConnectgapsValidator() + self._validators["customdata"] = v_scattercarpet.CustomdataValidator() + self._validators["customdatasrc"] = v_scattercarpet.CustomdatasrcValidator() + self._validators["fill"] = v_scattercarpet.FillValidator() + self._validators["fillcolor"] = v_scattercarpet.FillcolorValidator() + self._validators["hoverinfo"] = v_scattercarpet.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scattercarpet.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scattercarpet.HoverlabelValidator() + self._validators["hoveron"] = v_scattercarpet.HoveronValidator() + self._validators["hovertemplate"] = v_scattercarpet.HovertemplateValidator() self._validators[ "hovertemplatesrc" - ] = v_scattermapbox.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattermapbox.HovertextValidator() - self._validators["hovertextsrc"] = v_scattermapbox.HovertextsrcValidator() - self._validators["ids"] = v_scattermapbox.IdsValidator() - self._validators["idssrc"] = v_scattermapbox.IdssrcValidator() - self._validators["lat"] = v_scattermapbox.LatValidator() - self._validators["latsrc"] = v_scattermapbox.LatsrcValidator() - self._validators["legendgroup"] = v_scattermapbox.LegendgroupValidator() - self._validators["line"] = v_scattermapbox.LineValidator() - self._validators["lon"] = v_scattermapbox.LonValidator() - self._validators["lonsrc"] = v_scattermapbox.LonsrcValidator() - self._validators["marker"] = v_scattermapbox.MarkerValidator() - self._validators["meta"] = v_scattermapbox.MetaValidator() - self._validators["metasrc"] = v_scattermapbox.MetasrcValidator() - self._validators["mode"] = v_scattermapbox.ModeValidator() - self._validators["name"] = v_scattermapbox.NameValidator() - self._validators["opacity"] = v_scattermapbox.OpacityValidator() - self._validators["selected"] = v_scattermapbox.SelectedValidator() - self._validators["selectedpoints"] = v_scattermapbox.SelectedpointsValidator() - self._validators["showlegend"] = v_scattermapbox.ShowlegendValidator() - self._validators["stream"] = v_scattermapbox.StreamValidator() - self._validators["subplot"] = v_scattermapbox.SubplotValidator() - self._validators["text"] = v_scattermapbox.TextValidator() - self._validators["textfont"] = v_scattermapbox.TextfontValidator() - self._validators["textposition"] = v_scattermapbox.TextpositionValidator() - self._validators["textsrc"] = v_scattermapbox.TextsrcValidator() - self._validators["uid"] = v_scattermapbox.UidValidator() - self._validators["uirevision"] = v_scattermapbox.UirevisionValidator() - self._validators["unselected"] = v_scattermapbox.UnselectedValidator() - self._validators["visible"] = v_scattermapbox.VisibleValidator() + ] = v_scattercarpet.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scattercarpet.HovertextValidator() + self._validators["hovertextsrc"] = v_scattercarpet.HovertextsrcValidator() + self._validators["ids"] = v_scattercarpet.IdsValidator() + self._validators["idssrc"] = v_scattercarpet.IdssrcValidator() + self._validators["legendgroup"] = v_scattercarpet.LegendgroupValidator() + self._validators["line"] = v_scattercarpet.LineValidator() + self._validators["marker"] = v_scattercarpet.MarkerValidator() + self._validators["meta"] = v_scattercarpet.MetaValidator() + self._validators["metasrc"] = v_scattercarpet.MetasrcValidator() + self._validators["mode"] = v_scattercarpet.ModeValidator() + self._validators["name"] = v_scattercarpet.NameValidator() + self._validators["opacity"] = v_scattercarpet.OpacityValidator() + self._validators["selected"] = v_scattercarpet.SelectedValidator() + self._validators["selectedpoints"] = v_scattercarpet.SelectedpointsValidator() + self._validators["showlegend"] = v_scattercarpet.ShowlegendValidator() + self._validators["stream"] = v_scattercarpet.StreamValidator() + self._validators["text"] = v_scattercarpet.TextValidator() + self._validators["textfont"] = v_scattercarpet.TextfontValidator() + self._validators["textposition"] = v_scattercarpet.TextpositionValidator() + self._validators["textpositionsrc"] = v_scattercarpet.TextpositionsrcValidator() + self._validators["textsrc"] = v_scattercarpet.TextsrcValidator() + self._validators["texttemplate"] = v_scattercarpet.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scattercarpet.TexttemplatesrcValidator() + self._validators["uid"] = v_scattercarpet.UidValidator() + self._validators["uirevision"] = v_scattercarpet.UirevisionValidator() + self._validators["unselected"] = v_scattercarpet.UnselectedValidator() + self._validators["visible"] = v_scattercarpet.VisibleValidator() + self._validators["xaxis"] = v_scattercarpet.XAxisValidator() + self._validators["yaxis"] = v_scattercarpet.YAxisValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v + _v = arg.pop("a", None) + self["a"] = a if a is not None else _v + _v = arg.pop("asrc", None) + self["asrc"] = asrc if asrc is not None else _v + _v = arg.pop("b", None) + self["b"] = b if b is not None else _v + _v = arg.pop("bsrc", None) + self["bsrc"] = bsrc if bsrc is not None else _v + _v = arg.pop("carpet", None) + self["carpet"] = carpet if carpet is not None else _v _v = arg.pop("connectgaps", None) self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) @@ -28606,6 +32433,8 @@ def __init__( self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -28620,18 +32449,10 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("latsrc", None) - self["latsrc"] = latsrc if latsrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v _v = arg.pop("line", None) self["line"] = line if line is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("lonsrc", None) - self["lonsrc"] = lonsrc if lonsrc is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) @@ -28652,16 +32473,20 @@ def __init__( self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) self["textfont"] = textfont if textfont is not None else _v _v = arg.pop("textposition", None) self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -28670,14 +32495,18 @@ def __init__( self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scattermapbox" + self._props["type"] = "scattercarpet" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattermapbox", val="scattermapbox" + plotly_name="type", parent_name="scattercarpet", val="scattercarpet" ) arg.pop("type", None) @@ -28694,7 +32523,7 @@ def __init__( import copy as _copy -class Scattergl(_BaseTraceType): +class Scatter3d(_BaseTraceType): # connectgaps # ----------- @@ -28760,46 +32589,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - # error_x # ------- @property @@ -28807,7 +32596,7 @@ def error_x(self): """ The 'error_x' property is an instance of ErrorX that may be specified as: - - An instance of plotly.graph_objs.scattergl.ErrorX + - An instance of plotly.graph_objs.scatter3d.ErrorX - A dict of string/value properties that will be passed to the ErrorX constructor @@ -28830,7 +32619,7 @@ def error_x(self): . color Sets the stoke color of the error bars. - copy_ystyle + copy_zstyle symmetric Determines whether or not the error bars have @@ -28873,7 +32662,7 @@ def error_x(self): Returns ------- - plotly.graph_objs.scattergl.ErrorX + plotly.graph_objs.scatter3d.ErrorX """ return self["error_x"] @@ -28888,7 +32677,7 @@ def error_y(self): """ The 'error_y' property is an instance of ErrorY that may be specified as: - - An instance of plotly.graph_objs.scattergl.ErrorY + - An instance of plotly.graph_objs.scatter3d.ErrorY - A dict of string/value properties that will be passed to the ErrorY constructor @@ -28911,6 +32700,8 @@ def error_y(self): . color Sets the stoke color of the error bars. + copy_zstyle + symmetric Determines whether or not the error bars have the same length in both direction (top/bottom @@ -28952,7 +32743,7 @@ def error_y(self): Returns ------- - plotly.graph_objs.scattergl.ErrorY + plotly.graph_objs.scatter3d.ErrorY """ return self["error_y"] @@ -28960,106 +32751,84 @@ def error_y(self): def error_y(self, val): self["error_y"] = val - # fill - # ---- + # error_z + # ------- @property - def fill(self): + def error_z(self): """ - Sets the area to fill with a solid color. Defaults to "none" - unless this trace is stacked, then it gets "tonexty" - ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 - respectively. "tonextx" and "tonexty" fill between the - endpoints of this trace and the endpoints of the trace before - it, connecting those endpoints with straight lines (to make a - stacked area graph); if there is no trace before it, they - behave like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the space between two - traces if one completely encloses the other (eg consecutive - contour lines), and behaves like "toself" if there is no trace - before it. "tonext" should not be used if one trace does not - enclose the other. Traces in a `stackgroup` will only fill to - (or be filled to) other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if fill- - linked traces are not already consecutive, the later ones will - be pushed down in the drawing order. + The 'error_z' property is an instance of ErrorZ + that may be specified as: + - An instance of plotly.graph_objs.scatter3d.ErrorZ + - A dict of string/value properties that will be passed + to the ErrorZ constructor - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', - 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. Returns ------- - str + plotly.graph_objs.scatter3d.ErrorZ """ - return self["fillcolor"] + return self["error_z"] - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val + @error_z.setter + def error_z(self, val): + self["error_z"] = val # hoverinfo # --------- @@ -29114,7 +32883,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scattergl.Hoverlabel + - An instance of plotly.graph_objs.scatter3d.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -29158,7 +32927,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scattergl.Hoverlabel + plotly.graph_objs.scatter3d.Hoverlabel """ return self["hoverlabel"] @@ -29178,7 +32947,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -29228,10 +33001,10 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (x,y) pair. If a + Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace + the this trace's (x,y,z) coordinates. To be seen, trace `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: @@ -29341,25 +33114,105 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.scattergl.Line + - An instance of plotly.graph_objs.scatter3d.Line - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. color - Sets the line color. + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.scatter3d.line.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. + Sets the dash style of the lines. + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. width Sets the line width (in px). Returns ------- - plotly.graph_objs.scattergl.Line + plotly.graph_objs.scatter3d.Line """ return self["line"] @@ -29374,7 +33227,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scattergl.Marker + - An instance of plotly.graph_objs.scatter3d.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -29434,7 +33287,7 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.scattergl.marker.ColorBar + plotly.graph_objects.scatter3d.marker.ColorBar instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in @@ -29456,13 +33309,15 @@ def marker(self): Sets the source reference on plot.ly for color . line - plotly.graph_objects.scattergl.marker.Line + plotly.graph_objects.scatter3d.marker.Line instance or dict with compatible properties opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on plot.ly for - opacity . + Sets the marker opacity. Note that the marker + opacity for scatter3d traces must be a scalar + value for performance reasons. To set a + blending opacity value (i.e. which is not + transparent), set "marker.color" to an rgba + color and use its alpha channel. reversescale Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a @@ -29493,19 +33348,14 @@ def marker(self): Sets the source reference on plot.ly for size . symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. + Sets the marker symbol type. symbolsrc Sets the source reference on plot.ly for symbol . Returns ------- - plotly.graph_objs.scattergl.Marker + plotly.graph_objs.scatter3d.Marker """ return self["marker"] @@ -29566,7 +33416,12 @@ def metasrc(self, val): @property def mode(self): """ - Determines the drawing mode for this scatter trace. + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". The 'mode' property is a flaglist and may be specified as a string containing: @@ -29626,59 +33481,63 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- + # projection + # ---------- @property - def selected(self): + def projection(self): """ - The 'selected' property is an instance of Selected + The 'projection' property is an instance of Projection that may be specified as: - - An instance of plotly.graph_objs.scattergl.Selected + - An instance of plotly.graph_objs.scatter3d.Projection - A dict of string/value properties that will be passed - to the Selected constructor + to the Projection constructor Supported dict properties: - marker - plotly.graph_objects.scattergl.selected.Marker + x + plotly.graph_objects.scatter3d.projection.X + instance or dict with compatible properties + y + plotly.graph_objects.scatter3d.projection.Y + instance or dict with compatible properties + z + plotly.graph_objects.scatter3d.projection.Z instance or dict with compatible properties - textfont - plotly.graph_objects.scattergl.selected.Textfon - t instance or dict with compatible properties Returns ------- - plotly.graph_objs.scattergl.Selected + plotly.graph_objs.scatter3d.Projection """ - return self["selected"] + return self["projection"] - @selected.setter - def selected(self, val): - self["selected"] = val + @projection.setter + def projection(self, val): + self["projection"] = val - # selectedpoints - # -------------- + # scene + # ----- @property - def selectedpoints(self): + def scene(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. - The 'selectedpoints' property accepts values of any type + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) Returns ------- - Any + str """ - return self["selectedpoints"] + return self["scene"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @scene.setter + def scene(self, val): + self["scene"] = val # showlegend # ---------- @@ -29708,7 +33567,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scattergl.Stream + - An instance of plotly.graph_objs.scatter3d.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -29726,25 +33585,107 @@ def stream(self): Returns ------- - plotly.graph_objs.scattergl.Stream + plotly.graph_objs.scatter3d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # surfaceaxis + # ----------- + @property + def surfaceaxis(self): + """ + If "-1", the scatter points are not fill with a surface If 0, + 1, 2, the scatter points are filled with a Delaunay surface + about the x, y, z respectively. + + The 'surfaceaxis' property is an enumeration that may be specified as: + - One of the following enumeration values: + [-1, 0, 1, 2] + + Returns + ------- + Any + """ + return self["surfaceaxis"] + + @surfaceaxis.setter + def surfaceaxis(self, val): + self["surfaceaxis"] = val + + # surfacecolor + # ------------ + @property + def surfacecolor(self): + """ + Sets the surface fill color. + + The 'surfacecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str """ - return self["stream"] + return self["surfacecolor"] - @stream.setter - def stream(self, val): - self["stream"] = val + @surfacecolor.setter + def surfacecolor(self, val): + self["surfacecolor"] = val # text # ---- @property def text(self): """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets text elements associated with each (x,y,z) triplet. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y,z) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string @@ -29766,11 +33707,9 @@ def text(self, val): @property def textfont(self): """ - Sets the text font. - The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scattergl.Textfont + - An instance of plotly.graph_objs.scatter3d.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -29797,9 +33736,6 @@ def textfont(self): Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . size sizesrc @@ -29808,7 +33744,7 @@ def textfont(self): Returns ------- - plotly.graph_objs.scattergl.Textfont + plotly.graph_objs.scatter3d.Textfont """ return self["textfont"] @@ -29881,6 +33817,61 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + # uid # --- @property @@ -29936,36 +33927,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.scattergl.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - plotly.graph_objects.scattergl.unselected.Marke - r instance or dict with compatible properties - textfont - plotly.graph_objects.scattergl.unselected.Textf - ont instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.scattergl.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - # visible # ------- @property @@ -30009,52 +33970,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - # xcalendar # --------- @property @@ -30119,60 +34034,78 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- + # ycalendar + # --------- @property - def y0(self): + def ycalendar(self): """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. + Sets the calendar system to use with `y` date data. - The 'y0' property accepts values of any type + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- Any """ - return self["y0"] + return self["ycalendar"] - @y0.setter - def y0(self, val): - self["y0"] = val + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val - # yaxis - # ----- + # ysrc + # ---- @property - def yaxis(self): + def ysrc(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the source reference on plot.ly for y . - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["yaxis"] + return self["ysrc"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # ycalendar + # z + # - + @property + def z(self): + """ + Sets the z coordinates. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zcalendar # --------- @property - def ycalendar(self): + def zcalendar(self): """ - Sets the calendar system to use with `y` date data. + Sets the calendar system to use with `z` date data. - The 'ycalendar' property is an enumeration that may be specified as: + The 'zcalendar' property is an enumeration that may be specified as: - One of the following enumeration values: ['gregorian', 'chinese', 'coptic', 'discworld', 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', @@ -30183,31 +34116,31 @@ def ycalendar(self): ------- Any """ - return self["ycalendar"] + return self["zcalendar"] - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val - # ysrc + # zsrc # ---- @property - def ysrc(self): + def zsrc(self): """ - Sets the source reference on plot.ly for y . + Sets the source reference on plot.ly for z . - The 'ysrc' property must be specified as a string or + The 'zsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["ysrc"] + return self["zsrc"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val # type # ---- @@ -30236,43 +34169,15 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. error_x - plotly.graph_objects.scattergl.ErrorX instance or dict + plotly.graph_objects.scatter3d.ErrorX instance or dict with compatible properties error_y - plotly.graph_objects.scattergl.ErrorY instance or dict + plotly.graph_objects.scatter3d.ErrorY instance or dict + with compatible properties + error_z + plotly.graph_objects.scatter3d.ErrorZ instance or dict with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -30281,7 +34186,7 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scattergl.Hoverlabel instance or + plotly.graph_objects.scatter3d.Hoverlabel instance or dict with compatible properties hovertemplate Template string used for rendering the information that @@ -30291,7 +34196,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -30305,10 +34215,10 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) coordinates. To be seen, trace `hoverinfo` must contain a "text" flag. hovertextsrc @@ -30324,10 +34234,10 @@ def _prop_descriptions(self): the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scattergl.Line instance or dict + plotly.graph_objects.scatter3d.Line instance or dict with compatible properties marker - plotly.graph_objects.scattergl.Marker instance or dict + plotly.graph_objects.scatter3d.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -30345,38 +34255,49 @@ def _prop_descriptions(self): metasrc Sets the source reference on plot.ly for meta . mode - Determines the drawing mode for this scatter trace. + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - selected - plotly.graph_objects.scattergl.Selected instance or + projection + plotly.graph_objects.scatter3d.Projection instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scattergl.Stream instance or dict + plotly.graph_objects.scatter3d.Stream instance or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. textfont - Sets the text font. + plotly.graph_objects.scatter3d.Textfont instance or + dict with compatible properties textposition Sets the positions of the `text` elements with respects to the (x,y) coordinates. @@ -30385,6 +34306,25 @@ def _prop_descriptions(self): . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -30407,9 +34347,6 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.scattergl.Unselected instance or - dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -30417,34 +34354,22 @@ def _prop_descriptions(self): visible). x Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. xcalendar Sets the calendar system to use with `x` date data. xsrc Sets the source reference on plot.ly for x . y Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. ycalendar Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( @@ -30453,12 +34378,9 @@ def __init__( connectgaps=None, customdata=None, customdatasrc=None, - dx=None, - dy=None, error_x=None, error_y=None, - fill=None, - fillcolor=None, + error_z=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -30476,44 +34398,48 @@ def __init__( mode=None, name=None, opacity=None, - selected=None, - selectedpoints=None, + projection=None, + scene=None, showlegend=None, stream=None, + surfaceaxis=None, + surfacecolor=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, - unselected=None, visible=None, x=None, - x0=None, - xaxis=None, xcalendar=None, xsrc=None, y=None, - y0=None, - yaxis=None, ycalendar=None, ysrc=None, + z=None, + zcalendar=None, + zsrc=None, **kwargs ): """ - Construct a new Scattergl object + Construct a new Scatter3d object - The data visualized as scatter point or lines is set in `x` and - `y` using the WebGL plotting engine. Bubble charts are achieved - by setting `marker.size` and/or `marker.color` to a numerical - arrays. + The data visualized as scatter point or lines in 3D dimension + is set in `x`, `y`, `z`. Text (appearing either on the chart or + on hover only) is via `text`. Bubble charts are achieved by + setting `marker.size` and/or `marker.color` Projections are + achieved via `projection`. Surface fills are achieved via + `surfaceaxis`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scattergl + an instance of plotly.graph_objs.Scatter3d connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -30524,43 +34450,15 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. error_x - plotly.graph_objects.scattergl.ErrorX instance or dict + plotly.graph_objects.scatter3d.ErrorX instance or dict with compatible properties error_y - plotly.graph_objects.scattergl.ErrorY instance or dict + plotly.graph_objects.scatter3d.ErrorY instance or dict + with compatible properties + error_z + plotly.graph_objects.scatter3d.ErrorZ instance or dict with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -30569,7 +34467,7 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scattergl.Hoverlabel instance or + plotly.graph_objects.scatter3d.Hoverlabel instance or dict with compatible properties hovertemplate Template string used for rendering the information that @@ -30579,7 +34477,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -30593,10 +34496,10 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) coordinates. To be seen, trace `hoverinfo` must contain a "text" flag. hovertextsrc @@ -30612,10 +34515,10 @@ def __init__( the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scattergl.Line instance or dict + plotly.graph_objects.scatter3d.Line instance or dict with compatible properties marker - plotly.graph_objects.scattergl.Marker instance or dict + plotly.graph_objects.scatter3d.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -30633,38 +34536,49 @@ def __init__( metasrc Sets the source reference on plot.ly for meta . mode - Determines the drawing mode for this scatter trace. + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - selected - plotly.graph_objects.scattergl.Selected instance or + projection + plotly.graph_objects.scatter3d.Projection instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scattergl.Stream instance or dict + plotly.graph_objects.scatter3d.Stream instance or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. textfont - Sets the text font. + plotly.graph_objects.scatter3d.Textfont instance or + dict with compatible properties textposition Sets the positions of the `text` elements with respects to the (x,y) coordinates. @@ -30673,6 +34587,25 @@ def __init__( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -30695,9 +34628,6 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.scattergl.Unselected instance or - dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -30705,40 +34635,28 @@ def __init__( visible). x Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. xcalendar Sets the calendar system to use with `x` date data. xsrc Sets the source reference on plot.ly for x . y Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. ycalendar Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Scattergl + Scatter3d """ - super(Scattergl, self).__init__("scattergl") + super(Scatter3d, self).__init__("scatter3d") # Validate arg # ------------ @@ -30751,9 +34669,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scattergl +The first argument to the plotly.graph_objs.Scatter3d constructor must be a dict or -an instance of plotly.graph_objs.Scattergl""" +an instance of plotly.graph_objs.Scatter3d""" ) # Handle skip_invalid @@ -30762,59 +34680,58 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scattergl as v_scattergl + from plotly.validators import scatter3d as v_scatter3d # Initialize validators # --------------------- - self._validators["connectgaps"] = v_scattergl.ConnectgapsValidator() - self._validators["customdata"] = v_scattergl.CustomdataValidator() - self._validators["customdatasrc"] = v_scattergl.CustomdatasrcValidator() - self._validators["dx"] = v_scattergl.DxValidator() - self._validators["dy"] = v_scattergl.DyValidator() - self._validators["error_x"] = v_scattergl.ErrorXValidator() - self._validators["error_y"] = v_scattergl.ErrorYValidator() - self._validators["fill"] = v_scattergl.FillValidator() - self._validators["fillcolor"] = v_scattergl.FillcolorValidator() - self._validators["hoverinfo"] = v_scattergl.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattergl.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattergl.HoverlabelValidator() - self._validators["hovertemplate"] = v_scattergl.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scattergl.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattergl.HovertextValidator() - self._validators["hovertextsrc"] = v_scattergl.HovertextsrcValidator() - self._validators["ids"] = v_scattergl.IdsValidator() - self._validators["idssrc"] = v_scattergl.IdssrcValidator() - self._validators["legendgroup"] = v_scattergl.LegendgroupValidator() - self._validators["line"] = v_scattergl.LineValidator() - self._validators["marker"] = v_scattergl.MarkerValidator() - self._validators["meta"] = v_scattergl.MetaValidator() - self._validators["metasrc"] = v_scattergl.MetasrcValidator() - self._validators["mode"] = v_scattergl.ModeValidator() - self._validators["name"] = v_scattergl.NameValidator() - self._validators["opacity"] = v_scattergl.OpacityValidator() - self._validators["selected"] = v_scattergl.SelectedValidator() - self._validators["selectedpoints"] = v_scattergl.SelectedpointsValidator() - self._validators["showlegend"] = v_scattergl.ShowlegendValidator() - self._validators["stream"] = v_scattergl.StreamValidator() - self._validators["text"] = v_scattergl.TextValidator() - self._validators["textfont"] = v_scattergl.TextfontValidator() - self._validators["textposition"] = v_scattergl.TextpositionValidator() - self._validators["textpositionsrc"] = v_scattergl.TextpositionsrcValidator() - self._validators["textsrc"] = v_scattergl.TextsrcValidator() - self._validators["uid"] = v_scattergl.UidValidator() - self._validators["uirevision"] = v_scattergl.UirevisionValidator() - self._validators["unselected"] = v_scattergl.UnselectedValidator() - self._validators["visible"] = v_scattergl.VisibleValidator() - self._validators["x"] = v_scattergl.XValidator() - self._validators["x0"] = v_scattergl.X0Validator() - self._validators["xaxis"] = v_scattergl.XAxisValidator() - self._validators["xcalendar"] = v_scattergl.XcalendarValidator() - self._validators["xsrc"] = v_scattergl.XsrcValidator() - self._validators["y"] = v_scattergl.YValidator() - self._validators["y0"] = v_scattergl.Y0Validator() - self._validators["yaxis"] = v_scattergl.YAxisValidator() - self._validators["ycalendar"] = v_scattergl.YcalendarValidator() - self._validators["ysrc"] = v_scattergl.YsrcValidator() + self._validators["connectgaps"] = v_scatter3d.ConnectgapsValidator() + self._validators["customdata"] = v_scatter3d.CustomdataValidator() + self._validators["customdatasrc"] = v_scatter3d.CustomdatasrcValidator() + self._validators["error_x"] = v_scatter3d.ErrorXValidator() + self._validators["error_y"] = v_scatter3d.ErrorYValidator() + self._validators["error_z"] = v_scatter3d.ErrorZValidator() + self._validators["hoverinfo"] = v_scatter3d.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scatter3d.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scatter3d.HoverlabelValidator() + self._validators["hovertemplate"] = v_scatter3d.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_scatter3d.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scatter3d.HovertextValidator() + self._validators["hovertextsrc"] = v_scatter3d.HovertextsrcValidator() + self._validators["ids"] = v_scatter3d.IdsValidator() + self._validators["idssrc"] = v_scatter3d.IdssrcValidator() + self._validators["legendgroup"] = v_scatter3d.LegendgroupValidator() + self._validators["line"] = v_scatter3d.LineValidator() + self._validators["marker"] = v_scatter3d.MarkerValidator() + self._validators["meta"] = v_scatter3d.MetaValidator() + self._validators["metasrc"] = v_scatter3d.MetasrcValidator() + self._validators["mode"] = v_scatter3d.ModeValidator() + self._validators["name"] = v_scatter3d.NameValidator() + self._validators["opacity"] = v_scatter3d.OpacityValidator() + self._validators["projection"] = v_scatter3d.ProjectionValidator() + self._validators["scene"] = v_scatter3d.SceneValidator() + self._validators["showlegend"] = v_scatter3d.ShowlegendValidator() + self._validators["stream"] = v_scatter3d.StreamValidator() + self._validators["surfaceaxis"] = v_scatter3d.SurfaceaxisValidator() + self._validators["surfacecolor"] = v_scatter3d.SurfacecolorValidator() + self._validators["text"] = v_scatter3d.TextValidator() + self._validators["textfont"] = v_scatter3d.TextfontValidator() + self._validators["textposition"] = v_scatter3d.TextpositionValidator() + self._validators["textpositionsrc"] = v_scatter3d.TextpositionsrcValidator() + self._validators["textsrc"] = v_scatter3d.TextsrcValidator() + self._validators["texttemplate"] = v_scatter3d.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scatter3d.TexttemplatesrcValidator() + self._validators["uid"] = v_scatter3d.UidValidator() + self._validators["uirevision"] = v_scatter3d.UirevisionValidator() + self._validators["visible"] = v_scatter3d.VisibleValidator() + self._validators["x"] = v_scatter3d.XValidator() + self._validators["xcalendar"] = v_scatter3d.XcalendarValidator() + self._validators["xsrc"] = v_scatter3d.XsrcValidator() + self._validators["y"] = v_scatter3d.YValidator() + self._validators["ycalendar"] = v_scatter3d.YcalendarValidator() + self._validators["ysrc"] = v_scatter3d.YsrcValidator() + self._validators["z"] = v_scatter3d.ZValidator() + self._validators["zcalendar"] = v_scatter3d.ZcalendarValidator() + self._validators["zsrc"] = v_scatter3d.ZsrcValidator() # Populate data dict with properties # ---------------------------------- @@ -30824,18 +34741,12 @@ def __init__( self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v _v = arg.pop("error_x", None) self["error_x"] = error_x if error_x is not None else _v _v = arg.pop("error_y", None) self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v + _v = arg.pop("error_z", None) + self["error_z"] = error_z if error_z is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -30872,14 +34783,18 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("projection", None) + self["projection"] = projection if projection is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("surfaceaxis", None) + self["surfaceaxis"] = surfaceaxis if surfaceaxis is not None else _v + _v = arg.pop("surfacecolor", None) + self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) @@ -30890,42 +34805,42 @@ def __init__( self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v _v = arg.pop("xcalendar", None) self["xcalendar"] = xcalendar if xcalendar is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v _v = arg.pop("ycalendar", None) self["ycalendar"] = ycalendar if ycalendar is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zcalendar", None) + self["zcalendar"] = zcalendar if zcalendar is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scattergl" + self._props["type"] = "scatter3d" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattergl", val="scattergl" + plotly_name="type", parent_name="scatter3d", val="scatter3d" ) arg.pop("type", None) @@ -30942,7 +34857,30 @@ def __init__( import copy as _copy -class Scattergeo(_BaseTraceType): +class Scatter(_BaseTraceType): + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val # connectgaps # ----------- @@ -31008,18 +34946,235 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of plotly.graph_objs.scatter.ErrorX + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of plotly.graph_objs.scatter.ErrorY + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.scatter.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + # fill # ---- @property def fill(self): """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". "toself" connects the endpoints of the trace (or - each segment of the trace if it has gaps) into a closed shape. + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. The 'fill' property is an enumeration that may be specified as: - One of the following enumeration values: - ['none', 'toself'] + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] Returns ------- @@ -31092,30 +35247,34 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # geo - # --- + # groupnorm + # --------- @property - def geo(self): + def groupnorm(self): """ - Sets a reference between this trace's geospatial coordinates - and a geographic map. If "geo" (the default value), the - geospatial coordinates refer to `layout.geo`. If "geo2", the - geospatial coordinates refer to `layout.geo2`, and so on. + Only relevant when `stackgroup` is used, and only the first + `groupnorm` found in the `stackgroup` will be used - including + if `visible` is "legendonly" but not if it is `false`. Sets the + normalization for the sum of this `stackgroup`. With + "fraction", the value of each trace at each location is divided + by the sum of all trace values at that location. "percent" is + the same but multiplied by 100 to show percentages. If there + are multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. - The 'geo' property is an identifier of a particular - subplot, of type 'geo', that may be specified as the string 'geo' - optionally followed by an integer >= 1 - (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + The 'groupnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'fraction', 'percent'] Returns ------- - str + Any """ - return self["geo"] + return self["groupnorm"] - @geo.setter - def geo(self, val): - self["geo"] = val + @groupnorm.setter + def groupnorm(self, val): + self["groupnorm"] = val # hoverinfo # --------- @@ -31128,8 +35287,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['lon', 'lat', 'location', 'text', 'name'] joined with '+' characters - (e.g. 'lon+lat') + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -31170,7 +35329,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Hoverlabel + - An instance of plotly.graph_objs.scatter.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -31214,7 +35373,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scattergeo.Hoverlabel + plotly.graph_objs.scatter.Hoverlabel """ return self["hoverlabel"] @@ -31222,6 +35381,31 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hoveron + # ------- + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + # hovertemplate # ------------- @property @@ -31234,7 +35418,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -31284,12 +35472,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (lon,lat) pair or - item in `locations`. If a single string, the same string - appears over all the data points. If an array of string, the - items are mapped in order to the this trace's (lon,lat) or - `locations` coordinates. To be seen, trace `hoverinfo` must - contain a "text" flag. + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -31368,46 +35555,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- - @property - def lat(self): - """ - Sets the latitude coordinates (in degrees North). - - The 'lat' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # latsrc - # ------ - @property - def latsrc(self): - """ - Sets the source reference on plot.ly for lat . - - The 'latsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["latsrc"] - - @latsrc.setter - def latsrc(self, val): - self["latsrc"] = val - # legendgroup # ----------- @property @@ -31438,7 +35585,7 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Line + - An instance of plotly.graph_objs.scatter.Line - A dict of string/value properties that will be passed to the Line constructor @@ -31451,12 +35598,28 @@ def line(self): type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). + shape + Determines the line shape. With "spline" the + lines are drawn using spline interpolation. The + other available values correspond to step-wise + line shapes. + simplify + Simplifies lines by removing nearly-collinear + points. When transitioning lines, it may be + desirable to disable this so that the number of + points along the resulting SVG path is + unaffected. + smoothing + Has an effect only if `shape` is set to + "spline" Sets the amount of smoothing. 0 + corresponds to no smoothing (equivalent to a + "linear" shape). width Sets the line width (in px). Returns ------- - plotly.graph_objs.scattergeo.Line + plotly.graph_objs.scatter.Line """ return self["line"] @@ -31464,110 +35627,6 @@ def line(self): def line(self, val): self["line"] = val - # locationmode - # ------------ - @property - def locationmode(self): - """ - Determines the set of locations used to match entries in - `locations` to regions on the map. - - The 'locationmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['ISO-3', 'USA-states', 'country names'] - - Returns - ------- - Any - """ - return self["locationmode"] - - @locationmode.setter - def locationmode(self, val): - self["locationmode"] = val - - # locations - # --------- - @property - def locations(self): - """ - Sets the coordinates via location IDs or names. Coordinates - correspond to the centroid of each location given. See - `locationmode` for more info. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on plot.ly for locations . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude coordinates (in degrees East). - - The 'lon' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lon"] - - @lon.setter - def lon(self, val): - self["lon"] = val - - # lonsrc - # ------ - @property - def lonsrc(self): - """ - Sets the source reference on plot.ly for lon . - - The 'lonsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["lonsrc"] - - @lonsrc.setter - def lonsrc(self, val): - self["lonsrc"] = val - # marker # ------ @property @@ -31575,7 +35634,7 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Marker + - An instance of plotly.graph_objs.scatter.Marker - A dict of string/value properties that will be passed to the Marker constructor @@ -31635,7 +35694,7 @@ def marker(self): color scales can be linked to the same color axis. colorbar - plotly.graph_objects.scattergeo.marker.ColorBar + plotly.graph_objects.scatter.marker.ColorBar instance or dict with compatible properties colorscale Sets the colorscale. Has an effect only if in @@ -31657,11 +35716,14 @@ def marker(self): Sets the source reference on plot.ly for color . gradient - plotly.graph_objects.scattergeo.marker.Gradient + plotly.graph_objects.scatter.marker.Gradient instance or dict with compatible properties line - plotly.graph_objects.scattergeo.marker.Line + plotly.graph_objects.scatter.marker.Line instance or dict with compatible properties + maxdisplayed + Sets a maximum number of points to be drawn on + the graph. 0 corresponds to no limit. opacity Sets the marker opacity. opacitysrc @@ -31709,7 +35771,7 @@ def marker(self): Returns ------- - plotly.graph_objs.scattergeo.Marker + plotly.graph_objs.scatter.Marker """ return self["marker"] @@ -31835,6 +35897,74 @@ def opacity(self): def opacity(self, val): self["opacity"] = val + # orientation + # ----------- + @property + def orientation(self): + """ + Only relevant when `stackgroup` is used, and only the first + `orientation` found in the `stackgroup` will be used - + including if `visible` is "legendonly" but not if it is + `false`. Sets the stacking direction. With "v" ("h"), the y (x) + values of subsequent traces are added. Also affects the default + value of `fill`. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # r + # - + @property + def r(self): + """ + r coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the radial coordinatesfor + legacy polar chart only. + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on plot.ly for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + # selected # -------- @property @@ -31842,22 +35972,22 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Selected + - An instance of plotly.graph_objs.scatter.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.scattergeo.selected.Marker + plotly.graph_objects.scatter.selected.Marker instance or dict with compatible properties textfont - plotly.graph_objects.scattergeo.selected.Textfo - nt instance or dict with compatible properties + plotly.graph_objects.scatter.selected.Textfont + instance or dict with compatible properties Returns ------- - plotly.graph_objs.scattergeo.Selected + plotly.graph_objs.scatter.Selected """ return self["selected"] @@ -31910,6 +36040,66 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val + # stackgaps + # --------- + @property + def stackgaps(self): + """ + Only relevant when `stackgroup` is used, and only the first + `stackgaps` found in the `stackgroup` will be used - including + if `visible` is "legendonly" but not if it is `false`. + Determines how we handle locations at which other traces in + this group have data but this one does not. With *infer zero* + we insert a zero at these locations. With "interpolate" we + linearly interpolate between existing values, and extrapolate a + constant beyond the existing values. + + The 'stackgaps' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['infer zero', 'interpolate'] + + Returns + ------- + Any + """ + return self["stackgaps"] + + @stackgaps.setter + def stackgaps(self, val): + self["stackgaps"] = val + + # stackgroup + # ---------- + @property + def stackgroup(self): + """ + Set several scatter traces (on the same subplot) to the same + stackgroup in order to add their y values (or their x values if + `orientation` is "h"). If blank or omitted this trace will not + be stacked. Stacking also turns `fill` on by default, using + "tonexty" ("tonextx") if `orientation` is "h" ("v") and sets + the default `mode` to "lines" irrespective of point count. You + can only stack on a numeric (linear or log) axis. Traces in a + `stackgroup` will only fill to (or be filled to) other traces + in the same group. With multiple `stackgroup`s or some traces + stacked and some not, if fill-linked traces are not already + consecutive, the later ones will be pushed down in the drawing + order. + + The 'stackgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["stackgroup"] + + @stackgroup.setter + def stackgroup(self, val): + self["stackgroup"] = val + # stream # ------ @property @@ -31917,7 +36107,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Stream + - An instance of plotly.graph_objs.scatter.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -31935,26 +36125,47 @@ def stream(self): Returns ------- - plotly.graph_objs.scattergeo.Stream + plotly.graph_objs.scatter.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # t + # - + @property + def t(self): + """ + t coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the angular coordinatesfor + legacy polar chart only. + + The 't' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray """ - return self["stream"] + return self["t"] - @stream.setter - def stream(self, val): - self["stream"] = val + @t.setter + def t(self, val): + self["t"] = val # text # ---- @property def text(self): """ - Sets text elements associated with each (lon,lat) pair or item - in `locations`. If a single string, the same string appears - over all the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) or `locations` - coordinates. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. The 'text' property is a string and must be specified as: - A string @@ -31980,7 +36191,7 @@ def textfont(self): The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Textfont + - An instance of plotly.graph_objs.scatter.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -32018,7 +36229,7 @@ def textfont(self): Returns ------- - plotly.graph_objs.scattergeo.Textfont + plotly.graph_objs.scatter.Textfont """ return self["textfont"] @@ -32091,6 +36302,81 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # tsrc + # ---- + @property + def tsrc(self): + """ + Sets the source reference on plot.ly for t . + + The 'tsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tsrc"] + + @tsrc.setter + def tsrc(self, val): + self["tsrc"] = val + # uid # --- @property @@ -32153,23 +36439,22 @@ def unselected(self): """ The 'unselected' property is an instance of Unselected that may be specified as: - - An instance of plotly.graph_objs.scattergeo.Unselected + - An instance of plotly.graph_objs.scatter.Unselected - A dict of string/value properties that will be passed to the Unselected constructor Supported dict properties: marker - plotly.graph_objects.scattergeo.unselected.Mark - er instance or dict with compatible properties + plotly.graph_objects.scatter.unselected.Marker + instance or dict with compatible properties textfont - plotly.graph_objects.scattergeo.unselected.Text - font instance or dict with compatible - properties + plotly.graph_objects.scatter.unselected.Textfon + t instance or dict with compatible properties Returns ------- - plotly.graph_objs.scattergeo.Unselected + plotly.graph_objs.scatter.Unselected """ return self["unselected"] @@ -32200,6 +36485,226 @@ def visible(self): def visible(self, val): self["visible"] = val + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on plot.ly for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + # type # ---- @property @@ -32217,6 +36722,12 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -32227,21 +36738,54 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + plotly.graph_objects.scatter.ErrorX instance or dict + with compatible properties + error_y + plotly.graph_objects.scatter.ErrorY instance or dict + with compatible properties fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -32250,8 +36794,14 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scattergeo.Hoverlabel instance or + plotly.graph_objects.scatter.Hoverlabel instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -32260,7 +36810,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -32274,12 +36829,12 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (lon,lat) - pair or item in `locations`. If a single string, the - same string appears over all the data points. If an - array of string, the items are mapped in order to the - this trace's (lon,lat) or `locations` coordinates. To - be seen, trace `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -32288,32 +36843,15 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scattergeo.Line instance or dict - with compatible properties - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. - locations - Sets the coordinates via location IDs or names. - Coordinates correspond to the centroid of each location - given. See `locationmode` for more info. - locationssrc - Sets the source reference on plot.ly for locations . - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on plot.ly for lon . + plotly.graph_objects.scatter.Line instance or dict with + compatible properties marker - plotly.graph_objects.scattergeo.Marker instance or dict + plotly.graph_objects.scatter.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -32342,9 +36880,22 @@ def _prop_descriptions(self): legend item and on hover. opacity Sets the opacity of the trace. + orientation + Only relevant when `stackgroup` is used, and only the + first `orientation` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the stacking direction. With "v" + ("h"), the y (x) values of subsequent traces are added. + Also affects the default value of `fill`. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on plot.ly for r . selected - plotly.graph_objects.scattergeo.Selected instance or - dict with compatible properties + plotly.graph_objects.scatter.Selected instance or dict + with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -32355,18 +36906,45 @@ def _prop_descriptions(self): showlegend Determines whether or not an item corresponding to this trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. stream - plotly.graph_objects.scattergeo.Stream instance or dict + plotly.graph_objects.scatter.Stream instance or dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. text - Sets text elements associated with each (lon,lat) pair - or item in `locations`. If a single string, the same - string appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (lon,lat) or `locations` coordinates. If trace - `hoverinfo` contains a "text" flag and "hovertext" is - not set, these elements will be seen in the hover - labels. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textfont Sets the text font. textposition @@ -32377,6 +36955,27 @@ def _prop_descriptions(self): . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tsrc + Sets the source reference on plot.ly for t . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -32400,76 +36999,132 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scattergeo.Unselected instance or + plotly.graph_objects.scatter.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . """ def __init__( self, arg=None, + cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, fill=None, fillcolor=None, - geo=None, + groupnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - lat=None, - latsrc=None, legendgroup=None, line=None, - locationmode=None, - locations=None, - locationssrc=None, - lon=None, - lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, + orientation=None, + r=None, + rsrc=None, selected=None, selectedpoints=None, showlegend=None, + stackgaps=None, + stackgroup=None, stream=None, + t=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tsrc=None, uid=None, uirevision=None, unselected=None, visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, **kwargs ): """ - Construct a new Scattergeo object + Construct a new Scatter object - The data visualized as scatter point or lines on a geographic - map is provided either by longitude/latitude pairs in `lon` and - `lat` respectively or by geographic location IDs or names in - `locations`. + The scatter trace type encompasses line charts, scatter charts, + text charts, and bubble charts. The data visualized as scatter + point or lines is set in `x` and `y`. Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scattergeo + an instance of plotly.graph_objs.Scatter + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -32480,21 +37135,54 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + plotly.graph_objects.scatter.ErrorX instance or dict + with compatible properties + error_y + plotly.graph_objects.scatter.ErrorY instance or dict + with compatible properties fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". "toself" connects the + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. fillcolor Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -32503,8 +37191,14 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scattergeo.Hoverlabel instance or + plotly.graph_objects.scatter.Hoverlabel instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -32513,7 +37207,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -32527,12 +37226,12 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (lon,lat) - pair or item in `locations`. If a single string, the - same string appears over all the data points. If an - array of string, the items are mapped in order to the - this trace's (lon,lat) or `locations` coordinates. To - be seen, trace `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -32541,32 +37240,15 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on plot.ly for lat . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. line - plotly.graph_objects.scattergeo.Line instance or dict - with compatible properties - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. - locations - Sets the coordinates via location IDs or names. - Coordinates correspond to the centroid of each location - given. See `locationmode` for more info. - locationssrc - Sets the source reference on plot.ly for locations . - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on plot.ly for lon . + plotly.graph_objects.scatter.Line instance or dict with + compatible properties marker - plotly.graph_objects.scattergeo.Marker instance or dict + plotly.graph_objects.scatter.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -32595,9 +37277,22 @@ def __init__( legend item and on hover. opacity Sets the opacity of the trace. + orientation + Only relevant when `stackgroup` is used, and only the + first `orientation` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the stacking direction. With "v" + ("h"), the y (x) values of subsequent traces are added. + Also affects the default value of `fill`. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on plot.ly for r . selected - plotly.graph_objects.scattergeo.Selected instance or - dict with compatible properties + plotly.graph_objects.scatter.Selected instance or dict + with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -32608,18 +37303,45 @@ def __init__( showlegend Determines whether or not an item corresponding to this trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. stream - plotly.graph_objects.scattergeo.Stream instance or dict + plotly.graph_objects.scatter.Stream instance or dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. text - Sets text elements associated with each (lon,lat) pair - or item in `locations`. If a single string, the same - string appears over all the data points. If an array of - string, the items are mapped in order to the this - trace's (lon,lat) or `locations` coordinates. If trace - `hoverinfo` contains a "text" flag and "hovertext" is - not set, these elements will be seen in the hover - labels. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textfont Sets the text font. textposition @@ -32630,6 +37352,27 @@ def __init__( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tsrc + Sets the source reference on plot.ly for t . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -32653,19 +37396,49 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.scattergeo.Unselected instance or + plotly.graph_objects.scatter.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . Returns ------- - Scattergeo + Scatter """ - super(Scattergeo, self).__init__("scattergeo") + super(Scatter, self).__init__("scatter") # Validate arg # ------------ @@ -32678,9 +37451,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scattergeo +The first argument to the plotly.graph_objs.Scatter constructor must be a dict or -an instance of plotly.graph_objs.Scattergeo""" +an instance of plotly.graph_objs.Scatter""" ) # Handle skip_invalid @@ -32689,74 +37462,104 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scattergeo as v_scattergeo + from plotly.validators import scatter as v_scatter # Initialize validators # --------------------- - self._validators["connectgaps"] = v_scattergeo.ConnectgapsValidator() - self._validators["customdata"] = v_scattergeo.CustomdataValidator() - self._validators["customdatasrc"] = v_scattergeo.CustomdatasrcValidator() - self._validators["fill"] = v_scattergeo.FillValidator() - self._validators["fillcolor"] = v_scattergeo.FillcolorValidator() - self._validators["geo"] = v_scattergeo.GeoValidator() - self._validators["hoverinfo"] = v_scattergeo.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattergeo.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattergeo.HoverlabelValidator() - self._validators["hovertemplate"] = v_scattergeo.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scattergeo.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattergeo.HovertextValidator() - self._validators["hovertextsrc"] = v_scattergeo.HovertextsrcValidator() - self._validators["ids"] = v_scattergeo.IdsValidator() - self._validators["idssrc"] = v_scattergeo.IdssrcValidator() - self._validators["lat"] = v_scattergeo.LatValidator() - self._validators["latsrc"] = v_scattergeo.LatsrcValidator() - self._validators["legendgroup"] = v_scattergeo.LegendgroupValidator() - self._validators["line"] = v_scattergeo.LineValidator() - self._validators["locationmode"] = v_scattergeo.LocationmodeValidator() - self._validators["locations"] = v_scattergeo.LocationsValidator() - self._validators["locationssrc"] = v_scattergeo.LocationssrcValidator() - self._validators["lon"] = v_scattergeo.LonValidator() - self._validators["lonsrc"] = v_scattergeo.LonsrcValidator() - self._validators["marker"] = v_scattergeo.MarkerValidator() - self._validators["meta"] = v_scattergeo.MetaValidator() - self._validators["metasrc"] = v_scattergeo.MetasrcValidator() - self._validators["mode"] = v_scattergeo.ModeValidator() - self._validators["name"] = v_scattergeo.NameValidator() - self._validators["opacity"] = v_scattergeo.OpacityValidator() - self._validators["selected"] = v_scattergeo.SelectedValidator() - self._validators["selectedpoints"] = v_scattergeo.SelectedpointsValidator() - self._validators["showlegend"] = v_scattergeo.ShowlegendValidator() - self._validators["stream"] = v_scattergeo.StreamValidator() - self._validators["text"] = v_scattergeo.TextValidator() - self._validators["textfont"] = v_scattergeo.TextfontValidator() - self._validators["textposition"] = v_scattergeo.TextpositionValidator() - self._validators["textpositionsrc"] = v_scattergeo.TextpositionsrcValidator() - self._validators["textsrc"] = v_scattergeo.TextsrcValidator() - self._validators["uid"] = v_scattergeo.UidValidator() - self._validators["uirevision"] = v_scattergeo.UirevisionValidator() - self._validators["unselected"] = v_scattergeo.UnselectedValidator() - self._validators["visible"] = v_scattergeo.VisibleValidator() + self._validators["cliponaxis"] = v_scatter.CliponaxisValidator() + self._validators["connectgaps"] = v_scatter.ConnectgapsValidator() + self._validators["customdata"] = v_scatter.CustomdataValidator() + self._validators["customdatasrc"] = v_scatter.CustomdatasrcValidator() + self._validators["dx"] = v_scatter.DxValidator() + self._validators["dy"] = v_scatter.DyValidator() + self._validators["error_x"] = v_scatter.ErrorXValidator() + self._validators["error_y"] = v_scatter.ErrorYValidator() + self._validators["fill"] = v_scatter.FillValidator() + self._validators["fillcolor"] = v_scatter.FillcolorValidator() + self._validators["groupnorm"] = v_scatter.GroupnormValidator() + self._validators["hoverinfo"] = v_scatter.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_scatter.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_scatter.HoverlabelValidator() + self._validators["hoveron"] = v_scatter.HoveronValidator() + self._validators["hovertemplate"] = v_scatter.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_scatter.HovertemplatesrcValidator() + self._validators["hovertext"] = v_scatter.HovertextValidator() + self._validators["hovertextsrc"] = v_scatter.HovertextsrcValidator() + self._validators["ids"] = v_scatter.IdsValidator() + self._validators["idssrc"] = v_scatter.IdssrcValidator() + self._validators["legendgroup"] = v_scatter.LegendgroupValidator() + self._validators["line"] = v_scatter.LineValidator() + self._validators["marker"] = v_scatter.MarkerValidator() + self._validators["meta"] = v_scatter.MetaValidator() + self._validators["metasrc"] = v_scatter.MetasrcValidator() + self._validators["mode"] = v_scatter.ModeValidator() + self._validators["name"] = v_scatter.NameValidator() + self._validators["opacity"] = v_scatter.OpacityValidator() + self._validators["orientation"] = v_scatter.OrientationValidator() + self._validators["r"] = v_scatter.RValidator() + self._validators["rsrc"] = v_scatter.RsrcValidator() + self._validators["selected"] = v_scatter.SelectedValidator() + self._validators["selectedpoints"] = v_scatter.SelectedpointsValidator() + self._validators["showlegend"] = v_scatter.ShowlegendValidator() + self._validators["stackgaps"] = v_scatter.StackgapsValidator() + self._validators["stackgroup"] = v_scatter.StackgroupValidator() + self._validators["stream"] = v_scatter.StreamValidator() + self._validators["t"] = v_scatter.TValidator() + self._validators["text"] = v_scatter.TextValidator() + self._validators["textfont"] = v_scatter.TextfontValidator() + self._validators["textposition"] = v_scatter.TextpositionValidator() + self._validators["textpositionsrc"] = v_scatter.TextpositionsrcValidator() + self._validators["textsrc"] = v_scatter.TextsrcValidator() + self._validators["texttemplate"] = v_scatter.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_scatter.TexttemplatesrcValidator() + self._validators["tsrc"] = v_scatter.TsrcValidator() + self._validators["uid"] = v_scatter.UidValidator() + self._validators["uirevision"] = v_scatter.UirevisionValidator() + self._validators["unselected"] = v_scatter.UnselectedValidator() + self._validators["visible"] = v_scatter.VisibleValidator() + self._validators["x"] = v_scatter.XValidator() + self._validators["x0"] = v_scatter.X0Validator() + self._validators["xaxis"] = v_scatter.XAxisValidator() + self._validators["xcalendar"] = v_scatter.XcalendarValidator() + self._validators["xsrc"] = v_scatter.XsrcValidator() + self._validators["y"] = v_scatter.YValidator() + self._validators["y0"] = v_scatter.Y0Validator() + self._validators["yaxis"] = v_scatter.YAxisValidator() + self._validators["ycalendar"] = v_scatter.YcalendarValidator() + self._validators["ysrc"] = v_scatter.YsrcValidator() # Populate data dict with properties # ---------------------------------- + _v = arg.pop("cliponaxis", None) + self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v _v = arg.pop("connectgaps", None) self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v + _v = arg.pop("error_x", None) + self["error_x"] = error_x if error_x is not None else _v + _v = arg.pop("error_y", None) + self["error_y"] = error_y if error_y is not None else _v _v = arg.pop("fill", None) self["fill"] = fill if fill is not None else _v _v = arg.pop("fillcolor", None) self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("geo", None) - self["geo"] = geo if geo is not None else _v + _v = arg.pop("groupnorm", None) + self["groupnorm"] = groupnorm if groupnorm is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -32771,24 +37574,10 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("latsrc", None) - self["latsrc"] = latsrc if latsrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v _v = arg.pop("line", None) self["line"] = line if line is not None else _v - _v = arg.pop("locationmode", None) - self["locationmode"] = locationmode if locationmode is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("lonsrc", None) - self["lonsrc"] = lonsrc if lonsrc is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) @@ -32801,14 +37590,26 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v + _v = arg.pop("r", None) + self["r"] = r if r is not None else _v + _v = arg.pop("rsrc", None) + self["rsrc"] = rsrc if rsrc is not None else _v _v = arg.pop("selected", None) self["selected"] = selected if selected is not None else _v _v = arg.pop("selectedpoints", None) self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("stackgaps", None) + self["stackgaps"] = stackgaps if stackgaps is not None else _v + _v = arg.pop("stackgroup", None) + self["stackgroup"] = stackgroup if stackgroup is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("t", None) + self["t"] = t if t is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) @@ -32819,6 +37620,12 @@ def __init__( self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("tsrc", None) + self["tsrc"] = tsrc if tsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -32827,14 +37634,34 @@ def __init__( self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scattergeo" + self._props["type"] = "scatter" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattergeo", val="scattergeo" + plotly_name="type", parent_name="scatter", val="scatter" ) arg.pop("type", None) @@ -32844,138 +37671,41 @@ def __init__( # Reset skip_invalid # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scattercarpet(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - Sets the a-axis coordinates. - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on plot.ly for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val - - # b - # - - @property - def b(self): - """ - Sets the b-axis coordinates. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # bsrc - # ---- - @property - def bsrc(self): - """ - Sets the source reference on plot.ly for b . - - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bsrc"] + self._skip_invalid = False - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val - # carpet - # ------ - @property - def carpet(self): - """ - An identifier for this carpet, so that `scattercarpet` and - `scattercontour` traces can specify a carpet plot on which they - lie - - The 'carpet' property is a string and must be specified as: - - A string - - A number that will be converted to a string +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - str - """ - return self["carpet"] - @carpet.setter - def carpet(self, val): - self["carpet"] = val +class Sankey(_BaseTraceType): - # connectgaps + # arrangement # ----------- @property - def connectgaps(self): + def arrangement(self): """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. + If value is `snap` (the default), the node arrangement is + assisted by automatic snapping of elements to preserve space + between nodes specified via `nodepad`. If value is + `perpendicular`, the nodes can only move along a line + perpendicular to the flow. If value is `freeform`, the nodes + can freely move on the plane. If value is `fixed`, the nodes + are stationary. - The 'connectgaps' property must be specified as a bool - (either True, or False) + The 'arrangement' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['snap', 'perpendicular', 'freeform', 'fixed'] Returns ------- - bool + Any """ - return self["connectgaps"] + return self["arrangement"] - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val + @arrangement.setter + def arrangement(self, val): + self["arrangement"] = val # customdata # ---------- @@ -33020,95 +37750,41 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fill - # ---- - @property - def fill(self): - """ - Sets the area to fill with a solid color. Use with `fillcolor` - if not "none". scatterternary has a subset of the options - available to scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has gaps) into a - closed shape. "tonext" fills the space between two traces if - one completely encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is no trace before - it. "tonext" should not be used if one trace does not enclose - the other. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'toself', 'tonext'] - - Returns - ------- - Any - """ - return self["fill"] - - @fill.setter - def fill(self, val): - self["fill"] = val - - # fillcolor - # --------- + # domain + # ------ @property - def fillcolor(self): + def domain(self): """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.sankey.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this sankey trace . + row + If there is a layout grid, use the domain for + this row in the grid for this sankey trace . + x + Sets the horizontal domain of this sankey trace + (in plot fraction). + y + Sets the vertical domain of this sankey trace + (in plot fraction). Returns ------- - str + plotly.graph_objs.sankey.Domain """ - return self["fillcolor"] + return self["domain"] - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val + @domain.setter + def domain(self, val): + self["domain"] = val # hoverinfo # --------- @@ -33118,17 +37794,18 @@ def hoverinfo(self): Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. + Note that this attribute is superseded by `node.hoverinfo` and + `node.hoverinfo` for nodes and links respectively. The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['a', 'b', 'text', 'name'] joined with '+' characters - (e.g. 'a+b') + - Any combination of [] joined with '+' characters + (e.g. '') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above Returns ------- - Any|numpy.ndarray + Any """ return self["hoverinfo"] @@ -33136,26 +37813,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on plot.ly for hoverinfo . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - # hoverlabel # ---------- @property @@ -33163,7 +37820,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Hoverlabel + - An instance of plotly.graph_objs.sankey.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -33207,7 +37864,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scattercarpet.Hoverlabel + plotly.graph_objs.sankey.Hoverlabel """ return self["hoverlabel"] @@ -33215,134 +37872,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets hover text elements associated with each (a,b) point. If a - single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b). To be seen, trace `hoverinfo` - must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on plot.ly for hovertext . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - # ids # --- @property @@ -33385,223 +37914,116 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line + # link # ---- @property - def line(self): + def link(self): """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Line - - A dict of string/value properties that will be passed - to the Line constructor + The links of the Sankey plot. - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scattercarpet.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker + The 'link' property is an instance of Link that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Marker + - An instance of plotly.graph_objs.sankey.Link - A dict of string/value properties that will be passed - to the Marker constructor + to the Link constructor Supported dict properties: - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.scattercarpet.marker.Color - Bar instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. + Sets the `link` color. It can be a single + value, or an array for specifying color for + each `link`. If `link.color` is omitted, then + by default, a translucent grey link will be + used. + colorscales + A tuple of + plotly.graph_objects.sankey.link.Colorscale + instances or dicts with compatible properties + colorscaledefaults + When used in a template (as layout.template.dat + a.sankey.link.colorscaledefaults), sets the + default property values to use for elements of + sankey.link.colorscales colorsrc Sets the source reference on plot.ly for color . - gradient - plotly.graph_objects.scattercarpet.marker.Gradi - ent instance or dict with compatible properties + hoverinfo + Determines which trace information appear when + hovering links. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverlabel + plotly.graph_objects.sankey.link.Hoverlabel + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plot.ly/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for + hovertemplate . + label + The shown name of the link. + labelsrc + Sets the source reference on plot.ly for label + . line - plotly.graph_objects.scattercarpet.marker.Line - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc + plotly.graph_objects.sankey.link.Line instance + or dict with compatible properties + source + An integer number `[0..nodes.length - 1]` that + represents the source node. + sourcesrc Sets the source reference on plot.ly for - opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on plot.ly for size - . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc + source . + target + An integer number `[0..nodes.length - 1]` that + represents the target node. + targetsrc Sets the source reference on plot.ly for - symbol . + target . + value + A numeric value representing the flow volume + value. + valuesrc + Sets the source reference on plot.ly for value + . Returns ------- - plotly.graph_objs.scattercarpet.Marker + plotly.graph_objs.sankey.Link """ - return self["marker"] + return self["link"] - @marker.setter - def marker(self, val): - self["marker"] = val + @link.setter + def link(self, val): + self["link"] = val # meta # ---- @@ -33651,34 +38073,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - # name # ---- @property @@ -33701,56 +38095,128 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- + # node + # ---- @property - def opacity(self): + def node(self): """ - Sets the opacity of the trace. + The nodes of the Sankey plot. - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'node' property is an instance of Node + that may be specified as: + - An instance of plotly.graph_objs.sankey.Node + - A dict of string/value properties that will be passed + to the Node constructor + + Supported dict properties: + + color + Sets the `node` color. It can be a single + value, or an array for specifying color for + each `node`. If `node.color` is omitted, then + the default `Plotly` color palette will be + cycled through to have a variety of colors. + These defaults are not fully opaque, to allow + some visibility of what is beneath the node. + colorsrc + Sets the source reference on plot.ly for color + . + groups + Groups of nodes. Each group is defined by an + array with the indices of the nodes it + contains. Multiple groups can be specified. + hoverinfo + Determines which trace information appear when + hovering nodes. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverlabel + plotly.graph_objects.sankey.node.Hoverlabel + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plot.ly/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `value` and `label`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for + hovertemplate . + label + The shown name of the node. + labelsrc + Sets the source reference on plot.ly for label + . + line + plotly.graph_objects.sankey.node.Line instance + or dict with compatible properties + pad + Sets the padding (in px) between the `nodes`. + thickness + Sets the thickness (in px) of the `nodes`. + x + The normalized horizontal position of the node. + xsrc + Sets the source reference on plot.ly for x . + y + The normalized vertical position of the node. + ysrc + Sets the source reference on plot.ly for y . Returns ------- - int|float + plotly.graph_objs.sankey.Node """ - return self["opacity"] + return self["node"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @node.setter + def node(self, val): + self["node"] = val - # selected - # -------- + # orientation + # ----------- @property - def selected(self): + def orientation(self): """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Selected - - A dict of string/value properties that will be passed - to the Selected constructor + Sets the orientation of the Sankey diagram. - Supported dict properties: - - marker - plotly.graph_objects.scattercarpet.selected.Mar - ker instance or dict with compatible properties - textfont - plotly.graph_objects.scattercarpet.selected.Tex - tfont instance or dict with compatible - properties + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] Returns ------- - plotly.graph_objs.scattercarpet.Selected + Any """ - return self["selected"] + return self["orientation"] - @selected.setter - def selected(self, val): - self["selected"] = val + @orientation.setter + def orientation(self, val): + self["orientation"] = val # selectedpoints # -------------- @@ -33776,27 +38242,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- - @property - def showlegend(self): - """ - Determines whether or not an item corresponding to this trace - is shown in the legend. - - The 'showlegend' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showlegend"] - - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val - # stream # ------ @property @@ -33804,7 +38249,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Stream + - An instance of plotly.graph_objs.sankey.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -33822,7 +38267,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scattercarpet.Stream + plotly.graph_objs.sankey.Stream """ return self["stream"] @@ -33830,43 +38275,16 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (a,b) point. If a - single string, the same string appears over all the data - points. If an array of strings, the items are mapped in order - to the the data points in (a,b). If trace `hoverinfo` contains - a "text" flag and "hovertext" is not set, these elements will - be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - # textfont # -------- @property def textfont(self): """ - Sets the text font. + Sets the font for node labels The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Textfont + - An instance of plotly.graph_objs.sankey.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -33874,9 +38292,6 @@ def textfont(self): color - colorsrc - Sets the source reference on plot.ly for color - . family HTML font family - the typeface that will be applied by the web browser. The web browser @@ -33893,18 +38308,11 @@ def textfont(self): Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . size - - sizesrc - Sets the source reference on plot.ly for size - . Returns ------- - plotly.graph_objs.scattercarpet.Textfont + plotly.graph_objs.sankey.Textfont """ return self["textfont"] @@ -33912,71 +38320,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ - @property - def textposition(self): - """ - Sets the positions of the `text` elements with respects to the - (x,y) coordinates. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top left', 'top center', 'top right', 'middle left', - 'middle center', 'middle right', 'bottom left', 'bottom - center', 'bottom right'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on plot.ly for textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on plot.ly for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - # uid # --- @property @@ -34032,37 +38375,51 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- + # valueformat + # ----------- @property - def unselected(self): + def valueformat(self): """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.scattercarpet.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor + Sets the value formatting rule using d3 formatting mini- + language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format - Supported dict properties: - - marker - plotly.graph_objects.scattercarpet.unselected.M - arker instance or dict with compatible - properties - textfont - plotly.graph_objects.scattercarpet.unselected.T - extfont instance or dict with compatible - properties + The 'valueformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.scattercarpet.Unselected + str """ - return self["unselected"] + return self["valueformat"] - @unselected.setter - def unselected(self, val): - self["unselected"] = val + @valueformat.setter + def valueformat(self, val): + self["valueformat"] = val + + # valuesuffix + # ----------- + @property + def valuesuffix(self): + """ + Adds a unit to follow the value in the hover tooltip. Add a + space if a separation is necessary from the value. + + The 'valuesuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valuesuffix"] + + @valuesuffix.setter + def valuesuffix(self, val): + self["valuesuffix"] = val # visible # ------- @@ -34087,56 +38444,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - # type # ---- @property @@ -34149,26 +38456,19 @@ def type(self): def _parent_path_str(self): return "" - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - a - Sets the a-axis coordinates. - asrc - Sets the source reference on plot.ly for a . - b - Sets the b-axis coordinates. - bsrc - Sets the source reference on plot.ly for b . - carpet - An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -34176,82 +38476,27 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. + domain + plotly.graph_objects.sankey.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. hoverlabel - plotly.graph_objects.scattercarpet.Hoverlabel instance - or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets hover text elements associated with each (a,b) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b). To - be seen, trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + plotly.graph_objects.sankey.Hoverlabel instance or dict + with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.scattercarpet.Line instance or - dict with compatible properties - marker - plotly.graph_objects.scattercarpet.Marker instance or - dict with compatible properties + link + The links of the Sankey plot. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -34267,21 +38512,13 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - plotly.graph_objects.scattercarpet.Selected instance or - dict with compatible properties + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -34289,30 +38526,11 @@ def _prop_descriptions(self): the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. stream - plotly.graph_objects.scattercarpet.Stream instance or - dict with compatible properties - text - Sets text elements associated with each (a,b) point. If - a single string, the same string appears over all the - data points. If an array of strings, the items are - mapped in order to the the data points in (a,b). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + plotly.graph_objects.sankey.Stream instance or dict + with compatible properties textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . + Sets the font for node labels uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -34335,100 +38553,70 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.scattercarpet.Unselected instance - or dict with compatible properties + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. """ def __init__( self, arg=None, - a=None, - asrc=None, - b=None, - bsrc=None, - carpet=None, - connectgaps=None, + arrangement=None, customdata=None, customdatasrc=None, - fill=None, - fillcolor=None, + domain=None, hoverinfo=None, - hoverinfosrc=None, hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, ids=None, idssrc=None, - legendgroup=None, - line=None, - marker=None, + link=None, meta=None, metasrc=None, - mode=None, name=None, - opacity=None, - selected=None, + node=None, + orientation=None, selectedpoints=None, - showlegend=None, stream=None, - text=None, textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, uid=None, uirevision=None, - unselected=None, + valueformat=None, + valuesuffix=None, visible=None, - xaxis=None, - yaxis=None, **kwargs ): """ - Construct a new Scattercarpet object + Construct a new Sankey object - Plots a scatter trace on either the first carpet axis or the - carpet axis with a matching `carpet` attribute. + Sankey plots for network flow data analysis. The nodes are + specified in `nodes` and the links between sources and targets + in `links`. The colors are set in `nodes[i].color` and + `links[i].color`, otherwise defaults are used. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scattercarpet - a - Sets the a-axis coordinates. - asrc - Sets the source reference on plot.ly for a . - b - Sets the b-axis coordinates. - bsrc - Sets the source reference on plot.ly for b . - carpet - An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. + an instance of plotly.graph_objs.Sankey + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -34436,82 +38624,27 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - fill - Sets the area to fill with a solid color. Use with - `fillcolor` if not "none". scatterternary has a subset - of the options available to scatter. "toself" connects - the endpoints of the trace (or each segment of the - trace if it has gaps) into a closed shape. "tonext" - fills the space between two traces if one completely - encloses the other (eg consecutive contour lines), and - behaves like "toself" if there is no trace before it. - "tonext" should not be used if one trace does not - enclose the other. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. + domain + plotly.graph_objects.sankey.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. hoverlabel - plotly.graph_objects.scattercarpet.Hoverlabel instance - or dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets hover text elements associated with each (a,b) - point. If a single string, the same string appears over - all the data points. If an array of strings, the items - are mapped in order to the the data points in (a,b). To - be seen, trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + plotly.graph_objects.sankey.Hoverlabel instance or dict + with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.scattercarpet.Line instance or - dict with compatible properties - marker - plotly.graph_objects.scattercarpet.Marker instance or - dict with compatible properties + link + The links of the Sankey plot. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -34527,21 +38660,13 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - plotly.graph_objects.scattercarpet.Selected instance or - dict with compatible properties + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -34549,30 +38674,11 @@ def __init__( the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. stream - plotly.graph_objects.scattercarpet.Stream instance or - dict with compatible properties - text - Sets text elements associated with each (a,b) point. If - a single string, the same string appears over all the - data points. If an array of strings, the items are - mapped in order to the the data points in (a,b). If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + plotly.graph_objects.sankey.Stream instance or dict + with compatible properties textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . + Sets the font for node labels uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -34595,30 +38701,26 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.scattercarpet.Unselected instance - or dict with compatible properties + valueformat + Sets the value formatting rule using d3 formatting + mini-language which is similar to those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. Returns ------- - Scattercarpet + Sankey """ - super(Scattercarpet, self).__init__("scattercarpet") + super(Sankey, self).__init__("sankey") # Validate arg # ------------ @@ -34631,9 +38733,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scattercarpet +The first argument to the plotly.graph_objs.Sankey constructor must be a dict or -an instance of plotly.graph_objs.Scattercarpet""" +an instance of plotly.graph_objs.Sankey""" ) # Handle skip_invalid @@ -34642,154 +38744,87 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scattercarpet as v_scattercarpet + from plotly.validators import sankey as v_sankey # Initialize validators # --------------------- - self._validators["a"] = v_scattercarpet.AValidator() - self._validators["asrc"] = v_scattercarpet.AsrcValidator() - self._validators["b"] = v_scattercarpet.BValidator() - self._validators["bsrc"] = v_scattercarpet.BsrcValidator() - self._validators["carpet"] = v_scattercarpet.CarpetValidator() - self._validators["connectgaps"] = v_scattercarpet.ConnectgapsValidator() - self._validators["customdata"] = v_scattercarpet.CustomdataValidator() - self._validators["customdatasrc"] = v_scattercarpet.CustomdatasrcValidator() - self._validators["fill"] = v_scattercarpet.FillValidator() - self._validators["fillcolor"] = v_scattercarpet.FillcolorValidator() - self._validators["hoverinfo"] = v_scattercarpet.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scattercarpet.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scattercarpet.HoverlabelValidator() - self._validators["hoveron"] = v_scattercarpet.HoveronValidator() - self._validators["hovertemplate"] = v_scattercarpet.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_scattercarpet.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scattercarpet.HovertextValidator() - self._validators["hovertextsrc"] = v_scattercarpet.HovertextsrcValidator() - self._validators["ids"] = v_scattercarpet.IdsValidator() - self._validators["idssrc"] = v_scattercarpet.IdssrcValidator() - self._validators["legendgroup"] = v_scattercarpet.LegendgroupValidator() - self._validators["line"] = v_scattercarpet.LineValidator() - self._validators["marker"] = v_scattercarpet.MarkerValidator() - self._validators["meta"] = v_scattercarpet.MetaValidator() - self._validators["metasrc"] = v_scattercarpet.MetasrcValidator() - self._validators["mode"] = v_scattercarpet.ModeValidator() - self._validators["name"] = v_scattercarpet.NameValidator() - self._validators["opacity"] = v_scattercarpet.OpacityValidator() - self._validators["selected"] = v_scattercarpet.SelectedValidator() - self._validators["selectedpoints"] = v_scattercarpet.SelectedpointsValidator() - self._validators["showlegend"] = v_scattercarpet.ShowlegendValidator() - self._validators["stream"] = v_scattercarpet.StreamValidator() - self._validators["text"] = v_scattercarpet.TextValidator() - self._validators["textfont"] = v_scattercarpet.TextfontValidator() - self._validators["textposition"] = v_scattercarpet.TextpositionValidator() - self._validators["textpositionsrc"] = v_scattercarpet.TextpositionsrcValidator() - self._validators["textsrc"] = v_scattercarpet.TextsrcValidator() - self._validators["uid"] = v_scattercarpet.UidValidator() - self._validators["uirevision"] = v_scattercarpet.UirevisionValidator() - self._validators["unselected"] = v_scattercarpet.UnselectedValidator() - self._validators["visible"] = v_scattercarpet.VisibleValidator() - self._validators["xaxis"] = v_scattercarpet.XAxisValidator() - self._validators["yaxis"] = v_scattercarpet.YAxisValidator() + self._validators["arrangement"] = v_sankey.ArrangementValidator() + self._validators["customdata"] = v_sankey.CustomdataValidator() + self._validators["customdatasrc"] = v_sankey.CustomdatasrcValidator() + self._validators["domain"] = v_sankey.DomainValidator() + self._validators["hoverinfo"] = v_sankey.HoverinfoValidator() + self._validators["hoverlabel"] = v_sankey.HoverlabelValidator() + self._validators["ids"] = v_sankey.IdsValidator() + self._validators["idssrc"] = v_sankey.IdssrcValidator() + self._validators["link"] = v_sankey.LinkValidator() + self._validators["meta"] = v_sankey.MetaValidator() + self._validators["metasrc"] = v_sankey.MetasrcValidator() + self._validators["name"] = v_sankey.NameValidator() + self._validators["node"] = v_sankey.NodeValidator() + self._validators["orientation"] = v_sankey.OrientationValidator() + self._validators["selectedpoints"] = v_sankey.SelectedpointsValidator() + self._validators["stream"] = v_sankey.StreamValidator() + self._validators["textfont"] = v_sankey.TextfontValidator() + self._validators["uid"] = v_sankey.UidValidator() + self._validators["uirevision"] = v_sankey.UirevisionValidator() + self._validators["valueformat"] = v_sankey.ValueformatValidator() + self._validators["valuesuffix"] = v_sankey.ValuesuffixValidator() + self._validators["visible"] = v_sankey.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v + _v = arg.pop("arrangement", None) + self["arrangement"] = arrangement if arrangement is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v + _v = arg.pop("link", None) + self["link"] = link if link is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v + _v = arg.pop("node", None) + self["node"] = node if node is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v _v = arg.pop("selectedpoints", None) self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v + _v = arg.pop("valueformat", None) + self["valueformat"] = valueformat if valueformat is not None else _v + _v = arg.pop("valuesuffix", None) + self["valuesuffix"] = valuesuffix if valuesuffix is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scattercarpet" + self._props["type"] = "sankey" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scattercarpet", val="scattercarpet" + plotly_name="type", parent_name="sankey", val="sankey" ) arg.pop("type", None) @@ -34802,32 +38837,11 @@ def __init__( self._skip_invalid = False -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Scatter3d(_BaseTraceType): - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - bool - """ - return self["connectgaps"] - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val +class Pointcloud(_BaseTraceType): # customdata # ---------- @@ -34872,247 +38886,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of plotly.graph_objs.scatter3d.ErrorX - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter3d.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of plotly.graph_objs.scatter3d.ErrorY - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter3d.ErrorY - """ - return self["error_y"] - - @error_y.setter - def error_y(self, val): - self["error_y"] = val - - # error_z - # ------- - @property - def error_z(self): - """ - The 'error_z' property is an instance of ErrorZ - that may be specified as: - - An instance of plotly.graph_objs.scatter3d.ErrorZ - - A dict of string/value properties that will be passed - to the ErrorZ constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter3d.ErrorZ - """ - return self["error_z"] - - @error_z.setter - def error_z(self, val): - self["error_z"] = val - # hoverinfo # --------- @property @@ -35166,7 +38939,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scatter3d.Hoverlabel + - An instance of plotly.graph_objs.pointcloud.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -35210,7 +38983,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scatter3d.Hoverlabel + plotly.graph_objs.pointcloud.Hoverlabel """ return self["hoverlabel"] @@ -35218,109 +38991,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Sets text elements associated with each (x,y,z) triplet. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y,z) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on plot.ly for hovertext . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - # ids # --- @property @@ -35344,160 +39014,93 @@ def ids(self, val): self["ids"] = val # idssrc - # ------ - @property - def idssrc(self): - """ - Sets the source reference on plot.ly for ids . - - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["idssrc"] - - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val - - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of plotly.graph_objs.scatter3d.Line - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.scatter3d.line.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. - width - Sets the line width (in px). + # ------ + @property + def idssrc(self): + """ + Sets the source reference on plot.ly for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.scatter3d.Line + str """ - return self["line"] + return self["idssrc"] - @line.setter - def line(self, val): - self["line"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + # indices + # ------- + @property + def indices(self): + """ + A sequential value, 0..n, supply it to avoid creating this + array inside plotting. If specified, it must be a typed + `Int32Array` array. Its length must be equal to or greater than + the number of points. For the best performance and memory use, + create one large `indices` typed array that is guaranteed to be + at least as long as the largest number of points during use, + and reuse it on each `Plotly.restyle()` call. + + The 'indices' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["indices"] + + @indices.setter + def indices(self, val): + self["indices"] = val + + # indicessrc + # ---------- + @property + def indicessrc(self): + """ + Sets the source reference on plot.ly for indices . + + The 'indicessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["indicessrc"] + + @indicessrc.setter + def indicessrc(self, val): + self["indicessrc"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val # marker # ------ @@ -35506,135 +39109,46 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scatter3d.Marker + - An instance of plotly.graph_objs.pointcloud.Marker - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.scatter3d.marker.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - line - plotly.graph_objects.scatter3d.marker.Line + blend + Determines if colors are blended together for a + translucency effect in case `opacity` is + specified as a value less then `1`. Setting + `blend` to `true` reduces zoom/pan speed if + used with large numbers of points. + border + plotly.graph_objects.pointcloud.marker.Border instance or dict with compatible properties + color + Sets the marker fill color. It accepts a + specific color.If the color is not fully opaque + and there are hundreds of thousandsof points, + it may cause slower zooming and panning. opacity - Sets the marker opacity. Note that the marker - opacity for scatter3d traces must be a scalar - value for performance reasons. To set a - blending opacity value (i.e. which is not - transparent), set "marker.color" to an rgba - color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). + Sets the marker opacity. The default value is + `1` (fully opaque). If the markers are not + fully opaque and there are hundreds of + thousands of points, it may cause slower + zooming and panning. Opacity fades the color + even if `blend` is left on `false` even if + there is no translucency effect in that case. + sizemax + Sets the maximum size (in px) of the rendered + marker points. Effective when the `pointcloud` + shows only few points. sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on plot.ly for size - . - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on plot.ly for - symbol . + Sets the minimum size (in px) of the rendered + marker points, effective when the `pointcloud` + shows a million or more points. Returns ------- - plotly.graph_objs.scatter3d.Marker + plotly.graph_objs.pointcloud.Marker """ return self["marker"] @@ -35690,34 +39204,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val - # name # ---- @property @@ -35760,64 +39246,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # projection - # ---------- - @property - def projection(self): - """ - The 'projection' property is an instance of Projection - that may be specified as: - - An instance of plotly.graph_objs.scatter3d.Projection - - A dict of string/value properties that will be passed - to the Projection constructor - - Supported dict properties: - - x - plotly.graph_objects.scatter3d.projection.X - instance or dict with compatible properties - y - plotly.graph_objects.scatter3d.projection.Y - instance or dict with compatible properties - z - plotly.graph_objects.scatter3d.projection.Z - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.scatter3d.Projection - """ - return self["projection"] - - @projection.setter - def projection(self, val): - self["projection"] = val - - # scene - # ----- - @property - def scene(self): - """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. - - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) - - Returns - ------- - str - """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - # showlegend # ---------- @property @@ -35846,7 +39274,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scatter3d.Stream + - An instance of plotly.graph_objs.pointcloud.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -35864,7 +39292,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scatter3d.Stream + plotly.graph_objs.pointcloud.Stream """ return self["stream"] @@ -35872,209 +39300,32 @@ def stream(self): def stream(self, val): self["stream"] = val - # surfaceaxis - # ----------- - @property - def surfaceaxis(self): - """ - If "-1", the scatter points are not fill with a surface If 0, - 1, 2, the scatter points are filled with a Delaunay surface - about the x, y, z respectively. - - The 'surfaceaxis' property is an enumeration that may be specified as: - - One of the following enumeration values: - [-1, 0, 1, 2] - - Returns - ------- - Any - """ - return self["surfaceaxis"] - - @surfaceaxis.setter - def surfaceaxis(self, val): - self["surfaceaxis"] = val - - # surfacecolor - # ------------ - @property - def surfacecolor(self): - """ - Sets the surface fill color. - - The 'surfacecolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - Returns - ------- - str - """ - return self["surfacecolor"] - - @surfacecolor.setter - def surfacecolor(self, val): - self["surfacecolor"] = val - # text # ---- @property def text(self): """ - Sets text elements associated with each (x,y,z) triplet. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y,z) coordinates. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of plotly.graph_objs.scatter3d.Textfont - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.scatter3d.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Sets the positions of the `text` elements with respects to the - (x,y) coordinates. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top left', 'top center', 'top right', 'middle left', - 'middle center', 'middle right', 'bottom left', 'bottom - center', 'bottom right'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on plot.ly for textposition . + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ - return self["textpositionsrc"] + return self["text"] - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val + @text.setter + def text(self, val): + self["text"] = val # textsrc # ------- @@ -36194,29 +39445,72 @@ def x(self): def x(self, val): self["x"] = val - # xcalendar - # --------- + # xaxis + # ----- @property - def xcalendar(self): + def xaxis(self): """ - Sets the calendar system to use with `x` date data. + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - Any + str """ - return self["xcalendar"] + return self["xaxis"] - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xbounds + # ------- + @property + def xbounds(self): + """ + Specify `xbounds` in the shape of `[xMin, xMax] to avoid + looping through the `xy` typed array. Use it in conjunction + with `xy` and `ybounds` for the performance benefits. + + The 'xbounds' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["xbounds"] + + @xbounds.setter + def xbounds(self, val): + self["xbounds"] = val + + # xboundssrc + # ---------- + @property + def xboundssrc(self): + """ + Sets the source reference on plot.ly for xbounds . + + The 'xboundssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xboundssrc"] + + @xboundssrc.setter + def xboundssrc(self, val): + self["xboundssrc"] = val # xsrc # ---- @@ -36238,133 +39532,155 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - + # xy + # -- @property - def y(self): + def xy(self): """ - Sets the y coordinates. + Faster alternative to specifying `x` and `y` separately. If + supplied, it must be a typed `Float32Array` array that + represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + + 1] = y[i]` - The 'y' property is an array that may be specified as a tuple, + The 'xy' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["y"] + return self["xy"] - @y.setter - def y(self, val): - self["y"] = val + @xy.setter + def xy(self, val): + self["xy"] = val - # ycalendar - # --------- + # xysrc + # ----- @property - def ycalendar(self): + def xysrc(self): """ - Sets the calendar system to use with `y` date data. + Sets the source reference on plot.ly for xy . - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'xysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["ycalendar"] + return self["xysrc"] - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val + @xysrc.setter + def xysrc(self, val): + self["xysrc"] = val - # ysrc - # ---- + # y + # - @property - def ysrc(self): + def y(self): """ - Sets the source reference on plot.ly for y . + Sets the y coordinates. - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- str """ - return self["ysrc"] + return self["yaxis"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # z - # - + # ybounds + # ------- @property - def z(self): + def ybounds(self): """ - Sets the z coordinates. + Specify `ybounds` in the shape of `[yMin, yMax] to avoid + looping through the `xy` typed array. Use it in conjunction + with `xy` and `xbounds` for the performance benefits. - The 'z' property is an array that may be specified as a tuple, + The 'ybounds' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["z"] + return self["ybounds"] - @z.setter - def z(self, val): - self["z"] = val + @ybounds.setter + def ybounds(self, val): + self["ybounds"] = val - # zcalendar - # --------- + # yboundssrc + # ---------- @property - def zcalendar(self): + def yboundssrc(self): """ - Sets the calendar system to use with `z` date data. + Sets the source reference on plot.ly for ybounds . - The 'zcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'yboundssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["zcalendar"] + return self["yboundssrc"] - @zcalendar.setter - def zcalendar(self, val): - self["zcalendar"] = val + @yboundssrc.setter + def yboundssrc(self, val): + self["yboundssrc"] = val - # zsrc + # ysrc # ---- @property - def zsrc(self): + def ysrc(self): """ - Sets the source reference on plot.ly for z . + Sets the source reference on plot.ly for y . - The 'zsrc' property must be specified as a string or + The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["zsrc"] + return self["ysrc"] - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val # type # ---- @@ -36383,9 +39699,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -36393,15 +39706,6 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - error_x - plotly.graph_objects.scatter3d.ErrorX instance or dict - with compatible properties - error_y - plotly.graph_objects.scatter3d.ErrorY instance or dict - with compatible properties - error_z - plotly.graph_objects.scatter3d.ErrorZ instance or dict - with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -36410,53 +39714,31 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatter3d.Hoverlabel instance or + plotly.graph_objects.pointcloud.Hoverlabel instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + indices + A sequential value, 0..n, supply it to avoid creating + this array inside plotting. If specified, it must be a + typed `Int32Array` array. Its length must be equal to + or greater than the number of points. For the best + performance and memory use, create one large `indices` + typed array that is guaranteed to be at least as long + as the largest number of points during use, and reuse + it on each `Plotly.restyle()` call. + indicessrc + Sets the source reference on plot.ly for indices . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.scatter3d.Line instance or dict - with compatible properties marker - plotly.graph_objects.scatter3d.Marker instance or dict + plotly.graph_objects.pointcloud.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -36473,56 +39755,25 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - projection - plotly.graph_objects.scatter3d.Projection instance or - dict with compatible properties - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatter3d.Stream instance or dict + plotly.graph_objects.pointcloud.Stream instance or dict with compatible properties - surfaceaxis - If "-1", the scatter points are not fill with a surface - If 0, 1, 2, the scatter points are filled with a - Delaunay surface about the x, y, z respectively. - surfacecolor - Sets the surface fill color. text - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - plotly.graph_objects.scatter3d.Textfont instance or - dict with compatible properties - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textsrc Sets the source reference on plot.ly for text . uid @@ -36554,93 +39805,95 @@ def _prop_descriptions(self): visible). x Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbounds + Specify `xbounds` in the shape of `[xMin, xMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `ybounds` for the performance + benefits. + xboundssrc + Sets the source reference on plot.ly for xbounds . xsrc Sets the source reference on plot.ly for x . + xy + Faster alternative to specifying `x` and `y` + separately. If supplied, it must be a typed + `Float32Array` array that represents points such that + `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` + xysrc + Sets the source reference on plot.ly for xy . y Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybounds + Specify `ybounds` in the shape of `[yMin, yMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `xbounds` for the performance + benefits. + yboundssrc + Sets the source reference on plot.ly for ybounds . ysrc Sets the source reference on plot.ly for y . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - connectgaps=None, customdata=None, customdatasrc=None, - error_x=None, - error_y=None, - error_z=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, ids=None, idssrc=None, + indices=None, + indicessrc=None, legendgroup=None, - line=None, marker=None, meta=None, metasrc=None, - mode=None, name=None, opacity=None, - projection=None, - scene=None, showlegend=None, stream=None, - surfaceaxis=None, - surfacecolor=None, text=None, - textfont=None, - textposition=None, - textpositionsrc=None, textsrc=None, uid=None, uirevision=None, visible=None, x=None, - xcalendar=None, + xaxis=None, + xbounds=None, + xboundssrc=None, xsrc=None, + xy=None, + xysrc=None, y=None, - ycalendar=None, + yaxis=None, + ybounds=None, + yboundssrc=None, ysrc=None, - z=None, - zcalendar=None, - zsrc=None, **kwargs ): """ - Construct a new Scatter3d object + Construct a new Pointcloud object - The data visualized as scatter point or lines in 3D dimension - is set in `x`, `y`, `z`. Text (appearing either on the chart or - on hover only) is via `text`. Bubble charts are achieved by - setting `marker.size` and/or `marker.color` Projections are - achieved via `projection`. Surface fills are achieved via - `surfaceaxis`. + The data visualized as a point cloud set in `x` and `y` using + the WebGl plotting engine. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scatter3d - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. + an instance of plotly.graph_objs.Pointcloud customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -36648,15 +39901,6 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - error_x - plotly.graph_objects.scatter3d.ErrorX instance or dict - with compatible properties - error_y - plotly.graph_objects.scatter3d.ErrorY instance or dict - with compatible properties - error_z - plotly.graph_objects.scatter3d.ErrorZ instance or dict - with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -36665,53 +39909,31 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatter3d.Hoverlabel instance or + plotly.graph_objects.pointcloud.Hoverlabel instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + indices + A sequential value, 0..n, supply it to avoid creating + this array inside plotting. If specified, it must be a + typed `Int32Array` array. Its length must be equal to + or greater than the number of points. For the best + performance and memory use, create one large `indices` + typed array that is guaranteed to be at least as long + as the largest number of points during use, and reuse + it on each `Plotly.restyle()` call. + indicessrc + Sets the source reference on plot.ly for indices . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.scatter3d.Line instance or dict - with compatible properties marker - plotly.graph_objects.scatter3d.Marker instance or dict + plotly.graph_objects.pointcloud.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -36728,56 +39950,25 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - projection - plotly.graph_objects.scatter3d.Projection instance or - dict with compatible properties - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.scatter3d.Stream instance or dict + plotly.graph_objects.pointcloud.Stream instance or dict with compatible properties - surfaceaxis - If "-1", the scatter points are not fill with a surface - If 0, 1, 2, the scatter points are filled with a - Delaunay surface about the x, y, z respectively. - surfacecolor - Sets the surface fill color. text - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string appears - over all the data points. If an array of string, the - items are mapped in order to the this trace's (x,y,z) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - plotly.graph_objects.scatter3d.Textfont instance or - dict with compatible properties - textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textsrc Sets the source reference on plot.ly for text . uid @@ -36809,28 +40000,49 @@ def __init__( visible). x Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date data. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbounds + Specify `xbounds` in the shape of `[xMin, xMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `ybounds` for the performance + benefits. + xboundssrc + Sets the source reference on plot.ly for xbounds . xsrc Sets the source reference on plot.ly for x . + xy + Faster alternative to specifying `x` and `y` + separately. If supplied, it must be a typed + `Float32Array` array that represents points such that + `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` + xysrc + Sets the source reference on plot.ly for xy . y Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date data. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybounds + Specify `ybounds` in the shape of `[yMin, yMax] to + avoid looping through the `xy` typed array. Use it in + conjunction with `xy` and `xbounds` for the performance + benefits. + yboundssrc + Sets the source reference on plot.ly for ybounds . ysrc Sets the source reference on plot.ly for y . - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on plot.ly for z . Returns ------- - Scatter3d + Pointcloud """ - super(Scatter3d, self).__init__("scatter3d") + super(Pointcloud, self).__init__("pointcloud") # Validate arg # ------------ @@ -36843,9 +40055,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scatter3d +The first argument to the plotly.graph_objs.Pointcloud constructor must be a dict or -an instance of plotly.graph_objs.Scatter3d""" +an instance of plotly.graph_objs.Pointcloud""" ) # Handle skip_invalid @@ -36854,127 +40066,83 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scatter3d as v_scatter3d + from plotly.validators import pointcloud as v_pointcloud # Initialize validators # --------------------- - self._validators["connectgaps"] = v_scatter3d.ConnectgapsValidator() - self._validators["customdata"] = v_scatter3d.CustomdataValidator() - self._validators["customdatasrc"] = v_scatter3d.CustomdatasrcValidator() - self._validators["error_x"] = v_scatter3d.ErrorXValidator() - self._validators["error_y"] = v_scatter3d.ErrorYValidator() - self._validators["error_z"] = v_scatter3d.ErrorZValidator() - self._validators["hoverinfo"] = v_scatter3d.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatter3d.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatter3d.HoverlabelValidator() - self._validators["hovertemplate"] = v_scatter3d.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scatter3d.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatter3d.HovertextValidator() - self._validators["hovertextsrc"] = v_scatter3d.HovertextsrcValidator() - self._validators["ids"] = v_scatter3d.IdsValidator() - self._validators["idssrc"] = v_scatter3d.IdssrcValidator() - self._validators["legendgroup"] = v_scatter3d.LegendgroupValidator() - self._validators["line"] = v_scatter3d.LineValidator() - self._validators["marker"] = v_scatter3d.MarkerValidator() - self._validators["meta"] = v_scatter3d.MetaValidator() - self._validators["metasrc"] = v_scatter3d.MetasrcValidator() - self._validators["mode"] = v_scatter3d.ModeValidator() - self._validators["name"] = v_scatter3d.NameValidator() - self._validators["opacity"] = v_scatter3d.OpacityValidator() - self._validators["projection"] = v_scatter3d.ProjectionValidator() - self._validators["scene"] = v_scatter3d.SceneValidator() - self._validators["showlegend"] = v_scatter3d.ShowlegendValidator() - self._validators["stream"] = v_scatter3d.StreamValidator() - self._validators["surfaceaxis"] = v_scatter3d.SurfaceaxisValidator() - self._validators["surfacecolor"] = v_scatter3d.SurfacecolorValidator() - self._validators["text"] = v_scatter3d.TextValidator() - self._validators["textfont"] = v_scatter3d.TextfontValidator() - self._validators["textposition"] = v_scatter3d.TextpositionValidator() - self._validators["textpositionsrc"] = v_scatter3d.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatter3d.TextsrcValidator() - self._validators["uid"] = v_scatter3d.UidValidator() - self._validators["uirevision"] = v_scatter3d.UirevisionValidator() - self._validators["visible"] = v_scatter3d.VisibleValidator() - self._validators["x"] = v_scatter3d.XValidator() - self._validators["xcalendar"] = v_scatter3d.XcalendarValidator() - self._validators["xsrc"] = v_scatter3d.XsrcValidator() - self._validators["y"] = v_scatter3d.YValidator() - self._validators["ycalendar"] = v_scatter3d.YcalendarValidator() - self._validators["ysrc"] = v_scatter3d.YsrcValidator() - self._validators["z"] = v_scatter3d.ZValidator() - self._validators["zcalendar"] = v_scatter3d.ZcalendarValidator() - self._validators["zsrc"] = v_scatter3d.ZsrcValidator() + self._validators["customdata"] = v_pointcloud.CustomdataValidator() + self._validators["customdatasrc"] = v_pointcloud.CustomdatasrcValidator() + self._validators["hoverinfo"] = v_pointcloud.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_pointcloud.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_pointcloud.HoverlabelValidator() + self._validators["ids"] = v_pointcloud.IdsValidator() + self._validators["idssrc"] = v_pointcloud.IdssrcValidator() + self._validators["indices"] = v_pointcloud.IndicesValidator() + self._validators["indicessrc"] = v_pointcloud.IndicessrcValidator() + self._validators["legendgroup"] = v_pointcloud.LegendgroupValidator() + self._validators["marker"] = v_pointcloud.MarkerValidator() + self._validators["meta"] = v_pointcloud.MetaValidator() + self._validators["metasrc"] = v_pointcloud.MetasrcValidator() + self._validators["name"] = v_pointcloud.NameValidator() + self._validators["opacity"] = v_pointcloud.OpacityValidator() + self._validators["showlegend"] = v_pointcloud.ShowlegendValidator() + self._validators["stream"] = v_pointcloud.StreamValidator() + self._validators["text"] = v_pointcloud.TextValidator() + self._validators["textsrc"] = v_pointcloud.TextsrcValidator() + self._validators["uid"] = v_pointcloud.UidValidator() + self._validators["uirevision"] = v_pointcloud.UirevisionValidator() + self._validators["visible"] = v_pointcloud.VisibleValidator() + self._validators["x"] = v_pointcloud.XValidator() + self._validators["xaxis"] = v_pointcloud.XAxisValidator() + self._validators["xbounds"] = v_pointcloud.XboundsValidator() + self._validators["xboundssrc"] = v_pointcloud.XboundssrcValidator() + self._validators["xsrc"] = v_pointcloud.XsrcValidator() + self._validators["xy"] = v_pointcloud.XyValidator() + self._validators["xysrc"] = v_pointcloud.XysrcValidator() + self._validators["y"] = v_pointcloud.YValidator() + self._validators["yaxis"] = v_pointcloud.YAxisValidator() + self._validators["ybounds"] = v_pointcloud.YboundsValidator() + self._validators["yboundssrc"] = v_pointcloud.YboundssrcValidator() + self._validators["ysrc"] = v_pointcloud.YsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("error_z", None) - self["error_z"] = error_z if error_z is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("indices", None) + self["indices"] = indices if indices is not None else _v + _v = arg.pop("indicessrc", None) + self["indicessrc"] = indicessrc if indicessrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("projection", None) - self["projection"] = projection if projection is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("surfaceaxis", None) - self["surfaceaxis"] = surfaceaxis if surfaceaxis is not None else _v - _v = arg.pop("surfacecolor", None) - self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v _v = arg.pop("uid", None) @@ -36985,30 +40153,36 @@ def __init__( self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xbounds", None) + self["xbounds"] = xbounds if xbounds is not None else _v + _v = arg.pop("xboundssrc", None) + self["xboundssrc"] = xboundssrc if xboundssrc is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("xy", None) + self["xy"] = xy if xy is not None else _v + _v = arg.pop("xysrc", None) + self["xysrc"] = xysrc if xysrc is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ybounds", None) + self["ybounds"] = ybounds if ybounds is not None else _v + _v = arg.pop("yboundssrc", None) + self["yboundssrc"] = yboundssrc if yboundssrc is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zcalendar", None) - self["zcalendar"] = zcalendar if zcalendar is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scatter3d" + self._props["type"] = "pointcloud" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatter3d", val="scatter3d" + plotly_name="type", parent_name="pointcloud", val="pointcloud" ) arg.pop("type", None) @@ -37025,51 +40199,7 @@ def __init__( import copy as _copy -class Scatter(_BaseTraceType): - - # cliponaxis - # ---------- - @property - def cliponaxis(self): - """ - Determines whether or not markers and text nodes are clipped - about the subplot axes. To show markers and text nodes above - axis lines and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - - The 'cliponaxis' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the provided data arrays are connected. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val +class Pie(_BaseTraceType): # customdata # ---------- @@ -37114,335 +40244,104 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of plotly.graph_objs.scatter.ErrorX - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.scatter.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- + # direction + # --------- @property - def error_y(self): + def direction(self): """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of plotly.graph_objs.scatter.ErrorY - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus + Specifies the direction at which succeeding sectors follow one + another. - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['clockwise', 'counterclockwise'] Returns ------- - plotly.graph_objs.scatter.ErrorY + Any """ - return self["error_y"] + return self["direction"] - @error_y.setter - def error_y(self, val): - self["error_y"] = val + @direction.setter + def direction(self, val): + self["direction"] = val - # fill - # ---- + # dlabel + # ------ @property - def fill(self): + def dlabel(self): """ - Sets the area to fill with a solid color. Defaults to "none" - unless this trace is stacked, then it gets "tonexty" - ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 - respectively. "tonextx" and "tonexty" fill between the - endpoints of this trace and the endpoints of the trace before - it, connecting those endpoints with straight lines (to make a - stacked area graph); if there is no trace before it, they - behave like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the space between two - traces if one completely encloses the other (eg consecutive - contour lines), and behaves like "toself" if there is no trace - before it. "tonext" should not be used if one trace does not - enclose the other. Traces in a `stackgroup` will only fill to - (or be filled to) other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if fill- - linked traces are not already consecutive, the later ones will - be pushed down in the drawing order. - - The 'fill' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', - 'toself', 'tonext'] + Sets the label step. See `label0` for more info. + + The 'dlabel' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["fill"] + return self["dlabel"] - @fill.setter - def fill(self, val): - self["fill"] = val + @dlabel.setter + def dlabel(self, val): + self["dlabel"] = val - # fillcolor - # --------- + # domain + # ------ @property - def fillcolor(self): + def domain(self): """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.pie.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this pie trace . + row + If there is a layout grid, use the domain for + this row in the grid for this pie trace . + x + Sets the horizontal domain of this pie trace + (in plot fraction). + y + Sets the vertical domain of this pie trace (in + plot fraction). Returns ------- - str + plotly.graph_objs.pie.Domain """ - return self["fillcolor"] + return self["domain"] - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val + @domain.setter + def domain(self, val): + self["domain"] = val - # groupnorm - # --------- + # hole + # ---- @property - def groupnorm(self): + def hole(self): """ - Only relevant when `stackgroup` is used, and only the first - `groupnorm` found in the `stackgroup` will be used - including - if `visible` is "legendonly" but not if it is `false`. Sets the - normalization for the sum of this `stackgroup`. With - "fraction", the value of each trace at each location is divided - by the sum of all trace values at that location. "percent" is - the same but multiplied by 100 to show percentages. If there - are multiple subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own set. + Sets the fraction of the radius to cut out of the pie. Use this + to make a donut chart. - The 'groupnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'fraction', 'percent'] + The 'hole' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - Any + int|float """ - return self["groupnorm"] + return self["hole"] - @groupnorm.setter - def groupnorm(self, val): - self["groupnorm"] = val + @hole.setter + def hole(self, val): + self["hole"] = val # hoverinfo # --------- @@ -37455,8 +40354,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters + (e.g. 'label+text') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -37497,7 +40396,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.scatter.Hoverlabel + - An instance of plotly.graph_objs.pie.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -37541,7 +40440,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.scatter.Hoverlabel + plotly.graph_objs.pie.Hoverlabel """ return self["hoverlabel"] @@ -37549,31 +40448,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual points (markers or - line points) or do they highlight filled regions? If the fill - is "toself" or "tonext" and there are no markers or text, then - the default is "fills", otherwise it is "points". - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['points', 'fills'] joined with '+' characters - (e.g. 'points+fills') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - # hovertemplate # ------------- @property @@ -37586,11 +40460,16 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. + variables `label`, `color`, `value`, `percent` and `text`. Anything contained in tag `` is displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag @@ -37636,11 +40515,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -37719,6 +40598,127 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of plotly.graph_objs.pie.Insidetextfont + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.pie.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # label0 + # ------ + @property + def label0(self): + """ + Alternate to `labels`. Builds a numeric set of labels. Use with + `dlabel` where `label0` is the starting label and `dlabel` the + step. + + The 'label0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["label0"] + + @label0.setter + def label0(self, val): + self["label0"] = val + + # labels + # ------ + @property + def labels(self): + """ + Sets the sector labels. If `labels` entries are duplicated, we + sum associated `values` or simply count occurrences if `values` + is not provided. For other array attributes (including color) + we use the first non-empty entry among all occurrences of the + label. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + # labelssrc + # --------- + @property + def labelssrc(self): + """ + Sets the source reference on plot.ly for labels . + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + # legendgroup # ----------- @property @@ -37742,55 +40742,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of plotly.graph_objs.scatter.Line - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - simplify - Simplifies lines by removing nearly-collinear - points. When transitioning lines, it may be - desirable to disable this so that the number of - points along the resulting SVG path is - unaffected. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.scatter.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - # marker # ------ @property @@ -37798,144 +40749,26 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.scatter.Marker + - An instance of plotly.graph_objs.pie.Marker - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.scatter.marker.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - gradient - plotly.graph_objects.scatter.marker.Gradient - instance or dict with compatible properties - line - plotly.graph_objects.scatter.marker.Line - instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on plot.ly for - opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on plot.ly for size - . - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc + colors + Sets the color of each sector. If not + specified, the default trace color set is used + to pick the sector colors. + colorssrc Sets the source reference on plot.ly for - symbol . + colors . + line + plotly.graph_objects.pie.marker.Line instance + or dict with compatible properties Returns ------- - plotly.graph_objs.scatter.Marker + plotly.graph_objs.pie.Marker """ return self["marker"] @@ -37985,39 +40818,11 @@ def metasrc(self): ------- str """ - return self["metasrc"] - - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val - - # mode - # ---- - @property - def mode(self): - """ - Determines the drawing mode for this scatter trace. If the - provided `mode` includes "text" then the `text` elements appear - at the coordinates. Otherwise, the `text` elements appear on - hover. If there are less than 20 points and the trace is not - stacked then the default is "lines+markers". Otherwise, - "lines". - - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['lines', 'markers', 'text'] joined with '+' characters - (e.g. 'lines+markers') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["mode"] - - @mode.setter - def mode(self, val): - self["mode"] = val + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val # name # ---- @@ -38061,127 +40866,148 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- + # outsidetextfont + # --------------- @property - def orientation(self): + def outsidetextfont(self): """ - Only relevant when `stackgroup` is used, and only the first - `orientation` found in the `stackgroup` will be used - - including if `visible` is "legendonly" but not if it is - `false`. Sets the stacking direction. With "v" ("h"), the y (x) - values of subsequent traces are added. Also affects the default - value of `fill`. + Sets the font used for `textinfo` lying outside the sector. - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of plotly.graph_objs.pie.Outsidetextfont + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - Any + plotly.graph_objs.pie.Outsidetextfont """ - return self["orientation"] + return self["outsidetextfont"] - @orientation.setter - def orientation(self, val): - self["orientation"] = val + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val - # r - # - + # pull + # ---- @property - def r(self): + def pull(self): """ - r coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the radial coordinatesfor - legacy polar chart only. + Sets the fraction of larger radius to pull the sectors out from + the center. This can be a constant to pull all slices apart + from each other equally or an array to highlight one or more + slices. - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'pull' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + int|float|numpy.ndarray """ - return self["r"] + return self["pull"] - @r.setter - def r(self, val): - self["r"] = val + @pull.setter + def pull(self, val): + self["pull"] = val - # rsrc - # ---- + # pullsrc + # ------- @property - def rsrc(self): + def pullsrc(self): """ - Sets the source reference on plot.ly for r . + Sets the source reference on plot.ly for pull . - The 'rsrc' property must be specified as a string or + The 'pullsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["rsrc"] + return self["pullsrc"] - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val + @pullsrc.setter + def pullsrc(self, val): + self["pullsrc"] = val - # selected + # rotation # -------- @property - def selected(self): + def rotation(self): """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.scatter.Selected - - A dict of string/value properties that will be passed - to the Selected constructor + Instead of the first slice starting at 12 o'clock, rotate to + some other angle. - Supported dict properties: - - marker - plotly.graph_objects.scatter.selected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.scatter.selected.Textfont - instance or dict with compatible properties + The 'rotation' property is a number and may be specified as: + - An int or float in the interval [-360, 360] Returns ------- - plotly.graph_objs.scatter.Selected + int|float """ - return self["selected"] + return self["rotation"] - @selected.setter - def selected(self, val): - self["selected"] = val + @rotation.setter + def rotation(self, val): + self["rotation"] = val - # selectedpoints - # -------------- + # scalegroup + # ---------- @property - def selectedpoints(self): + def scalegroup(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + If there are multiple pie charts that should be sized according + to their totals, link them by providing a non-empty group id + here shared by every trace in the same group. - The 'selectedpoints' property accepts values of any type + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - Any + str """ - return self["selectedpoints"] + return self["scalegroup"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val # showlegend # ---------- @@ -38204,65 +41030,26 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stackgaps - # --------- - @property - def stackgaps(self): - """ - Only relevant when `stackgroup` is used, and only the first - `stackgaps` found in the `stackgroup` will be used - including - if `visible` is "legendonly" but not if it is `false`. - Determines how we handle locations at which other traces in - this group have data but this one does not. With *infer zero* - we insert a zero at these locations. With "interpolate" we - linearly interpolate between existing values, and extrapolate a - constant beyond the existing values. - - The 'stackgaps' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['infer zero', 'interpolate'] - - Returns - ------- - Any - """ - return self["stackgaps"] - - @stackgaps.setter - def stackgaps(self, val): - self["stackgaps"] = val - - # stackgroup - # ---------- + # sort + # ---- @property - def stackgroup(self): + def sort(self): """ - Set several scatter traces (on the same subplot) to the same - stackgroup in order to add their y values (or their x values if - `orientation` is "h"). If blank or omitted this trace will not - be stacked. Stacking also turns `fill` on by default, using - "tonexty" ("tonextx") if `orientation` is "h" ("v") and sets - the default `mode` to "lines" irrespective of point count. You - can only stack on a numeric (linear or log) axis. Traces in a - `stackgroup` will only fill to (or be filled to) other traces - in the same group. With multiple `stackgroup`s or some traces - stacked and some not, if fill-linked traces are not already - consecutive, the later ones will be pushed down in the drawing - order. + Determines whether or not the sectors are reordered from + largest to smallest. - The 'stackgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'sort' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["stackgroup"] + return self["sort"] - @stackgroup.setter - def stackgroup(self, val): - self["stackgroup"] = val + @sort.setter + def sort(self, val): + self["sort"] = val # stream # ------ @@ -38271,7 +41058,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.scatter.Stream + - An instance of plotly.graph_objs.pie.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -38289,7 +41076,7 @@ def stream(self): Returns ------- - plotly.graph_objs.scatter.Stream + plotly.graph_objs.pie.Stream """ return self["stream"] @@ -38297,48 +41084,23 @@ def stream(self): def stream(self, val): self["stream"] = val - # t - # - - @property - def t(self): - """ - t coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the angular coordinatesfor - legacy polar chart only. - - The 't' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - # text # ---- @property def text(self): """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["text"] @@ -38351,11 +41113,11 @@ def text(self, val): @property def textfont(self): """ - Sets the text font. + Sets the font used for `textinfo`. The 'textfont' property is an instance of Textfont that may be specified as: - - An instance of plotly.graph_objs.scatter.Textfont + - An instance of plotly.graph_objs.pie.Textfont - A dict of string/value properties that will be passed to the Textfont constructor @@ -38393,7 +41155,7 @@ def textfont(self): Returns ------- - plotly.graph_objs.scatter.Textfont + plotly.graph_objs.pie.Textfont """ return self["textfont"] @@ -38401,19 +41163,39 @@ def textfont(self): def textfont(self, val): self["textfont"] = val + # textinfo + # -------- + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + # textposition # ------------ @property def textposition(self): """ - Sets the positions of the `text` elements with respects to the - (x,y) coordinates. + Specifies the location of the `textinfo`. The 'textposition' property is an enumeration that may be specified as: - One of the following enumeration values: - ['top left', 'top center', 'top right', 'middle left', - 'middle center', 'middle right', 'bottom left', 'bottom - center', 'bottom right'] + ['inside', 'outside', 'auto', 'none'] - A tuple, list, or one-dimensional numpy array of the above Returns @@ -38466,353 +41248,299 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # tsrc - # ---- - @property - def tsrc(self): - """ - Sets the source reference on plot.ly for t . - - The 'tsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tsrc"] - - @tsrc.setter - def tsrc(self, val): - self["tsrc"] = val - - # uid - # --- + # texttemplate + # ------------ @property - def uid(self): + def texttemplate(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, `percent` and + `text`. + + The 'texttemplate' property is a string and must be specified as: - A string - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ - return self["uid"] + return self["texttemplate"] - @uid.setter - def uid(self, val): - self["uid"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # uirevision - # ---------- + # texttemplatesrc + # --------------- @property - def uirevision(self): + def texttemplatesrc(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Sets the source reference on plot.ly for texttemplate . - The 'uirevision' property accepts values of any type + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["uirevision"] + return self["texttemplatesrc"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # unselected - # ---------- + # title + # ----- @property - def unselected(self): + def title(self): """ - The 'unselected' property is an instance of Unselected + The 'title' property is an instance of Title that may be specified as: - - An instance of plotly.graph_objs.scatter.Unselected + - An instance of plotly.graph_objs.pie.Title - A dict of string/value properties that will be passed - to the Unselected constructor + to the Title constructor Supported dict properties: - marker - plotly.graph_objects.scatter.unselected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.scatter.unselected.Textfon - t instance or dict with compatible properties + font + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + position + Specifies the location of the `title`. Note + that the title's position used to be set by the + now deprecated `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no + title is displayed. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. Returns ------- - plotly.graph_objs.scatter.Unselected + plotly.graph_objs.pie.Title """ - return self["unselected"] + return self["title"] - @unselected.setter - def unselected(self, val): - self["unselected"] = val + @title.setter + def title(self, val): + self["title"] = val - # visible - # ------- + # titlefont + # --------- @property - def visible(self): + def titlefont(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Deprecated: Please use pie.title.font instead. Sets the font + used for `title`. Note that the title's font used to be set by + the now deprecated `titlefont` attribute. - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.pie.title.Font + - A dict of string/value properties that will be passed + to the Font constructor - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. + Supported dict properties: + + color - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - str + """ - return self["xaxis"] + return self["titlefont"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val - # xcalendar - # --------- + # titleposition + # ------------- @property - def xcalendar(self): + def titleposition(self): """ - Sets the calendar system to use with `x` date data. + Deprecated: Please use pie.title.position instead. Specifies + the location of the `title`. Note that the title's position + used to be set by the now deprecated `titleposition` attribute. - The 'xcalendar' property is an enumeration that may be specified as: + The 'position' property is an enumeration that may be specified as: - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + ['top left', 'top center', 'top right', 'middle center', + 'bottom left', 'bottom center', 'bottom right'] Returns ------- - Any + """ - return self["xcalendar"] + return self["titleposition"] - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val + @titleposition.setter + def titleposition(self, val): + self["titleposition"] = val - # xsrc - # ---- + # uid + # --- @property - def xsrc(self): + def uid(self): """ - Sets the source reference on plot.ly for x . + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["xsrc"] + return self["uid"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # y - # - + # uirevision + # ---------- @property - def y(self): + def uirevision(self): """ - Sets the y coordinates. + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'uirevision' property accepts values of any type Returns ------- - numpy.ndarray + Any """ - return self["y"] + return self["uirevision"] - @y.setter - def y(self, val): - self["y"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # y0 - # -- + # values + # ------ @property - def y0(self): + def values(self): """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. + Sets the values of the sectors. If omitted, we count + occurrences of each label. - The 'y0' property accepts values of any type + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["y0"] + return self["values"] - @y0.setter - def y0(self, val): - self["y0"] = val + @values.setter + def values(self, val): + self["values"] = val - # yaxis - # ----- + # valuessrc + # --------- @property - def yaxis(self): + def valuessrc(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the source reference on plot.ly for values . - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["yaxis"] + return self["valuessrc"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val - # ycalendar - # --------- + # visible + # ------- @property - def ycalendar(self): + def visible(self): """ - Sets the calendar system to use with `y` date data. + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'ycalendar' property is an enumeration that may be specified as: + The 'visible' property is an enumeration that may be specified as: - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + [True, False, 'legendonly'] Returns ------- Any """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on plot.ly for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] + return self["visible"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @visible.setter + def visible(self, val): + self["visible"] = val # type # ---- @@ -38831,15 +41559,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -38847,54 +41566,17 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - plotly.graph_objects.scatter.ErrorX instance or dict - with compatible properties - error_y - plotly.graph_objects.scatter.ErrorY instance or dict - with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - groupnorm - Only relevant when `stackgroup` is used, and only the - first `groupnorm` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the normalization for the sum of - this `stackgroup`. With "fraction", the value of each - trace at each location is divided by the sum of all - trace values at that location. "percent" is the same - but multiplied by 100 to show percentages. If there are - multiple subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own set. + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + plotly.graph_objects.pie.Domain instance or dict with + compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -38903,14 +41585,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatter.Hoverlabel instance or - dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". + plotly.graph_objects.pie.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -38919,26 +41595,32 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. + available. variables `label`, `color`, `value`, + `percent` and `text`. Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -38947,16 +41629,28 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on plot.ly for labels . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.scatter.Line instance or dict with - compatible properties marker - plotly.graph_objects.scatter.Marker instance or dict - with compatible properties + plotly.graph_objects.pie.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -38972,95 +41666,87 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - orientation - Only relevant when `stackgroup` is used, and only the - first `orientation` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the stacking direction. With "v" - ("h"), the y (x) values of subsequent traces are added. - Also affects the default value of `fill`. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on plot.ly for r . - selected - plotly.graph_objects.scatter.Selected instance or dict - with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on plot.ly for pull . + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - stackgaps - Only relevant when `stackgroup` is used, and only the - first `stackgaps` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Determines how we handle locations at - which other traces in this group have data but this one - does not. With *infer zero* we insert a zero at these - locations. With "interpolate" we linearly interpolate - between existing values, and extrapolate a constant - beyond the existing values. - stackgroup - Set several scatter traces (on the same subplot) to the - same stackgroup in order to add their y values (or - their x values if `orientation` is "h"). If blank or - omitted this trace will not be stacked. Stacking also - turns `fill` on by default, using "tonexty" ("tonextx") - if `orientation` is "h" ("v") and sets the default - `mode` to "lines" irrespective of point count. You can - only stack on a numeric (linear or log) axis. Traces in - a `stackgroup` will only fill to (or be filled to) - other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if - fill-linked traces are not already consecutive, the - later ones will be pushed down in the drawing order. + sort + Determines whether or not the sectors are reordered + from largest to smallest. stream - plotly.graph_objects.scatter.Stream instance or dict - with compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. + plotly.graph_objects.pie.Stream instance or dict with + compatible properties text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. textfont - Sets the text font. + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. + Specifies the location of the `textinfo`. textpositionsrc Sets the source reference on plot.ly for textposition . textsrc Sets the source reference on plot.ly for text . - tsrc - Sets the source reference on plot.ly for t . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `percent` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + title + plotly.graph_objects.pie.Title instance or dict with + compatible properties + titlefont + Deprecated: Please use pie.title.font instead. Sets the + font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleposition + Deprecated: Please use pie.title.position instead. + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -39069,148 +41755,103 @@ def _prop_descriptions(self): Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.scatter.Unselected instance or - dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on plot.ly for values . + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). """ + _mapped_properties = { + "titlefont": ("title", "font"), + "titleposition": ("title", "position"), + } + def __init__( self, arg=None, - cliponaxis=None, - connectgaps=None, customdata=None, customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - groupnorm=None, + direction=None, + dlabel=None, + domain=None, + hole=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, + insidetextfont=None, + label0=None, + labels=None, + labelssrc=None, legendgroup=None, - line=None, marker=None, meta=None, metasrc=None, - mode=None, name=None, opacity=None, - orientation=None, - r=None, - rsrc=None, - selected=None, - selectedpoints=None, + outsidetextfont=None, + pull=None, + pullsrc=None, + rotation=None, + scalegroup=None, showlegend=None, - stackgaps=None, - stackgroup=None, + sort=None, stream=None, - t=None, text=None, textfont=None, + textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, - tsrc=None, + texttemplate=None, + texttemplatesrc=None, + title=None, + titlefont=None, + titleposition=None, uid=None, uirevision=None, - unselected=None, + values=None, + valuessrc=None, visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, **kwargs ): """ - Construct a new Scatter object + Construct a new Pie object - The scatter trace type encompasses line charts, scatter charts, - text charts, and bubble charts. The data visualized as scatter - point or lines is set in `x` and `y`. Text (appearing either on - the chart or on hover only) is via `text`. Bubble charts are - achieved by setting `marker.size` and/or `marker.color` to - numerical arrays. + A data visualized by the sectors of the pie is set in `values`. + The sector labels are set in `labels`. The sector colors are + set in `marker.colors` Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Scatter - cliponaxis - Determines whether or not markers and text nodes are - clipped about the subplot axes. To show markers and - text nodes above axis lines and tick labels, make sure - to set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the provided data arrays are connected. + an instance of plotly.graph_objs.Pie customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -39218,54 +41859,17 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - plotly.graph_objects.scatter.ErrorX instance or dict - with compatible properties - error_y - plotly.graph_objects.scatter.ErrorY instance or dict - with compatible properties - fill - Sets the area to fill with a solid color. Defaults to - "none" unless this trace is stacked, then it gets - "tonexty" ("tonextx") if `orientation` is "v" ("h") Use - with `fillcolor` if not "none". "tozerox" and "tozeroy" - fill to x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this trace and - the endpoints of the trace before it, connecting those - endpoints with straight lines (to make a stacked area - graph); if there is no trace before it, they behave - like "tozerox" and "tozeroy". "toself" connects the - endpoints of the trace (or each segment of the trace if - it has gaps) into a closed shape. "tonext" fills the - space between two traces if one completely encloses the - other (eg consecutive contour lines), and behaves like - "toself" if there is no trace before it. "tonext" - should not be used if one trace does not enclose the - other. Traces in a `stackgroup` will only fill to (or - be filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already consecutive, - the later ones will be pushed down in the drawing - order. - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. - groupnorm - Only relevant when `stackgroup` is used, and only the - first `groupnorm` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the normalization for the sum of - this `stackgroup`. With "fraction", the value of each - trace at each location is divided by the sum of all - trace values at that location. "percent" is the same - but multiplied by 100 to show percentages. If there are - multiple subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own set. + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + plotly.graph_objects.pie.Domain instance or dict with + compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -39274,14 +41878,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.scatter.Hoverlabel instance or - dict with compatible properties - hoveron - Do the hover effects highlight individual points - (markers or line points) or do they highlight filled - regions? If the fill is "toself" or "tonext" and there - are no markers or text, then the default is "fills", - otherwise it is "points". + plotly.graph_objects.pie.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -39290,26 +41888,32 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. + available. variables `label`, `color`, `value`, + `percent` and `text`. Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -39318,16 +41922,28 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on plot.ly for labels . legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.scatter.Line instance or dict with - compatible properties marker - plotly.graph_objects.scatter.Marker instance or dict - with compatible properties + plotly.graph_objects.pie.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -39343,95 +41959,87 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines the drawing mode for this scatter trace. If - the provided `mode` includes "text" then the `text` - elements appear at the coordinates. Otherwise, the - `text` elements appear on hover. If there are less than - 20 points and the trace is not stacked then the default - is "lines+markers". Otherwise, "lines". name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the trace. - orientation - Only relevant when `stackgroup` is used, and only the - first `orientation` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Sets the stacking direction. With "v" - ("h"), the y (x) values of subsequent traces are added. - Also affects the default value of `fill`. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on plot.ly for r . - selected - plotly.graph_objects.scatter.Selected instance or dict - with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on plot.ly for pull . + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - stackgaps - Only relevant when `stackgroup` is used, and only the - first `stackgaps` found in the `stackgroup` will be - used - including if `visible` is "legendonly" but not - if it is `false`. Determines how we handle locations at - which other traces in this group have data but this one - does not. With *infer zero* we insert a zero at these - locations. With "interpolate" we linearly interpolate - between existing values, and extrapolate a constant - beyond the existing values. - stackgroup - Set several scatter traces (on the same subplot) to the - same stackgroup in order to add their y values (or - their x values if `orientation` is "h"). If blank or - omitted this trace will not be stacked. Stacking also - turns `fill` on by default, using "tonexty" ("tonextx") - if `orientation` is "h" ("v") and sets the default - `mode` to "lines" irrespective of point count. You can - only stack on a numeric (linear or log) axis. Traces in - a `stackgroup` will only fill to (or be filled to) - other traces in the same group. With multiple - `stackgroup`s or some traces stacked and some not, if - fill-linked traces are not already consecutive, the - later ones will be pushed down in the drawing order. + sort + Determines whether or not the sectors are reordered + from largest to smallest. stream - plotly.graph_objects.scatter.Stream instance or dict - with compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. + plotly.graph_objects.pie.Stream instance or dict with + compatible properties text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. textfont - Sets the text font. + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. textposition - Sets the positions of the `text` elements with respects - to the (x,y) coordinates. + Specifies the location of the `textinfo`. textpositionsrc Sets the source reference on plot.ly for textposition . textsrc Sets the source reference on plot.ly for text . - tsrc - Sets the source reference on plot.ly for t . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `percent` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + title + plotly.graph_objects.pie.Title instance or dict with + compatible properties + titlefont + Deprecated: Please use pie.title.font instead. Sets the + font used for `title`. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleposition + Deprecated: Please use pie.title.position instead. + Specifies the location of the `title`. Note that the + title's position used to be set by the now deprecated + `titleposition` attribute. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -39454,50 +42062,22 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.scatter.Unselected instance or - dict with compatible properties + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . Returns ------- - Scatter + Pie """ - super(Scatter, self).__init__("scatter") + super(Pie, self).__init__("pie") # Validate arg # ------------ @@ -39510,9 +42090,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Scatter +The first argument to the plotly.graph_objs.Pie constructor must be a dict or -an instance of plotly.graph_objs.Scatter""" +an instance of plotly.graph_objs.Pie""" ) # Handle skip_invalid @@ -39521,102 +42101,78 @@ def __init__( # Import validators # ----------------- - from plotly.validators import scatter as v_scatter + from plotly.validators import pie as v_pie # Initialize validators # --------------------- - self._validators["cliponaxis"] = v_scatter.CliponaxisValidator() - self._validators["connectgaps"] = v_scatter.ConnectgapsValidator() - self._validators["customdata"] = v_scatter.CustomdataValidator() - self._validators["customdatasrc"] = v_scatter.CustomdatasrcValidator() - self._validators["dx"] = v_scatter.DxValidator() - self._validators["dy"] = v_scatter.DyValidator() - self._validators["error_x"] = v_scatter.ErrorXValidator() - self._validators["error_y"] = v_scatter.ErrorYValidator() - self._validators["fill"] = v_scatter.FillValidator() - self._validators["fillcolor"] = v_scatter.FillcolorValidator() - self._validators["groupnorm"] = v_scatter.GroupnormValidator() - self._validators["hoverinfo"] = v_scatter.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_scatter.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_scatter.HoverlabelValidator() - self._validators["hoveron"] = v_scatter.HoveronValidator() - self._validators["hovertemplate"] = v_scatter.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_scatter.HovertemplatesrcValidator() - self._validators["hovertext"] = v_scatter.HovertextValidator() - self._validators["hovertextsrc"] = v_scatter.HovertextsrcValidator() - self._validators["ids"] = v_scatter.IdsValidator() - self._validators["idssrc"] = v_scatter.IdssrcValidator() - self._validators["legendgroup"] = v_scatter.LegendgroupValidator() - self._validators["line"] = v_scatter.LineValidator() - self._validators["marker"] = v_scatter.MarkerValidator() - self._validators["meta"] = v_scatter.MetaValidator() - self._validators["metasrc"] = v_scatter.MetasrcValidator() - self._validators["mode"] = v_scatter.ModeValidator() - self._validators["name"] = v_scatter.NameValidator() - self._validators["opacity"] = v_scatter.OpacityValidator() - self._validators["orientation"] = v_scatter.OrientationValidator() - self._validators["r"] = v_scatter.RValidator() - self._validators["rsrc"] = v_scatter.RsrcValidator() - self._validators["selected"] = v_scatter.SelectedValidator() - self._validators["selectedpoints"] = v_scatter.SelectedpointsValidator() - self._validators["showlegend"] = v_scatter.ShowlegendValidator() - self._validators["stackgaps"] = v_scatter.StackgapsValidator() - self._validators["stackgroup"] = v_scatter.StackgroupValidator() - self._validators["stream"] = v_scatter.StreamValidator() - self._validators["t"] = v_scatter.TValidator() - self._validators["text"] = v_scatter.TextValidator() - self._validators["textfont"] = v_scatter.TextfontValidator() - self._validators["textposition"] = v_scatter.TextpositionValidator() - self._validators["textpositionsrc"] = v_scatter.TextpositionsrcValidator() - self._validators["textsrc"] = v_scatter.TextsrcValidator() - self._validators["tsrc"] = v_scatter.TsrcValidator() - self._validators["uid"] = v_scatter.UidValidator() - self._validators["uirevision"] = v_scatter.UirevisionValidator() - self._validators["unselected"] = v_scatter.UnselectedValidator() - self._validators["visible"] = v_scatter.VisibleValidator() - self._validators["x"] = v_scatter.XValidator() - self._validators["x0"] = v_scatter.X0Validator() - self._validators["xaxis"] = v_scatter.XAxisValidator() - self._validators["xcalendar"] = v_scatter.XcalendarValidator() - self._validators["xsrc"] = v_scatter.XsrcValidator() - self._validators["y"] = v_scatter.YValidator() - self._validators["y0"] = v_scatter.Y0Validator() - self._validators["yaxis"] = v_scatter.YAxisValidator() - self._validators["ycalendar"] = v_scatter.YcalendarValidator() - self._validators["ysrc"] = v_scatter.YsrcValidator() + self._validators["customdata"] = v_pie.CustomdataValidator() + self._validators["customdatasrc"] = v_pie.CustomdatasrcValidator() + self._validators["direction"] = v_pie.DirectionValidator() + self._validators["dlabel"] = v_pie.DlabelValidator() + self._validators["domain"] = v_pie.DomainValidator() + self._validators["hole"] = v_pie.HoleValidator() + self._validators["hoverinfo"] = v_pie.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_pie.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_pie.HoverlabelValidator() + self._validators["hovertemplate"] = v_pie.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_pie.HovertemplatesrcValidator() + self._validators["hovertext"] = v_pie.HovertextValidator() + self._validators["hovertextsrc"] = v_pie.HovertextsrcValidator() + self._validators["ids"] = v_pie.IdsValidator() + self._validators["idssrc"] = v_pie.IdssrcValidator() + self._validators["insidetextfont"] = v_pie.InsidetextfontValidator() + self._validators["label0"] = v_pie.Label0Validator() + self._validators["labels"] = v_pie.LabelsValidator() + self._validators["labelssrc"] = v_pie.LabelssrcValidator() + self._validators["legendgroup"] = v_pie.LegendgroupValidator() + self._validators["marker"] = v_pie.MarkerValidator() + self._validators["meta"] = v_pie.MetaValidator() + self._validators["metasrc"] = v_pie.MetasrcValidator() + self._validators["name"] = v_pie.NameValidator() + self._validators["opacity"] = v_pie.OpacityValidator() + self._validators["outsidetextfont"] = v_pie.OutsidetextfontValidator() + self._validators["pull"] = v_pie.PullValidator() + self._validators["pullsrc"] = v_pie.PullsrcValidator() + self._validators["rotation"] = v_pie.RotationValidator() + self._validators["scalegroup"] = v_pie.ScalegroupValidator() + self._validators["showlegend"] = v_pie.ShowlegendValidator() + self._validators["sort"] = v_pie.SortValidator() + self._validators["stream"] = v_pie.StreamValidator() + self._validators["text"] = v_pie.TextValidator() + self._validators["textfont"] = v_pie.TextfontValidator() + self._validators["textinfo"] = v_pie.TextinfoValidator() + self._validators["textposition"] = v_pie.TextpositionValidator() + self._validators["textpositionsrc"] = v_pie.TextpositionsrcValidator() + self._validators["textsrc"] = v_pie.TextsrcValidator() + self._validators["texttemplate"] = v_pie.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_pie.TexttemplatesrcValidator() + self._validators["title"] = v_pie.TitleValidator() + self._validators["uid"] = v_pie.UidValidator() + self._validators["uirevision"] = v_pie.UirevisionValidator() + self._validators["values"] = v_pie.ValuesValidator() + self._validators["valuessrc"] = v_pie.ValuessrcValidator() + self._validators["visible"] = v_pie.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("fill", None) - self["fill"] = fill if fill is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v - _v = arg.pop("groupnorm", None) - self["groupnorm"] = groupnorm if groupnorm is not None else _v + _v = arg.pop("direction", None) + self["direction"] = direction if direction is not None else _v + _v = arg.pop("dlabel", None) + self["dlabel"] = dlabel if dlabel is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v + _v = arg.pop("hole", None) + self["hole"] = hole if hole is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -39631,90 +42187,86 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v + _v = arg.pop("label0", None) + self["label0"] = label0 if label0 is not None else _v + _v = arg.pop("labels", None) + self["labels"] = labels if labels is not None else _v + _v = arg.pop("labelssrc", None) + self["labelssrc"] = labelssrc if labelssrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("outsidetextfont", None) + self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v + _v = arg.pop("pull", None) + self["pull"] = pull if pull is not None else _v + _v = arg.pop("pullsrc", None) + self["pullsrc"] = pullsrc if pullsrc is not None else _v + _v = arg.pop("rotation", None) + self["rotation"] = rotation if rotation is not None else _v + _v = arg.pop("scalegroup", None) + self["scalegroup"] = scalegroup if scalegroup is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stackgaps", None) - self["stackgaps"] = stackgaps if stackgaps is not None else _v - _v = arg.pop("stackgroup", None) - self["stackgroup"] = stackgroup if stackgroup is not None else _v + _v = arg.pop("sort", None) + self["sort"] = sort if sort is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textfont", None) self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textinfo", None) + self["textinfo"] = textinfo if textinfo is not None else _v _v = arg.pop("textposition", None) self["textposition"] = textposition if textposition is not None else _v _v = arg.pop("textpositionsrc", None) self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("tsrc", None) - self["tsrc"] = tsrc if tsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("title", None) + self["title"] = title if title is not None else _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleposition", None) + _v = titleposition if titleposition is not None else _v + if _v is not None: + self["titleposition"] = _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v + _v = arg.pop("values", None) + self["values"] = values if values is not None else _v + _v = arg.pop("valuessrc", None) + self["valuessrc"] = valuessrc if valuessrc is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "scatter" + self._props["type"] = "pie" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="scatter", val="scatter" + plotly_name="type", parent_name="pie", val="pie" ) arg.pop("type", None) @@ -39731,34 +42283,7 @@ def __init__( import copy as _copy -class Sankey(_BaseTraceType): - - # arrangement - # ----------- - @property - def arrangement(self): - """ - If value is `snap` (the default), the node arrangement is - assisted by automatic snapping of elements to preserve space - between nodes specified via `nodepad`. If value is - `perpendicular`, the nodes can only move along a line - perpendicular to the flow. If value is `freeform`, the nodes - can freely move on the plane. If value is `fixed`, the nodes - are stationary. - - The 'arrangement' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['snap', 'perpendicular', 'freeform', 'fixed'] - - Returns - ------- - Any - """ - return self["arrangement"] - - @arrangement.setter - def arrangement(self, val): - self["arrangement"] = val +class Parcoords(_BaseTraceType): # customdata # ---------- @@ -39803,127 +42328,174 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ + # dimensions + # ---------- @property - def domain(self): + def dimensions(self): """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.sankey.Domain - - A dict of string/value properties that will be passed - to the Domain constructor + The dimensions (variables) of the parallel coordinates chart. + 2..60 dimensions are supported. + + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcoords.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor Supported dict properties: - column - If there is a layout grid, use the domain for - this column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for - this row in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace - (in plot fraction). - y - Sets the vertical domain of this sankey trace - (in plot fraction). + constraintrange + The domain range to which the filter on the + dimension is constrained. Must be an array of + `[fromValue, toValue]` with `fromValue <= + toValue`, or if `multiselect` is not disabled, + you may give an array of arrays, where each + inner array is `[fromValue, toValue]`. + label + The shown name of the dimension. + multiselect + Do we allow multiple selection ranges or just a + single range? + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + range + The domain range that represents the full, + shown axis extent. Defaults to the `values` + extent. Must be an array of `[fromValue, + toValue]` with finite numbers as elements. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + ticktext + Sets the text displayed at the ticks position + via `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + values + Dimension values. `values[n]` represents the + value of the `n`th point in the dataset, + therefore the `values` vector for all + dimensions must be the same (longer vectors + will be truncated). Each value must be a finite + number. + valuessrc + Sets the source reference on plot.ly for + values . + visible + Shows the dimension when set to `true` (the + default). Hides the dimension for `false`. Returns ------- - plotly.graph_objs.sankey.Domain + tuple[plotly.graph_objs.parcoords.Dimension] """ - return self["domain"] + return self["dimensions"] - @domain.setter - def domain(self, val): - self["domain"] = val + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val - # hoverinfo - # --------- + # dimensiondefaults + # ----------------- @property - def hoverinfo(self): + def dimensiondefaults(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - Note that this attribute is superseded by `node.hoverinfo` and - `node.hoverinfo` for nodes and links respectively. + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets the + default property values to use for elements of + parcoords.dimensions - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of [] joined with '+' characters - (e.g. '') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of plotly.graph_objs.parcoords.Dimension + - A dict of string/value properties that will be passed + to the Dimension constructor + + Supported dict properties: Returns ------- - Any + plotly.graph_objs.parcoords.Dimension """ - return self["hoverinfo"] + return self["dimensiondefaults"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val - # hoverlabel - # ---------- + # domain + # ------ @property - def hoverlabel(self): + def domain(self): """ - The 'hoverlabel' property is an instance of Hoverlabel + The 'domain' property is an instance of Domain that may be specified as: - - An instance of plotly.graph_objs.sankey.Hoverlabel + - An instance of plotly.graph_objs.parcoords.Domain - A dict of string/value properties that will be passed - to the Hoverlabel constructor + to the Domain constructor Supported dict properties: - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + column + If there is a layout grid, use the domain for + this column in the grid for this parcoords + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this parcoords trace . + x + Sets the horizontal domain of this parcoords + trace (in plot fraction). + y + Sets the vertical domain of this parcoords + trace (in plot fraction). Returns ------- - plotly.graph_objs.sankey.Hoverlabel + plotly.graph_objs.parcoords.Domain """ - return self["hoverlabel"] + return self["domain"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @domain.setter + def domain(self, val): + self["domain"] = val # ids # --- @@ -39967,110 +42539,208 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # link - # ---- + # labelangle + # ---------- @property - def link(self): + def labelangle(self): """ - The links of the Sankey plot. + Sets the angle of the labels with respect to the horizontal. + For example, a `tickangle` of -90 draws the labels vertically. + Tilted labels with "labelangle" may be positioned better inside + margins when `labelposition` is set to "bottom". - The 'link' property is an instance of Link + The 'labelangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["labelangle"] + + @labelangle.setter + def labelangle(self, val): + self["labelangle"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font for the `dimension` labels. + + The 'labelfont' property is an instance of Labelfont that may be specified as: - - An instance of plotly.graph_objs.sankey.Link + - An instance of plotly.graph_objs.parcoords.Labelfont - A dict of string/value properties that will be passed - to the Link constructor + to the Labelfont constructor Supported dict properties: color - Sets the `link` color. It can be a single - value, or an array for specifying color for - each `link`. If `link.color` is omitted, then - by default, a translucent grey link will be - used. - colorscales - A tuple of - plotly.graph_objects.sankey.link.Colorscale - instances or dicts with compatible properties - colorscaledefaults - When used in a template (as layout.template.dat - a.sankey.link.colorscaledefaults), sets the - default property values to use for elements of - sankey.link.colorscales + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcoords.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # labelside + # --------- + @property + def labelside(self): + """ + Specifies the location of the `label`. "top" positions labels + above, next to the title "bottom" positions labels below the + graph Tilted labels with "labelangle" may be positioned better + inside margins when `labelposition` is set to "bottom". + + The 'labelside' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom'] + + Returns + ------- + Any + """ + return self["labelside"] + + @labelside.setter + def labelside(self, val): + self["labelside"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.parcoords.Line + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. + color + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.parcoords.line.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. colorsrc Sets the source reference on plot.ly for color . - hoverinfo - Determines which trace information appear when - hovering links. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - plotly.graph_objects.sankey.link.Hoverlabel - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plot.ly/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for - hovertemplate . - label - The shown name of the link. - labelsrc - Sets the source reference on plot.ly for label - . - line - plotly.graph_objects.sankey.link.Line instance - or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on plot.ly for - source . - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on plot.ly for - target . - value - A numeric value representing the flow volume - value. - valuesrc - Sets the source reference on plot.ly for value - . + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. Returns ------- - plotly.graph_objs.sankey.Link + plotly.graph_objs.parcoords.Line """ - return self["link"] + return self["line"] - @link.setter - def link(self, val): - self["link"] = val + @line.setter + def line(self, val): + self["line"] = val # meta # ---- @@ -40142,146 +42812,50 @@ def name(self): def name(self, val): self["name"] = val - # node - # ---- + # rangefont + # --------- @property - def node(self): + def rangefont(self): """ - The nodes of the Sankey plot. + Sets the font for the `dimension` range values. - The 'node' property is an instance of Node + The 'rangefont' property is an instance of Rangefont that may be specified as: - - An instance of plotly.graph_objs.sankey.Node + - An instance of plotly.graph_objs.parcoords.Rangefont - A dict of string/value properties that will be passed - to the Node constructor + to the Rangefont constructor Supported dict properties: color - Sets the `node` color. It can be a single - value, or an array for specifying color for - each `node`. If `node.color` is omitted, then - the default `Plotly` color palette will be - cycled through to have a variety of colors. - These defaults are not fully opaque, to allow - some visibility of what is beneath the node. - colorsrc - Sets the source reference on plot.ly for color - . - groups - Groups of nodes. Each group is defined by an - array with the indices of the nodes it - contains. Multiple groups can be specified. - hoverinfo - Determines which trace information appear when - hovering nodes. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - plotly.graph_objects.sankey.node.Hoverlabel - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plot.ly/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for - hovertemplate . - label - The shown name of the node. - labelsrc - Sets the source reference on plot.ly for label - . - line - plotly.graph_objects.sankey.node.Line instance - or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on plot.ly for x . - y - The normalized vertical position of the node. - ysrc - Sets the source reference on plot.ly for y . - - Returns - ------- - plotly.graph_objs.sankey.Node - """ - return self["node"] - - @node.setter - def node(self, val): - self["node"] = val - - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the Sankey diagram. - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - The 'selectedpoints' property accepts values of any type + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size Returns ------- - Any + plotly.graph_objs.parcoords.Rangefont """ - return self["selectedpoints"] + return self["rangefont"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @rangefont.setter + def rangefont(self, val): + self["rangefont"] = val # stream # ------ @@ -40290,7 +42864,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.sankey.Stream + - An instance of plotly.graph_objs.parcoords.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -40308,7 +42882,7 @@ def stream(self): Returns ------- - plotly.graph_objs.sankey.Stream + plotly.graph_objs.parcoords.Stream """ return self["stream"] @@ -40316,18 +42890,18 @@ def stream(self): def stream(self, val): self["stream"] = val - # textfont + # tickfont # -------- @property - def textfont(self): + def tickfont(self): """ - Sets the font for node labels + Sets the font for the `dimension` tick values. - The 'textfont' property is an instance of Textfont + The 'tickfont' property is an instance of Tickfont that may be specified as: - - An instance of plotly.graph_objs.sankey.Textfont + - An instance of plotly.graph_objs.parcoords.Tickfont - A dict of string/value properties that will be passed - to the Textfont constructor + to the Tickfont constructor Supported dict properties: @@ -40353,13 +42927,13 @@ def textfont(self): Returns ------- - plotly.graph_objs.sankey.Textfont + plotly.graph_objs.parcoords.Tickfont """ - return self["textfont"] + return self["tickfont"] - @textfont.setter - def textfont(self, val): - self["textfont"] = val + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val # uid # --- @@ -40416,52 +42990,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # valueformat - # ----------- - @property - def valueformat(self): - """ - Sets the value formatting rule using d3 formatting mini- - language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'valueformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["valueformat"] - - @valueformat.setter - def valueformat(self, val): - self["valueformat"] = val - - # valuesuffix - # ----------- - @property - def valuesuffix(self): - """ - Adds a unit to follow the value in the hover tooltip. Add a - space if a separation is necessary from the value. - - The 'valuesuffix' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["valuesuffix"] - - @valuesuffix.setter - def valuesuffix(self, val): - self["valuesuffix"] = val - # visible # ------- @property @@ -40502,14 +43030,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - arrangement - If value is `snap` (the default), the node arrangement - is assisted by automatic snapping of elements to - preserve space between nodes specified via `nodepad`. - If value is `perpendicular`, the nodes can only move - along a line perpendicular to the flow. If value is - `freeform`, the nodes can freely move on the plane. If - value is `fixed`, the nodes are stationary. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -40517,18 +43037,16 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions domain - plotly.graph_objects.sankey.Domain instance or dict - with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. Note that this attribute is - superseded by `node.hoverinfo` and `node.hoverinfo` for - nodes and links respectively. - hoverlabel - plotly.graph_objects.sankey.Hoverlabel instance or dict + plotly.graph_objects.parcoords.Domain instance or dict with compatible properties ids Assigns id labels to each datum. These ids for object @@ -40536,8 +43054,23 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - link - The links of the Sankey plot. + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + line + plotly.graph_objects.parcoords.Line instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -40556,22 +43089,13 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - node - The nodes of the Sankey plot. - orientation - Sets the orientation of the Sankey diagram. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + rangefont + Sets the font for the `dimension` range values. stream - plotly.graph_objects.sankey.Stream instance or dict + plotly.graph_objects.parcoords.Stream instance or dict with compatible properties - textfont - Sets the font for node labels + tickfont + Sets the font for the `dimension` tick values. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -40594,15 +43118,6 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - valuesuffix - Adds a unit to follow the value in the hover tooltip. - Add a space if a separation is necessary from the - value. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -40613,51 +43128,40 @@ def _prop_descriptions(self): def __init__( self, arg=None, - arrangement=None, customdata=None, customdatasrc=None, + dimensions=None, + dimensiondefaults=None, domain=None, - hoverinfo=None, - hoverlabel=None, ids=None, idssrc=None, - link=None, + labelangle=None, + labelfont=None, + labelside=None, + line=None, meta=None, metasrc=None, name=None, - node=None, - orientation=None, - selectedpoints=None, + rangefont=None, stream=None, - textfont=None, + tickfont=None, uid=None, uirevision=None, - valueformat=None, - valuesuffix=None, visible=None, **kwargs ): """ - Construct a new Sankey object + Construct a new Parcoords object - Sankey plots for network flow data analysis. The nodes are - specified in `nodes` and the links between sources and targets - in `links`. The colors are set in `nodes[i].color` and - `links[i].color`, otherwise defaults are used. + Parallel coordinates for multidimensional exploratory data + analysis. The samples are specified in `dimensions`. The colors + are set in `line.color`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Sankey - arrangement - If value is `snap` (the default), the node arrangement - is assisted by automatic snapping of elements to - preserve space between nodes specified via `nodepad`. - If value is `perpendicular`, the nodes can only move - along a line perpendicular to the flow. If value is - `freeform`, the nodes can freely move on the plane. If - value is `fixed`, the nodes are stationary. + an instance of plotly.graph_objs.Parcoords customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -40665,18 +43169,16 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions domain - plotly.graph_objects.sankey.Domain instance or dict - with compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. Note that this attribute is - superseded by `node.hoverinfo` and `node.hoverinfo` for - nodes and links respectively. - hoverlabel - plotly.graph_objects.sankey.Hoverlabel instance or dict + plotly.graph_objects.parcoords.Domain instance or dict with compatible properties ids Assigns id labels to each datum. These ids for object @@ -40684,8 +43186,23 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - link - The links of the Sankey plot. + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + line + plotly.graph_objects.parcoords.Line instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -40704,22 +43221,13 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - node - The nodes of the Sankey plot. - orientation - Sets the orientation of the Sankey diagram. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + rangefont + Sets the font for the `dimension` range values. stream - plotly.graph_objects.sankey.Stream instance or dict + plotly.graph_objects.parcoords.Stream instance or dict with compatible properties - textfont - Sets the font for node labels + tickfont + Sets the font for the `dimension` tick values. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -40737,20 +43245,11 @@ def __init__( (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - valueformat - Sets the value formatting rule using d3 formatting - mini-language which is similar to those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - valuesuffix - Adds a unit to follow the value in the hover tooltip. - Add a space if a separation is necessary from the - value. + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -40759,9 +43258,9 @@ def __init__( Returns ------- - Sankey + Parcoords """ - super(Sankey, self).__init__("sankey") + super(Parcoords, self).__init__("parcoords") # Validate arg # ------------ @@ -40774,9 +43273,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Sankey +The first argument to the plotly.graph_objs.Parcoords constructor must be a dict or -an instance of plotly.graph_objs.Sankey""" +an instance of plotly.graph_objs.Parcoords""" ) # Handle skip_invalid @@ -40785,77 +43284,73 @@ def __init__( # Import validators # ----------------- - from plotly.validators import sankey as v_sankey + from plotly.validators import parcoords as v_parcoords # Initialize validators # --------------------- - self._validators["arrangement"] = v_sankey.ArrangementValidator() - self._validators["customdata"] = v_sankey.CustomdataValidator() - self._validators["customdatasrc"] = v_sankey.CustomdatasrcValidator() - self._validators["domain"] = v_sankey.DomainValidator() - self._validators["hoverinfo"] = v_sankey.HoverinfoValidator() - self._validators["hoverlabel"] = v_sankey.HoverlabelValidator() - self._validators["ids"] = v_sankey.IdsValidator() - self._validators["idssrc"] = v_sankey.IdssrcValidator() - self._validators["link"] = v_sankey.LinkValidator() - self._validators["meta"] = v_sankey.MetaValidator() - self._validators["metasrc"] = v_sankey.MetasrcValidator() - self._validators["name"] = v_sankey.NameValidator() - self._validators["node"] = v_sankey.NodeValidator() - self._validators["orientation"] = v_sankey.OrientationValidator() - self._validators["selectedpoints"] = v_sankey.SelectedpointsValidator() - self._validators["stream"] = v_sankey.StreamValidator() - self._validators["textfont"] = v_sankey.TextfontValidator() - self._validators["uid"] = v_sankey.UidValidator() - self._validators["uirevision"] = v_sankey.UirevisionValidator() - self._validators["valueformat"] = v_sankey.ValueformatValidator() - self._validators["valuesuffix"] = v_sankey.ValuesuffixValidator() - self._validators["visible"] = v_sankey.VisibleValidator() + self._validators["customdata"] = v_parcoords.CustomdataValidator() + self._validators["customdatasrc"] = v_parcoords.CustomdatasrcValidator() + self._validators["dimensions"] = v_parcoords.DimensionsValidator() + self._validators["dimensiondefaults"] = v_parcoords.DimensionValidator() + self._validators["domain"] = v_parcoords.DomainValidator() + self._validators["ids"] = v_parcoords.IdsValidator() + self._validators["idssrc"] = v_parcoords.IdssrcValidator() + self._validators["labelangle"] = v_parcoords.LabelangleValidator() + self._validators["labelfont"] = v_parcoords.LabelfontValidator() + self._validators["labelside"] = v_parcoords.LabelsideValidator() + self._validators["line"] = v_parcoords.LineValidator() + self._validators["meta"] = v_parcoords.MetaValidator() + self._validators["metasrc"] = v_parcoords.MetasrcValidator() + self._validators["name"] = v_parcoords.NameValidator() + self._validators["rangefont"] = v_parcoords.RangefontValidator() + self._validators["stream"] = v_parcoords.StreamValidator() + self._validators["tickfont"] = v_parcoords.TickfontValidator() + self._validators["uid"] = v_parcoords.UidValidator() + self._validators["uirevision"] = v_parcoords.UirevisionValidator() + self._validators["visible"] = v_parcoords.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("arrangement", None) - self["arrangement"] = arrangement if arrangement is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("dimensions", None) + self["dimensions"] = dimensions if dimensions is not None else _v + _v = arg.pop("dimensiondefaults", None) + self["dimensiondefaults"] = ( + dimensiondefaults if dimensiondefaults is not None else _v + ) _v = arg.pop("domain", None) self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("link", None) - self["link"] = link if link is not None else _v + _v = arg.pop("labelangle", None) + self["labelangle"] = labelangle if labelangle is not None else _v + _v = arg.pop("labelfont", None) + self["labelfont"] = labelfont if labelfont is not None else _v + _v = arg.pop("labelside", None) + self["labelside"] = labelside if labelside is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("node", None) - self["node"] = node if node is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("rangefont", None) + self["rangefont"] = rangefont if rangefont is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("tickfont", None) + self["tickfont"] = tickfont if tickfont is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("valueformat", None) - self["valueformat"] = valueformat if valueformat is not None else _v - _v = arg.pop("valuesuffix", None) - self["valuesuffix"] = valuesuffix if valuesuffix is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v @@ -40863,9 +43358,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "sankey" + self._props["type"] = "parcoords" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="sankey", val="sankey" + plotly_name="type", parent_name="parcoords", val="parcoords" ) arg.pop("type", None) @@ -40882,254 +43377,315 @@ def __init__( import copy as _copy -class Pointcloud(_BaseTraceType): +class Parcats(_BaseTraceType): - # customdata - # ---------- + # arrangement + # ----------- @property - def customdata(self): + def arrangement(self): """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + Sets the drag interaction mode for categories and dimensions. + If `perpendicular`, the categories can only move along a line + perpendicular to the paths. If `freeform`, the categories can + freely move on the plane. If `fixed`, the categories and + dimensions are stationary. - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'arrangement' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['perpendicular', 'freeform', 'fixed'] Returns ------- - numpy.ndarray + Any """ - return self["customdata"] + return self["arrangement"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @arrangement.setter + def arrangement(self, val): + self["arrangement"] = val - # customdatasrc - # ------------- + # bundlecolors + # ------------ @property - def customdatasrc(self): + def bundlecolors(self): """ - Sets the source reference on plot.ly for customdata . + Sort paths so that like colors are bundled together within each + category. - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'bundlecolors' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["customdatasrc"] + return self["bundlecolors"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @bundlecolors.setter + def bundlecolors(self, val): + self["bundlecolors"] = val - # hoverinfo - # --------- + # counts + # ------ @property - def hoverinfo(self): + def counts(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + The number of observations represented by each state. Defaults + to 1 so that each state represents one observation - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'counts' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any|numpy.ndarray + int|float|numpy.ndarray """ - return self["hoverinfo"] + return self["counts"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @counts.setter + def counts(self, val): + self["counts"] = val - # hoverinfosrc - # ------------ + # countssrc + # --------- @property - def hoverinfosrc(self): + def countssrc(self): """ - Sets the source reference on plot.ly for hoverinfo . + Sets the source reference on plot.ly for counts . - The 'hoverinfosrc' property must be specified as a string or + The 'countssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["hoverinfosrc"] + return self["countssrc"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @countssrc.setter + def countssrc(self, val): + self["countssrc"] = val - # hoverlabel + # dimensions # ---------- @property - def hoverlabel(self): + def dimensions(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.pointcloud.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor + The dimensions (variables) of the parallel categories diagram. + + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcats.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor Supported dict properties: - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc + categoryarray + Sets the order in which categories in this + dimension appear. Only has an effect if + `categoryorder` is set to "array". Used with + `categoryorder`. + categoryarraysrc Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc + categoryarray . + categoryorder + Specifies the ordering logic for the categories + in the dimension. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + displayindex + The display index of dimension, from left to + right, zero indexed, defaults to dimension + index. + label + The shown name of the dimension. + ticktext + Sets alternative tick labels for the categories + in this dimension. Only has an effect if + `categoryorder` is set to "array". Should be an + array the same length as `categoryarray` Used + with `categoryorder`. + ticktextsrc Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc + ticktext . + values + Dimension values. `values[n]` represents the + category value of the `n`th point in the + dataset, therefore the `values` vector for all + dimensions must be the same (longer vectors + will be truncated). + valuessrc Sets the source reference on plot.ly for - namelength . + values . + visible + Shows the dimension when set to `true` (the + default). Hides the dimension for `false`. Returns ------- - plotly.graph_objs.pointcloud.Hoverlabel + tuple[plotly.graph_objs.parcats.Dimension] """ - return self["hoverlabel"] + return self["dimensions"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val - # ids - # --- + # dimensiondefaults + # ----------------- @property - def ids(self): + def dimensiondefaults(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets the + default property values to use for elements of + parcats.dimensions - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of plotly.graph_objs.parcats.Dimension + - A dict of string/value properties that will be passed + to the Dimension constructor + + Supported dict properties: Returns ------- - numpy.ndarray + plotly.graph_objs.parcats.Dimension """ - return self["ids"] + return self["dimensiondefaults"] - @ids.setter - def ids(self, val): - self["ids"] = val + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val - # idssrc + # domain # ------ @property - def idssrc(self): + def domain(self): """ - Sets the source reference on plot.ly for ids . + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.parcats.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this parcats trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this parcats trace . + x + Sets the horizontal domain of this parcats + trace (in plot fraction). + y + Sets the vertical domain of this parcats trace + (in plot fraction). Returns ------- - str + plotly.graph_objs.parcats.Domain """ - return self["idssrc"] + return self["domain"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @domain.setter + def domain(self, val): + self["domain"] = val - # indices - # ------- + # hoverinfo + # --------- @property - def indices(self): + def hoverinfo(self): """ - A sequential value, 0..n, supply it to avoid creating this - array inside plotting. If specified, it must be a typed - `Int32Array` array. Its length must be equal to or greater than - the number of points. For the best performance and memory use, - create one large `indices` typed array that is guaranteed to be - at least as long as the largest number of points during use, - and reuse it on each `Plotly.restyle()` call. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'indices' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['count', 'probability'] joined with '+' characters + (e.g. 'count+probability') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') Returns ------- - numpy.ndarray + Any """ - return self["indices"] + return self["hoverinfo"] - @indices.setter - def indices(self, val): - self["indices"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # indicessrc - # ---------- + # hoveron + # ------- @property - def indicessrc(self): + def hoveron(self): """ - Sets the source reference on plot.ly for indices . + Sets the hover interaction mode for the parcats diagram. If + `category`, hover interaction take place per category. If + `color`, hover interactions take place per color per category. + If `dimension`, hover interactions take place across all + categories per dimension. - The 'indicessrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'hoveron' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['category', 'color', 'dimension'] Returns ------- - str + Any """ - return self["indicessrc"] + return self["hoveron"] - @indicessrc.setter - def indicessrc(self, val): - self["indicessrc"] = val + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val - # legendgroup - # ----------- + # hovertemplate + # ------------- @property - def legendgroup(self): + def hovertemplate(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `count`, `probability`, `category`, `categorycount`, + `colorcount` and `bandcolorcount`. Anything contained in tag + `` is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. - The 'legendgroup' property is a string and must be specified as: + The 'hovertemplate' property is a string and must be specified as: - A string - A number that will be converted to a string @@ -41137,65 +43693,198 @@ def legendgroup(self): ------- str """ - return self["legendgroup"] + return self["hovertemplate"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # labelfont + # --------- + @property + def labelfont(self): + """ + Sets the font for the `dimension` labels. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of plotly.graph_objs.parcats.Labelfont + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.parcats.Labelfont + """ + return self["labelfont"] - # marker - # ------ + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + # line + # ---- @property - def marker(self): + def line(self): """ - The 'marker' property is an instance of Marker + The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.pointcloud.Marker + - An instance of plotly.graph_objs.parcats.Line - A dict of string/value properties that will be passed - to the Marker constructor + to the Line constructor Supported dict properties: - blend - Determines if colors are blended together for a - translucency effect in case `opacity` is - specified as a value less then `1`. Setting - `blend` to `true` reduces zoom/pan speed if - used with large numbers of points. - border - plotly.graph_objects.pointcloud.marker.Border - instance or dict with compatible properties + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `line.colorscale`. Has an effect + only if in `line.color`is set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `line.color`) or the bounds set in + `line.cmin` and `line.cmax` Has an effect only + if in `line.color`is set to a numerical array. + Defaults to `false` when `line.cmin` and + `line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `line.cmin` and/or `line.cmax` to be + equidistant to this point. Has an effect only + if in `line.color`is set to a numerical array. + Value should have the same units as in + `line.color`. Has no effect when `line.cauto` + is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `line.color`is set to a + numerical array. Value should have the same + units as in `line.color` and if set, + `line.cmax` must be set as well. color - Sets the marker fill color. It accepts a - specific color.If the color is not fully opaque - and there are hundreds of thousandsof points, - it may cause slower zooming and panning. - opacity - Sets the marker opacity. The default value is - `1` (fully opaque). If the markers are not - fully opaque and there are hundreds of - thousands of points, it may cause slower - zooming and panning. Opacity fades the color - even if `blend` is left on `false` even if - there is no translucency effect in that case. - sizemax - Sets the maximum size (in px) of the rendered - marker points. Effective when the `pointcloud` - shows only few points. - sizemin - Sets the minimum size (in px) of the rendered - marker points, effective when the `pointcloud` - shows a million or more points. + Sets thelinecolor. It accepts either a specific + color or an array of numbers that are mapped to + the colorscale relative to the max and min + values of the array or relative to `line.cmin` + and `line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.parcats.line.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `line.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`line.cmin` and `line.cmax`. + Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R + ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri + c,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plot.ly/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `count` and `probability`. Anything + contained in tag `` is displayed in the + secondary box, for example + "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + reversescale + Reverses the color mapping if true. Has an + effect only if in `line.color`is set to a + numerical array. If true, `line.cmin` will + correspond to the last color in the array and + `line.cmax` will correspond to the first color. + shape + Sets the shape of the paths. If `linear`, paths + are composed of straight lines. If `hspline`, + paths are composed of horizontal curved splines + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `line.color`is set to a numerical array. Returns ------- - plotly.graph_objs.pointcloud.Marker + plotly.graph_objs.parcats.Line """ - return self["marker"] + return self["line"] - @marker.setter - def marker(self, val): - self["marker"] = val + @line.setter + def line(self, val): + self["line"] = val # meta # ---- @@ -41267,46 +43956,28 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - - # showlegend - # ---------- + # sortpaths + # --------- @property - def showlegend(self): + def sortpaths(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + Sets the path sorting algorithm. If `forward`, sort paths based + on dimension categories from left to right. If `backward`, sort + paths based on dimensions categories from right to left. - The 'showlegend' property must be specified as a bool - (either True, or False) + The 'sortpaths' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['forward', 'backward'] Returns ------- - bool + Any """ - return self["showlegend"] + return self["sortpaths"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @sortpaths.setter + def sortpaths(self, val): + self["sortpaths"] = val # stream # ------ @@ -41315,7 +43986,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.pointcloud.Stream + - An instance of plotly.graph_objs.parcats.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -41333,7 +44004,7 @@ def stream(self): Returns ------- - plotly.graph_objs.pointcloud.Stream + plotly.graph_objs.parcats.Stream """ return self["stream"] @@ -41341,387 +44012,128 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on plot.ly for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xbounds - # ------- - @property - def xbounds(self): - """ - Specify `xbounds` in the shape of `[xMin, xMax] to avoid - looping through the `xy` typed array. Use it in conjunction - with `xy` and `ybounds` for the performance benefits. - - The 'xbounds' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["xbounds"] - - @xbounds.setter - def xbounds(self, val): - self["xbounds"] = val - - # xboundssrc - # ---------- - @property - def xboundssrc(self): - """ - Sets the source reference on plot.ly for xbounds . - - The 'xboundssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xboundssrc"] - - @xboundssrc.setter - def xboundssrc(self, val): - self["xboundssrc"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on plot.ly for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # xy - # -- - @property - def xy(self): - """ - Faster alternative to specifying `x` and `y` separately. If - supplied, it must be a typed `Float32Array` array that - represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + - 1] = y[i]` - - The 'xy' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["xy"] - - @xy.setter - def xy(self, val): - self["xy"] = val - - # xysrc - # ----- - @property - def xysrc(self): - """ - Sets the source reference on plot.ly for xy . - - The 'xysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xysrc"] - - @xysrc.setter - def xysrc(self, val): - self["xysrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # yaxis - # ----- + # tickfont + # -------- @property - def yaxis(self): + def tickfont(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the font for the `category` labels. - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of plotly.graph_objs.parcats.Tickfont + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size Returns ------- - str + plotly.graph_objs.parcats.Tickfont """ - return self["yaxis"] + return self["tickfont"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val - # ybounds - # ------- + # uid + # --- @property - def ybounds(self): + def uid(self): """ - Specify `ybounds` in the shape of `[yMin, yMax] to avoid - looping through the `xy` typed array. Use it in conjunction - with `xy` and `xbounds` for the performance benefits. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'ybounds' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - numpy.ndarray + str """ - return self["ybounds"] + return self["uid"] - @ybounds.setter - def ybounds(self, val): - self["ybounds"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # yboundssrc + # uirevision # ---------- @property - def yboundssrc(self): + def uirevision(self): """ - Sets the source reference on plot.ly for ybounds . + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'yboundssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uirevision' property accepts values of any type Returns ------- - str + Any """ - return self["yboundssrc"] + return self["uirevision"] - @yboundssrc.setter - def yboundssrc(self, val): - self["yboundssrc"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # ysrc - # ---- + # visible + # ------- @property - def ysrc(self): + def visible(self): """ - Sets the source reference on plot.ly for y . + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["ysrc"] + return self["visible"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @visible.setter + def visible(self, val): + self["visible"] = val # type # ---- @@ -41740,47 +44152,75 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on plot.ly for counts . + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + plotly.graph_objects.parcats.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.pointcloud.Hoverlabel instance or - dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - indices - A sequential value, 0..n, supply it to avoid creating - this array inside plotting. If specified, it must be a - typed `Int32Array` array. Its length must be equal to - or greater than the number of points. For the best - performance and memory use, create one large `indices` - typed array that is guaranteed to be at least as long - as the largest number of points during use, and reuse - it on each `Plotly.restyle()` call. - indicessrc - Sets the source reference on plot.ly for indices . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.pointcloud.Marker instance or dict - with compatible properties + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `count`, `probability`, + `category`, `categorycount`, `colorcount` and + `bandcolorcount`. Anything contained in tag `` + is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + labelfont + Sets the font for the `dimension` labels. + line + plotly.graph_objects.parcats.Line instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -41799,24 +44239,16 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - opacity - Sets the opacity of the trace. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. stream - plotly.graph_objects.pointcloud.Stream instance or dict + plotly.graph_objects.parcats.Stream instance or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on plot.ly for text . + tickfont + Sets the font for the `category` labels. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -41844,138 +44276,114 @@ def _prop_descriptions(self): "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbounds - Specify `xbounds` in the shape of `[xMin, xMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `ybounds` for the performance - benefits. - xboundssrc - Sets the source reference on plot.ly for xbounds . - xsrc - Sets the source reference on plot.ly for x . - xy - Faster alternative to specifying `x` and `y` - separately. If supplied, it must be a typed - `Float32Array` array that represents points such that - `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` - xysrc - Sets the source reference on plot.ly for xy . - y - Sets the y coordinates. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybounds - Specify `ybounds` in the shape of `[yMin, yMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `xbounds` for the performance - benefits. - yboundssrc - Sets the source reference on plot.ly for ybounds . - ysrc - Sets the source reference on plot.ly for y . """ def __init__( self, arg=None, - customdata=None, - customdatasrc=None, + arrangement=None, + bundlecolors=None, + counts=None, + countssrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - indices=None, - indicessrc=None, - legendgroup=None, - marker=None, + hoveron=None, + hovertemplate=None, + labelfont=None, + line=None, meta=None, metasrc=None, name=None, - opacity=None, - showlegend=None, + sortpaths=None, stream=None, - text=None, - textsrc=None, + tickfont=None, uid=None, uirevision=None, visible=None, - x=None, - xaxis=None, - xbounds=None, - xboundssrc=None, - xsrc=None, - xy=None, - xysrc=None, - y=None, - yaxis=None, - ybounds=None, - yboundssrc=None, - ysrc=None, **kwargs ): """ - Construct a new Pointcloud object + Construct a new Parcats object - The data visualized as a point cloud set in `x` and `y` using - the WebGl plotting engine. + Parallel categories diagram for multidimensional categorical + data. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Pointcloud - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . + an instance of plotly.graph_objs.Parcats + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on plot.ly for counts . + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + plotly.graph_objects.parcats.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.pointcloud.Hoverlabel instance or - dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - indices - A sequential value, 0..n, supply it to avoid creating - this array inside plotting. If specified, it must be a - typed `Int32Array` array. Its length must be equal to - or greater than the number of points. For the best - performance and memory use, create one large `indices` - typed array that is guaranteed to be at least as long - as the largest number of points during use, and reuse - it on each `Plotly.restyle()` call. - indicessrc - Sets the source reference on plot.ly for indices . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.pointcloud.Marker instance or dict - with compatible properties + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `count`, `probability`, + `category`, `categorycount`, `colorcount` and + `bandcolorcount`. Anything contained in tag `` + is displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + labelfont + Sets the font for the `dimension` labels. + line + plotly.graph_objects.parcats.Line instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -41994,24 +44402,16 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - opacity - Sets the opacity of the trace. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. stream - plotly.graph_objects.pointcloud.Stream instance or dict + plotly.graph_objects.parcats.Stream instance or dict with compatible properties - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on plot.ly for text . + tickfont + Sets the font for the `category` labels. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -42026,64 +44426,25 @@ def __init__( controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the x coordinates. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbounds - Specify `xbounds` in the shape of `[xMin, xMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `ybounds` for the performance - benefits. - xboundssrc - Sets the source reference on plot.ly for xbounds . - xsrc - Sets the source reference on plot.ly for x . - xy - Faster alternative to specifying `x` and `y` - separately. If supplied, it must be a typed - `Float32Array` array that represents points such that - `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` - xysrc - Sets the source reference on plot.ly for xy . - y - Sets the y coordinates. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybounds - Specify `ybounds` in the shape of `[yMin, yMax] to - avoid looping through the `xy` typed array. Use it in - conjunction with `xy` and `xbounds` for the performance - benefits. - yboundssrc - Sets the source reference on plot.ly for ybounds . - ysrc - Sets the source reference on plot.ly for y . + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). Returns ------- - Pointcloud + Parcats """ - super(Pointcloud, self).__init__("pointcloud") + super(Parcats, self).__init__("parcats") # Validate arg # ------------ @@ -42096,9 +44457,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Pointcloud +The first argument to the plotly.graph_objs.Parcats constructor must be a dict or -an instance of plotly.graph_objs.Pointcloud""" +an instance of plotly.graph_objs.Parcats""" ) # Handle skip_invalid @@ -42107,123 +44468,86 @@ def __init__( # Import validators # ----------------- - from plotly.validators import pointcloud as v_pointcloud + from plotly.validators import parcats as v_parcats # Initialize validators # --------------------- - self._validators["customdata"] = v_pointcloud.CustomdataValidator() - self._validators["customdatasrc"] = v_pointcloud.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_pointcloud.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_pointcloud.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_pointcloud.HoverlabelValidator() - self._validators["ids"] = v_pointcloud.IdsValidator() - self._validators["idssrc"] = v_pointcloud.IdssrcValidator() - self._validators["indices"] = v_pointcloud.IndicesValidator() - self._validators["indicessrc"] = v_pointcloud.IndicessrcValidator() - self._validators["legendgroup"] = v_pointcloud.LegendgroupValidator() - self._validators["marker"] = v_pointcloud.MarkerValidator() - self._validators["meta"] = v_pointcloud.MetaValidator() - self._validators["metasrc"] = v_pointcloud.MetasrcValidator() - self._validators["name"] = v_pointcloud.NameValidator() - self._validators["opacity"] = v_pointcloud.OpacityValidator() - self._validators["showlegend"] = v_pointcloud.ShowlegendValidator() - self._validators["stream"] = v_pointcloud.StreamValidator() - self._validators["text"] = v_pointcloud.TextValidator() - self._validators["textsrc"] = v_pointcloud.TextsrcValidator() - self._validators["uid"] = v_pointcloud.UidValidator() - self._validators["uirevision"] = v_pointcloud.UirevisionValidator() - self._validators["visible"] = v_pointcloud.VisibleValidator() - self._validators["x"] = v_pointcloud.XValidator() - self._validators["xaxis"] = v_pointcloud.XAxisValidator() - self._validators["xbounds"] = v_pointcloud.XboundsValidator() - self._validators["xboundssrc"] = v_pointcloud.XboundssrcValidator() - self._validators["xsrc"] = v_pointcloud.XsrcValidator() - self._validators["xy"] = v_pointcloud.XyValidator() - self._validators["xysrc"] = v_pointcloud.XysrcValidator() - self._validators["y"] = v_pointcloud.YValidator() - self._validators["yaxis"] = v_pointcloud.YAxisValidator() - self._validators["ybounds"] = v_pointcloud.YboundsValidator() - self._validators["yboundssrc"] = v_pointcloud.YboundssrcValidator() - self._validators["ysrc"] = v_pointcloud.YsrcValidator() + self._validators["arrangement"] = v_parcats.ArrangementValidator() + self._validators["bundlecolors"] = v_parcats.BundlecolorsValidator() + self._validators["counts"] = v_parcats.CountsValidator() + self._validators["countssrc"] = v_parcats.CountssrcValidator() + self._validators["dimensions"] = v_parcats.DimensionsValidator() + self._validators["dimensiondefaults"] = v_parcats.DimensionValidator() + self._validators["domain"] = v_parcats.DomainValidator() + self._validators["hoverinfo"] = v_parcats.HoverinfoValidator() + self._validators["hoveron"] = v_parcats.HoveronValidator() + self._validators["hovertemplate"] = v_parcats.HovertemplateValidator() + self._validators["labelfont"] = v_parcats.LabelfontValidator() + self._validators["line"] = v_parcats.LineValidator() + self._validators["meta"] = v_parcats.MetaValidator() + self._validators["metasrc"] = v_parcats.MetasrcValidator() + self._validators["name"] = v_parcats.NameValidator() + self._validators["sortpaths"] = v_parcats.SortpathsValidator() + self._validators["stream"] = v_parcats.StreamValidator() + self._validators["tickfont"] = v_parcats.TickfontValidator() + self._validators["uid"] = v_parcats.UidValidator() + self._validators["uirevision"] = v_parcats.UirevisionValidator() + self._validators["visible"] = v_parcats.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("arrangement", None) + self["arrangement"] = arrangement if arrangement is not None else _v + _v = arg.pop("bundlecolors", None) + self["bundlecolors"] = bundlecolors if bundlecolors is not None else _v + _v = arg.pop("counts", None) + self["counts"] = counts if counts is not None else _v + _v = arg.pop("countssrc", None) + self["countssrc"] = countssrc if countssrc is not None else _v + _v = arg.pop("dimensions", None) + self["dimensions"] = dimensions if dimensions is not None else _v + _v = arg.pop("dimensiondefaults", None) + self["dimensiondefaults"] = ( + dimensiondefaults if dimensiondefaults is not None else _v + ) + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("indices", None) - self["indices"] = indices if indices is not None else _v - _v = arg.pop("indicessrc", None) - self["indicessrc"] = indicessrc if indicessrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("labelfont", None) + self["labelfont"] = labelfont if labelfont is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("sortpaths", None) + self["sortpaths"] = sortpaths if sortpaths is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("tickfont", None) + self["tickfont"] = tickfont if tickfont is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbounds", None) - self["xbounds"] = xbounds if xbounds is not None else _v - _v = arg.pop("xboundssrc", None) - self["xboundssrc"] = xboundssrc if xboundssrc is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xy", None) - self["xy"] = xy if xy is not None else _v - _v = arg.pop("xysrc", None) - self["xysrc"] = xysrc if xysrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybounds", None) - self["ybounds"] = ybounds if ybounds is not None else _v - _v = arg.pop("yboundssrc", None) - self["yboundssrc"] = yboundssrc if yboundssrc is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "pointcloud" + self._props["type"] = "parcats" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="pointcloud", val="pointcloud" + plotly_name="type", parent_name="parcats", val="parcats" ) arg.pop("type", None) @@ -42240,7 +44564,47 @@ def __init__( import copy as _copy -class Pie(_BaseTraceType): +class Ohlc(_BaseTraceType): + + # close + # ----- + @property + def close(self): + """ + Sets the close values. + + The 'close' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["close"] + + @close.setter + def close(self, val): + self["close"] = val + + # closesrc + # -------- + @property + def closesrc(self): + """ + Sets the source reference on plot.ly for close . + + The 'closesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["closesrc"] + + @closesrc.setter + def closesrc(self, val): + self["closesrc"] = val # customdata # ---------- @@ -42285,104 +44649,72 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # direction - # --------- - @property - def direction(self): - """ - Specifies the direction at which succeeding sectors follow one - another. - - The 'direction' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['clockwise', 'counterclockwise'] - - Returns - ------- - Any - """ - return self["direction"] - - @direction.setter - def direction(self, val): - self["direction"] = val - - # dlabel - # ------ + # decreasing + # ---------- @property - def dlabel(self): + def decreasing(self): """ - Sets the label step. See `label0` for more info. + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of plotly.graph_objs.ohlc.Decreasing + - A dict of string/value properties that will be passed + to the Decreasing constructor - The 'dlabel' property is a number and may be specified as: - - An int or float + Supported dict properties: + + line + plotly.graph_objects.ohlc.decreasing.Line + instance or dict with compatible properties Returns ------- - int|float + plotly.graph_objs.ohlc.Decreasing """ - return self["dlabel"] + return self["decreasing"] - @dlabel.setter - def dlabel(self, val): - self["dlabel"] = val + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val - # domain - # ------ + # high + # ---- @property - def domain(self): + def high(self): """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.pie.Domain - - A dict of string/value properties that will be passed - to the Domain constructor + Sets the high values. - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this pie trace . - row - If there is a layout grid, use the domain for - this row in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace - (in plot fraction). - y - Sets the vertical domain of this pie trace (in - plot fraction). + The 'high' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.pie.Domain + numpy.ndarray """ - return self["domain"] + return self["high"] - @domain.setter - def domain(self, val): - self["domain"] = val + @high.setter + def high(self, val): + self["high"] = val - # hole - # ---- + # highsrc + # ------- @property - def hole(self): + def highsrc(self): """ - Sets the fraction of the radius to cut out of the pie. Use this - to make a donut chart. + Sets the source reference on plot.ly for high . - The 'hole' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'highsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["hole"] + return self["highsrc"] - @hole.setter - def hole(self, val): - self["hole"] = val + @highsrc.setter + def highsrc(self, val): + self["highsrc"] = val # hoverinfo # --------- @@ -42395,8 +44727,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters - (e.g. 'label+text') + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -42437,7 +44769,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.pie.Hoverlabel + - An instance of plotly.graph_objs.ohlc.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -42478,10 +44810,13 @@ def hoverlabel(self): namelengthsrc Sets the source reference on plot.ly for namelength . + split + Show hover information (open, close, high, low) + in separate labels. Returns ------- - plotly.graph_objs.pie.Hoverlabel + plotly.graph_objs.ohlc.Hoverlabel """ return self["hoverlabel"] @@ -42489,74 +44824,12 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `percent` and `text`. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - # hovertext # --------- @property def hovertext(self): """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. + Same as `text`. The 'hovertext' property is a string and must be specified as: - A string @@ -42635,126 +44908,32 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- + # increasing + # ---------- @property - def insidetextfont(self): + def increasing(self): """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont + The 'increasing' property is an instance of Increasing that may be specified as: - - An instance of plotly.graph_objs.pie.Insidetextfont + - An instance of plotly.graph_objs.ohlc.Increasing - A dict of string/value properties that will be passed - to the Insidetextfont constructor + to the Increasing constructor Supported dict properties: - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.pie.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # label0 - # ------ - @property - def label0(self): - """ - Alternate to `labels`. Builds a numeric set of labels. Use with - `dlabel` where `label0` is the starting label and `dlabel` the - step. - - The 'label0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["label0"] - - @label0.setter - def label0(self, val): - self["label0"] = val - - # labels - # ------ - @property - def labels(self): - """ - Sets the sector labels. If `labels` entries are duplicated, we - sum associated `values` or simply count occurrences if `values` - is not provided. For other array attributes (including color) - we use the first non-empty entry among all occurrences of the - label. - - The 'labels' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["labels"] - - @labels.setter - def labels(self, val): - self["labels"] = val - - # labelssrc - # --------- - @property - def labelssrc(self): - """ - Sets the source reference on plot.ly for labels . - - The 'labelssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + line + plotly.graph_objects.ohlc.increasing.Line + instance or dict with compatible properties Returns ------- - str + plotly.graph_objs.ohlc.Increasing """ - return self["labelssrc"] + return self["increasing"] - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val + @increasing.setter + def increasing(self, val): + self["increasing"] = val # legendgroup # ----------- @@ -42779,39 +44958,82 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # marker - # ------ + # line + # ---- @property - def marker(self): + def line(self): """ - The 'marker' property is an instance of Marker + The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.pie.Marker + - An instance of plotly.graph_objs.ohlc.Line - A dict of string/value properties that will be passed - to the Marker constructor + to the Line constructor Supported dict properties: - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on plot.ly for - colors . - line - plotly.graph_objects.pie.marker.Line instance - or dict with compatible properties + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + Note that this style setting can also be set + per direction via `increasing.line.dash` and + `decreasing.line.dash`. + width + [object Object] Note that this style setting + can also be set per direction via + `increasing.line.width` and + `decreasing.line.width`. Returns ------- - plotly.graph_objs.pie.Marker + plotly.graph_objs.ohlc.Line """ - return self["marker"] + return self["line"] - @marker.setter - def marker(self, val): - self["marker"] = val + @line.setter + def line(self, val): + self["line"] = val + + # low + # --- + @property + def low(self): + """ + Sets the low values. + + The 'low' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["low"] + + @low.setter + def low(self, val): + self["low"] = val + + # lowsrc + # ------ + @property + def lowsrc(self): + """ + Sets the source reference on plot.ly for low . + + The 'lowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowsrc"] + + @lowsrc.setter + def lowsrc(self, val): + self["lowsrc"] = val # meta # ---- @@ -42903,148 +45125,69 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `textinfo` lying outside the sector. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of plotly.graph_objs.pie.Outsidetextfont - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.pie.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # pull + # open # ---- @property - def pull(self): + def open(self): """ - Sets the fraction of larger radius to pull the sectors out from - the center. This can be a constant to pull all slices apart - from each other equally or an array to highlight one or more - slices. + Sets the open values. - The 'pull' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - A tuple, list, or one-dimensional numpy array of the above + The 'open' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float|numpy.ndarray + numpy.ndarray """ - return self["pull"] + return self["open"] - @pull.setter - def pull(self, val): - self["pull"] = val + @open.setter + def open(self, val): + self["open"] = val - # pullsrc + # opensrc # ------- @property - def pullsrc(self): + def opensrc(self): """ - Sets the source reference on plot.ly for pull . + Sets the source reference on plot.ly for open . - The 'pullsrc' property must be specified as a string or + The 'opensrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["pullsrc"] - - @pullsrc.setter - def pullsrc(self, val): - self["pullsrc"] = val - - # rotation - # -------- - @property - def rotation(self): - """ - Instead of the first slice starting at 12 o'clock, rotate to - some other angle. - - The 'rotation' property is a number and may be specified as: - - An int or float in the interval [-360, 360] - - Returns - ------- - int|float - """ - return self["rotation"] + return self["opensrc"] - @rotation.setter - def rotation(self, val): - self["rotation"] = val + @opensrc.setter + def opensrc(self, val): + self["opensrc"] = val - # scalegroup - # ---------- + # selectedpoints + # -------------- @property - def scalegroup(self): + def selectedpoints(self): """ - If there are multiple pie charts that should be sized according - to their totals, link them by providing a non-empty group id - here shared by every trace in the same group. + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. - The 'scalegroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'selectedpoints' property accepts values of any type Returns ------- - str + Any """ - return self["scalegroup"] + return self["selectedpoints"] - @scalegroup.setter - def scalegroup(self, val): - self["scalegroup"] = val + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val # showlegend # ---------- @@ -43067,27 +45210,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # sort - # ---- - @property - def sort(self): - """ - Determines whether or not the sectors are reordered from - largest to smallest. - - The 'sort' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["sort"] - - @sort.setter - def sort(self, val): - self["sort"] = val - # stream # ------ @property @@ -43095,7 +45217,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.pie.Stream + - An instance of plotly.graph_objs.ohlc.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -43113,7 +45235,7 @@ def stream(self): Returns ------- - plotly.graph_objs.pie.Stream + plotly.graph_objs.ohlc.Stream """ return self["stream"] @@ -43126,18 +45248,19 @@ def stream(self, val): @property def text(self): """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. + Sets hover text elements associated with each sample point. If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + this trace's sample points. - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["text"] @@ -43145,126 +45268,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `textinfo`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of plotly.graph_objs.pie.Textfont - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.pie.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `textinfo`. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on plot.ly for textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - # textsrc # ------- @property @@ -43285,124 +45288,26 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of plotly.graph_objs.pie.Title - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - position - Specifies the location of the `title`. Note - that the title's position used to be set by the - now deprecated `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no - title is displayed. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - - Returns - ------- - plotly.graph_objs.pie.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - - # titlefont + # tickwidth # --------- @property - def titlefont(self): - """ - Deprecated: Please use pie.title.font instead. Sets the font - used for `title`. Note that the title's font used to be set by - the now deprecated `titlefont` attribute. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of plotly.graph_objs.pie.title.Font - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - - """ - return self["titlefont"] - - @titlefont.setter - def titlefont(self, val): - self["titlefont"] = val - - # titleposition - # ------------- - @property - def titleposition(self): + def tickwidth(self): """ - Deprecated: Please use pie.title.position instead. Specifies - the location of the `title`. Note that the title's position - used to be set by the now deprecated `titleposition` attribute. + Sets the width of the open/close tick marks relative to the "x" + minimal interval. - The 'position' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top left', 'top center', 'top right', 'middle center', - 'bottom left', 'bottom center', 'bottom right'] + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, 0.5] Returns ------- - + int|float """ - return self["titleposition"] + return self["tickwidth"] - @titleposition.setter - def titleposition(self, val): - self["titleposition"] = val + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val # uid # --- @@ -43459,69 +45364,143 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ + # visible + # ------- @property - def values(self): + def visible(self): """ - Sets the values of the sectors. If omitted, we count - occurrences of each label. + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'values' property is an array that may be specified as a tuple, + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # x + # - + @property + def x(self): + """ + Sets the x coordinates. If absent, linear coordinate will be + generated. + + The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["values"] + return self["x"] - @values.setter - def values(self, val): - self["values"] = val + @x.setter + def x(self, val): + self["x"] = val - # valuessrc - # --------- + # xaxis + # ----- @property - def valuessrc(self): + def xaxis(self): """ - Sets the source reference on plot.ly for values . + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- str """ - return self["valuessrc"] + return self["xaxis"] - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # visible - # ------- + # xcalendar + # --------- @property - def visible(self): + def xcalendar(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the calendar system to use with `x` date data. - The 'visible' property is an enumeration that may be specified as: + The 'xcalendar' property is an enumeration that may be specified as: - One of the following enumeration values: - [True, False, 'legendonly'] + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- Any """ - return self["visible"] + return self["xcalendar"] - @visible.setter - def visible(self, val): - self["visible"] = val + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val # type # ---- @@ -43540,6 +45519,10 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ + close + Sets the close values. + closesrc + Sets the source reference on plot.ly for close . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -43547,17 +45530,13 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - direction - Specifies the direction at which succeeding sectors - follow one another. - dlabel - Sets the label step. See `label0` for more info. - domain - plotly.graph_objects.pie.Domain instance or dict with - compatible properties - hole - Sets the fraction of the radius to cut out of the pie. - Use this to make a donut chart. + decreasing + plotly.graph_objects.ohlc.Decreasing instance or dict + with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on plot.ly for high . hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -43566,37 +45545,10 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.pie.Hoverlabel instance or dict + plotly.graph_objects.ohlc.Hoverlabel instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. + Same as `text`. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -43605,28 +45557,20 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on plot.ly for labels . + increasing + plotly.graph_objects.ohlc.Increasing instance or dict + with compatible properties legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - marker - plotly.graph_objects.pie.Marker instance or dict with + line + plotly.graph_objects.ohlc.Line instance or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on plot.ly for low . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -43647,62 +45591,33 @@ def _prop_descriptions(self): legend item and on hover. opacity Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. - pull - Sets the fraction of larger radius to pull the sectors - out from the center. This can be a constant to pull all - slices apart from each other equally or an array to - highlight one or more slices. - pullsrc - Sets the source reference on plot.ly for pull . - rotation - Instead of the first slice starting at 12 o'clock, - rotate to some other angle. - scalegroup - If there are multiple pie charts that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. + open + Sets the open values. + opensrc + Sets the source reference on plot.ly for open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - sort - Determines whether or not the sectors are reordered - from largest to smallest. stream - plotly.graph_objects.pie.Stream instance or dict with + plotly.graph_objects.ohlc.Stream instance or dict with compatible properties text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. textsrc Sets the source reference on plot.ly for text . - title - plotly.graph_objects.pie.Title instance or dict with - compatible properties - titlefont - Deprecated: Please use pie.title.font instead. Sets the - font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleposition - Deprecated: Please use pie.title.position instead. - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -43725,87 +45640,95 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. """ - _mapped_properties = { - "titlefont": ("title", "font"), - "titleposition": ("title", "position"), - } - def __init__( self, arg=None, + close=None, + closesrc=None, customdata=None, customdatasrc=None, - direction=None, - dlabel=None, - domain=None, - hole=None, + decreasing=None, + high=None, + highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - insidetextfont=None, - label0=None, - labels=None, - labelssrc=None, + increasing=None, legendgroup=None, - marker=None, + line=None, + low=None, + lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, - outsidetextfont=None, - pull=None, - pullsrc=None, - rotation=None, - scalegroup=None, + open=None, + opensrc=None, + selectedpoints=None, showlegend=None, - sort=None, stream=None, text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, textsrc=None, - title=None, - titlefont=None, - titleposition=None, + tickwidth=None, uid=None, uirevision=None, - values=None, - valuessrc=None, visible=None, + x=None, + xaxis=None, + xcalendar=None, + xsrc=None, + yaxis=None, **kwargs ): """ - Construct a new Pie object + Construct a new Ohlc object - A data visualized by the sectors of the pie is set in `values`. - The sector labels are set in `labels`. The sector colors are - set in `marker.colors` + The ohlc (short for Open-High-Low-Close) is a style of + financial chart describing open, high, low and close for a + given `x` coordinate (most likely time). The tip of the lines + represent the `low` and `high` values and the horizontal + segments represent the `open` and `close` values. Sample points + where the close value is higher (lower) then the open value are + called increasing (decreasing). By default, increasing items + are drawn in green whereas decreasing are drawn in red. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Pie + an instance of plotly.graph_objs.Ohlc + close + Sets the close values. + closesrc + Sets the source reference on plot.ly for close . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -43813,17 +45736,13 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - direction - Specifies the direction at which succeeding sectors - follow one another. - dlabel - Sets the label step. See `label0` for more info. - domain - plotly.graph_objects.pie.Domain instance or dict with - compatible properties - hole - Sets the fraction of the radius to cut out of the pie. - Use this to make a donut chart. + decreasing + plotly.graph_objects.ohlc.Decreasing instance or dict + with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on plot.ly for high . hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -43832,37 +45751,10 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.pie.Hoverlabel instance or dict + plotly.graph_objects.ohlc.Hoverlabel instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. + Same as `text`. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -43871,28 +45763,20 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on plot.ly for labels . + increasing + plotly.graph_objects.ohlc.Increasing instance or dict + with compatible properties legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - marker - plotly.graph_objects.pie.Marker instance or dict with + line + plotly.graph_objects.ohlc.Line instance or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on plot.ly for low . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -43913,62 +45797,33 @@ def __init__( legend item and on hover. opacity Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside the - sector. - pull - Sets the fraction of larger radius to pull the sectors - out from the center. This can be a constant to pull all - slices apart from each other equally or an array to - highlight one or more slices. - pullsrc - Sets the source reference on plot.ly for pull . - rotation - Instead of the first slice starting at 12 o'clock, - rotate to some other angle. - scalegroup - If there are multiple pie charts that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. + open + Sets the open values. + opensrc + Sets the source reference on plot.ly for open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this - trace is shown in the legend. - sort - Determines whether or not the sectors are reordered - from largest to smallest. - stream - plotly.graph_objects.pie.Stream instance or dict with - compatible properties - text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . - title - plotly.graph_objects.pie.Title instance or dict with - compatible properties - titlefont - Deprecated: Please use pie.title.font instead. Sets the - font used for `title`. Note that the title's font used - to be set by the now deprecated `titlefont` attribute. - titleposition - Deprecated: Please use pie.title.position instead. - Specifies the location of the `title`. Note that the - title's position used to be set by the now deprecated - `titleposition` attribute. + trace is shown in the legend. + stream + plotly.graph_objects.ohlc.Stream instance or dict with + compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on plot.ly for text . + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -43991,22 +45846,34 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. Returns ------- - Pie + Ohlc """ - super(Pie, self).__init__("pie") + super(Ohlc, self).__init__("ohlc") # Validate arg # ------------ @@ -44019,9 +45886,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Pie +The first argument to the plotly.graph_objs.Ohlc constructor must be a dict or -an instance of plotly.graph_objs.Pie""" +an instance of plotly.graph_objs.Ohlc""" ) # Handle skip_invalid @@ -44030,82 +45897,72 @@ def __init__( # Import validators # ----------------- - from plotly.validators import pie as v_pie + from plotly.validators import ohlc as v_ohlc # Initialize validators # --------------------- - self._validators["customdata"] = v_pie.CustomdataValidator() - self._validators["customdatasrc"] = v_pie.CustomdatasrcValidator() - self._validators["direction"] = v_pie.DirectionValidator() - self._validators["dlabel"] = v_pie.DlabelValidator() - self._validators["domain"] = v_pie.DomainValidator() - self._validators["hole"] = v_pie.HoleValidator() - self._validators["hoverinfo"] = v_pie.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_pie.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_pie.HoverlabelValidator() - self._validators["hovertemplate"] = v_pie.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_pie.HovertemplatesrcValidator() - self._validators["hovertext"] = v_pie.HovertextValidator() - self._validators["hovertextsrc"] = v_pie.HovertextsrcValidator() - self._validators["ids"] = v_pie.IdsValidator() - self._validators["idssrc"] = v_pie.IdssrcValidator() - self._validators["insidetextfont"] = v_pie.InsidetextfontValidator() - self._validators["label0"] = v_pie.Label0Validator() - self._validators["labels"] = v_pie.LabelsValidator() - self._validators["labelssrc"] = v_pie.LabelssrcValidator() - self._validators["legendgroup"] = v_pie.LegendgroupValidator() - self._validators["marker"] = v_pie.MarkerValidator() - self._validators["meta"] = v_pie.MetaValidator() - self._validators["metasrc"] = v_pie.MetasrcValidator() - self._validators["name"] = v_pie.NameValidator() - self._validators["opacity"] = v_pie.OpacityValidator() - self._validators["outsidetextfont"] = v_pie.OutsidetextfontValidator() - self._validators["pull"] = v_pie.PullValidator() - self._validators["pullsrc"] = v_pie.PullsrcValidator() - self._validators["rotation"] = v_pie.RotationValidator() - self._validators["scalegroup"] = v_pie.ScalegroupValidator() - self._validators["showlegend"] = v_pie.ShowlegendValidator() - self._validators["sort"] = v_pie.SortValidator() - self._validators["stream"] = v_pie.StreamValidator() - self._validators["text"] = v_pie.TextValidator() - self._validators["textfont"] = v_pie.TextfontValidator() - self._validators["textinfo"] = v_pie.TextinfoValidator() - self._validators["textposition"] = v_pie.TextpositionValidator() - self._validators["textpositionsrc"] = v_pie.TextpositionsrcValidator() - self._validators["textsrc"] = v_pie.TextsrcValidator() - self._validators["title"] = v_pie.TitleValidator() - self._validators["uid"] = v_pie.UidValidator() - self._validators["uirevision"] = v_pie.UirevisionValidator() - self._validators["values"] = v_pie.ValuesValidator() - self._validators["valuessrc"] = v_pie.ValuessrcValidator() - self._validators["visible"] = v_pie.VisibleValidator() + self._validators["close"] = v_ohlc.CloseValidator() + self._validators["closesrc"] = v_ohlc.ClosesrcValidator() + self._validators["customdata"] = v_ohlc.CustomdataValidator() + self._validators["customdatasrc"] = v_ohlc.CustomdatasrcValidator() + self._validators["decreasing"] = v_ohlc.DecreasingValidator() + self._validators["high"] = v_ohlc.HighValidator() + self._validators["highsrc"] = v_ohlc.HighsrcValidator() + self._validators["hoverinfo"] = v_ohlc.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_ohlc.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_ohlc.HoverlabelValidator() + self._validators["hovertext"] = v_ohlc.HovertextValidator() + self._validators["hovertextsrc"] = v_ohlc.HovertextsrcValidator() + self._validators["ids"] = v_ohlc.IdsValidator() + self._validators["idssrc"] = v_ohlc.IdssrcValidator() + self._validators["increasing"] = v_ohlc.IncreasingValidator() + self._validators["legendgroup"] = v_ohlc.LegendgroupValidator() + self._validators["line"] = v_ohlc.LineValidator() + self._validators["low"] = v_ohlc.LowValidator() + self._validators["lowsrc"] = v_ohlc.LowsrcValidator() + self._validators["meta"] = v_ohlc.MetaValidator() + self._validators["metasrc"] = v_ohlc.MetasrcValidator() + self._validators["name"] = v_ohlc.NameValidator() + self._validators["opacity"] = v_ohlc.OpacityValidator() + self._validators["open"] = v_ohlc.OpenValidator() + self._validators["opensrc"] = v_ohlc.OpensrcValidator() + self._validators["selectedpoints"] = v_ohlc.SelectedpointsValidator() + self._validators["showlegend"] = v_ohlc.ShowlegendValidator() + self._validators["stream"] = v_ohlc.StreamValidator() + self._validators["text"] = v_ohlc.TextValidator() + self._validators["textsrc"] = v_ohlc.TextsrcValidator() + self._validators["tickwidth"] = v_ohlc.TickwidthValidator() + self._validators["uid"] = v_ohlc.UidValidator() + self._validators["uirevision"] = v_ohlc.UirevisionValidator() + self._validators["visible"] = v_ohlc.VisibleValidator() + self._validators["x"] = v_ohlc.XValidator() + self._validators["xaxis"] = v_ohlc.XAxisValidator() + self._validators["xcalendar"] = v_ohlc.XcalendarValidator() + self._validators["xsrc"] = v_ohlc.XsrcValidator() + self._validators["yaxis"] = v_ohlc.YAxisValidator() # Populate data dict with properties # ---------------------------------- + _v = arg.pop("close", None) + self["close"] = close if close is not None else _v + _v = arg.pop("closesrc", None) + self["closesrc"] = closesrc if closesrc is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("direction", None) - self["direction"] = direction if direction is not None else _v - _v = arg.pop("dlabel", None) - self["dlabel"] = dlabel if dlabel is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hole", None) - self["hole"] = hole if hole is not None else _v + _v = arg.pop("decreasing", None) + self["decreasing"] = decreasing if decreasing is not None else _v + _v = arg.pop("high", None) + self["high"] = high if high is not None else _v + _v = arg.pop("highsrc", None) + self["highsrc"] = highsrc if highsrc is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) _v = arg.pop("hovertext", None) self["hovertext"] = hovertext if hovertext is not None else _v _v = arg.pop("hovertextsrc", None) @@ -44114,18 +45971,16 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("label0", None) - self["label0"] = label0 if label0 is not None else _v - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v + _v = arg.pop("increasing", None) + self["increasing"] = increasing if increasing is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("low", None) + self["low"] = low if low is not None else _v + _v = arg.pop("lowsrc", None) + self["lowsrc"] = lowsrc if lowsrc is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) @@ -44134,62 +45989,46 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("pull", None) - self["pull"] = pull if pull is not None else _v - _v = arg.pop("pullsrc", None) - self["pullsrc"] = pullsrc if pullsrc is not None else _v - _v = arg.pop("rotation", None) - self["rotation"] = rotation if rotation is not None else _v - _v = arg.pop("scalegroup", None) - self["scalegroup"] = scalegroup if scalegroup is not None else _v + _v = arg.pop("open", None) + self["open"] = open if open is not None else _v + _v = arg.pop("opensrc", None) + self["opensrc"] = opensrc if opensrc is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("sort", None) - self["sort"] = sort if sort is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("titlefont", None) - _v = titlefont if titlefont is not None else _v - if _v is not None: - self["titlefont"] = _v - _v = arg.pop("titleposition", None) - _v = titleposition if titleposition is not None else _v - if _v is not None: - self["titleposition"] = _v + _v = arg.pop("tickwidth", None) + self["tickwidth"] = tickwidth if tickwidth is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "pie" + self._props["type"] = "ohlc" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="pie", val="pie" + plotly_name="type", parent_name="ohlc", val="ohlc" ) arg.pop("type", None) @@ -44206,1598 +46045,1201 @@ def __init__( import copy as _copy -class Parcoords(_BaseTraceType): - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on plot.ly for customdata . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # dimensions - # ---------- - @property - def dimensions(self): - """ - The dimensions (variables) of the parallel coordinates chart. - 2..60 dimensions are supported. - - The 'dimensions' property is a tuple of instances of - Dimension that may be specified as: - - A list or tuple of instances of plotly.graph_objs.parcoords.Dimension - - A list or tuple of dicts of string/value properties that - will be passed to the Dimension constructor - - Supported dict properties: - - constraintrange - The domain range to which the filter on the - dimension is constrained. Must be an array of - `[fromValue, toValue]` with `fromValue <= - toValue`, or if `multiselect` is not disabled, - you may give an array of arrays, where each - inner array is `[fromValue, toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a - single range? - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - The domain range that represents the full, - shown axis extent. Defaults to the `values` - extent. Must be an array of `[fromValue, - toValue]` with finite numbers as elements. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticktext - Sets the text displayed at the ticks position - via `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - values - Dimension values. `values[n]` represents the - value of the `n`th point in the dataset, - therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on plot.ly for - values . - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. - - Returns - ------- - tuple[plotly.graph_objs.parcoords.Dimension] - """ - return self["dimensions"] - - @dimensions.setter - def dimensions(self, val): - self["dimensions"] = val - - # dimensiondefaults - # ----------------- - @property - def dimensiondefaults(self): - """ - When used in a template (as - layout.template.data.parcoords.dimensiondefaults), sets the - default property values to use for elements of - parcoords.dimensions - - The 'dimensiondefaults' property is an instance of Dimension - that may be specified as: - - An instance of plotly.graph_objs.parcoords.Dimension - - A dict of string/value properties that will be passed - to the Dimension constructor - - Supported dict properties: - - Returns - ------- - plotly.graph_objs.parcoords.Dimension - """ - return self["dimensiondefaults"] - - @dimensiondefaults.setter - def dimensiondefaults(self, val): - self["dimensiondefaults"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.parcoords.Domain - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this parcoords - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords - trace (in plot fraction). - y - Sets the vertical domain of this parcoords - trace (in plot fraction). - - Returns - ------- - plotly.graph_objs.parcoords.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - - # ids - # --- - @property - def ids(self): - """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. - - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["ids"] - - @ids.setter - def ids(self, val): - self["ids"] = val +class Mesh3d(_BaseTraceType): - # idssrc - # ------ + # alphahull + # --------- @property - def idssrc(self): + def alphahull(self): """ - Sets the source reference on plot.ly for ids . + Determines how the mesh surface triangles are derived from the + set of vertices (points) represented by the `x`, `y` and `z` + arrays, if the `i`, `j`, `k` arrays are not supplied. For + general use of `mesh3d` it is preferred that `i`, `j`, `k` are + supplied. If "-1", Delaunay triangulation is used, which is + mainly suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In case the + `delaunayaxis` intersects the mesh surface at more than one + point it will result triangles that are very long in the + dimension of `delaunayaxis`. If ">0", the alpha-shape algorithm + is used. In this case, the positive `alphahull` value signals + the use of the alpha-shape algorithm, _and_ its value acts as + the parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or if the + intention is to enclose the `x`, `y` and `z` point set into a + convex hull. - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'alphahull' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["idssrc"] + return self["alphahull"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @alphahull.setter + def alphahull(self, val): + self["alphahull"] = val - # labelangle - # ---------- + # autocolorscale + # -------------- @property - def labelangle(self): - """ - Sets the angle of the labels with respect to the horizontal. - For example, a `tickangle` of -90 draws the labels vertically. - Tilted labels with "labelangle" may be positioned better inside - margins when `labelposition` is set to "bottom". + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'labelangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - int|float + bool """ - return self["labelangle"] + return self["autocolorscale"] - @labelangle.setter - def labelangle(self, val): - self["labelangle"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # labelfont - # --------- + # cauto + # ----- @property - def labelfont(self): + def cauto(self): """ - Sets the font for the `dimension` labels. - - The 'labelfont' property is an instance of Labelfont - that may be specified as: - - An instance of plotly.graph_objs.parcoords.Labelfont - - A dict of string/value properties that will be passed - to the Labelfont constructor - - Supported dict properties: - - color + Determines whether or not the color domain is computed with + respect to the input data (here `intensity`) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size + The 'cauto' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.parcoords.Labelfont + bool """ - return self["labelfont"] + return self["cauto"] - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val + @cauto.setter + def cauto(self, val): + self["cauto"] = val - # labelside - # --------- + # cmax + # ---- @property - def labelside(self): + def cmax(self): """ - Specifies the location of the `label`. "top" positions labels - above, next to the title "bottom" positions labels below the - graph Tilted labels with "labelangle" may be positioned better - inside margins when `labelposition` is set to "bottom". + Sets the upper bound of the color domain. Value should have the + same units as `intensity` and if set, `cmin` must be set as + well. - The 'labelside' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['top', 'bottom'] + The 'cmax' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["labelside"] + return self["cmax"] - @labelside.setter - def labelside(self, val): - self["labelside"] = val + @cmax.setter + def cmax(self, val): + self["cmax"] = val - # line + # cmid # ---- @property - def line(self): + def cmid(self): """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of plotly.graph_objs.parcoords.Line - - A dict of string/value properties that will be passed - to the Line constructor + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `intensity`. Has no effect when `cauto` is + `false`. - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.parcoords.line.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. + The 'cmid' property is a number and may be specified as: + - An int or float Returns ------- - plotly.graph_objs.parcoords.Line + int|float """ - return self["line"] + return self["cmid"] - @line.setter - def line(self, val): - self["line"] = val + @cmid.setter + def cmid(self, val): + self["cmid"] = val - # meta + # cmin # ---- @property - def meta(self): + def cmin(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Sets the lower bound of the color domain. Value should have the + same units as `intensity` and if set, `cmax` must be set as + well. - The 'meta' property accepts values of any type + The 'cmin' property is a number and may be specified as: + - An int or float Returns ------- - Any|numpy.ndarray + int|float """ - return self["meta"] + return self["cmin"] - @meta.setter - def meta(self, val): - self["meta"] = val + @cmin.setter + def cmin(self, val): + self["cmin"] = val - # metasrc - # ------- + # color + # ----- @property - def metasrc(self): + def color(self): """ - Sets the source reference on plot.ly for meta . + Sets the color of the whole mesh - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to mesh3d.colorscale Returns ------- str """ - return self["metasrc"] + return self["color"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @color.setter + def color(self, val): + self["color"] = val - # name - # ---- + # coloraxis + # --------- @property - def name(self): + def coloraxis(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) Returns ------- str """ - return self["name"] + return self["coloraxis"] - @name.setter - def name(self, val): - self["name"] = val + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # rangefont - # --------- + # colorbar + # -------- @property - def rangefont(self): + def colorbar(self): """ - Sets the font for the `dimension` range values. - - The 'rangefont' property is an instance of Rangefont + The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.parcoords.Rangefont + - An instance of plotly.graph_objs.mesh3d.ColorBar - A dict of string/value properties that will be passed - to the Rangefont constructor + to the ColorBar constructor Supported dict properties: - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.mesh3d.colorbar + .Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.mesh3d.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of mesh3d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.mesh3d.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + mesh3d.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + mesh3d.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - plotly.graph_objs.parcoords.Rangefont + plotly.graph_objs.mesh3d.ColorBar """ - return self["rangefont"] + return self["colorbar"] - @rangefont.setter - def rangefont(self, val): - self["rangefont"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # stream - # ------ + # colorscale + # ---------- @property - def stream(self): + def colorscale(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.parcoords.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- - plotly.graph_objs.parcoords.Stream + str """ - return self["stream"] + return self["colorscale"] - @stream.setter - def stream(self, val): - self["stream"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # tickfont - # -------- + # contour + # ------- @property - def tickfont(self): + def contour(self): """ - Sets the font for the `dimension` tick values. - - The 'tickfont' property is an instance of Tickfont + The 'contour' property is an instance of Contour that may be specified as: - - An instance of plotly.graph_objs.parcoords.Tickfont + - An instance of plotly.graph_objs.mesh3d.Contour - A dict of string/value properties that will be passed - to the Tickfont constructor + to the Contour constructor Supported dict properties: color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - Returns - ------- - plotly.graph_objs.parcoords.Tickfont - """ - return self["tickfont"] - - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. Returns ------- - str + plotly.graph_objs.mesh3d.Contour """ - return self["uid"] + return self["contour"] - @uid.setter - def uid(self, val): - self["uid"] = val + @contour.setter + def contour(self, val): + self["contour"] = val - # uirevision + # customdata # ---------- @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): + def customdata(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] - - Returns - ------- - Any - """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - dimensions - The dimensions (variables) of the parallel coordinates - chart. 2..60 dimensions are supported. - dimensiondefaults - When used in a template (as - layout.template.data.parcoords.dimensiondefaults), sets - the default property values to use for elements of - parcoords.dimensions - domain - plotly.graph_objects.parcoords.Domain instance or dict - with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - labelangle - Sets the angle of the labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - labels vertically. Tilted labels with "labelangle" may - be positioned better inside margins when - `labelposition` is set to "bottom". - labelfont - Sets the font for the `dimension` labels. - labelside - Specifies the location of the `label`. "top" positions - labels above, next to the title "bottom" positions - labels below the graph Tilted labels with "labelangle" - may be positioned better inside margins when - `labelposition` is set to "bottom". - line - plotly.graph_objects.parcoords.Line instance or dict - with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - rangefont - Sets the font for the `dimension` range values. - stream - plotly.graph_objects.parcoords.Stream instance or dict - with compatible properties - tickfont - Sets the font for the `dimension` tick values. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - """ - - def __init__( - self, - arg=None, - customdata=None, - customdatasrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - ids=None, - idssrc=None, - labelangle=None, - labelfont=None, - labelside=None, - line=None, - meta=None, - metasrc=None, - name=None, - rangefont=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - visible=None, - **kwargs - ): - """ - Construct a new Parcoords object - - Parallel coordinates for multidimensional exploratory data - analysis. The samples are specified in `dimensions`. The colors - are set in `line.color`. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Parcoords - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - dimensions - The dimensions (variables) of the parallel coordinates - chart. 2..60 dimensions are supported. - dimensiondefaults - When used in a template (as - layout.template.data.parcoords.dimensiondefaults), sets - the default property values to use for elements of - parcoords.dimensions - domain - plotly.graph_objects.parcoords.Domain instance or dict - with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - labelangle - Sets the angle of the labels with respect to the - horizontal. For example, a `tickangle` of -90 draws the - labels vertically. Tilted labels with "labelangle" may - be positioned better inside margins when - `labelposition` is set to "bottom". - labelfont - Sets the font for the `dimension` labels. - labelside - Specifies the location of the `label`. "top" positions - labels above, next to the title "bottom" positions - labels below the graph Tilted labels with "labelangle" - may be positioned better inside margins when - `labelposition` is set to "bottom". - line - plotly.graph_objects.parcoords.Line instance or dict - with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - rangefont - Sets the font for the `dimension` range values. - stream - plotly.graph_objects.parcoords.Stream instance or dict - with compatible properties - tickfont - Sets the font for the `dimension` tick values. - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Parcoords + numpy.ndarray """ - super(Parcoords, self).__init__("parcoords") - - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Parcoords -constructor must be a dict or -an instance of plotly.graph_objs.Parcoords""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import parcoords as v_parcoords + return self["customdata"] - # Initialize validators - # --------------------- - self._validators["customdata"] = v_parcoords.CustomdataValidator() - self._validators["customdatasrc"] = v_parcoords.CustomdatasrcValidator() - self._validators["dimensions"] = v_parcoords.DimensionsValidator() - self._validators["dimensiondefaults"] = v_parcoords.DimensionValidator() - self._validators["domain"] = v_parcoords.DomainValidator() - self._validators["ids"] = v_parcoords.IdsValidator() - self._validators["idssrc"] = v_parcoords.IdssrcValidator() - self._validators["labelangle"] = v_parcoords.LabelangleValidator() - self._validators["labelfont"] = v_parcoords.LabelfontValidator() - self._validators["labelside"] = v_parcoords.LabelsideValidator() - self._validators["line"] = v_parcoords.LineValidator() - self._validators["meta"] = v_parcoords.MetaValidator() - self._validators["metasrc"] = v_parcoords.MetasrcValidator() - self._validators["name"] = v_parcoords.NameValidator() - self._validators["rangefont"] = v_parcoords.RangefontValidator() - self._validators["stream"] = v_parcoords.StreamValidator() - self._validators["tickfont"] = v_parcoords.TickfontValidator() - self._validators["uid"] = v_parcoords.UidValidator() - self._validators["uirevision"] = v_parcoords.UirevisionValidator() - self._validators["visible"] = v_parcoords.VisibleValidator() + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dimensions", None) - self["dimensions"] = dimensions if dimensions is not None else _v - _v = arg.pop("dimensiondefaults", None) - self["dimensiondefaults"] = ( - dimensiondefaults if dimensiondefaults is not None else _v - ) - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("labelangle", None) - self["labelangle"] = labelangle if labelangle is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("labelside", None) - self["labelside"] = labelside if labelside is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("rangefont", None) - self["rangefont"] = rangefont if rangefont is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v + # customdatasrc + # ------------- + @property + def customdatasrc(self): + """ + Sets the source reference on plot.ly for customdata . + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + str + """ + return self["customdatasrc"] - self._props["type"] = "parcoords" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="parcoords", val="parcoords" - ) - arg.pop("type", None) + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # delaunayaxis + # ------------ + @property + def delaunayaxis(self): + """ + Sets the Delaunay axis, which is the axis that is perpendicular + to the surface of the Delaunay triangulation. It has an effect + if `i`, `j`, `k` are not provided and `alphahull` is set to + indicate Delaunay triangulation. + + The 'delaunayaxis' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['x', 'y', 'z'] - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + Any + """ + return self["delaunayaxis"] + @delaunayaxis.setter + def delaunayaxis(self, val): + self["delaunayaxis"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # facecolor + # --------- + @property + def facecolor(self): + """ + Sets the color of each face Overrides "color" and + "vertexcolor". + + The 'facecolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + Returns + ------- + numpy.ndarray + """ + return self["facecolor"] -class Parcats(_BaseTraceType): + @facecolor.setter + def facecolor(self, val): + self["facecolor"] = val - # arrangement - # ----------- + # facecolorsrc + # ------------ @property - def arrangement(self): + def facecolorsrc(self): """ - Sets the drag interaction mode for categories and dimensions. - If `perpendicular`, the categories can only move along a line - perpendicular to the paths. If `freeform`, the categories can - freely move on the plane. If `fixed`, the categories and - dimensions are stationary. + Sets the source reference on plot.ly for facecolor . - The 'arrangement' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['perpendicular', 'freeform', 'fixed'] + The 'facecolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["arrangement"] + return self["facecolorsrc"] - @arrangement.setter - def arrangement(self, val): - self["arrangement"] = val + @facecolorsrc.setter + def facecolorsrc(self, val): + self["facecolorsrc"] = val - # bundlecolors - # ------------ + # flatshading + # ----------- @property - def bundlecolors(self): + def flatshading(self): """ - Sort paths so that like colors are bundled together within each - category. + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. - The 'bundlecolors' property must be specified as a bool + The 'flatshading' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["bundlecolors"] + return self["flatshading"] - @bundlecolors.setter - def bundlecolors(self, val): - self["bundlecolors"] = val + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val - # counts - # ------ + # hoverinfo + # --------- @property - def counts(self): + def hoverinfo(self): """ - The number of observations represented by each state. Defaults - to 1 so that each state represents one observation + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'counts' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - int|float|numpy.ndarray + Any|numpy.ndarray """ - return self["counts"] + return self["hoverinfo"] - @counts.setter - def counts(self, val): - self["counts"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # countssrc - # --------- + # hoverinfosrc + # ------------ @property - def countssrc(self): + def hoverinfosrc(self): """ - Sets the source reference on plot.ly for counts . + Sets the source reference on plot.ly for hoverinfo . - The 'countssrc' property must be specified as a string or + The 'hoverinfosrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["countssrc"] + return self["hoverinfosrc"] - @countssrc.setter - def countssrc(self, val): - self["countssrc"] = val + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val - # dimensions + # hoverlabel # ---------- @property - def dimensions(self): + def hoverlabel(self): """ - The dimensions (variables) of the parallel categories diagram. - - The 'dimensions' property is a tuple of instances of - Dimension that may be specified as: - - A list or tuple of instances of plotly.graph_objs.parcats.Dimension - - A list or tuple of dicts of string/value properties that - will be passed to the Dimension constructor + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.mesh3d.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor Supported dict properties: - categoryarray - Sets the order in which categories in this - dimension appear. Only has an effect if - `categoryorder` is set to "array". Used with - `categoryorder`. - categoryarraysrc + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc Sets the source reference on plot.ly for - categoryarray . - categoryorder - Specifies the ordering logic for the categories - in the dimension. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - displayindex - The display index of dimension, from left to - right, zero indexed, defaults to dimension - index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories - in this dimension. Only has an effect if - `categoryorder` is set to "array". Should be an - array the same length as `categoryarray` Used - with `categoryorder`. - ticktextsrc + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc Sets the source reference on plot.ly for - ticktext . - values - Dimension values. `values[n]` represents the - category value of the `n`th point in the - dataset, therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). - valuessrc + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc Sets the source reference on plot.ly for - values . - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. + namelength . + + Returns + ------- + plotly.graph_objs.mesh3d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + # i + # - + @property + def i(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "first" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `i[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `i` represents a point in + space, which is the first vertex of a triangle. + + The 'i' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["i"] + + @i.setter + def i(self, val): + self["i"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + # idssrc + # ------ + @property + def idssrc(self): + """ + Sets the source reference on plot.ly for ids . + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - tuple[plotly.graph_objs.parcats.Dimension] + str """ - return self["dimensions"] + return self["idssrc"] - @dimensions.setter - def dimensions(self, val): - self["dimensions"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # dimensiondefaults - # ----------------- + # intensity + # --------- @property - def dimensiondefaults(self): + def intensity(self): """ - When used in a template (as - layout.template.data.parcats.dimensiondefaults), sets the - default property values to use for elements of - parcats.dimensions - - The 'dimensiondefaults' property is an instance of Dimension - that may be specified as: - - An instance of plotly.graph_objs.parcats.Dimension - - A dict of string/value properties that will be passed - to the Dimension constructor + Sets the vertex intensity values, used for plotting fields on + meshes - Supported dict properties: + The 'intensity' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.parcats.Dimension + numpy.ndarray """ - return self["dimensiondefaults"] + return self["intensity"] - @dimensiondefaults.setter - def dimensiondefaults(self, val): - self["dimensiondefaults"] = val + @intensity.setter + def intensity(self, val): + self["intensity"] = val - # domain - # ------ + # intensitysrc + # ------------ @property - def domain(self): + def intensitysrc(self): """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.parcats.Domain - - A dict of string/value properties that will be passed - to the Domain constructor + Sets the source reference on plot.ly for intensity . - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this parcats trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats - trace (in plot fraction). - y - Sets the vertical domain of this parcats trace - (in plot fraction). + The 'intensitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.parcats.Domain + str """ - return self["domain"] + return self["intensitysrc"] - @domain.setter - def domain(self, val): - self["domain"] = val + @intensitysrc.setter + def intensitysrc(self, val): + self["intensitysrc"] = val - # hoverinfo - # --------- + # isrc + # ---- @property - def hoverinfo(self): + def isrc(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Sets the source reference on plot.ly for i . - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['count', 'probability'] joined with '+' characters - (e.g. 'count+probability') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + The 'isrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["hoverinfo"] + return self["isrc"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @isrc.setter + def isrc(self, val): + self["isrc"] = val - # hoveron - # ------- + # j + # - @property - def hoveron(self): + def j(self): """ - Sets the hover interaction mode for the parcats diagram. If - `category`, hover interaction take place per category. If - `color`, hover interactions take place per color per category. - If `dimension`, hover interactions take place across all - categories per dimension. + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "second" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `j[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `j` represents a point in + space, which is the second vertex of a triangle. - The 'hoveron' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['category', 'color', 'dimension'] + The 'j' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["hoveron"] + return self["j"] - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val + @j.setter + def j(self, val): + self["j"] = val - # hovertemplate - # ------------- + # jsrc + # ---- @property - def hovertemplate(self): + def jsrc(self): """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `count`, `probability`, `category`, `categorycount`, - `colorcount` and `bandcolorcount`. Anything contained in tag - `` is displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. + Sets the source reference on plot.ly for j . - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'jsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["hovertemplate"] + return self["jsrc"] - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val + @jsrc.setter + def jsrc(self, val): + self["jsrc"] = val - # labelfont - # --------- + # k + # - @property - def labelfont(self): + def k(self): """ - Sets the font for the `dimension` labels. + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "third" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `k[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `k` represents a point in + space, which is the third vertex of a triangle. - The 'labelfont' property is an instance of Labelfont + The 'k' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["k"] + + @k.setter + def k(self, val): + self["k"] = val + + # ksrc + # ---- + @property + def ksrc(self): + """ + Sets the source reference on plot.ly for k . + + The 'ksrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ksrc"] + + @ksrc.setter + def ksrc(self, val): + self["ksrc"] = val + + # lighting + # -------- + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting that may be specified as: - - An instance of plotly.graph_objs.parcats.Labelfont + - An instance of plotly.graph_objs.mesh3d.Lighting - A dict of string/value properties that will be passed - to the Labelfont constructor + to the Lighting constructor Supported dict properties: - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. Returns ------- - plotly.graph_objs.parcats.Labelfont + plotly.graph_objs.mesh3d.Lighting """ - return self["labelfont"] + return self["lighting"] - @labelfont.setter - def labelfont(self, val): - self["labelfont"] = val + @lighting.setter + def lighting(self, val): + self["lighting"] = val - # line - # ---- + # lightposition + # ------------- @property - def line(self): + def lightposition(self): """ - The 'line' property is an instance of Line + The 'lightposition' property is an instance of Lightposition that may be specified as: - - An instance of plotly.graph_objs.parcats.Line + - An instance of plotly.graph_objs.mesh3d.Lightposition - A dict of string/value properties that will be passed - to the Line constructor + to the Lightposition constructor Supported dict properties: - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color`is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color`is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color`is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color`is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets thelinecolor. It accepts either a specific - color or an array of numbers that are mapped to - the colorscale relative to the max and min - values of the array or relative to `line.cmin` - and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.parcats.line.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Greys,YlGnBu - ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R - ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri - c,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The - variables available in `hovertemplate` are the - ones emitted as event data described at this - link https://plot.ly/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - variables `count` and `probability`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color`is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - shape - Sets the shape of the paths. If `linear`, paths - are composed of straight lines. If `hspline`, - paths are composed of horizontal curved splines - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color`is set to a numerical array. + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. Returns ------- - plotly.graph_objs.parcats.Line + plotly.graph_objs.mesh3d.Lightposition """ - return self["line"] + return self["lightposition"] - @line.setter - def line(self, val): - self["line"] = val + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val # meta # ---- @@ -45841,56 +47283,126 @@ def metasrc(self): ------- str """ - return self["metasrc"] + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + # name + # ---- + @property + def name(self): + """ + Sets the trace name. The trace name appear as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val - # name - # ---- + # scene + # ----- @property - def name(self): + def scene(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) Returns ------- str """ - return self["name"] + return self["scene"] - @name.setter - def name(self, val): - self["name"] = val + @scene.setter + def scene(self, val): + self["scene"] = val - # sortpaths + # showscale # --------- @property - def sortpaths(self): + def showscale(self): """ - Sets the path sorting algorithm. If `forward`, sort paths based - on dimension categories from left to right. If `backward`, sort - paths based on dimensions categories from right to left. + Determines whether or not a colorbar is displayed for this + trace. - The 'sortpaths' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['forward', 'backward'] + The 'showscale' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["sortpaths"] + return self["showscale"] - @sortpaths.setter - def sortpaths(self, val): - self["sortpaths"] = val + @showscale.setter + def showscale(self, val): + self["showscale"] = val # stream # ------ @@ -45899,7 +47411,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.parcats.Stream + - An instance of plotly.graph_objs.mesh3d.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -45917,7 +47429,7 @@ def stream(self): Returns ------- - plotly.graph_objs.parcats.Stream + plotly.graph_objs.mesh3d.Stream """ return self["stream"] @@ -45925,50 +47437,49 @@ def stream(self): def stream(self, val): self["stream"] = val - # tickfont - # -------- + # text + # ---- @property - def tickfont(self): + def text(self): """ - Sets the font for the `category` labels. - - The 'tickfont' property is an instance of Tickfont - that may be specified as: - - An instance of plotly.graph_objs.parcats.Tickfont - - A dict of string/value properties that will be passed - to the Tickfont constructor + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. - Supported dict properties: - - color + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.parcats.Tickfont + str """ - return self["tickfont"] + return self["textsrc"] - @tickfont.setter - def tickfont(self, val): - self["tickfont"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val # uid # --- @@ -46025,6 +47536,49 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # vertexcolor + # ----------- + @property + def vertexcolor(self): + """ + Sets the color of each vertex Overrides "color". While Red, + green and blue colors are in the range of 0 and 255; in the + case of having vertex color data in RGBA format, the alpha + color should be normalized to be between 0 and 1. + + The 'vertexcolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["vertexcolor"] + + @vertexcolor.setter + def vertexcolor(self, val): + self["vertexcolor"] = val + + # vertexcolorsrc + # -------------- + @property + def vertexcolorsrc(self): + """ + Sets the source reference on plot.ly for vertexcolor . + + The 'vertexcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vertexcolorsrc"] + + @vertexcolorsrc.setter + def vertexcolorsrc(self, val): + self["vertexcolorsrc"] = val + # visible # ------- @property @@ -46048,6 +47602,204 @@ def visible(self): def visible(self, val): self["visible"] = val + # x + # - + @property + def x(self): + """ + Sets the X coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the Y coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on plot.ly for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # z + # - + @property + def z(self): + """ + Sets the Z coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zcalendar + # --------- + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + # type # ---- @property @@ -46065,45 +47817,109 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - arrangement - Sets the drag interaction mode for categories and - dimensions. If `perpendicular`, the categories can only - move along a line perpendicular to the paths. If - `freeform`, the categories can freely move on the - plane. If `fixed`, the categories and dimensions are - stationary. - bundlecolors - Sort paths so that like colors are bundled together - within each category. - counts - The number of observations represented by each state. - Defaults to 1 so that each state represents one - observation - countssrc - Sets the source reference on plot.ly for counts . - dimensions - The dimensions (variables) of the parallel categories - diagram. - dimensiondefaults - When used in a template (as - layout.template.data.parcats.dimensiondefaults), sets - the default property values to use for elements of - parcats.dimensions - domain - plotly.graph_objects.parcats.Domain instance or dict + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.mesh3d.ColorBar instance or dict + with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + plotly.graph_objects.mesh3d.Contour instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on plot.ly for facecolor . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. - hoveron - Sets the hover interaction mode for the parcats - diagram. If `category`, hover interaction take place - per category. If `color`, hover interactions take place - per color per category. If `dimension`, hover - interactions take place across all categories per - dimension. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.mesh3d.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -46112,23 +47928,78 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `count`, `probability`, - `category`, `categorycount`, `colorcount` and - `bandcolorcount`. Anything contained in tag `` - is displayed in the secondary box, for example + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. - labelfont - Sets the font for the `dimension` labels. - line - plotly.graph_objects.parcats.Line instance or dict with - compatible properties + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + intensity + Sets the vertex intensity values, used for plotting + fields on meshes + intensitysrc + Sets the source reference on plot.ly for intensity . + isrc + Sets the source reference on plot.ly for i . + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on plot.ly for j . + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on plot.ly for k . + lighting + plotly.graph_objects.mesh3d.Lighting instance or dict + with compatible properties + lightposition + plotly.graph_objects.mesh3d.Lightposition instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -46147,16 +48018,37 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - sortpaths - Sets the path sorting algorithm. If `forward`, sort - paths based on dimension categories from left to right. - If `backward`, sort paths based on dimensions - categories from right to left. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.parcats.Stream instance or dict + plotly.graph_objects.mesh3d.Stream instance or dict with compatible properties - tickfont - Sets the font for the `category` labels. + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on plot.ly for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -46179,89 +48071,226 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on plot.ly for vertexcolor . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - arrangement=None, - bundlecolors=None, - counts=None, - countssrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, + alphahull=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + delaunayaxis=None, + facecolor=None, + facecolorsrc=None, + flatshading=None, hoverinfo=None, - hoveron=None, + hoverinfosrc=None, + hoverlabel=None, hovertemplate=None, - labelfont=None, - line=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + i=None, + ids=None, + idssrc=None, + intensity=None, + intensitysrc=None, + isrc=None, + j=None, + jsrc=None, + k=None, + ksrc=None, + lighting=None, + lightposition=None, meta=None, metasrc=None, name=None, - sortpaths=None, + opacity=None, + reversescale=None, + scene=None, + showscale=None, stream=None, - tickfont=None, + text=None, + textsrc=None, uid=None, uirevision=None, + vertexcolor=None, + vertexcolorsrc=None, visible=None, + x=None, + xcalendar=None, + xsrc=None, + y=None, + ycalendar=None, + ysrc=None, + z=None, + zcalendar=None, + zsrc=None, **kwargs ): """ - Construct a new Parcats object + Construct a new Mesh3d object - Parallel categories diagram for multidimensional categorical - data. + Draws sets of triangles with coordinates given by three + 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, + `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- + shape algorithm or (4) the Convex-hull algorithm Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Parcats - arrangement - Sets the drag interaction mode for categories and - dimensions. If `perpendicular`, the categories can only - move along a line perpendicular to the paths. If - `freeform`, the categories can freely move on the - plane. If `fixed`, the categories and dimensions are - stationary. - bundlecolors - Sort paths so that like colors are bundled together - within each category. - counts - The number of observations represented by each state. - Defaults to 1 so that each state represents one - observation - countssrc - Sets the source reference on plot.ly for counts . - dimensions - The dimensions (variables) of the parallel categories - diagram. - dimensiondefaults - When used in a template (as - layout.template.data.parcats.dimensiondefaults), sets - the default property values to use for elements of - parcats.dimensions - domain - plotly.graph_objects.parcats.Domain instance or dict + an instance of plotly.graph_objs.Mesh3d + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.mesh3d.ColorBar instance or dict + with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + plotly.graph_objects.mesh3d.Contour instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on plot.ly for facecolor . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. - hoveron - Sets the hover interaction mode for the parcats - diagram. If `category`, hover interaction take place - per category. If `color`, hover interactions take place - per color per category. If `dimension`, hover - interactions take place across all categories per - dimension. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.mesh3d.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -46270,23 +48299,78 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `count`, `probability`, - `category`, `categorycount`, `colorcount` and - `bandcolorcount`. Anything contained in tag `` - is displayed in the secondary box, for example + available. Anything contained in tag `` is + displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. - labelfont - Sets the font for the `dimension` labels. - line - plotly.graph_objects.parcats.Line instance or dict with - compatible properties + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + intensity + Sets the vertex intensity values, used for plotting + fields on meshes + intensitysrc + Sets the source reference on plot.ly for intensity . + isrc + Sets the source reference on plot.ly for i . + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on plot.ly for j . + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on plot.ly for k . + lighting + plotly.graph_objects.mesh3d.Lighting instance or dict + with compatible properties + lightposition + plotly.graph_objects.mesh3d.Lightposition instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -46305,16 +48389,37 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - sortpaths - Sets the path sorting algorithm. If `forward`, sort - paths based on dimension categories from left to right. - If `backward`, sort paths based on dimensions - categories from right to left. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.parcats.Stream instance or dict + plotly.graph_objects.mesh3d.Stream instance or dict with compatible properties - tickfont - Sets the font for the `category` labels. + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on plot.ly for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -46337,17 +48442,49 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on plot.ly for vertexcolor . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Parcats + Mesh3d """ - super(Parcats, self).__init__("parcats") + super(Mesh3d, self).__init__("mesh3d") # Validate arg # ------------ @@ -46360,97 +48497,214 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Parcats +The first argument to the plotly.graph_objs.Mesh3d constructor must be a dict or -an instance of plotly.graph_objs.Parcats""" +an instance of plotly.graph_objs.Mesh3d""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) - # Import validators - # ----------------- - from plotly.validators import parcats as v_parcats - - # Initialize validators - # --------------------- - self._validators["arrangement"] = v_parcats.ArrangementValidator() - self._validators["bundlecolors"] = v_parcats.BundlecolorsValidator() - self._validators["counts"] = v_parcats.CountsValidator() - self._validators["countssrc"] = v_parcats.CountssrcValidator() - self._validators["dimensions"] = v_parcats.DimensionsValidator() - self._validators["dimensiondefaults"] = v_parcats.DimensionValidator() - self._validators["domain"] = v_parcats.DomainValidator() - self._validators["hoverinfo"] = v_parcats.HoverinfoValidator() - self._validators["hoveron"] = v_parcats.HoveronValidator() - self._validators["hovertemplate"] = v_parcats.HovertemplateValidator() - self._validators["labelfont"] = v_parcats.LabelfontValidator() - self._validators["line"] = v_parcats.LineValidator() - self._validators["meta"] = v_parcats.MetaValidator() - self._validators["metasrc"] = v_parcats.MetasrcValidator() - self._validators["name"] = v_parcats.NameValidator() - self._validators["sortpaths"] = v_parcats.SortpathsValidator() - self._validators["stream"] = v_parcats.StreamValidator() - self._validators["tickfont"] = v_parcats.TickfontValidator() - self._validators["uid"] = v_parcats.UidValidator() - self._validators["uirevision"] = v_parcats.UirevisionValidator() - self._validators["visible"] = v_parcats.VisibleValidator() + # Import validators + # ----------------- + from plotly.validators import mesh3d as v_mesh3d + + # Initialize validators + # --------------------- + self._validators["alphahull"] = v_mesh3d.AlphahullValidator() + self._validators["autocolorscale"] = v_mesh3d.AutocolorscaleValidator() + self._validators["cauto"] = v_mesh3d.CautoValidator() + self._validators["cmax"] = v_mesh3d.CmaxValidator() + self._validators["cmid"] = v_mesh3d.CmidValidator() + self._validators["cmin"] = v_mesh3d.CminValidator() + self._validators["color"] = v_mesh3d.ColorValidator() + self._validators["coloraxis"] = v_mesh3d.ColoraxisValidator() + self._validators["colorbar"] = v_mesh3d.ColorBarValidator() + self._validators["colorscale"] = v_mesh3d.ColorscaleValidator() + self._validators["contour"] = v_mesh3d.ContourValidator() + self._validators["customdata"] = v_mesh3d.CustomdataValidator() + self._validators["customdatasrc"] = v_mesh3d.CustomdatasrcValidator() + self._validators["delaunayaxis"] = v_mesh3d.DelaunayaxisValidator() + self._validators["facecolor"] = v_mesh3d.FacecolorValidator() + self._validators["facecolorsrc"] = v_mesh3d.FacecolorsrcValidator() + self._validators["flatshading"] = v_mesh3d.FlatshadingValidator() + self._validators["hoverinfo"] = v_mesh3d.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_mesh3d.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_mesh3d.HoverlabelValidator() + self._validators["hovertemplate"] = v_mesh3d.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_mesh3d.HovertemplatesrcValidator() + self._validators["hovertext"] = v_mesh3d.HovertextValidator() + self._validators["hovertextsrc"] = v_mesh3d.HovertextsrcValidator() + self._validators["i"] = v_mesh3d.IValidator() + self._validators["ids"] = v_mesh3d.IdsValidator() + self._validators["idssrc"] = v_mesh3d.IdssrcValidator() + self._validators["intensity"] = v_mesh3d.IntensityValidator() + self._validators["intensitysrc"] = v_mesh3d.IntensitysrcValidator() + self._validators["isrc"] = v_mesh3d.IsrcValidator() + self._validators["j"] = v_mesh3d.JValidator() + self._validators["jsrc"] = v_mesh3d.JsrcValidator() + self._validators["k"] = v_mesh3d.KValidator() + self._validators["ksrc"] = v_mesh3d.KsrcValidator() + self._validators["lighting"] = v_mesh3d.LightingValidator() + self._validators["lightposition"] = v_mesh3d.LightpositionValidator() + self._validators["meta"] = v_mesh3d.MetaValidator() + self._validators["metasrc"] = v_mesh3d.MetasrcValidator() + self._validators["name"] = v_mesh3d.NameValidator() + self._validators["opacity"] = v_mesh3d.OpacityValidator() + self._validators["reversescale"] = v_mesh3d.ReversescaleValidator() + self._validators["scene"] = v_mesh3d.SceneValidator() + self._validators["showscale"] = v_mesh3d.ShowscaleValidator() + self._validators["stream"] = v_mesh3d.StreamValidator() + self._validators["text"] = v_mesh3d.TextValidator() + self._validators["textsrc"] = v_mesh3d.TextsrcValidator() + self._validators["uid"] = v_mesh3d.UidValidator() + self._validators["uirevision"] = v_mesh3d.UirevisionValidator() + self._validators["vertexcolor"] = v_mesh3d.VertexcolorValidator() + self._validators["vertexcolorsrc"] = v_mesh3d.VertexcolorsrcValidator() + self._validators["visible"] = v_mesh3d.VisibleValidator() + self._validators["x"] = v_mesh3d.XValidator() + self._validators["xcalendar"] = v_mesh3d.XcalendarValidator() + self._validators["xsrc"] = v_mesh3d.XsrcValidator() + self._validators["y"] = v_mesh3d.YValidator() + self._validators["ycalendar"] = v_mesh3d.YcalendarValidator() + self._validators["ysrc"] = v_mesh3d.YsrcValidator() + self._validators["z"] = v_mesh3d.ZValidator() + self._validators["zcalendar"] = v_mesh3d.ZcalendarValidator() + self._validators["zsrc"] = v_mesh3d.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("arrangement", None) - self["arrangement"] = arrangement if arrangement is not None else _v - _v = arg.pop("bundlecolors", None) - self["bundlecolors"] = bundlecolors if bundlecolors is not None else _v - _v = arg.pop("counts", None) - self["counts"] = counts if counts is not None else _v - _v = arg.pop("countssrc", None) - self["countssrc"] = countssrc if countssrc is not None else _v - _v = arg.pop("dimensions", None) - self["dimensions"] = dimensions if dimensions is not None else _v - _v = arg.pop("dimensiondefaults", None) - self["dimensiondefaults"] = ( - dimensiondefaults if dimensiondefaults is not None else _v - ) - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v + _v = arg.pop("alphahull", None) + self["alphahull"] = alphahull if alphahull is not None else _v + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("contour", None) + self["contour"] = contour if contour is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("delaunayaxis", None) + self["delaunayaxis"] = delaunayaxis if delaunayaxis is not None else _v + _v = arg.pop("facecolor", None) + self["facecolor"] = facecolor if facecolor is not None else _v + _v = arg.pop("facecolorsrc", None) + self["facecolorsrc"] = facecolorsrc if facecolorsrc is not None else _v + _v = arg.pop("flatshading", None) + self["flatshading"] = flatshading if flatshading is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("labelfont", None) - self["labelfont"] = labelfont if labelfont is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("i", None) + self["i"] = i if i is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("intensity", None) + self["intensity"] = intensity if intensity is not None else _v + _v = arg.pop("intensitysrc", None) + self["intensitysrc"] = intensitysrc if intensitysrc is not None else _v + _v = arg.pop("isrc", None) + self["isrc"] = isrc if isrc is not None else _v + _v = arg.pop("j", None) + self["j"] = j if j is not None else _v + _v = arg.pop("jsrc", None) + self["jsrc"] = jsrc if jsrc is not None else _v + _v = arg.pop("k", None) + self["k"] = k if k is not None else _v + _v = arg.pop("ksrc", None) + self["ksrc"] = ksrc if ksrc is not None else _v + _v = arg.pop("lighting", None) + self["lighting"] = lighting if lighting is not None else _v + _v = arg.pop("lightposition", None) + self["lightposition"] = lightposition if lightposition is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("sortpaths", None) - self["sortpaths"] = sortpaths if sortpaths is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("tickfont", None) - self["tickfont"] = tickfont if tickfont is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("vertexcolor", None) + self["vertexcolor"] = vertexcolor if vertexcolor is not None else _v + _v = arg.pop("vertexcolorsrc", None) + self["vertexcolorsrc"] = vertexcolorsrc if vertexcolorsrc is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zcalendar", None) + self["zcalendar"] = zcalendar if zcalendar is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "parcats" + self._props["type"] = "mesh3d" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="parcats", val="parcats" + plotly_name="type", parent_name="mesh3d", val="mesh3d" ) arg.pop("type", None) @@ -46467,47 +48721,495 @@ def __init__( import copy as _copy -class Ohlc(_BaseTraceType): +class Isosurface(_BaseTraceType): + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # caps + # ---- + @property + def caps(self): + """ + The 'caps' property is an instance of Caps + that may be specified as: + - An instance of plotly.graph_objs.isosurface.Caps + - A dict of string/value properties that will be passed + to the Caps constructor + + Supported dict properties: + + x + plotly.graph_objects.isosurface.caps.X instance + or dict with compatible properties + y + plotly.graph_objects.isosurface.caps.Y instance + or dict with compatible properties + z + plotly.graph_objects.isosurface.caps.Z instance + or dict with compatible properties + + Returns + ------- + plotly.graph_objs.isosurface.Caps + """ + return self["caps"] + + @caps.setter + def caps(self, val): + self["caps"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `value`) or the bounds set in + `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `value` and if set, `cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `value`. Has no effect when `cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `value` and if set, `cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.isosurface.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.isosurface.colo + rbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.isosurface.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of isosurface.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.isosurface.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + isosurface.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + isosurface.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.isosurface.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # close - # ----- + # colorscale + # ---------- @property - def close(self): + def colorscale(self): """ - Sets the close values. + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'close' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- - numpy.ndarray + str """ - return self["close"] + return self["colorscale"] - @close.setter - def close(self, val): - self["close"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # closesrc - # -------- + # contour + # ------- @property - def closesrc(self): + def contour(self): """ - Sets the source reference on plot.ly for close . + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of plotly.graph_objs.isosurface.Contour + - A dict of string/value properties that will be passed + to the Contour constructor - The 'closesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + color + Sets the color of the contour lines. + show + Sets whether or not dynamic contours are shown + on hover + width + Sets the width of the contour lines. Returns ------- - str + plotly.graph_objs.isosurface.Contour """ - return self["closesrc"] + return self["contour"] - @closesrc.setter - def closesrc(self, val): - self["closesrc"] = val + @contour.setter + def contour(self, val): + self["contour"] = val # customdata # ---------- @@ -46552,72 +49254,27 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # decreasing - # ---------- - @property - def decreasing(self): - """ - The 'decreasing' property is an instance of Decreasing - that may be specified as: - - An instance of plotly.graph_objs.ohlc.Decreasing - - A dict of string/value properties that will be passed - to the Decreasing constructor - - Supported dict properties: - - line - plotly.graph_objects.ohlc.decreasing.Line - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.ohlc.Decreasing - """ - return self["decreasing"] - - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val - - # high - # ---- - @property - def high(self): - """ - Sets the high values. - - The 'high' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["high"] - - @high.setter - def high(self, val): - self["high"] = val - - # highsrc - # ------- + # flatshading + # ----------- @property - def highsrc(self): + def flatshading(self): """ - Sets the source reference on plot.ly for high . + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. - The 'highsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'flatshading' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["highsrc"] + return self["flatshading"] - @highsrc.setter - def highsrc(self, val): - self["highsrc"] = val + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val # hoverinfo # --------- @@ -46672,7 +49329,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.ohlc.Hoverlabel + - An instance of plotly.graph_objs.isosurface.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -46713,13 +49370,10 @@ def hoverlabel(self): namelengthsrc Sets the source reference on plot.ly for namelength . - split - Show hover information (open, close, high, low) - in separate labels. Returns ------- - plotly.graph_objs.ohlc.Hoverlabel + plotly.graph_objs.isosurface.Hoverlabel """ return self["hoverlabel"] @@ -46727,6 +49381,67 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + # hovertext # --------- @property @@ -46811,132 +49526,126 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # increasing - # ---------- + # isomax + # ------ @property - def increasing(self): + def isomax(self): """ - The 'increasing' property is an instance of Increasing - that may be specified as: - - An instance of plotly.graph_objs.ohlc.Increasing - - A dict of string/value properties that will be passed - to the Increasing constructor + Sets the maximum boundary for iso-surface plot. - Supported dict properties: - - line - plotly.graph_objects.ohlc.increasing.Line - instance or dict with compatible properties + The 'isomax' property is a number and may be specified as: + - An int or float Returns ------- - plotly.graph_objs.ohlc.Increasing + int|float """ - return self["increasing"] + return self["isomax"] - @increasing.setter - def increasing(self, val): - self["increasing"] = val + @isomax.setter + def isomax(self, val): + self["isomax"] = val - # legendgroup - # ----------- + # isomin + # ------ @property - def legendgroup(self): + def isomin(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + Sets the minimum boundary for iso-surface plot. - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'isomin' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["legendgroup"] + return self["isomin"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @isomin.setter + def isomin(self, val): + self["isomin"] = val - # line - # ---- + # lighting + # -------- @property - def line(self): + def lighting(self): """ - The 'line' property is an instance of Line + The 'lighting' property is an instance of Lighting that may be specified as: - - An instance of plotly.graph_objs.ohlc.Line + - An instance of plotly.graph_objs.isosurface.Lighting - A dict of string/value properties that will be passed - to the Line constructor + to the Lighting constructor Supported dict properties: - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - Note that this style setting can also be set - per direction via `increasing.line.dash` and - `decreasing.line.dash`. - width - [object Object] Note that this style setting - can also be set per direction via - `increasing.line.width` and - `decreasing.line.width`. - - Returns - ------- - plotly.graph_objs.ohlc.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # low - # --- - @property - def low(self): - """ - Sets the low values. - - The 'low' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. Returns ------- - numpy.ndarray + plotly.graph_objs.isosurface.Lighting """ - return self["low"] + return self["lighting"] - @low.setter - def low(self, val): - self["low"] = val + @lighting.setter + def lighting(self, val): + self["lighting"] = val - # lowsrc - # ------ + # lightposition + # ------------- @property - def lowsrc(self): + def lightposition(self): """ - Sets the source reference on plot.ly for low . + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of plotly.graph_objs.isosurface.Lightposition + - A dict of string/value properties that will be passed + to the Lightposition constructor - The 'lowsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. Returns ------- - str + plotly.graph_objs.isosurface.Lightposition """ - return self["lowsrc"] + return self["lightposition"] - @lowsrc.setter - def lowsrc(self, val): - self["lowsrc"] = val + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val # meta # ---- @@ -47013,7 +49722,12 @@ def name(self, val): @property def opacity(self): """ - Sets the opacity of the trace. + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] @@ -47022,96 +49736,149 @@ def opacity(self): ------- int|float """ - return self["opacity"] + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val - # open - # ---- + # scene + # ----- @property - def open(self): + def scene(self): """ - Sets the open values. + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. - The 'open' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) Returns ------- - numpy.ndarray + str """ - return self["open"] + return self["scene"] - @open.setter - def open(self, val): - self["open"] = val + @scene.setter + def scene(self, val): + self["scene"] = val - # opensrc - # ------- + # showscale + # --------- @property - def opensrc(self): + def showscale(self): """ - Sets the source reference on plot.ly for open . + Determines whether or not a colorbar is displayed for this + trace. - The 'opensrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'showscale' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["opensrc"] + return self["showscale"] - @opensrc.setter - def opensrc(self, val): - self["opensrc"] = val + @showscale.setter + def showscale(self, val): + self["showscale"] = val - # selectedpoints - # -------------- + # slices + # ------ @property - def selectedpoints(self): + def slices(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + The 'slices' property is an instance of Slices + that may be specified as: + - An instance of plotly.graph_objs.isosurface.Slices + - A dict of string/value properties that will be passed + to the Slices constructor - The 'selectedpoints' property accepts values of any type + Supported dict properties: + + x + plotly.graph_objects.isosurface.slices.X + instance or dict with compatible properties + y + plotly.graph_objects.isosurface.slices.Y + instance or dict with compatible properties + z + plotly.graph_objects.isosurface.slices.Z + instance or dict with compatible properties Returns ------- - Any + plotly.graph_objs.isosurface.Slices """ - return self["selectedpoints"] + return self["slices"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @slices.setter + def slices(self, val): + self["slices"] = val - # showlegend + # spaceframe # ---------- @property - def showlegend(self): + def spaceframe(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + The 'spaceframe' property is an instance of Spaceframe + that may be specified as: + - An instance of plotly.graph_objs.isosurface.Spaceframe + - A dict of string/value properties that will be passed + to the Spaceframe constructor - The 'showlegend' property must be specified as a bool - (either True, or False) + Supported dict properties: + + fill + Sets the fill ratio of the `spaceframe` + elements. The default fill value is 0.15 + meaning that only 15% of the area of every + faces of tetras would be shaded. Applying a + greater `fill` ratio would allow the creation + of stronger elements or could be sued to have + entirely closed areas (in case of using 1). + show + Displays/hides tetrahedron shapes between + minimum and maximum iso-values. Often useful + when either caps or surfaces are disabled or + filled with values less than 1. Returns ------- - bool + plotly.graph_objs.isosurface.Spaceframe """ - return self["showlegend"] + return self["spaceframe"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @spaceframe.setter + def spaceframe(self, val): + self["spaceframe"] = val # stream # ------ @@ -47120,7 +49887,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.ohlc.Stream + - An instance of plotly.graph_objs.isosurface.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -47138,7 +49905,7 @@ def stream(self): Returns ------- - plotly.graph_objs.ohlc.Stream + plotly.graph_objs.isosurface.Stream """ return self["stream"] @@ -47146,15 +49913,64 @@ def stream(self): def stream(self, val): self["stream"] = val + # surface + # ------- + @property + def surface(self): + """ + The 'surface' property is an instance of Surface + that may be specified as: + - An instance of plotly.graph_objs.isosurface.Surface + - A dict of string/value properties that will be passed + to the Surface constructor + + Supported dict properties: + + count + Sets the number of iso-surfaces between minimum + and maximum iso-values. By default this value + is 2 meaning that only minimum and maximum + surfaces would be drawn. + fill + Sets the fill ratio of the iso-surface. The + default fill value of the surface is 1 meaning + that they are entirely shaded. On the other + hand Applying a `fill` ratio less than one + would allow the creation of openings parallel + to the edges. + pattern + Sets the surface pattern of the iso-surface 3-D + sections. The default pattern of the surface is + `all` meaning that the rest of surface elements + would be shaded. The check options (either 1 or + 2) could be used to draw half of the squares on + the surface. Using various combinations of + capital `A`, `B`, `C`, `D` and `E` may also be + used to reduce the number of triangles on the + iso-surfaces and creating other patterns of + interest. + show + Hides/displays surfaces between minimum and + maximum iso-values. + + Returns + ------- + plotly.graph_objs.isosurface.Surface + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + # text # ---- @property def text(self): """ - Sets hover text elements associated with each sample point. If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - this trace's sample points. + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string @@ -47191,27 +50007,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # tickwidth - # --------- - @property - def tickwidth(self): - """ - Sets the width of the open/close tick marks relative to the "x" - minimal interval. - - The 'tickwidth' property is a number and may be specified as: - - An int or float in the interval [0, 0.5] - - Returns - ------- - int|float - """ - return self["tickwidth"] - - @tickwidth.setter - def tickwidth(self, val): - self["tickwidth"] = val - # uid # --- @property @@ -47267,6 +50062,46 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # value + # ----- + @property + def value(self): + """ + Sets the 4th dimension (value) of the vertices. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # valuesrc + # -------- + @property + def valuesrc(self): + """ + Sets the source reference on plot.ly for value . + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + # visible # ------- @property @@ -47295,8 +50130,7 @@ def visible(self, val): @property def x(self): """ - Sets the x coordinates. If absent, linear coordinate will be - generated. + Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -47311,99 +50145,105 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- + # xsrc + # ---- @property - def xaxis(self): + def xsrc(self): """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + Sets the source reference on plot.ly for x . - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["xaxis"] + return self["xsrc"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # xcalendar - # --------- + # y + # - @property - def xcalendar(self): + def y(self): """ - Sets the calendar system to use with `x` date data. + Sets the Y coordinates of the vertices on Y axis. - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any + numpy.ndarray """ - return self["xcalendar"] + return self["y"] - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val + @y.setter + def y(self, val): + self["y"] = val - # xsrc + # ysrc # ---- @property - def xsrc(self): + def ysrc(self): """ - Sets the source reference on plot.ly for x . + Sets the source reference on plot.ly for y . - The 'xsrc' property must be specified as a string or + The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["xsrc"] + return self["ysrc"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # yaxis - # ----- + # z + # - @property - def yaxis(self): + def z(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the Z coordinates of the vertices on Z axis. - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["yaxis"] + return self["zsrc"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val # type # ---- @@ -47422,10 +50262,59 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - close - Sets the close values. - closesrc - Sets the source reference on plot.ly for close . + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + plotly.graph_objects.isosurface.Caps instance or dict + with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.isosurface.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + plotly.graph_objects.isosurface.Contour instance or + dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -47433,13 +50322,10 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - decreasing - plotly.graph_objects.ohlc.Decreasing instance or dict - with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on plot.ly for high . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -47448,8 +50334,34 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.ohlc.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.isosurface.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . hovertext Same as `text`. hovertextsrc @@ -47460,20 +50372,16 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - increasing - plotly.graph_objects.ohlc.Increasing instance or dict - with compatible properties - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.ohlc.Line instance or dict with - compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on plot.ly for low . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + lighting + plotly.graph_objects.isosurface.Lighting instance or + dict with compatible properties + lightposition + plotly.graph_objects.isosurface.Lightposition instance + or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -47486,41 +50394,52 @@ def _prop_descriptions(self): `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on plot.ly for open . - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + plotly.graph_objects.isosurface.Slices instance or dict + with compatible properties + spaceframe + plotly.graph_objects.isosurface.Spaceframe instance or + dict with compatible properties stream - plotly.graph_objects.ohlc.Stream instance or dict with - compatible properties + plotly.graph_objects.isosurface.Stream instance or dict + with compatible properties + surface + plotly.graph_objects.isosurface.Surface instance or + dict with compatible properties text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textsrc Sets the source reference on plot.ly for text . - tickwidth - Sets the width of the open/close tick marks relative to - the "x" minimal interval. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -47543,95 +50462,152 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on plot.ly for value . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. + Sets the X coordinates of the vertices on X axis. xsrc Sets the source reference on plot.ly for x . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - close=None, - closesrc=None, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, customdata=None, customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, + flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - increasing=None, - legendgroup=None, - line=None, - low=None, - lowsrc=None, + isomax=None, + isomin=None, + lighting=None, + lightposition=None, meta=None, metasrc=None, name=None, opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, + reversescale=None, + scene=None, + showscale=None, + slices=None, + spaceframe=None, stream=None, + surface=None, text=None, textsrc=None, - tickwidth=None, uid=None, uirevision=None, + value=None, + valuesrc=None, visible=None, x=None, - xaxis=None, - xcalendar=None, xsrc=None, - yaxis=None, + y=None, + ysrc=None, + z=None, + zsrc=None, **kwargs ): """ - Construct a new Ohlc object + Construct a new Isosurface object - The ohlc (short for Open-High-Low-Close) is a style of - financial chart describing open, high, low and close for a - given `x` coordinate (most likely time). The tip of the lines - represent the `low` and `high` values and the horizontal - segments represent the `open` and `close` values. Sample points - where the close value is higher (lower) then the open value are - called increasing (decreasing). By default, increasing items - are drawn in green whereas decreasing are drawn in red. + Draws isosurfaces between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Ohlc - close - Sets the close values. - closesrc - Sets the source reference on plot.ly for close . + an instance of plotly.graph_objs.Isosurface + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + plotly.graph_objects.isosurface.Caps instance or dict + with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.isosurface.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contour + plotly.graph_objects.isosurface.Contour instance or + dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -47639,13 +50615,10 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - decreasing - plotly.graph_objects.ohlc.Decreasing instance or dict - with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on plot.ly for high . + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -47654,8 +50627,34 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.ohlc.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.isosurface.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . hovertext Same as `text`. hovertextsrc @@ -47666,20 +50665,16 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - increasing - plotly.graph_objects.ohlc.Increasing instance or dict - with compatible properties - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.ohlc.Line instance or dict with - compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on plot.ly for low . + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + lighting + plotly.graph_objects.isosurface.Lighting instance or + dict with compatible properties + lightposition + plotly.graph_objects.isosurface.Lightposition instance + or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -47699,34 +50694,45 @@ def __init__( Sets the trace name. The trace name appear as the legend item and on hover. opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on plot.ly for open . - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + plotly.graph_objects.isosurface.Slices instance or dict + with compatible properties + spaceframe + plotly.graph_objects.isosurface.Spaceframe instance or + dict with compatible properties stream - plotly.graph_objects.ohlc.Stream instance or dict with - compatible properties + plotly.graph_objects.isosurface.Stream instance or dict + with compatible properties + surface + plotly.graph_objects.isosurface.Surface instance or + dict with compatible properties text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textsrc Sets the source reference on plot.ly for text . - tickwidth - Sets the width of the open/close tick marks relative to - the "x" minimal interval. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -47749,34 +50755,33 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuesrc + Sets the source reference on plot.ly for value . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. + Sets the X coordinates of the vertices on X axis. xsrc Sets the source reference on plot.ly for x . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. + y + Sets the Y coordinates of the vertices on Y axis. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the Z coordinates of the vertices on Z axis. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Ohlc + Isosurface """ - super(Ohlc, self).__init__("ohlc") + super(Isosurface, self).__init__("isosurface") # Validate arg # ------------ @@ -47789,9 +50794,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Ohlc +The first argument to the plotly.graph_objs.Isosurface constructor must be a dict or -an instance of plotly.graph_objs.Ohlc""" +an instance of plotly.graph_objs.Isosurface""" ) # Handle skip_invalid @@ -47800,72 +50805,101 @@ def __init__( # Import validators # ----------------- - from plotly.validators import ohlc as v_ohlc + from plotly.validators import isosurface as v_isosurface # Initialize validators # --------------------- - self._validators["close"] = v_ohlc.CloseValidator() - self._validators["closesrc"] = v_ohlc.ClosesrcValidator() - self._validators["customdata"] = v_ohlc.CustomdataValidator() - self._validators["customdatasrc"] = v_ohlc.CustomdatasrcValidator() - self._validators["decreasing"] = v_ohlc.DecreasingValidator() - self._validators["high"] = v_ohlc.HighValidator() - self._validators["highsrc"] = v_ohlc.HighsrcValidator() - self._validators["hoverinfo"] = v_ohlc.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_ohlc.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_ohlc.HoverlabelValidator() - self._validators["hovertext"] = v_ohlc.HovertextValidator() - self._validators["hovertextsrc"] = v_ohlc.HovertextsrcValidator() - self._validators["ids"] = v_ohlc.IdsValidator() - self._validators["idssrc"] = v_ohlc.IdssrcValidator() - self._validators["increasing"] = v_ohlc.IncreasingValidator() - self._validators["legendgroup"] = v_ohlc.LegendgroupValidator() - self._validators["line"] = v_ohlc.LineValidator() - self._validators["low"] = v_ohlc.LowValidator() - self._validators["lowsrc"] = v_ohlc.LowsrcValidator() - self._validators["meta"] = v_ohlc.MetaValidator() - self._validators["metasrc"] = v_ohlc.MetasrcValidator() - self._validators["name"] = v_ohlc.NameValidator() - self._validators["opacity"] = v_ohlc.OpacityValidator() - self._validators["open"] = v_ohlc.OpenValidator() - self._validators["opensrc"] = v_ohlc.OpensrcValidator() - self._validators["selectedpoints"] = v_ohlc.SelectedpointsValidator() - self._validators["showlegend"] = v_ohlc.ShowlegendValidator() - self._validators["stream"] = v_ohlc.StreamValidator() - self._validators["text"] = v_ohlc.TextValidator() - self._validators["textsrc"] = v_ohlc.TextsrcValidator() - self._validators["tickwidth"] = v_ohlc.TickwidthValidator() - self._validators["uid"] = v_ohlc.UidValidator() - self._validators["uirevision"] = v_ohlc.UirevisionValidator() - self._validators["visible"] = v_ohlc.VisibleValidator() - self._validators["x"] = v_ohlc.XValidator() - self._validators["xaxis"] = v_ohlc.XAxisValidator() - self._validators["xcalendar"] = v_ohlc.XcalendarValidator() - self._validators["xsrc"] = v_ohlc.XsrcValidator() - self._validators["yaxis"] = v_ohlc.YAxisValidator() + self._validators["autocolorscale"] = v_isosurface.AutocolorscaleValidator() + self._validators["caps"] = v_isosurface.CapsValidator() + self._validators["cauto"] = v_isosurface.CautoValidator() + self._validators["cmax"] = v_isosurface.CmaxValidator() + self._validators["cmid"] = v_isosurface.CmidValidator() + self._validators["cmin"] = v_isosurface.CminValidator() + self._validators["coloraxis"] = v_isosurface.ColoraxisValidator() + self._validators["colorbar"] = v_isosurface.ColorBarValidator() + self._validators["colorscale"] = v_isosurface.ColorscaleValidator() + self._validators["contour"] = v_isosurface.ContourValidator() + self._validators["customdata"] = v_isosurface.CustomdataValidator() + self._validators["customdatasrc"] = v_isosurface.CustomdatasrcValidator() + self._validators["flatshading"] = v_isosurface.FlatshadingValidator() + self._validators["hoverinfo"] = v_isosurface.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_isosurface.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_isosurface.HoverlabelValidator() + self._validators["hovertemplate"] = v_isosurface.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_isosurface.HovertemplatesrcValidator() + self._validators["hovertext"] = v_isosurface.HovertextValidator() + self._validators["hovertextsrc"] = v_isosurface.HovertextsrcValidator() + self._validators["ids"] = v_isosurface.IdsValidator() + self._validators["idssrc"] = v_isosurface.IdssrcValidator() + self._validators["isomax"] = v_isosurface.IsomaxValidator() + self._validators["isomin"] = v_isosurface.IsominValidator() + self._validators["lighting"] = v_isosurface.LightingValidator() + self._validators["lightposition"] = v_isosurface.LightpositionValidator() + self._validators["meta"] = v_isosurface.MetaValidator() + self._validators["metasrc"] = v_isosurface.MetasrcValidator() + self._validators["name"] = v_isosurface.NameValidator() + self._validators["opacity"] = v_isosurface.OpacityValidator() + self._validators["reversescale"] = v_isosurface.ReversescaleValidator() + self._validators["scene"] = v_isosurface.SceneValidator() + self._validators["showscale"] = v_isosurface.ShowscaleValidator() + self._validators["slices"] = v_isosurface.SlicesValidator() + self._validators["spaceframe"] = v_isosurface.SpaceframeValidator() + self._validators["stream"] = v_isosurface.StreamValidator() + self._validators["surface"] = v_isosurface.SurfaceValidator() + self._validators["text"] = v_isosurface.TextValidator() + self._validators["textsrc"] = v_isosurface.TextsrcValidator() + self._validators["uid"] = v_isosurface.UidValidator() + self._validators["uirevision"] = v_isosurface.UirevisionValidator() + self._validators["value"] = v_isosurface.ValueValidator() + self._validators["valuesrc"] = v_isosurface.ValuesrcValidator() + self._validators["visible"] = v_isosurface.VisibleValidator() + self._validators["x"] = v_isosurface.XValidator() + self._validators["xsrc"] = v_isosurface.XsrcValidator() + self._validators["y"] = v_isosurface.YValidator() + self._validators["ysrc"] = v_isosurface.YsrcValidator() + self._validators["z"] = v_isosurface.ZValidator() + self._validators["zsrc"] = v_isosurface.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("close", None) - self["close"] = close if close is not None else _v - _v = arg.pop("closesrc", None) - self["closesrc"] = closesrc if closesrc is not None else _v + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("caps", None) + self["caps"] = caps if caps is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("contour", None) + self["contour"] = contour if contour is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("high", None) - self["high"] = high if high is not None else _v - _v = arg.pop("highsrc", None) - self["highsrc"] = highsrc if highsrc is not None else _v + _v = arg.pop("flatshading", None) + self["flatshading"] = flatshading if flatshading is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) _v = arg.pop("hovertext", None) self["hovertext"] = hovertext if hovertext is not None else _v _v = arg.pop("hovertextsrc", None) @@ -47874,16 +50908,14 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("low", None) - self["low"] = low if low is not None else _v - _v = arg.pop("lowsrc", None) - self["lowsrc"] = lowsrc if lowsrc is not None else _v + _v = arg.pop("isomax", None) + self["isomax"] = isomax if isomax is not None else _v + _v = arg.pop("isomin", None) + self["isomin"] = isomin if isomin is not None else _v + _v = arg.pop("lighting", None) + self["lighting"] = lighting if lighting is not None else _v + _v = arg.pop("lightposition", None) + self["lightposition"] = lightposition if lightposition is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) @@ -47892,617 +50924,94 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("open", None) - self["open"] = open if open is not None else _v - _v = arg.pop("opensrc", None) - self["opensrc"] = opensrc if opensrc is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("slices", None) + self["slices"] = slices if slices is not None else _v + _v = arg.pop("spaceframe", None) + self["spaceframe"] = spaceframe if spaceframe is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("surface", None) + self["surface"] = surface if surface is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("tickwidth", None) - self["tickwidth"] = tickwidth if tickwidth is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("value", None) + self["value"] = value if value is not None else _v + _v = arg.pop("valuesrc", None) + self["valuesrc"] = valuesrc if valuesrc is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "ohlc" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="ohlc", val="ohlc" - ) - arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy - - -class Mesh3d(_BaseTraceType): - - # alphahull - # --------- - @property - def alphahull(self): - """ - Determines how the mesh surface triangles are derived from the - set of vertices (points) represented by the `x`, `y` and `z` - arrays, if the `i`, `j`, `k` arrays are not supplied. For - general use of `mesh3d` it is preferred that `i`, `j`, `k` are - supplied. If "-1", Delaunay triangulation is used, which is - mainly suitable if the mesh is a single, more or less layer - surface that is perpendicular to `delaunayaxis`. In case the - `delaunayaxis` intersects the mesh surface at more than one - point it will result triangles that are very long in the - dimension of `delaunayaxis`. If ">0", the alpha-shape algorithm - is used. In this case, the positive `alphahull` value signals - the use of the alpha-shape algorithm, _and_ its value acts as - the parameter for the mesh fitting. If 0, the convex-hull - algorithm is used. It is suitable for convex bodies or if the - intention is to enclose the `x`, `y` and `z` point set into a - convex hull. - - The 'alphahull' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["alphahull"] - - @alphahull.setter - def alphahull(self, val): - self["alphahull"] = val - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here `intensity`) or the bounds set - in `cmin` and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as `intensity` and if set, `cmin` must be set as - well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as `intensity`. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as `intensity` and if set, `cmax` must be set as - well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - - # color - # ----- - @property - def color(self): - """ - Sets the color of the whole mesh - - The 'color' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to mesh3d.colorscale - - Returns - ------- - str - """ - return self["color"] - - @color.setter - def color(self, val): - self["color"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.mesh3d.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.mesh3d.colorbar - .Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.mesh3d.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of mesh3d.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.mesh3d.colorbar.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use - mesh3d.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - mesh3d.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v - Returns - ------- - plotly.graph_objs.mesh3d.ColorBar - """ - return self["colorbar"] + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val + self._props["type"] = "isosurface" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="isosurface", val="isosurface" + ) + arg.pop("type", None) - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - Returns - ------- - str - """ - return self["colorscale"] + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - # contour - # ------- +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Indicator(_BaseTraceType): + + # align + # ----- @property - def contour(self): + def align(self): """ - The 'contour' property is an instance of Contour - that may be specified as: - - An instance of plotly.graph_objs.mesh3d.Contour - - A dict of string/value properties that will be passed - to the Contour constructor + Sets the horizontal alignment of the `text` within the box. + Note that this attribute has no effect if an angular gauge is + displayed: in this case, it is always centered - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] Returns ------- - plotly.graph_objs.mesh3d.Contour + Any """ - return self["contour"] + return self["align"] - @contour.setter - def contour(self, val): - self["contour"] = val + @align.setter + def align(self, val): + self["align"] = val # customdata # ---------- @@ -48547,656 +51056,935 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # delaunayaxis - # ------------ + # delta + # ----- @property - def delaunayaxis(self): + def delta(self): """ - Sets the Delaunay axis, which is the axis that is perpendicular - to the surface of the Delaunay triangulation. It has an effect - if `i`, `j`, `k` are not provided and `alphahull` is set to - indicate Delaunay triangulation. + The 'delta' property is an instance of Delta + that may be specified as: + - An instance of plotly.graph_objs.indicator.Delta + - A dict of string/value properties that will be passed + to the Delta constructor - The 'delaunayaxis' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['x', 'y', 'z'] + Supported dict properties: + + decreasing + plotly.graph_objects.indicator.delta.Decreasing + instance or dict with compatible properties + font + Set the font used to display the delta + increasing + plotly.graph_objects.indicator.delta.Increasing + instance or dict with compatible properties + position + Sets the position of delta with respect to the + number. + reference + Sets the reference value to compute the delta. + By default, it is set to the current value. + relative + Show relative change + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format Returns ------- - Any + plotly.graph_objs.indicator.Delta """ - return self["delaunayaxis"] + return self["delta"] - @delaunayaxis.setter - def delaunayaxis(self, val): - self["delaunayaxis"] = val + @delta.setter + def delta(self, val): + self["delta"] = val - # facecolor - # --------- + # domain + # ------ @property - def facecolor(self): + def domain(self): """ - Sets the color of each face Overrides "color" and - "vertexcolor". + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.indicator.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'facecolor' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this indicator + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this indicator trace . + x + Sets the horizontal domain of this indicator + trace (in plot fraction). + y + Sets the vertical domain of this indicator + trace (in plot fraction). Returns ------- - numpy.ndarray + plotly.graph_objs.indicator.Domain """ - return self["facecolor"] + return self["domain"] - @facecolor.setter - def facecolor(self, val): - self["facecolor"] = val + @domain.setter + def domain(self, val): + self["domain"] = val - # facecolorsrc - # ------------ + # gauge + # ----- @property - def facecolorsrc(self): + def gauge(self): """ - Sets the source reference on plot.ly for facecolor . + The gauge of the Indicator plot. - The 'facecolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["facecolorsrc"] - - @facecolorsrc.setter - def facecolorsrc(self, val): - self["facecolorsrc"] = val - - # flatshading - # ----------- - @property - def flatshading(self): - """ - Determines whether or not normal smoothing is applied to the - meshes, creating meshes with an angular, low-poly look via flat - reflections. + The 'gauge' property is an instance of Gauge + that may be specified as: + - An instance of plotly.graph_objs.indicator.Gauge + - A dict of string/value properties that will be passed + to the Gauge constructor - The 'flatshading' property must be specified as a bool - (either True, or False) + Supported dict properties: + + axis + plotly.graph_objects.indicator.gauge.Axis + instance or dict with compatible properties + bar + Set the appearance of the gauge's value + bgcolor + Sets the gauge background color. + bordercolor + Sets the color of the border enclosing the + gauge. + borderwidth + Sets the width (in px) of the border enclosing + the gauge. + shape + Set the shape of the gauge + steps + A tuple of + plotly.graph_objects.indicator.gauge.Step + instances or dicts with compatible properties + stepdefaults + When used in a template (as layout.template.dat + a.indicator.gauge.stepdefaults), sets the + default property values to use for elements of + indicator.gauge.steps + threshold + plotly.graph_objects.indicator.gauge.Threshold + instance or dict with compatible properties Returns ------- - bool + plotly.graph_objs.indicator.Gauge """ - return self["flatshading"] + return self["gauge"] - @flatshading.setter - def flatshading(self, val): - self["flatshading"] = val + @gauge.setter + def gauge(self, val): + self["gauge"] = val - # hoverinfo - # --------- + # ids + # --- @property - def hoverinfo(self): + def ids(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - Any|numpy.ndarray + numpy.ndarray """ - return self["hoverinfo"] + return self["ids"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @ids.setter + def ids(self, val): + self["ids"] = val - # hoverinfosrc - # ------------ + # idssrc + # ------ @property - def hoverinfosrc(self): + def idssrc(self): """ - Sets the source reference on plot.ly for hoverinfo . + Sets the source reference on plot.ly for ids . - The 'hoverinfosrc' property must be specified as a string or + The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["hoverinfosrc"] + return self["idssrc"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # hoverlabel - # ---------- + # meta + # ---- @property - def hoverlabel(self): + def meta(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.mesh3d.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + The 'meta' property accepts values of any type Returns ------- - plotly.graph_objs.mesh3d.Hoverlabel + Any|numpy.ndarray """ - return self["hoverlabel"] + return self["meta"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # hovertemplate - # ------------- + # metasrc + # ------- @property - def hovertemplate(self): + def metasrc(self): """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. + Sets the source reference on plot.ly for meta . - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - str|numpy.ndarray + str """ - return self["hovertemplate"] + return self["metasrc"] - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # hovertemplatesrc - # ---------------- + # mode + # ---- @property - def hovertemplatesrc(self): + def mode(self): """ - Sets the source reference on plot.ly for hovertemplate . + Determines how the value is displayed on the graph. `number` + displays the value numerically in text. `delta` displays the + difference to a reference value in text. Finally, `gauge` + displays the value graphically on an axis. - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['number', 'delta', 'gauge'] joined with '+' characters + (e.g. 'number+delta') Returns ------- - str + Any """ - return self["hovertemplatesrc"] + return self["mode"] - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val + @mode.setter + def mode(self, val): + self["mode"] = val - # hovertext - # --------- + # name + # ---- @property - def hovertext(self): + def name(self): """ - Same as `text`. + Sets the trace name. The trace name appear as the legend item + and on hover. - The 'hovertext' property is a string and must be specified as: + The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str|numpy.ndarray + str """ - return self["hovertext"] + return self["name"] - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val + @name.setter + def name(self, val): + self["name"] = val - # hovertextsrc - # ------------ + # number + # ------ @property - def hovertextsrc(self): + def number(self): """ - Sets the source reference on plot.ly for hovertext . + The 'number' property is an instance of Number + that may be specified as: + - An instance of plotly.graph_objs.indicator.Number + - A dict of string/value properties that will be passed + to the Number constructor - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + font + Set the font used to display main number + prefix + Sets a prefix appearing before the number. + suffix + Sets a suffix appearing next to the number. + valueformat + Sets the value formatting rule using d3 + formatting mini-language which is similar to + those of Python. See + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format Returns ------- - str + plotly.graph_objs.indicator.Number """ - return self["hovertextsrc"] + return self["number"] - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val + @number.setter + def number(self, val): + self["number"] = val - # i - # - + # stream + # ------ @property - def i(self): + def stream(self): """ - A vector of vertex indices, i.e. integer values between 0 and - the length of the vertex vectors, representing the "first" - vertex of a triangle. For example, `{i[m], j[m], k[m]}` - together represent face m (triangle m) in the mesh, where `i[m] - = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex - arrays. Therefore, each element in `i` represents a point in - space, which is the first vertex of a triangle. + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.indicator.Stream + - A dict of string/value properties that will be passed + to the Stream constructor - The 'i' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - numpy.ndarray + plotly.graph_objs.indicator.Stream """ - return self["i"] + return self["stream"] - @i.setter - def i(self, val): - self["i"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # ids - # --- + # title + # ----- @property - def ids(self): + def title(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + The 'title' property is an instance of Title + that may be specified as: + - An instance of plotly.graph_objs.indicator.Title + - A dict of string/value properties that will be passed + to the Title constructor - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + align + Sets the horizontal alignment of the title. It + defaults to `center` except for bullet charts + for which it defaults to right. + font + Set the font used to display the title + text + Sets the title of this indicator. Returns ------- - numpy.ndarray + plotly.graph_objs.indicator.Title """ - return self["ids"] + return self["title"] - @ids.setter - def ids(self, val): - self["ids"] = val + @title.setter + def title(self, val): + self["title"] = val - # idssrc - # ------ + # uid + # --- @property - def idssrc(self): + def uid(self): """ - Sets the source reference on plot.ly for ids . + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["idssrc"] + return self["uid"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # intensity - # --------- + # uirevision + # ---------- @property - def intensity(self): + def uirevision(self): """ - Sets the vertex intensity values, used for plotting fields on - meshes + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'intensity' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'uirevision' property accepts values of any type Returns ------- - numpy.ndarray + Any """ - return self["intensity"] + return self["uirevision"] - @intensity.setter - def intensity(self, val): - self["intensity"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # intensitysrc - # ------------ + # value + # ----- @property - def intensitysrc(self): + def value(self): """ - Sets the source reference on plot.ly for intensity . + Sets the number to be displayed. - The 'intensitysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'value' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["intensitysrc"] + return self["value"] - @intensitysrc.setter - def intensitysrc(self, val): - self["intensitysrc"] = val + @value.setter + def value(self, val): + self["value"] = val - # isrc - # ---- + # visible + # ------- @property - def isrc(self): + def visible(self): """ - Sets the source reference on plot.ly for i . + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'isrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] Returns ------- - str + Any """ - return self["isrc"] + return self["visible"] - @isrc.setter - def isrc(self, val): - self["isrc"] = val + @visible.setter + def visible(self, val): + self["visible"] = val - # j - # - + # type + # ---- @property - def j(self): + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + delta + plotly.graph_objects.indicator.Delta instance or dict + with compatible properties + domain + plotly.graph_objects.indicator.Domain instance or dict + with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + number + plotly.graph_objects.indicator.Number instance or dict + with compatible properties + stream + plotly.graph_objects.indicator.Stream instance or dict + with compatible properties + title + plotly.graph_objects.indicator.Title instance or dict + with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). """ - A vector of vertex indices, i.e. integer values between 0 and - the length of the vertex vectors, representing the "second" - vertex of a triangle. For example, `{i[m], j[m], k[m]}` - together represent face m (triangle m) in the mesh, where `j[m] - = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex - arrays. Therefore, each element in `j` represents a point in - space, which is the second vertex of a triangle. - - The 'j' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + + def __init__( + self, + arg=None, + align=None, + customdata=None, + customdatasrc=None, + delta=None, + domain=None, + gauge=None, + ids=None, + idssrc=None, + meta=None, + metasrc=None, + mode=None, + name=None, + number=None, + stream=None, + title=None, + uid=None, + uirevision=None, + value=None, + visible=None, + **kwargs + ): + """ + Construct a new Indicator object + + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Indicator + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + delta + plotly.graph_objects.indicator.Delta instance or dict + with compatible properties + domain + plotly.graph_objects.indicator.Domain instance or dict + with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appear as the + legend item and on hover. + number + plotly.graph_objects.indicator.Number instance or dict + with compatible properties + stream + plotly.graph_objects.indicator.Stream instance or dict + with compatible properties + title + plotly.graph_objects.indicator.Title instance or dict + with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). Returns ------- - numpy.ndarray + Indicator """ - return self["j"] + super(Indicator, self).__init__("indicator") - @j.setter - def j(self, val): - self["j"] = val + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Indicator +constructor must be a dict or +an instance of plotly.graph_objs.Indicator""" + ) - # jsrc - # ---- - @property - def jsrc(self): - """ - Sets the source reference on plot.ly for j . - - The 'jsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators import indicator as v_indicator + + # Initialize validators + # --------------------- + self._validators["align"] = v_indicator.AlignValidator() + self._validators["customdata"] = v_indicator.CustomdataValidator() + self._validators["customdatasrc"] = v_indicator.CustomdatasrcValidator() + self._validators["delta"] = v_indicator.DeltaValidator() + self._validators["domain"] = v_indicator.DomainValidator() + self._validators["gauge"] = v_indicator.GaugeValidator() + self._validators["ids"] = v_indicator.IdsValidator() + self._validators["idssrc"] = v_indicator.IdssrcValidator() + self._validators["meta"] = v_indicator.MetaValidator() + self._validators["metasrc"] = v_indicator.MetasrcValidator() + self._validators["mode"] = v_indicator.ModeValidator() + self._validators["name"] = v_indicator.NameValidator() + self._validators["number"] = v_indicator.NumberValidator() + self._validators["stream"] = v_indicator.StreamValidator() + self._validators["title"] = v_indicator.TitleValidator() + self._validators["uid"] = v_indicator.UidValidator() + self._validators["uirevision"] = v_indicator.UirevisionValidator() + self._validators["value"] = v_indicator.ValueValidator() + self._validators["visible"] = v_indicator.VisibleValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + self["align"] = align if align is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("delta", None) + self["delta"] = delta if delta is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v + _v = arg.pop("gauge", None) + self["gauge"] = gauge if gauge is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("mode", None) + self["mode"] = mode if mode is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("number", None) + self["number"] = number if number is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("title", None) + self["title"] = title if title is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("value", None) + self["value"] = value if value is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v - Returns - ------- - str - """ - return self["jsrc"] + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - @jsrc.setter - def jsrc(self, val): - self["jsrc"] = val + self._props["type"] = "indicator" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="indicator", val="indicator" + ) + arg.pop("type", None) - # k - # - - @property - def k(self): - """ - A vector of vertex indices, i.e. integer values between 0 and - the length of the vertex vectors, representing the "third" - vertex of a triangle. For example, `{i[m], j[m], k[m]}` - together represent face m (triangle m) in the mesh, where `k[m] - = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex - arrays. Therefore, each element in `k` represents a point in - space, which is the third vertex of a triangle. - - The 'k' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - Returns - ------- - numpy.ndarray - """ - return self["k"] + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - @k.setter - def k(self, val): - self["k"] = val - # ksrc - # ---- - @property - def ksrc(self): - """ - Sets the source reference on plot.ly for k . - - The 'ksrc' property must be specified as a string or - as a plotly.grid_objs.Column object +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - str - """ - return self["ksrc"] - @ksrc.setter - def ksrc(self, val): - self["ksrc"] = val +class Histogram2dContour(_BaseTraceType): - # lighting + # autobinx # -------- @property - def lighting(self): + def autobinx(self): """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of plotly.graph_objs.mesh3d.Lighting - - A dict of string/value properties that will be passed - to the Lighting constructor + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. + The 'autobinx' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.mesh3d.Lighting + bool """ - return self["lighting"] + return self["autobinx"] - @lighting.setter - def lighting(self, val): - self["lighting"] = val + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val - # lightposition - # ------------- + # autobiny + # -------- @property - def lightposition(self): + def autobiny(self): """ - The 'lightposition' property is an instance of Lightposition - that may be specified as: - - An instance of plotly.graph_objs.mesh3d.Lightposition - - A dict of string/value properties that will be passed - to the Lightposition constructor + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. + The 'autobiny' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.mesh3d.Lightposition + bool """ - return self["lightposition"] + return self["autobiny"] - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val - # meta - # ---- + # autocolorscale + # -------------- @property - def meta(self): + def autocolorscale(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'meta' property accepts values of any type + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - Any|numpy.ndarray + bool """ - return self["meta"] + return self["autocolorscale"] - @meta.setter - def meta(self, val): - self["meta"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # metasrc - # ------- + # autocontour + # ----------- @property - def metasrc(self): + def autocontour(self): """ - Sets the source reference on plot.ly for meta . + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'autocontour' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["metasrc"] + return self["autocontour"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val - # name - # ---- + # bingroup + # -------- @property - def name(self): + def bingroup(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Set the `xbingroup` and `ybingroup` default prefix For example, + setting a `bingroup` of 1 on two histogram2d traces will make + them their x-bins and y-bins match separately. - The 'name' property is a string and must be specified as: + The 'bingroup' property is a string and must be specified as: - A string - A number that will be converted to a string @@ -49204,4204 +51992,4149 @@ def name(self): ------- str """ - return self["name"] + return self["bingroup"] - @name.setter - def name(self, val): - self["name"] = val + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val - # opacity - # ------- + # coloraxis + # --------- @property - def opacity(self): + def coloraxis(self): """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) Returns ------- - int|float + str """ - return self["opacity"] + return self["coloraxis"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # reversescale - # ------------ + # colorbar + # -------- @property - def reversescale(self): + def colorbar(self): """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.histogram2dcontour.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor - The 'reversescale' property must be specified as a bool - (either True, or False) + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.histogram2dcont + our.colorbar.Tickformatstop instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram2dcontour.colorbar.tickformatstopdef + aults), sets the default property values to use + for elements of + histogram2dcontour.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.histogram2dcontour.colorba + r.Title instance or dict with compatible + properties + titlefont + Deprecated: Please use + histogram2dcontour.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram2dcontour.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - bool + plotly.graph_objs.histogram2dcontour.ColorBar """ - return self["reversescale"] + return self["colorbar"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # scene - # ----- + # colorscale + # ---------- @property - def scene(self): + def colorscale(self): """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- str """ - return self["scene"] - - @scene.setter - def scene(self, val): - self["scene"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] + return self["colorscale"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # stream - # ------ + # contours + # -------- @property - def stream(self): + def contours(self): """ - The 'stream' property is an instance of Stream + The 'contours' property is an instance of Contours that may be specified as: - - An instance of plotly.graph_objs.mesh3d.Stream + - An instance of plotly.graph_objs.histogram2dcontour.Contours - A dict of string/value properties that will be passed - to the Stream constructor + to the Contours constructor Supported dict properties: - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "heatmap", + a heatmap gradient coloring is applied between + each contour level. If "lines", coloring is + done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. Returns ------- - plotly.graph_objs.mesh3d.Stream + plotly.graph_objs.histogram2dcontour.Contours """ - return self["stream"] + return self["contours"] - @stream.setter - def stream(self, val): - self["stream"] = val + @contours.setter + def contours(self, val): + self["contours"] = val - # text - # ---- + # customdata + # ---------- @property - def text(self): + def customdata(self): """ - Sets the text elements associated with the vertices. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ - return self["text"] + return self["customdata"] - @text.setter - def text(self, val): - self["text"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # textsrc - # ------- + # customdatasrc + # ------------- @property - def textsrc(self): + def customdatasrc(self): """ - Sets the source reference on plot.ly for text . + Sets the source reference on plot.ly for customdata . - The 'textsrc' property must be specified as a string or + The 'customdatasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["textsrc"] + return self["customdatasrc"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # uid - # --- + # histfunc + # -------- @property - def uid(self): + def histfunc(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] Returns ------- - str + Any """ - return self["uid"] + return self["histfunc"] - @uid.setter - def uid(self, val): - self["uid"] = val + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val - # uirevision - # ---------- + # histnorm + # -------- @property - def uirevision(self): + def histnorm(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). - The 'uirevision' property accepts values of any type + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] Returns ------- Any """ - return self["uirevision"] + return self["histnorm"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val - # vertexcolor - # ----------- + # hoverinfo + # --------- @property - def vertexcolor(self): + def hoverinfo(self): """ - Sets the color of each vertex Overrides "color". While Red, - green and blue colors are in the range of 0 and 255; in the - case of having vertex color data in RGBA format, the alpha - color should be normalized to be between 0 and 1. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'vertexcolor' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - numpy.ndarray + Any|numpy.ndarray """ - return self["vertexcolor"] + return self["hoverinfo"] - @vertexcolor.setter - def vertexcolor(self, val): - self["vertexcolor"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # vertexcolorsrc - # -------------- + # hoverinfosrc + # ------------ @property - def vertexcolorsrc(self): + def hoverinfosrc(self): """ - Sets the source reference on plot.ly for vertexcolor . + Sets the source reference on plot.ly for hoverinfo . - The 'vertexcolorsrc' property must be specified as a string or + The 'hoverinfosrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["vertexcolorsrc"] + return self["hoverinfosrc"] - @vertexcolorsrc.setter - def vertexcolorsrc(self, val): - self["vertexcolorsrc"] = val + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val - # visible - # ------- + # hoverlabel + # ---------- @property - def visible(self): + def hoverlabel(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.histogram2dcontour.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - Any + plotly.graph_objs.histogram2dcontour.Hoverlabel """ - return self["visible"] + return self["hoverlabel"] - @visible.setter - def visible(self, val): - self["visible"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # x - # - + # hovertemplate + # ------------- @property - def x(self): + def hovertemplate(self): """ - Sets the X coordinates of the vertices. The nth element of - vectors `x`, `y` and `z` jointly represent the X, Y and Z - coordinates of the nth vertex. + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `z` Anything contained in tag `` is displayed + in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ - return self["x"] + return self["hovertemplate"] - @x.setter - def x(self, val): - self["x"] = val + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val - # xcalendar - # --------- + # hovertemplatesrc + # ---------------- @property - def xcalendar(self): + def hovertemplatesrc(self): """ - Sets the calendar system to use with `x` date data. + Sets the source reference on plot.ly for hovertemplate . - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["xcalendar"] + return self["hovertemplatesrc"] - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # ids + # --- + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val - # xsrc - # ---- + # idssrc + # ------ @property - def xsrc(self): + def idssrc(self): """ - Sets the source reference on plot.ly for x . + Sets the source reference on plot.ly for ids . - The 'xsrc' property must be specified as a string or + The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["xsrc"] + return self["idssrc"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # y - # - + # legendgroup + # ----------- @property - def y(self): + def legendgroup(self): """ - Sets the Y coordinates of the vertices. The nth element of - vectors `x`, `y` and `z` jointly represent the X, Y and Z - coordinates of the nth vertex. + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - numpy.ndarray + str """ - return self["y"] + return self["legendgroup"] - @y.setter - def y(self, val): - self["y"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # ycalendar - # --------- + # line + # ---- @property - def ycalendar(self): + def line(self): """ - Sets the calendar system to use with `y` date data. + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.histogram2dcontour.Line + - A dict of string/value properties that will be passed + to the Line constructor - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + Supported dict properties: + + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Returns ------- - Any + plotly.graph_objs.histogram2dcontour.Line """ - return self["ycalendar"] + return self["line"] - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val + @line.setter + def line(self, val): + self["line"] = val - # ysrc - # ---- + # marker + # ------ @property - def ysrc(self): + def marker(self): """ - Sets the source reference on plot.ly for y . + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.histogram2dcontour.Marker + - A dict of string/value properties that will be passed + to the Marker constructor - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + color + Sets the aggregation data. + colorsrc + Sets the source reference on plot.ly for color + . Returns ------- - str + plotly.graph_objs.histogram2dcontour.Marker """ - return self["ysrc"] + return self["marker"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @marker.setter + def marker(self, val): + self["marker"] = val - # z - # - + # meta + # ---- @property - def z(self): + def meta(self): """ - Sets the Z coordinates of the vertices. The nth element of - vectors `x`, `y` and `z` jointly represent the X, Y and Z - coordinates of the nth vertex. + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'meta' property accepts values of any type Returns ------- - numpy.ndarray + Any|numpy.ndarray """ - return self["z"] + return self["meta"] - @z.setter - def z(self, val): - self["z"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # zcalendar - # --------- + # metasrc + # ------- @property - def zcalendar(self): + def metasrc(self): """ - Sets the calendar system to use with `z` date data. + Sets the source reference on plot.ly for meta . - The 'zcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["zcalendar"] + return self["metasrc"] - @zcalendar.setter - def zcalendar(self, val): - self["zcalendar"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # zsrc + # name # ---- @property - def zsrc(self): + def name(self): """ - Sets the source reference on plot.ly for z . + Sets the trace name. The trace name appear as the legend item + and on hover. - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] + return self["name"] - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" + @name.setter + def name(self, val): + self["name"] = val - # Self properties description - # --------------------------- + # nbinsx + # ------ @property - def _prop_descriptions(self): - return """\ - alphahull - Determines how the mesh surface triangles are derived - from the set of vertices (points) represented by the - `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays - are not supplied. For general use of `mesh3d` it is - preferred that `i`, `j`, `k` are supplied. If "-1", - Delaunay triangulation is used, which is mainly - suitable if the mesh is a single, more or less layer - surface that is perpendicular to `delaunayaxis`. In - case the `delaunayaxis` intersects the mesh surface at - more than one point it will result triangles that are - very long in the dimension of `delaunayaxis`. If ">0", - the alpha-shape algorithm is used. In this case, the - positive `alphahull` value signals the use of the - alpha-shape algorithm, _and_ its value acts as the - parameter for the mesh fitting. If 0, the convex-hull - algorithm is used. It is suitable for convex bodies or - if the intention is to enclose the `x`, `y` and `z` - point set into a convex hull. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `intensity`) or - the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `intensity` and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `intensity`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `intensity` and if set, `cmax` - must be set as well. - color - Sets the color of the whole mesh - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.mesh3d.ColorBar instance or dict - with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - plotly.graph_objects.mesh3d.Contour instance or dict - with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - delaunayaxis - Sets the Delaunay axis, which is the axis that is - perpendicular to the surface of the Delaunay - triangulation. It has an effect if `i`, `j`, `k` are - not provided and `alphahull` is set to indicate - Delaunay triangulation. - facecolor - Sets the color of each face Overrides "color" and - "vertexcolor". - facecolorsrc - Sets the source reference on plot.ly for facecolor . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.mesh3d.Hoverlabel instance or dict - with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - i - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "first" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `i[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `i` represents a point in space, which - is the first vertex of a triangle. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - intensity - Sets the vertex intensity values, used for plotting - fields on meshes - intensitysrc - Sets the source reference on plot.ly for intensity . - isrc - Sets the source reference on plot.ly for i . - j - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "second" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `j[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `j` represents a point in space, which - is the second vertex of a triangle. - jsrc - Sets the source reference on plot.ly for j . - k - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "third" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `k[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `k` represents a point in space, which - is the third vertex of a triangle. - ksrc - Sets the source reference on plot.ly for k . - lighting - plotly.graph_objects.mesh3d.Lighting instance or dict - with compatible properties - lightposition - plotly.graph_objects.mesh3d.Lightposition instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - plotly.graph_objects.mesh3d.Stream instance or dict - with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - vertexcolor - Sets the color of each vertex Overrides "color". While - Red, green and blue colors are in the range of 0 and - 255; in the case of having vertex color data in RGBA - format, the alpha color should be normalized to be - between 0 and 1. - vertexcolorsrc - Sets the source reference on plot.ly for vertexcolor . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the Y coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the Z coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on plot.ly for z . + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int """ + return self["nbinsx"] - def __init__( - self, - arg=None, - alphahull=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - delaunayaxis=None, - facecolor=None, - facecolorsrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - i=None, - ids=None, - idssrc=None, - intensity=None, - intensitysrc=None, - isrc=None, - j=None, - jsrc=None, - k=None, - ksrc=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - vertexcolor=None, - vertexcolorsrc=None, - visible=None, - x=None, - xcalendar=None, - xsrc=None, - y=None, - ycalendar=None, - ysrc=None, - z=None, - zcalendar=None, - zsrc=None, - **kwargs - ): + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + # nbinsy + # ------ + @property + def nbinsy(self): """ - Construct a new Mesh3d object - - Draws sets of triangles with coordinates given by three - 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, - `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- - shape algorithm or (4) the Convex-hull algorithm + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Mesh3d - alphahull - Determines how the mesh surface triangles are derived - from the set of vertices (points) represented by the - `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays - are not supplied. For general use of `mesh3d` it is - preferred that `i`, `j`, `k` are supplied. If "-1", - Delaunay triangulation is used, which is mainly - suitable if the mesh is a single, more or less layer - surface that is perpendicular to `delaunayaxis`. In - case the `delaunayaxis` intersects the mesh surface at - more than one point it will result triangles that are - very long in the dimension of `delaunayaxis`. If ">0", - the alpha-shape algorithm is used. In this case, the - positive `alphahull` value signals the use of the - alpha-shape algorithm, _and_ its value acts as the - parameter for the mesh fitting. If 0, the convex-hull - algorithm is used. It is suitable for convex bodies or - if the intention is to enclose the `x`, `y` and `z` - point set into a convex hull. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `intensity`) or - the bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `intensity` and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `intensity`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `intensity` and if set, `cmax` - must be set as well. - color - Sets the color of the whole mesh - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.mesh3d.ColorBar instance or dict - with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - plotly.graph_objects.mesh3d.Contour instance or dict - with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - delaunayaxis - Sets the Delaunay axis, which is the axis that is - perpendicular to the surface of the Delaunay - triangulation. It has an effect if `i`, `j`, `k` are - not provided and `alphahull` is set to indicate - Delaunay triangulation. - facecolor - Sets the color of each face Overrides "color" and - "vertexcolor". - facecolorsrc - Sets the source reference on plot.ly for facecolor . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.mesh3d.Hoverlabel instance or dict - with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - i - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "first" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `i[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `i` represents a point in space, which - is the first vertex of a triangle. - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - intensity - Sets the vertex intensity values, used for plotting - fields on meshes - intensitysrc - Sets the source reference on plot.ly for intensity . - isrc - Sets the source reference on plot.ly for i . - j - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "second" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `j[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `j` represents a point in space, which - is the second vertex of a triangle. - jsrc - Sets the source reference on plot.ly for j . - k - A vector of vertex indices, i.e. integer values between - 0 and the length of the vertex vectors, representing - the "third" vertex of a triangle. For example, `{i[m], - j[m], k[m]}` together represent face m (triangle m) in - the mesh, where `k[m] = n` points to the triplet - `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, - each element in `k` represents a point in space, which - is the third vertex of a triangle. - ksrc - Sets the source reference on plot.ly for k . - lighting - plotly.graph_objects.mesh3d.Lighting instance or dict - with compatible properties - lightposition - plotly.graph_objects.mesh3d.Lightposition instance or - dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - plotly.graph_objects.mesh3d.Stream instance or dict - with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - vertexcolor - Sets the color of each vertex Overrides "color". While - Red, green and blue colors are in the range of 0 and - 255; in the case of having vertex color data in RGBA - format, the alpha color should be normalized to be - between 0 and 1. - vertexcolorsrc - Sets the source reference on plot.ly for vertexcolor . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the Y coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the Z coordinates of the vertices. The nth element - of vectors `x`, `y` and `z` jointly represent the X, Y - and Z coordinates of the nth vertex. - zcalendar - Sets the calendar system to use with `z` date data. - zsrc - Sets the source reference on plot.ly for z . + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + # ncontours + # --------- + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.histogram2dcontour.Stream + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - Mesh3d + plotly.graph_objs.histogram2dcontour.Stream """ - super(Mesh3d, self).__init__("mesh3d") + return self["stream"] - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Mesh3d -constructor must be a dict or -an instance of plotly.graph_objs.Mesh3d""" - ) + @stream.setter + def stream(self, val): + self["stream"] = val - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string - # Import validators - # ----------------- - from plotly.validators import mesh3d as v_mesh3d + Returns + ------- + str + """ + return self["uid"] - # Initialize validators - # --------------------- - self._validators["alphahull"] = v_mesh3d.AlphahullValidator() - self._validators["autocolorscale"] = v_mesh3d.AutocolorscaleValidator() - self._validators["cauto"] = v_mesh3d.CautoValidator() - self._validators["cmax"] = v_mesh3d.CmaxValidator() - self._validators["cmid"] = v_mesh3d.CmidValidator() - self._validators["cmin"] = v_mesh3d.CminValidator() - self._validators["color"] = v_mesh3d.ColorValidator() - self._validators["coloraxis"] = v_mesh3d.ColoraxisValidator() - self._validators["colorbar"] = v_mesh3d.ColorBarValidator() - self._validators["colorscale"] = v_mesh3d.ColorscaleValidator() - self._validators["contour"] = v_mesh3d.ContourValidator() - self._validators["customdata"] = v_mesh3d.CustomdataValidator() - self._validators["customdatasrc"] = v_mesh3d.CustomdatasrcValidator() - self._validators["delaunayaxis"] = v_mesh3d.DelaunayaxisValidator() - self._validators["facecolor"] = v_mesh3d.FacecolorValidator() - self._validators["facecolorsrc"] = v_mesh3d.FacecolorsrcValidator() - self._validators["flatshading"] = v_mesh3d.FlatshadingValidator() - self._validators["hoverinfo"] = v_mesh3d.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_mesh3d.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_mesh3d.HoverlabelValidator() - self._validators["hovertemplate"] = v_mesh3d.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_mesh3d.HovertemplatesrcValidator() - self._validators["hovertext"] = v_mesh3d.HovertextValidator() - self._validators["hovertextsrc"] = v_mesh3d.HovertextsrcValidator() - self._validators["i"] = v_mesh3d.IValidator() - self._validators["ids"] = v_mesh3d.IdsValidator() - self._validators["idssrc"] = v_mesh3d.IdssrcValidator() - self._validators["intensity"] = v_mesh3d.IntensityValidator() - self._validators["intensitysrc"] = v_mesh3d.IntensitysrcValidator() - self._validators["isrc"] = v_mesh3d.IsrcValidator() - self._validators["j"] = v_mesh3d.JValidator() - self._validators["jsrc"] = v_mesh3d.JsrcValidator() - self._validators["k"] = v_mesh3d.KValidator() - self._validators["ksrc"] = v_mesh3d.KsrcValidator() - self._validators["lighting"] = v_mesh3d.LightingValidator() - self._validators["lightposition"] = v_mesh3d.LightpositionValidator() - self._validators["meta"] = v_mesh3d.MetaValidator() - self._validators["metasrc"] = v_mesh3d.MetasrcValidator() - self._validators["name"] = v_mesh3d.NameValidator() - self._validators["opacity"] = v_mesh3d.OpacityValidator() - self._validators["reversescale"] = v_mesh3d.ReversescaleValidator() - self._validators["scene"] = v_mesh3d.SceneValidator() - self._validators["showscale"] = v_mesh3d.ShowscaleValidator() - self._validators["stream"] = v_mesh3d.StreamValidator() - self._validators["text"] = v_mesh3d.TextValidator() - self._validators["textsrc"] = v_mesh3d.TextsrcValidator() - self._validators["uid"] = v_mesh3d.UidValidator() - self._validators["uirevision"] = v_mesh3d.UirevisionValidator() - self._validators["vertexcolor"] = v_mesh3d.VertexcolorValidator() - self._validators["vertexcolorsrc"] = v_mesh3d.VertexcolorsrcValidator() - self._validators["visible"] = v_mesh3d.VisibleValidator() - self._validators["x"] = v_mesh3d.XValidator() - self._validators["xcalendar"] = v_mesh3d.XcalendarValidator() - self._validators["xsrc"] = v_mesh3d.XsrcValidator() - self._validators["y"] = v_mesh3d.YValidator() - self._validators["ycalendar"] = v_mesh3d.YcalendarValidator() - self._validators["ysrc"] = v_mesh3d.YsrcValidator() - self._validators["z"] = v_mesh3d.ZValidator() - self._validators["zcalendar"] = v_mesh3d.ZcalendarValidator() - self._validators["zsrc"] = v_mesh3d.ZsrcValidator() + @uid.setter + def uid(self, val): + self["uid"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alphahull", None) - self["alphahull"] = alphahull if alphahull is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("delaunayaxis", None) - self["delaunayaxis"] = delaunayaxis if delaunayaxis is not None else _v - _v = arg.pop("facecolor", None) - self["facecolor"] = facecolor if facecolor is not None else _v - _v = arg.pop("facecolorsrc", None) - self["facecolorsrc"] = facecolorsrc if facecolorsrc is not None else _v - _v = arg.pop("flatshading", None) - self["flatshading"] = flatshading if flatshading is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("i", None) - self["i"] = i if i is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("intensity", None) - self["intensity"] = intensity if intensity is not None else _v - _v = arg.pop("intensitysrc", None) - self["intensitysrc"] = intensitysrc if intensitysrc is not None else _v - _v = arg.pop("isrc", None) - self["isrc"] = isrc if isrc is not None else _v - _v = arg.pop("j", None) - self["j"] = j if j is not None else _v - _v = arg.pop("jsrc", None) - self["jsrc"] = jsrc if jsrc is not None else _v - _v = arg.pop("k", None) - self["k"] = k if k is not None else _v - _v = arg.pop("ksrc", None) - self["ksrc"] = ksrc if ksrc is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("vertexcolor", None) - self["vertexcolor"] = vertexcolor if vertexcolor is not None else _v - _v = arg.pop("vertexcolorsrc", None) - self["vertexcolorsrc"] = vertexcolorsrc if vertexcolorsrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zcalendar", None) - self["zcalendar"] = zcalendar if zcalendar is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + Any + """ + return self["uirevision"] - self._props["type"] = "mesh3d" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="mesh3d", val="mesh3d" - ) - arg.pop("type", None) + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + Any + """ + return self["visible"] + @visible.setter + def visible(self, val): + self["visible"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # x + # - + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + Returns + ------- + numpy.ndarray + """ + return self["x"] -class Isosurface(_BaseTraceType): + @x.setter + def x(self, val): + self["x"] = val - # autocolorscale - # -------------- + # xaxis + # ----- @property - def autocolorscale(self): + def xaxis(self): """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - The 'autocolorscale' property must be specified as a bool - (either True, or False) + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - bool + str """ - return self["autocolorscale"] + return self["xaxis"] - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # caps - # ---- + # xbingroup + # --------- @property - def caps(self): + def xbingroup(self): """ - The 'caps' property is an instance of Caps + Set a group of histogram traces which will have compatible + x-bin settings. Using `xbingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram `bingroup` + + The 'xbingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xbingroup"] + + @xbingroup.setter + def xbingroup(self, val): + self["xbingroup"] = val + + # xbins + # ----- + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins that may be specified as: - - An instance of plotly.graph_objs.isosurface.Caps + - An instance of plotly.graph_objs.histogram2dcontour.XBins - A dict of string/value properties that will be passed - to the Caps constructor + to the XBins constructor Supported dict properties: - x - plotly.graph_objects.isosurface.caps.X instance - or dict with compatible properties - y - plotly.graph_objects.isosurface.caps.Y instance - or dict with compatible properties - z - plotly.graph_objects.isosurface.caps.Z instance - or dict with compatible properties + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. Returns ------- - plotly.graph_objs.isosurface.Caps + plotly.graph_objs.histogram2dcontour.XBins """ - return self["caps"] + return self["xbins"] - @caps.setter - def caps(self, val): - self["caps"] = val + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # y + # - + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val - # cauto + # yaxis # ----- @property - def cauto(self): + def yaxis(self): """ - Determines whether or not the color domain is computed with - respect to the input data (here `value`) or the bounds set in - `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` - are set by the user. + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. - The 'cauto' property must be specified as a bool - (either True, or False) + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- - bool + str """ - return self["cauto"] + return self["yaxis"] - @cauto.setter - def cauto(self, val): - self["cauto"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # cmax - # ---- + # ybingroup + # --------- @property - def cmax(self): + def ybingroup(self): """ - Sets the upper bound of the color domain. Value should have the - same units as `value` and if set, `cmin` must be set as well. + Set a group of histogram traces which will have compatible + y-bin settings. Using `ybingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram `bingroup` - The 'cmax' property is a number and may be specified as: - - An int or float + The 'ybingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - int|float + str """ - return self["cmax"] + return self["ybingroup"] - @cmax.setter - def cmax(self, val): - self["cmax"] = val + @ybingroup.setter + def ybingroup(self, val): + self["ybingroup"] = val - # cmid - # ---- + # ybins + # ----- @property - def cmid(self): + def ybins(self): """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as `value`. Has no effect when `cauto` is `false`. + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of plotly.graph_objs.histogram2dcontour.YBins + - A dict of string/value properties that will be passed + to the YBins constructor - The 'cmid' property is a number and may be specified as: - - An int or float + Supported dict properties: + + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. Returns ------- - int|float + plotly.graph_objs.histogram2dcontour.YBins """ - return self["cmid"] + return self["ybins"] - @cmid.setter - def cmid(self, val): - self["cmid"] = val + @ybins.setter + def ybins(self, val): + self["ybins"] = val - # cmin - # ---- + # ycalendar + # --------- @property - def cmin(self): + def ycalendar(self): """ - Sets the lower bound of the color domain. Value should have the - same units as `value` and if set, `cmax` must be set as well. + Sets the calendar system to use with `y` date data. - The 'cmin' property is a number and may be specified as: - - An int or float + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - int|float + Any """ - return self["cmin"] + return self["ycalendar"] - @cmin.setter - def cmin(self, val): - self["cmin"] = val + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val - # coloraxis - # --------- + # ysrc + # ---- @property - def coloraxis(self): + def ysrc(self): """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. + Sets the source reference on plot.ly for y . - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["coloraxis"] + return self["ysrc"] - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # colorbar - # -------- + # z + # - @property - def colorbar(self): + def z(self): """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.isosurface.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor + Sets the aggregation data. - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.isosurface.colo - rbar.Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.isosurface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of isosurface.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.isosurface.colorbar.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use - isosurface.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - isosurface.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.isosurface.ColorBar + numpy.ndarray """ - return self["colorbar"] + return self["z"] - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val + @z.setter + def z(self, val): + self["z"] = val - # colorscale - # ---------- + # zauto + # ----- @property - def colorscale(self): + def zauto(self): """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + The 'zauto' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["colorscale"] + return self["zauto"] - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + @zauto.setter + def zauto(self, val): + self["zauto"] = val - # contour - # ------- + # zhoverformat + # ------------ @property - def contour(self): + def zhoverformat(self): """ - The 'contour' property is an instance of Contour - that may be specified as: - - An instance of plotly.graph_objs.isosurface.Contour - - A dict of string/value properties that will be passed - to the Contour constructor + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.isosurface.Contour + str """ - return self["contour"] + return self["zhoverformat"] - @contour.setter - def contour(self, val): - self["contour"] = val + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val - # customdata - # ---------- + # zmax + # ---- @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'zmax' property is a number and may be specified as: + - An int or float Returns ------- - numpy.ndarray + int|float """ - return self["customdata"] + return self["zmax"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @zmax.setter + def zmax(self, val): + self["zmax"] = val - # customdatasrc - # ------------- + # zmid + # ---- @property - def customdatasrc(self): + def zmid(self): """ - Sets the source reference on plot.ly for customdata . + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'zmid' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["customdatasrc"] + return self["zmid"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @zmid.setter + def zmid(self, val): + self["zmid"] = val - # flatshading - # ----------- + # zmin + # ---- @property - def flatshading(self): + def zmin(self): """ - Determines whether or not normal smoothing is applied to the - meshes, creating meshes with an angular, low-poly look via flat - reflections. + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. - The 'flatshading' property must be specified as a bool - (either True, or False) + The 'zmin' property is a number and may be specified as: + - An int or float Returns ------- - bool + int|float """ - return self["flatshading"] + return self["zmin"] - @flatshading.setter - def flatshading(self, val): - self["flatshading"] = val + @zmin.setter + def zmin(self, val): + self["zmin"] = val - # hoverinfo - # --------- + # zsrc + # ---- @property - def hoverinfo(self): + def zsrc(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Sets the source reference on plot.ly for z . - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any|numpy.ndarray + str """ - return self["hoverinfo"] + return self["zsrc"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val - # hoverinfosrc - # ------------ + # type + # ---- @property - def hoverinfosrc(self): + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.histogram2dcontour.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + plotly.graph_objects.histogram2dcontour.Contours + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.histogram2dcontour.Hoverlabel + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.histogram2dcontour.Line instance + or dict with compatible properties + marker + plotly.graph_objects.histogram2dcontour.Marker instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + plotly.graph_objects.histogram2dcontour.Stream instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + plotly.graph_objects.histogram2dcontour.XBins instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + plotly.graph_objects.histogram2dcontour.YBins instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on plot.ly for z . """ - Sets the source reference on plot.ly for hoverinfo . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object + + def __init__( + self, + arg=None, + autobinx=None, + autobiny=None, + autocolorscale=None, + autocontour=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legendgroup=None, + line=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs + ): + """ + Construct a new Histogram2dContour object + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a contour plot. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Histogram2dContour + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.histogram2dcontour.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + plotly.graph_objects.histogram2dcontour.Contours + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.histogram2dcontour.Hoverlabel + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.histogram2dcontour.Line instance + or dict with compatible properties + marker + plotly.graph_objects.histogram2dcontour.Marker instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + plotly.graph_objects.histogram2dcontour.Stream instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + plotly.graph_objects.histogram2dcontour.XBins instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + plotly.graph_objects.histogram2dcontour.YBins instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - str + Histogram2dContour """ - return self["hoverinfosrc"] + super(Histogram2dContour, self).__init__("histogram2dcontour") - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Histogram2dContour +constructor must be a dict or +an instance of plotly.graph_objs.Histogram2dContour""" + ) - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.isosurface.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) - Returns - ------- - plotly.graph_objs.isosurface.Hoverlabel - """ - return self["hoverlabel"] + # Import validators + # ----------------- + from plotly.validators import histogram2dcontour as v_histogram2dcontour - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + # Initialize validators + # --------------------- + self._validators["autobinx"] = v_histogram2dcontour.AutobinxValidator() + self._validators["autobiny"] = v_histogram2dcontour.AutobinyValidator() + self._validators[ + "autocolorscale" + ] = v_histogram2dcontour.AutocolorscaleValidator() + self._validators["autocontour"] = v_histogram2dcontour.AutocontourValidator() + self._validators["bingroup"] = v_histogram2dcontour.BingroupValidator() + self._validators["coloraxis"] = v_histogram2dcontour.ColoraxisValidator() + self._validators["colorbar"] = v_histogram2dcontour.ColorBarValidator() + self._validators["colorscale"] = v_histogram2dcontour.ColorscaleValidator() + self._validators["contours"] = v_histogram2dcontour.ContoursValidator() + self._validators["customdata"] = v_histogram2dcontour.CustomdataValidator() + self._validators[ + "customdatasrc" + ] = v_histogram2dcontour.CustomdatasrcValidator() + self._validators["histfunc"] = v_histogram2dcontour.HistfuncValidator() + self._validators["histnorm"] = v_histogram2dcontour.HistnormValidator() + self._validators["hoverinfo"] = v_histogram2dcontour.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_histogram2dcontour.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_histogram2dcontour.HoverlabelValidator() + self._validators[ + "hovertemplate" + ] = v_histogram2dcontour.HovertemplateValidator() + self._validators[ + "hovertemplatesrc" + ] = v_histogram2dcontour.HovertemplatesrcValidator() + self._validators["ids"] = v_histogram2dcontour.IdsValidator() + self._validators["idssrc"] = v_histogram2dcontour.IdssrcValidator() + self._validators["legendgroup"] = v_histogram2dcontour.LegendgroupValidator() + self._validators["line"] = v_histogram2dcontour.LineValidator() + self._validators["marker"] = v_histogram2dcontour.MarkerValidator() + self._validators["meta"] = v_histogram2dcontour.MetaValidator() + self._validators["metasrc"] = v_histogram2dcontour.MetasrcValidator() + self._validators["name"] = v_histogram2dcontour.NameValidator() + self._validators["nbinsx"] = v_histogram2dcontour.NbinsxValidator() + self._validators["nbinsy"] = v_histogram2dcontour.NbinsyValidator() + self._validators["ncontours"] = v_histogram2dcontour.NcontoursValidator() + self._validators["opacity"] = v_histogram2dcontour.OpacityValidator() + self._validators["reversescale"] = v_histogram2dcontour.ReversescaleValidator() + self._validators["showlegend"] = v_histogram2dcontour.ShowlegendValidator() + self._validators["showscale"] = v_histogram2dcontour.ShowscaleValidator() + self._validators["stream"] = v_histogram2dcontour.StreamValidator() + self._validators["uid"] = v_histogram2dcontour.UidValidator() + self._validators["uirevision"] = v_histogram2dcontour.UirevisionValidator() + self._validators["visible"] = v_histogram2dcontour.VisibleValidator() + self._validators["x"] = v_histogram2dcontour.XValidator() + self._validators["xaxis"] = v_histogram2dcontour.XAxisValidator() + self._validators["xbingroup"] = v_histogram2dcontour.XbingroupValidator() + self._validators["xbins"] = v_histogram2dcontour.XBinsValidator() + self._validators["xcalendar"] = v_histogram2dcontour.XcalendarValidator() + self._validators["xsrc"] = v_histogram2dcontour.XsrcValidator() + self._validators["y"] = v_histogram2dcontour.YValidator() + self._validators["yaxis"] = v_histogram2dcontour.YAxisValidator() + self._validators["ybingroup"] = v_histogram2dcontour.YbingroupValidator() + self._validators["ybins"] = v_histogram2dcontour.YBinsValidator() + self._validators["ycalendar"] = v_histogram2dcontour.YcalendarValidator() + self._validators["ysrc"] = v_histogram2dcontour.YsrcValidator() + self._validators["z"] = v_histogram2dcontour.ZValidator() + self._validators["zauto"] = v_histogram2dcontour.ZautoValidator() + self._validators["zhoverformat"] = v_histogram2dcontour.ZhoverformatValidator() + self._validators["zmax"] = v_histogram2dcontour.ZmaxValidator() + self._validators["zmid"] = v_histogram2dcontour.ZmidValidator() + self._validators["zmin"] = v_histogram2dcontour.ZminValidator() + self._validators["zsrc"] = v_histogram2dcontour.ZsrcValidator() - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autobinx", None) + self["autobinx"] = autobinx if autobinx is not None else _v + _v = arg.pop("autobiny", None) + self["autobiny"] = autobiny if autobiny is not None else _v + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("autocontour", None) + self["autocontour"] = autocontour if autocontour is not None else _v + _v = arg.pop("bingroup", None) + self["bingroup"] = bingroup if bingroup is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("contours", None) + self["contours"] = contours if contours is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("histfunc", None) + self["histfunc"] = histfunc if histfunc is not None else _v + _v = arg.pop("histnorm", None) + self["histnorm"] = histnorm if histnorm is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("nbinsx", None) + self["nbinsx"] = nbinsx if nbinsx is not None else _v + _v = arg.pop("nbinsy", None) + self["nbinsy"] = nbinsy if nbinsy is not None else _v + _v = arg.pop("ncontours", None) + self["ncontours"] = ncontours if ncontours is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xbingroup", None) + self["xbingroup"] = xbingroup if xbingroup is not None else _v + _v = arg.pop("xbins", None) + self["xbins"] = xbins if xbins is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ybingroup", None) + self["ybingroup"] = ybingroup if ybingroup is not None else _v + _v = arg.pop("ybins", None) + self["ybins"] = ybins if ybins is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zauto", None) + self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zhoverformat", None) + self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v + _v = arg.pop("zmax", None) + self["zmax"] = zmax if zmax is not None else _v + _v = arg.pop("zmid", None) + self["zmid"] = zmid if zmid is not None else _v + _v = arg.pop("zmin", None) + self["zmin"] = zmin if zmin is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val + self._props["type"] = "histogram2dcontour" + self._validators["type"] = LiteralValidator( + plotly_name="type", + parent_name="histogram2dcontour", + val="histogram2dcontour", + ) + arg.pop("type", None) - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) - Returns - ------- - str - """ - return self["hovertemplatesrc"] + # Reset skip_invalid + # ------------------ + self._skip_invalid = False - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val +class Histogram2d(_BaseTraceType): - # hovertextsrc - # ------------ + # autobinx + # -------- @property - def hovertextsrc(self): + def autobinx(self): """ - Sets the source reference on plot.ly for hovertext . + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'autobinx' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["hovertextsrc"] + return self["autobinx"] - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val - # ids - # --- + # autobiny + # -------- @property - def ids(self): + def autobiny(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'autobiny' property must be specified as a bool + (either True, or False) Returns ------- - numpy.ndarray + bool """ - return self["ids"] + return self["autobiny"] - @ids.setter - def ids(self, val): - self["ids"] = val + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val - # idssrc - # ------ + # autocolorscale + # -------------- @property - def idssrc(self): + def autocolorscale(self): """ - Sets the source reference on plot.ly for ids . + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["idssrc"] + return self["autocolorscale"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # isomax - # ------ + # bingroup + # -------- @property - def isomax(self): + def bingroup(self): """ - Sets the maximum boundary for iso-surface plot. + Set the `xbingroup` and `ybingroup` default prefix For example, + setting a `bingroup` of 1 on two histogram2d traces will make + them their x-bins and y-bins match separately. - The 'isomax' property is a number and may be specified as: - - An int or float + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - int|float + str """ - return self["isomax"] + return self["bingroup"] - @isomax.setter - def isomax(self, val): - self["isomax"] = val + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val - # isomin - # ------ + # coloraxis + # --------- @property - def isomin(self): + def coloraxis(self): """ - Sets the minimum boundary for iso-surface plot. + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. - The 'isomin' property is a number and may be specified as: - - An int or float + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) Returns ------- - int|float + str """ - return self["isomin"] + return self["coloraxis"] - @isomin.setter - def isomin(self, val): - self["isomin"] = val + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # lighting + # colorbar # -------- @property - def lighting(self): - """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of plotly.graph_objs.isosurface.Lighting - - A dict of string/value properties that will be passed - to the Lighting constructor - - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - - Returns - ------- - plotly.graph_objs.isosurface.Lighting - """ - return self["lighting"] - - @lighting.setter - def lighting(self, val): - self["lighting"] = val - - # lightposition - # ------------- - @property - def lightposition(self): + def colorbar(self): """ - The 'lightposition' property is an instance of Lightposition + The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.isosurface.Lightposition + - An instance of plotly.graph_objs.histogram2d.ColorBar - A dict of string/value properties that will be passed - to the Lightposition constructor + to the ColorBar constructor Supported dict properties: + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.histogram2d.col + orbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.histogram2d.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of + histogram2d.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.histogram2d.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + histogram2d.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + histogram2d.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - - Returns - ------- - plotly.graph_objs.isosurface.Lightposition - """ - return self["lightposition"] - - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - Any|numpy.ndarray + plotly.graph_objs.histogram2d.ColorBar """ - return self["meta"] + return self["colorbar"] - @meta.setter - def meta(self, val): - self["meta"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # metasrc - # ------- + # colorscale + # ---------- @property - def metasrc(self): + def colorscale(self): """ - Sets the source reference on plot.ly for meta . + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- str """ - return self["metasrc"] + return self["colorscale"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # name - # ---- + # customdata + # ---------- @property - def name(self): + def customdata(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["name"] + return self["customdata"] - @name.setter - def name(self, val): - self["name"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # opacity - # ------- + # customdatasrc + # ------------- @property - def opacity(self): + def customdatasrc(self): """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. + Sets the source reference on plot.ly for customdata . - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["opacity"] + return self["customdatasrc"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # reversescale - # ------------ + # histfunc + # -------- @property - def reversescale(self): + def histfunc(self): """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will - correspond to the first color. + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. - The 'reversescale' property must be specified as a bool - (either True, or False) + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] Returns ------- - bool + Any """ - return self["reversescale"] + return self["histfunc"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val - # scene - # ----- + # histnorm + # -------- @property - def scene(self): + def histnorm(self): """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] Returns ------- - str + Any """ - return self["scene"] + return self["histnorm"] - @scene.setter - def scene(self, val): - self["scene"] = val + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val - # showscale + # hoverinfo # --------- @property - def showscale(self): + def hoverinfo(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'showscale' property must be specified as a bool - (either True, or False) + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - bool + Any|numpy.ndarray """ - return self["showscale"] + return self["hoverinfo"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # slices - # ------ + # hoverinfosrc + # ------------ @property - def slices(self): + def hoverinfosrc(self): """ - The 'slices' property is an instance of Slices - that may be specified as: - - An instance of plotly.graph_objs.isosurface.Slices - - A dict of string/value properties that will be passed - to the Slices constructor + Sets the source reference on plot.ly for hoverinfo . - Supported dict properties: - - x - plotly.graph_objects.isosurface.slices.X - instance or dict with compatible properties - y - plotly.graph_objects.isosurface.slices.Y - instance or dict with compatible properties - z - plotly.graph_objects.isosurface.slices.Z - instance or dict with compatible properties + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.isosurface.Slices + str """ - return self["slices"] + return self["hoverinfosrc"] - @slices.setter - def slices(self, val): - self["slices"] = val + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val - # spaceframe + # hoverlabel # ---------- @property - def spaceframe(self): - """ - The 'spaceframe' property is an instance of Spaceframe - that may be specified as: - - An instance of plotly.graph_objs.isosurface.Spaceframe - - A dict of string/value properties that will be passed - to the Spaceframe constructor - - Supported dict properties: - - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 0.15 - meaning that only 15% of the area of every - faces of tetras would be shaded. Applying a - greater `fill` ratio would allow the creation - of stronger elements or could be sued to have - entirely closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. - - Returns - ------- - plotly.graph_objs.isosurface.Spaceframe - """ - return self["spaceframe"] - - @spaceframe.setter - def spaceframe(self, val): - self["spaceframe"] = val - - # stream - # ------ - @property - def stream(self): - """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.isosurface.Stream - - A dict of string/value properties that will be passed - to the Stream constructor - - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. - - Returns - ------- - plotly.graph_objs.isosurface.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # surface - # ------- - @property - def surface(self): + def hoverlabel(self): """ - The 'surface' property is an instance of Surface + The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.isosurface.Surface + - An instance of plotly.graph_objs.histogram2d.Hoverlabel - A dict of string/value properties that will be passed - to the Surface constructor + to the Hoverlabel constructor Supported dict properties: - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. - - Returns - ------- - plotly.graph_objs.isosurface.Surface - """ - return self["surface"] - - @surface.setter - def surface(self, val): - self["surface"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with the vertices. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on plot.ly for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # value - # ----- - @property - def value(self): - """ - Sets the 4th dimension (value) of the vertices. - - The 'value' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - numpy.ndarray + plotly.graph_objs.histogram2d.Hoverlabel """ - return self["value"] + return self["hoverlabel"] - @value.setter - def value(self, val): - self["value"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # valuesrc - # -------- + # hovertemplate + # ------------- @property - def valuesrc(self): + def hovertemplate(self): """ - Sets the source reference on plot.ly for value . + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `z` Anything contained in tag `` is displayed + in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. - The 'valuesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ - return self["valuesrc"] + return self["hovertemplate"] - @valuesrc.setter - def valuesrc(self, val): - self["valuesrc"] = val + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val - # visible - # ------- + # hovertemplatesrc + # ---------------- @property - def visible(self): + def hovertemplatesrc(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the source reference on plot.ly for hovertemplate . - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["visible"] + return self["hovertemplatesrc"] - @visible.setter - def visible(self, val): - self["visible"] = val + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val - # x - # - + # ids + # --- @property - def x(self): + def ids(self): """ - Sets the X coordinates of the vertices on X axis. + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. - The 'x' property is an array that may be specified as a tuple, + The 'ids' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["x"] + return self["ids"] - @x.setter - def x(self, val): - self["x"] = val + @ids.setter + def ids(self, val): + self["ids"] = val - # xsrc - # ---- + # idssrc + # ------ @property - def xsrc(self): + def idssrc(self): """ - Sets the source reference on plot.ly for x . + Sets the source reference on plot.ly for ids . - The 'xsrc' property must be specified as a string or + The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["xsrc"] + return self["idssrc"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val - # y - # - + # marker + # ------ @property - def y(self): + def marker(self): """ - Sets the Y coordinates of the vertices on Y axis. + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.histogram2d.Marker + - A dict of string/value properties that will be passed + to the Marker constructor - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + color + Sets the aggregation data. + colorsrc + Sets the source reference on plot.ly for color + . Returns ------- - numpy.ndarray + plotly.graph_objs.histogram2d.Marker """ - return self["y"] + return self["marker"] - @y.setter - def y(self, val): - self["y"] = val + @marker.setter + def marker(self, val): + self["marker"] = val - # ysrc + # meta # ---- @property - def ysrc(self): + def meta(self): """ - Sets the source reference on plot.ly for y . + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'meta' property accepts values of any type Returns ------- - str + Any|numpy.ndarray """ - return self["ysrc"] + return self["meta"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # z - # - + # metasrc + # ------- @property - def z(self): + def metasrc(self): """ - Sets the Z coordinates of the vertices on Z axis. + Sets the source reference on plot.ly for meta . - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - numpy.ndarray + str """ - return self["z"] + return self["metasrc"] - @z.setter - def z(self, val): - self["z"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # zsrc + # name # ---- @property - def zsrc(self): + def name(self): """ - Sets the source reference on plot.ly for z . + Sets the trace name. The trace name appear as the legend item + and on hover. - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] + return self["name"] - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" + @name.setter + def name(self, val): + self["name"] = val - # Self properties description - # --------------------------- + # nbinsx + # ------ @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - plotly.graph_objects.isosurface.Caps instance or dict - with compatible properties - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.isosurface.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - plotly.graph_objects.isosurface.Contour instance or - dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.isosurface.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - lighting - plotly.graph_objects.isosurface.Lighting instance or - dict with compatible properties - lightposition - plotly.graph_objects.isosurface.Lightposition instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - slices - plotly.graph_objects.isosurface.Slices instance or dict - with compatible properties - spaceframe - plotly.graph_objects.isosurface.Spaceframe instance or - dict with compatible properties - stream - plotly.graph_objects.isosurface.Stream instance or dict - with compatible properties - surface - plotly.graph_objects.isosurface.Surface instance or - dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on plot.ly for value . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices on X axis. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the Y coordinates of the vertices on Y axis. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the Z coordinates of the vertices on Z axis. - zsrc - Sets the source reference on plot.ly for z . + def nbinsx(self): """ - - def __init__( - self, - arg=None, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuesrc=None, - visible=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, - **kwargs - ): + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int """ - Construct a new Isosurface object - - Draws isosurfaces between iso-min and iso-max values with - coordinates given by four 1-dimensional arrays containing the - `value`, `x`, `y` and `z` of every vertex of a uniform or non- - uniform 3-D grid. Horizontal or vertical slices, caps as well - as spaceframe between iso-min and iso-max values could also be - drawn using this trace. + return self["nbinsx"] - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Isosurface - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - plotly.graph_objects.isosurface.Caps instance or dict - with compatible properties - cauto - Determines whether or not the color domain is computed - with respect to the input data (here `value`) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as `value` and if set, `cmin` must - be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as `value`. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as `value` and if set, `cmax` must - be set as well. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.isosurface.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contour - plotly.graph_objects.isosurface.Contour instance or - dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - flatshading - Determines whether or not normal smoothing is applied - to the meshes, creating meshes with an angular, low- - poly look via flat reflections. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.isosurface.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - lighting - plotly.graph_objects.isosurface.Lighting instance or - dict with compatible properties - lightposition - plotly.graph_objects.isosurface.Lightposition instance - or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, `cmin` - will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. - showscale - Determines whether or not a colorbar is displayed for - this trace. - slices - plotly.graph_objects.isosurface.Slices instance or dict - with compatible properties - spaceframe - plotly.graph_objects.isosurface.Spaceframe instance or - dict with compatible properties - stream - plotly.graph_objects.isosurface.Stream instance or dict - with compatible properties - surface - plotly.graph_objects.isosurface.Surface instance or - dict with compatible properties - text - Sets the text elements associated with the vertices. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuesrc - Sets the source reference on plot.ly for value . - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - x - Sets the X coordinates of the vertices on X axis. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the Y coordinates of the vertices on Y axis. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the Z coordinates of the vertices on Z axis. - zsrc - Sets the source reference on plot.ly for z . + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + # nbinsy + # ------ + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] Returns ------- - Isosurface + int """ - super(Isosurface, self).__init__("isosurface") + return self["nbinsy"] - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Isosurface -constructor must be a dict or -an instance of plotly.graph_objs.Isosurface""" - ) + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) + # opacity + # ------- + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] - # Import validators - # ----------------- - from plotly.validators import isosurface as v_isosurface + Returns + ------- + int|float + """ + return self["opacity"] - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_isosurface.AutocolorscaleValidator() - self._validators["caps"] = v_isosurface.CapsValidator() - self._validators["cauto"] = v_isosurface.CautoValidator() - self._validators["cmax"] = v_isosurface.CmaxValidator() - self._validators["cmid"] = v_isosurface.CmidValidator() - self._validators["cmin"] = v_isosurface.CminValidator() - self._validators["coloraxis"] = v_isosurface.ColoraxisValidator() - self._validators["colorbar"] = v_isosurface.ColorBarValidator() - self._validators["colorscale"] = v_isosurface.ColorscaleValidator() - self._validators["contour"] = v_isosurface.ContourValidator() - self._validators["customdata"] = v_isosurface.CustomdataValidator() - self._validators["customdatasrc"] = v_isosurface.CustomdatasrcValidator() - self._validators["flatshading"] = v_isosurface.FlatshadingValidator() - self._validators["hoverinfo"] = v_isosurface.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_isosurface.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_isosurface.HoverlabelValidator() - self._validators["hovertemplate"] = v_isosurface.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_isosurface.HovertemplatesrcValidator() - self._validators["hovertext"] = v_isosurface.HovertextValidator() - self._validators["hovertextsrc"] = v_isosurface.HovertextsrcValidator() - self._validators["ids"] = v_isosurface.IdsValidator() - self._validators["idssrc"] = v_isosurface.IdssrcValidator() - self._validators["isomax"] = v_isosurface.IsomaxValidator() - self._validators["isomin"] = v_isosurface.IsominValidator() - self._validators["lighting"] = v_isosurface.LightingValidator() - self._validators["lightposition"] = v_isosurface.LightpositionValidator() - self._validators["meta"] = v_isosurface.MetaValidator() - self._validators["metasrc"] = v_isosurface.MetasrcValidator() - self._validators["name"] = v_isosurface.NameValidator() - self._validators["opacity"] = v_isosurface.OpacityValidator() - self._validators["reversescale"] = v_isosurface.ReversescaleValidator() - self._validators["scene"] = v_isosurface.SceneValidator() - self._validators["showscale"] = v_isosurface.ShowscaleValidator() - self._validators["slices"] = v_isosurface.SlicesValidator() - self._validators["spaceframe"] = v_isosurface.SpaceframeValidator() - self._validators["stream"] = v_isosurface.StreamValidator() - self._validators["surface"] = v_isosurface.SurfaceValidator() - self._validators["text"] = v_isosurface.TextValidator() - self._validators["textsrc"] = v_isosurface.TextsrcValidator() - self._validators["uid"] = v_isosurface.UidValidator() - self._validators["uirevision"] = v_isosurface.UirevisionValidator() - self._validators["value"] = v_isosurface.ValueValidator() - self._validators["valuesrc"] = v_isosurface.ValuesrcValidator() - self._validators["visible"] = v_isosurface.VisibleValidator() - self._validators["x"] = v_isosurface.XValidator() - self._validators["xsrc"] = v_isosurface.XsrcValidator() - self._validators["y"] = v_isosurface.YValidator() - self._validators["ysrc"] = v_isosurface.YsrcValidator() - self._validators["z"] = v_isosurface.ZValidator() - self._validators["zsrc"] = v_isosurface.ZsrcValidator() + @opacity.setter + def opacity(self, val): + self["opacity"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("caps", None) - self["caps"] = caps if caps is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contour", None) - self["contour"] = contour if contour is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("flatshading", None) - self["flatshading"] = flatshading if flatshading is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("isomax", None) - self["isomax"] = isomax if isomax is not None else _v - _v = arg.pop("isomin", None) - self["isomin"] = isomin if isomin is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("slices", None) - self["slices"] = slices if slices is not None else _v - _v = arg.pop("spaceframe", None) - self["spaceframe"] = spaceframe if spaceframe is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("surface", None) - self["surface"] = surface if surface is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v - _v = arg.pop("valuesrc", None) - self["valuesrc"] = valuesrc if valuesrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.histogram2d.Stream + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + plotly.graph_objs.histogram2d.Stream + """ + return self["stream"] - self._props["type"] = "isosurface" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="isosurface", val="isosurface" - ) - arg.pop("type", None) + @stream.setter + def stream(self, val): + self["stream"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + str + """ + return self["uid"] + @uid.setter + def uid(self, val): + self["uid"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + Returns + ------- + Any + """ + return self["uirevision"] -class Indicator(_BaseTraceType): + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # align - # ----- + # visible + # ------- @property - def align(self): + def visible(self): """ - Sets the horizontal alignment of the `text` within the box. - Note that this attribute has no effect if an angular gauge is - displayed: in this case, it is always centered + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'align' property is an enumeration that may be specified as: + The 'visible' property is an enumeration that may be specified as: - One of the following enumeration values: - ['left', 'center', 'right'] + [True, False, 'legendonly'] Returns ------- Any """ - return self["align"] + return self["visible"] - @align.setter - def align(self, val): - self["align"] = val + @visible.setter + def visible(self, val): + self["visible"] = val - # customdata - # ---------- + # x + # - @property - def customdata(self): + def x(self): """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + Sets the sample data to be binned on the x axis. - The 'customdata' property is an array that may be specified as a tuple, + The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["customdata"] + return self["x"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @x.setter + def x(self, val): + self["x"] = val - # customdatasrc - # ------------- + # xaxis + # ----- @property - def customdatasrc(self): + def xaxis(self): """ - Sets the source reference on plot.ly for customdata . + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- str """ - return self["customdatasrc"] + return self["xaxis"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # delta + # xbingroup + # --------- + @property + def xbingroup(self): + """ + Set a group of histogram traces which will have compatible + x-bin settings. Using `xbingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram `bingroup` + + The 'xbingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xbingroup"] + + @xbingroup.setter + def xbingroup(self, val): + self["xbingroup"] = val + + # xbins # ----- @property - def delta(self): + def xbins(self): """ - The 'delta' property is an instance of Delta + The 'xbins' property is an instance of XBins that may be specified as: - - An instance of plotly.graph_objs.indicator.Delta + - An instance of plotly.graph_objs.histogram2d.XBins - A dict of string/value properties that will be passed - to the Delta constructor + to the XBins constructor Supported dict properties: - decreasing - plotly.graph_objects.indicator.delta.Decreasing - instance or dict with compatible properties - font - Set the font used to display the delta - increasing - plotly.graph_objects.indicator.delta.Increasing - instance or dict with compatible properties - position - Sets the position of delta with respect to the - number. - reference - Sets the reference value to compute the delta. - By default, it is set to the current value. - relative - Show relative change - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format + end + Sets the end value for the x axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each x axis bin. Default + behavior: If `nbinsx` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsx` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the x axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. Returns ------- - plotly.graph_objs.indicator.Delta + plotly.graph_objs.histogram2d.XBins """ - return self["delta"] + return self["xbins"] - @delta.setter - def delta(self, val): - self["delta"] = val + @xbins.setter + def xbins(self, val): + self["xbins"] = val - # domain - # ------ + # xcalendar + # --------- @property - def domain(self): + def xcalendar(self): """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.indicator.Domain - - A dict of string/value properties that will be passed - to the Domain constructor + Sets the calendar system to use with `x` date data. - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this indicator - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator - trace (in plot fraction). - y - Sets the vertical domain of this indicator - trace (in plot fraction). + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - plotly.graph_objs.indicator.Domain + Any """ - return self["domain"] + return self["xcalendar"] - @domain.setter - def domain(self, val): - self["domain"] = val + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val - # gauge - # ----- + # xgap + # ---- @property - def gauge(self): + def xgap(self): """ - The gauge of the Indicator plot. + Sets the horizontal gap (in pixels) between bricks. - The 'gauge' property is an instance of Gauge - that may be specified as: - - An instance of plotly.graph_objs.indicator.Gauge - - A dict of string/value properties that will be passed - to the Gauge constructor + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . - Supported dict properties: - - axis - plotly.graph_objects.indicator.gauge.Axis - instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the - gauge. - borderwidth - Sets the width (in px) of the border enclosing - the gauge. - shape - Set the shape of the gauge - stepss - A tuple of - plotly.graph_objects.indicator.gauge.Steps - instances or dicts with compatible properties - stepsdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.stepsdefaults), sets the - default property values to use for elements of - indicator.gauge.steps - threshold - plotly.graph_objects.indicator.gauge.Threshold - instance or dict with compatible properties + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.indicator.Gauge + str """ - return self["gauge"] + return self["xsrc"] - @gauge.setter - def gauge(self, val): - self["gauge"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # ids - # --- + # y + # - @property - def ids(self): + def y(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + Sets the sample data to be binned on the y axis. - The 'ids' property is an array that may be specified as a tuple, + The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["ids"] + return self["y"] - @ids.setter - def ids(self, val): - self["ids"] = val + @y.setter + def y(self, val): + self["y"] = val - # idssrc - # ------ + # yaxis + # ----- @property - def idssrc(self): + def yaxis(self): """ - Sets the source reference on plot.ly for ids . + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- str """ - return self["idssrc"] + return self["yaxis"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # meta - # ---- + # ybingroup + # --------- @property - def meta(self): + def ybingroup(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Set a group of histogram traces which will have compatible + y-bin settings. Using `ybingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram `bingroup` - The 'meta' property accepts values of any type + The 'ybingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - Any|numpy.ndarray + str """ - return self["meta"] + return self["ybingroup"] - @meta.setter - def meta(self, val): - self["meta"] = val + @ybingroup.setter + def ybingroup(self, val): + self["ybingroup"] = val - # metasrc - # ------- + # ybins + # ----- @property - def metasrc(self): + def ybins(self): """ - Sets the source reference on plot.ly for meta . + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of plotly.graph_objs.histogram2d.YBins + - A dict of string/value properties that will be passed + to the YBins constructor + + Supported dict properties: + + end + Sets the end value for the y axis bins. The + last bin may not end exactly at this value, we + increment the bin edge by `size` from `start` + until we reach or exceed `end`. Defaults to the + maximum data value. Like `start`, for dates use + a date string, and for category data `end` is + based on the category serial numbers. + size + Sets the size of each y axis bin. Default + behavior: If `nbinsy` is 0 or omitted, we + choose a nice round bin size such that the + number of bins is about the same as the typical + number of samples in each bin. If `nbinsy` is + provided, we choose a nice round bin size + giving no more than that many bins. For date + data, use milliseconds or "M" for months, as + in `axis.dtick`. For category data, the number + of categories to bin together (always defaults + to 1). + start + Sets the starting value for the y axis bins. + Defaults to the minimum data value, shifted + down if necessary to make nice round values and + to remove ambiguous bin edges. For example, if + most of the data is integers we shift the bin + edges 0.5 down, so a `size` of 5 would have a + default `start` of -0.5, so it is clear that + 0-4 are in the first bin, 5-9 in the second, + but continuous data gets a start of 0 and bins + [0,5), [5,10) etc. Dates behave similarly, and + `start` should be a date string. For category + data, `start` is based on the category serial + numbers, and defaults to -0.5. + + Returns + ------- + plotly.graph_objs.histogram2d.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - str + Any """ - return self["metasrc"] + return self["ycalendar"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val - # mode + # ygap # ---- @property - def mode(self): + def ygap(self): """ - Determines how the value is displayed on the graph. `number` - displays the value numerically in text. `delta` displays the - difference to a reference value in text. Finally, `gauge` - displays the value graphically on an axis. + Sets the vertical gap (in pixels) between bricks. - The 'mode' property is a flaglist and may be specified - as a string containing: - - Any combination of ['number', 'delta', 'gauge'] joined with '+' characters - (e.g. 'number+delta') + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, inf] Returns ------- - Any + int|float """ - return self["mode"] + return self["ygap"] - @mode.setter - def mode(self, val): - self["mode"] = val + @ygap.setter + def ygap(self, val): + self["ygap"] = val - # name + # ysrc # ---- @property - def name(self): + def ysrc(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Sets the source reference on plot.ly for y . - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["name"] + return self["ysrc"] - @name.setter - def name(self, val): - self["name"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # number - # ------ + # z + # - @property - def number(self): + def z(self): """ - The 'number' property is an instance of Number - that may be specified as: - - An instance of plotly.graph_objs.indicator.Number - - A dict of string/value properties that will be passed - to the Number constructor + Sets the aggregation data. - Supported dict properties: - - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 - formatting mini-language which is similar to - those of Python. See - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.indicator.Number + numpy.ndarray """ - return self["number"] + return self["z"] - @number.setter - def number(self, val): - self["number"] = val + @z.setter + def z(self, val): + self["z"] = val - # stream - # ------ + # zauto + # ----- @property - def stream(self): + def zauto(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.indicator.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'zauto' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.indicator.Stream + bool """ - return self["stream"] + return self["zauto"] - @stream.setter - def stream(self, val): - self["stream"] = val + @zauto.setter + def zauto(self, val): + self["zauto"] = val - # title - # ----- + # zhoverformat + # ------------ @property - def title(self): + def zhoverformat(self): """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of plotly.graph_objs.indicator.Title - - A dict of string/value properties that will be passed - to the Title constructor + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format - Supported dict properties: - - align - Sets the horizontal alignment of the title. It - defaults to `center` except for bullet charts - for which it defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - plotly.graph_objs.indicator.Title + str """ - return self["title"] + return self["zhoverformat"] - @title.setter - def title(self, val): - self["title"] = val + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val - # uid - # --- + # zmax + # ---- @property - def uid(self): + def zmax(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'zmax' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["uid"] + return self["zmax"] - @uid.setter - def uid(self, val): - self["uid"] = val + @zmax.setter + def zmax(self, val): + self["zmax"] = val - # uirevision - # ---------- + # zmid + # ---- @property - def uirevision(self): + def zmid(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. - The 'uirevision' property accepts values of any type + The 'zmid' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["uirevision"] + return self["zmid"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @zmid.setter + def zmid(self, val): + self["zmid"] = val - # value - # ----- + # zmin + # ---- @property - def value(self): + def zmin(self): """ - Sets the number to be displayed. + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. - The 'value' property is a number and may be specified as: + The 'zmin' property is a number and may be specified as: - An int or float Returns ------- int|float """ - return self["value"] + return self["zmin"] - @value.setter - def value(self, val): - self["value"] = val + @zmin.setter + def zmin(self, val): + self["zmin"] = val - # visible + # zsmooth # ------- @property - def visible(self): + def zsmooth(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Picks a smoothing algorithm use to smooth `z` data. - The 'visible' property is an enumeration that may be specified as: + The 'zsmooth' property is an enumeration that may be specified as: - One of the following enumeration values: - [True, False, 'legendonly'] + ['fast', 'best', False] Returns ------- Any """ - return self["visible"] + return self["zsmooth"] - @visible.setter - def visible(self, val): - self["visible"] = val + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val # type # ---- @@ -53420,11 +56153,52 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - align - Sets the horizontal alignment of the `text` within the - box. Note that this attribute has no effect if an - angular gauge is displayed: in this case, it is always - centered + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.histogram2d.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -53432,20 +56206,77 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - delta - plotly.graph_objects.indicator.Delta instance or dict - with compatible properties - domain - plotly.graph_objects.indicator.Domain instance or dict - with compatible properties - gauge - The gauge of the Indicator plot. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.histogram2d.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + marker + plotly.graph_objects.histogram2d.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -53461,94 +56292,256 @@ def _prop_descriptions(self): index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines how the value is displayed on the graph. - `number` displays the value numerically in text. - `delta` displays the difference to a reference value in - text. Finally, `gauge` displays the value graphically - on an axis. name Sets the trace name. The trace name appear as the legend item and on hover. - number - plotly.graph_objects.indicator.Number instance or dict - with compatible properties + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.indicator.Stream instance or dict + plotly.graph_objects.histogram2d.Stream instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + plotly.graph_objects.histogram2d.XBins instance or dict with compatible properties - title - plotly.graph_objects.indicator.Title instance or dict + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + plotly.graph_objects.histogram2d.YBins instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - value - Sets the number to be displayed. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - align=None, + autobinx=None, + autobiny=None, + autocolorscale=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, customdata=None, customdatasrc=None, - delta=None, - domain=None, - gauge=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, ids=None, idssrc=None, + marker=None, meta=None, metasrc=None, - mode=None, name=None, - number=None, + nbinsx=None, + nbinsy=None, + opacity=None, + reversescale=None, + showscale=None, stream=None, - title=None, uid=None, uirevision=None, - value=None, visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xgap=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ygap=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, **kwargs ): """ - Construct a new Indicator object + Construct a new Histogram2d object - TODO: add description + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a heatmap. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Indicator - align - Sets the horizontal alignment of the `text` within the - box. Note that this attribute has no effect if an - angular gauge is displayed: in this case, it is always - centered + an instance of plotly.graph_objs.Histogram2d + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.histogram2d.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -53556,20 +56549,77 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - delta - plotly.graph_objects.indicator.Delta instance or dict - with compatible properties - domain - plotly.graph_objects.indicator.Domain instance or dict - with compatible properties - gauge - The gauge of the Indicator plot. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.histogram2d.Hoverlabel instance or + dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variable `z` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + marker + plotly.graph_objects.histogram2d.Marker instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -53585,24 +56635,33 @@ def __init__( index. metasrc Sets the source reference on plot.ly for meta . - mode - Determines how the value is displayed on the graph. - `number` displays the value numerically in text. - `delta` displays the difference to a reference value in - text. Finally, `gauge` displays the value graphically - on an axis. name Sets the trace name. The trace name appear as the legend item and on hover. - number - plotly.graph_objects.indicator.Number instance or dict - with compatible properties + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.indicator.Stream instance or dict - with compatible properties - title - plotly.graph_objects.indicator.Title instance or dict - with compatible properties + plotly.graph_objects.histogram2d.Stream instance or + dict with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -53625,19 +56684,92 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - value - Sets the number to be displayed. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + plotly.graph_objects.histogram2d.XBins instance or dict + with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + plotly.graph_objects.histogram2d.YBins instance or dict + with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Indicator + Histogram2d """ - super(Indicator, self).__init__("indicator") + super(Histogram2d, self).__init__("histogram2d") # Validate arg # ------------ @@ -53650,9 +56782,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Indicator +The first argument to the plotly.graph_objs.Histogram2d constructor must be a dict or -an instance of plotly.graph_objs.Indicator""" +an instance of plotly.graph_objs.Histogram2d""" ) # Handle skip_invalid @@ -53661,78 +56793,182 @@ def __init__( # Import validators # ----------------- - from plotly.validators import indicator as v_indicator + from plotly.validators import histogram2d as v_histogram2d # Initialize validators # --------------------- - self._validators["align"] = v_indicator.AlignValidator() - self._validators["customdata"] = v_indicator.CustomdataValidator() - self._validators["customdatasrc"] = v_indicator.CustomdatasrcValidator() - self._validators["delta"] = v_indicator.DeltaValidator() - self._validators["domain"] = v_indicator.DomainValidator() - self._validators["gauge"] = v_indicator.GaugeValidator() - self._validators["ids"] = v_indicator.IdsValidator() - self._validators["idssrc"] = v_indicator.IdssrcValidator() - self._validators["meta"] = v_indicator.MetaValidator() - self._validators["metasrc"] = v_indicator.MetasrcValidator() - self._validators["mode"] = v_indicator.ModeValidator() - self._validators["name"] = v_indicator.NameValidator() - self._validators["number"] = v_indicator.NumberValidator() - self._validators["stream"] = v_indicator.StreamValidator() - self._validators["title"] = v_indicator.TitleValidator() - self._validators["uid"] = v_indicator.UidValidator() - self._validators["uirevision"] = v_indicator.UirevisionValidator() - self._validators["value"] = v_indicator.ValueValidator() - self._validators["visible"] = v_indicator.VisibleValidator() + self._validators["autobinx"] = v_histogram2d.AutobinxValidator() + self._validators["autobiny"] = v_histogram2d.AutobinyValidator() + self._validators["autocolorscale"] = v_histogram2d.AutocolorscaleValidator() + self._validators["bingroup"] = v_histogram2d.BingroupValidator() + self._validators["coloraxis"] = v_histogram2d.ColoraxisValidator() + self._validators["colorbar"] = v_histogram2d.ColorBarValidator() + self._validators["colorscale"] = v_histogram2d.ColorscaleValidator() + self._validators["customdata"] = v_histogram2d.CustomdataValidator() + self._validators["customdatasrc"] = v_histogram2d.CustomdatasrcValidator() + self._validators["histfunc"] = v_histogram2d.HistfuncValidator() + self._validators["histnorm"] = v_histogram2d.HistnormValidator() + self._validators["hoverinfo"] = v_histogram2d.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_histogram2d.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_histogram2d.HoverlabelValidator() + self._validators["hovertemplate"] = v_histogram2d.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_histogram2d.HovertemplatesrcValidator() + self._validators["ids"] = v_histogram2d.IdsValidator() + self._validators["idssrc"] = v_histogram2d.IdssrcValidator() + self._validators["marker"] = v_histogram2d.MarkerValidator() + self._validators["meta"] = v_histogram2d.MetaValidator() + self._validators["metasrc"] = v_histogram2d.MetasrcValidator() + self._validators["name"] = v_histogram2d.NameValidator() + self._validators["nbinsx"] = v_histogram2d.NbinsxValidator() + self._validators["nbinsy"] = v_histogram2d.NbinsyValidator() + self._validators["opacity"] = v_histogram2d.OpacityValidator() + self._validators["reversescale"] = v_histogram2d.ReversescaleValidator() + self._validators["showscale"] = v_histogram2d.ShowscaleValidator() + self._validators["stream"] = v_histogram2d.StreamValidator() + self._validators["uid"] = v_histogram2d.UidValidator() + self._validators["uirevision"] = v_histogram2d.UirevisionValidator() + self._validators["visible"] = v_histogram2d.VisibleValidator() + self._validators["x"] = v_histogram2d.XValidator() + self._validators["xaxis"] = v_histogram2d.XAxisValidator() + self._validators["xbingroup"] = v_histogram2d.XbingroupValidator() + self._validators["xbins"] = v_histogram2d.XBinsValidator() + self._validators["xcalendar"] = v_histogram2d.XcalendarValidator() + self._validators["xgap"] = v_histogram2d.XgapValidator() + self._validators["xsrc"] = v_histogram2d.XsrcValidator() + self._validators["y"] = v_histogram2d.YValidator() + self._validators["yaxis"] = v_histogram2d.YAxisValidator() + self._validators["ybingroup"] = v_histogram2d.YbingroupValidator() + self._validators["ybins"] = v_histogram2d.YBinsValidator() + self._validators["ycalendar"] = v_histogram2d.YcalendarValidator() + self._validators["ygap"] = v_histogram2d.YgapValidator() + self._validators["ysrc"] = v_histogram2d.YsrcValidator() + self._validators["z"] = v_histogram2d.ZValidator() + self._validators["zauto"] = v_histogram2d.ZautoValidator() + self._validators["zhoverformat"] = v_histogram2d.ZhoverformatValidator() + self._validators["zmax"] = v_histogram2d.ZmaxValidator() + self._validators["zmid"] = v_histogram2d.ZmidValidator() + self._validators["zmin"] = v_histogram2d.ZminValidator() + self._validators["zsmooth"] = v_histogram2d.ZsmoothValidator() + self._validators["zsrc"] = v_histogram2d.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v + _v = arg.pop("autobinx", None) + self["autobinx"] = autobinx if autobinx is not None else _v + _v = arg.pop("autobiny", None) + self["autobiny"] = autobiny if autobiny is not None else _v + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("bingroup", None) + self["bingroup"] = bingroup if bingroup is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("delta", None) - self["delta"] = delta if delta is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("gauge", None) - self["gauge"] = gauge if gauge is not None else _v + _v = arg.pop("histfunc", None) + self["histfunc"] = histfunc if histfunc is not None else _v + _v = arg.pop("histnorm", None) + self["histnorm"] = histnorm if histnorm is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("mode", None) - self["mode"] = mode if mode is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("number", None) - self["number"] = number if number is not None else _v + _v = arg.pop("nbinsx", None) + self["nbinsx"] = nbinsx if nbinsx is not None else _v + _v = arg.pop("nbinsy", None) + self["nbinsy"] = nbinsy if nbinsy is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("value", None) - self["value"] = value if value is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xbingroup", None) + self["xbingroup"] = xbingroup if xbingroup is not None else _v + _v = arg.pop("xbins", None) + self["xbins"] = xbins if xbins is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xgap", None) + self["xgap"] = xgap if xgap is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ybingroup", None) + self["ybingroup"] = ybingroup if ybingroup is not None else _v + _v = arg.pop("ybins", None) + self["ybins"] = ybins if ybins is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ygap", None) + self["ygap"] = ygap if ygap is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zauto", None) + self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zhoverformat", None) + self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v + _v = arg.pop("zmax", None) + self["zmax"] = zmax if zmax is not None else _v + _v = arg.pop("zmid", None) + self["zmid"] = zmid if zmid is not None else _v + _v = arg.pop("zmin", None) + self["zmin"] = zmin if zmin is not None else _v + _v = arg.pop("zsmooth", None) + self["zsmooth"] = zsmooth if zsmooth is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "indicator" + self._props["type"] = "histogram2d" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="indicator", val="indicator" + plotly_name="type", parent_name="histogram2d", val="histogram2d" ) arg.pop("type", None) @@ -53749,7 +56985,30 @@ def __init__( import copy as _copy -class Histogram2dContour(_BaseTraceType): +class Histogram(_BaseTraceType): + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val # autobinx # -------- @@ -53797,62 +57056,18 @@ def autobiny(self): def autobiny(self, val): self["autobiny"] = val - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # autocontour - # ----------- - @property - def autocontour(self): - """ - Determines whether or not the contour level attributes are - picked by an algorithm. If True, the number of contour levels - can be set in `ncontours`. If False, set the contour level - attributes in `contours`. - - The 'autocontour' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocontour"] - - @autocontour.setter - def autocontour(self, val): - self["autocontour"] = val - # bingroup # -------- @property def bingroup(self): """ - Set the `xbingroup` and `ybingroup` default prefix For example, - setting a `bingroup` of 1 on two histogram2d traces will make - them their x-bins and y-bins match separately. + Set a group of histogram traces which will have compatible bin + settings. Note that traces on the same subplot and with the + same "orientation" under `barmode` "stack", "relative" and + "group" are forced into the same bingroup, Using `bingroup`, + traces under `barmode` "overlay" and on different axes (of the + same axis type) can have compatible bin settings. Note that + histogram and histogram2d* trace can share the same `bingroup` The 'bingroup' property is a string and must be specified as: - A string @@ -53868,406 +57083,55 @@ def bingroup(self): def bingroup(self, val): self["bingroup"] = val - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.histogram2dcont - our.colorbar.Tickformatstop instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2dcontour.colorbar.tickformatstopdef - aults), sets the default property values to use - for elements of - histogram2dcontour.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.histogram2dcontour.colorba - r.Title instance or dict with compatible - properties - titlefont - Deprecated: Please use - histogram2dcontour.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - histogram2dcontour.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.histogram2dcontour.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale + # cumulative # ---------- @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # contours - # -------- - @property - def contours(self): + def cumulative(self): """ - The 'contours' property is an instance of Contours + The 'cumulative' property is an instance of Cumulative that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.Contours + - An instance of plotly.graph_objs.histogram.Cumulative - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. + to the Cumulative constructor + + Supported dict properties: + + currentbin + Only applies if cumulative is enabled. Sets + whether the current bin is included, excluded, + or has half of its value included in the + current cumulative value. "include" is the + default for compatibility with various other + tools, however it introduces a half-bin bias to + the results. "exclude" makes the opposite half- + bin bias, and "half" removes it. + direction + Only applies if cumulative is enabled. If + "increasing" (default) we sum all prior bins, + so the result increases from left to right. If + "decreasing" we sum later bins so the result + decreases from left to right. + enabled + If true, display the cumulative distribution by + summing the binned values. Use the `direction` + and `centralbin` attributes to tune the + accumulation method. Note: in this mode, the + "density" `histnorm` settings behave the same + as their equivalents without "density": "" and + "density" both rise to the number of data + points, and "probability" and *probability + density* both rise to the number of sample + points. Returns ------- - plotly.graph_objs.histogram2dcontour.Contours + plotly.graph_objs.histogram.Cumulative """ - return self["contours"] + return self["cumulative"] - @contours.setter - def contours(self, val): - self["contours"] = val + @cumulative.setter + def cumulative(self, val): + self["cumulative"] = val # customdata # ---------- @@ -54312,6 +57176,166 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of plotly.graph_objs.histogram.ErrorX + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.histogram.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of plotly.graph_objs.histogram.ErrorY + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.histogram.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + # histfunc # -------- @property @@ -54425,7 +57449,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.Hoverlabel + - An instance of plotly.graph_objs.histogram.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -54469,7 +57493,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.histogram2dcontour.Hoverlabel + plotly.graph_objs.histogram.Hoverlabel """ return self["hoverlabel"] @@ -54489,13 +57513,17 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - variable `z` Anything contained in tag `` is displayed - in the secondary box, for example + variable `binNumber` Anything contained in tag `` is + displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. @@ -54534,6 +57562,48 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val + # hovertext + # --------- + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + # ids # --- @property @@ -54599,44 +57669,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.Line - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the line width (in px). - - Returns - ------- - plotly.graph_objs.histogram2dcontour.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - # marker # ------ @property @@ -54644,21 +57676,110 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.Marker + - An instance of plotly.graph_objs.histogram.Marker - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. color - Sets the aggregation data. + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.histogram.marker.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. colorsrc Sets the source reference on plot.ly for color . + line + plotly.graph_objects.histogram.marker.Line + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. Returns ------- - plotly.graph_objs.histogram2dcontour.Marker + plotly.graph_objs.histogram.Marker """ return self["marker"] @@ -54784,29 +57905,28 @@ def nbinsy(self): def nbinsy(self, val): self["nbinsy"] = val - # ncontours - # --------- + # offsetgroup + # ----------- @property - def ncontours(self): + def offsetgroup(self): """ - Sets the maximum number of contour levels. The actual number of - contours will be chosen automatically to be less than or equal - to the value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is missing. + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. - The 'ncontours' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - int + str """ - return self["ncontours"] + return self["offsetgroup"] - @ncontours.setter - def ncontours(self, val): - self["ncontours"] = val + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val # opacity # ------- @@ -54828,69 +57948,102 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ + # orientation + # ----------- @property - def reversescale(self): + def orientation(self): """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). - The 'reversescale' property must be specified as a bool - (either True, or False) + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] Returns ------- - bool + Any """ - return self["reversescale"] + return self["orientation"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @orientation.setter + def orientation(self, val): + self["orientation"] = val - # showlegend - # ---------- + # selected + # -------- @property - def showlegend(self): + def selected(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.histogram.Selected + - A dict of string/value properties that will be passed + to the Selected constructor - The 'showlegend' property must be specified as a bool - (either True, or False) + Supported dict properties: + + marker + plotly.graph_objects.histogram.selected.Marker + instance or dict with compatible properties + textfont + plotly.graph_objects.histogram.selected.Textfon + t instance or dict with compatible properties Returns ------- - bool + plotly.graph_objs.histogram.Selected """ - return self["showlegend"] + return self["selected"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @selected.setter + def selected(self, val): + self["selected"] = val - # showscale - # --------- + # selectedpoints + # -------------- @property - def showscale(self): + def selectedpoints(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. - The 'showscale' property must be specified as a bool + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["showscale"] - - @showscale.setter - def showscale(self, val): - self["showscale"] = val + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val # stream # ------ @@ -54899,7 +58052,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.Stream + - An instance of plotly.graph_objs.histogram.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -54917,7 +58070,7 @@ def stream(self): Returns ------- - plotly.graph_objs.histogram2dcontour.Stream + plotly.graph_objs.histogram.Stream """ return self["stream"] @@ -54925,6 +58078,51 @@ def stream(self): def stream(self, val): self["stream"] = val + # text + # ---- + @property + def text(self): + """ + Sets hover text elements associated with each bar. If a single + string, the same string appears over all bars. If an array of + string, the items are mapped in order to the this trace's + coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + # uid # --- @property @@ -54980,6 +58178,36 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.histogram.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.histogram.unselected.Marke + r instance or dict with compatible properties + textfont + plotly.graph_objects.histogram.unselected.Textf + ont instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.histogram.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + # visible # ------- @property @@ -55048,31 +58276,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xbingroup - # --------- - @property - def xbingroup(self): - """ - Set a group of histogram traces which will have compatible - x-bin settings. Using `xbingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram `bingroup` - - The 'xbingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["xbingroup"] - - @xbingroup.setter - def xbingroup(self, val): - self["xbingroup"] = val - # xbins # ----- @property @@ -55080,7 +58283,7 @@ def xbins(self): """ The 'xbins' property is an instance of XBins that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.XBins + - An instance of plotly.graph_objs.histogram.XBins - A dict of string/value properties that will be passed to the XBins constructor @@ -55105,7 +58308,12 @@ def xbins(self): data, use milliseconds or "M" for months, as in `axis.dtick`. For category data, the number of categories to bin together (always defaults - to 1). + to 1). If multiple non-overlaying histograms + share a subplot, the first explicit `size` is + used and all others discarded. If no `size` is + provided,the sample data from all traces is + combined to determine `size` as described + above. start Sets the starting value for the x axis bins. Defaults to the minimum data value, shifted @@ -55119,11 +58327,16 @@ def xbins(self): [0,5), [5,10) etc. Dates behave similarly, and `start` should be a date string. For category data, `start` is based on the category serial - numbers, and defaults to -0.5. + numbers, and defaults to -0.5. If multiple non- + overlaying histograms share a subplot, the + first explicit `start` is used exactly and all + others are shifted down (if necessary) to + differ from that one by an integer number of + bins. Returns ------- - plotly.graph_objs.histogram2dcontour.XBins + plotly.graph_objs.histogram.XBins """ return self["xbins"] @@ -55220,31 +58433,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ybingroup - # --------- - @property - def ybingroup(self): - """ - Set a group of histogram traces which will have compatible - y-bin settings. Using `ybingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram `bingroup` - - The 'ybingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["ybingroup"] - - @ybingroup.setter - def ybingroup(self, val): - self["ybingroup"] = val - # ybins # ----- @property @@ -55252,7 +58440,7 @@ def ybins(self): """ The 'ybins' property is an instance of YBins that may be specified as: - - An instance of plotly.graph_objs.histogram2dcontour.YBins + - An instance of plotly.graph_objs.histogram.YBins - A dict of string/value properties that will be passed to the YBins constructor @@ -55277,7 +58465,12 @@ def ybins(self): data, use milliseconds or "M" for months, as in `axis.dtick`. For category data, the number of categories to bin together (always defaults - to 1). + to 1). If multiple non-overlaying histograms + share a subplot, the first explicit `size` is + used and all others discarded. If no `size` is + provided,the sample data from all traces is + combined to determine `size` as described + above. start Sets the starting value for the y axis bins. Defaults to the minimum data value, shifted @@ -55291,11 +58484,16 @@ def ybins(self): [0,5), [5,10) etc. Dates behave similarly, and `start` should be a date string. For category data, `start` is based on the category serial - numbers, and defaults to -0.5. + numbers, and defaults to -0.5. If multiple non- + overlaying histograms share a subplot, the + first explicit `start` is used exactly and all + others are shifted down (if necessary) to + differ from that one by an integer number of + bins. Returns ------- - plotly.graph_objs.histogram2dcontour.YBins + plotly.graph_objs.histogram.YBins """ return self["ybins"] @@ -55347,157 +58545,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - - @property - def z(self): - """ - Sets the aggregation data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsrc - # ---- - @property - def zsrc(self): - """ - Sets the source reference on plot.ly for z . - - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - # type # ---- @property @@ -55515,6 +58562,11 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. autobinx Obsolete: since v1.42 each bin attribute is auto- determined separately and `autobinx` is not needed. @@ -55527,48 +58579,18 @@ def _prop_descriptions(self): However, we accept `autobiny: true` or `false` and will update `ybins` accordingly before deleting `autobiny` from the trace. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.histogram2dcontour.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - plotly.graph_objects.histogram2dcontour.Contours - instance or dict with compatible properties + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cumulative + plotly.graph_objects.histogram.Cumulative instance or + dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -55576,6 +58598,12 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + error_x + plotly.graph_objects.histogram.ErrorX instance or dict + with compatible properties + error_y + plotly.graph_objects.histogram.ErrorY instance or dict + with compatible properties histfunc Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by @@ -55609,8 +58637,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.histogram2dcontour.Hoverlabel - instance or dict with compatible properties + plotly.graph_objects.histogram.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -55619,20 +58647,29 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for + available. variable `binNumber` Anything contained in + tag `` is displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an @@ -55643,12 +58680,9 @@ def _prop_descriptions(self): Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.histogram2dcontour.Line instance - or dict with compatible properties marker - plotly.graph_objects.histogram2dcontour.Marker instance - or dict with compatible properties + plotly.graph_objects.histogram.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -55679,27 +58713,39 @@ def _prop_descriptions(self): optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. opacity Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + selected + plotly.graph_objects.histogram.Selected instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. stream - plotly.graph_objects.histogram2dcontour.Stream instance - or dict with compatible properties + plotly.graph_objects.histogram.Stream instance or dict + with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on plot.ly for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -55722,6 +58768,9 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.histogram.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -55732,86 +58781,43 @@ def _prop_descriptions(self): xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - plotly.graph_objects.histogram2dcontour.XBins instance - or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the sample data to be binned on the y axis. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - plotly.graph_objects.histogram2dcontour.YBins instance - or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + plotly.graph_objects.histogram.XBins instance or dict + with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + plotly.graph_objects.histogram.YBins instance or dict + with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . """ def __init__( self, arg=None, + alignmentgroup=None, autobinx=None, autobiny=None, - autocolorscale=None, - autocontour=None, bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, + cumulative=None, customdata=None, customdatasrc=None, + error_x=None, + error_y=None, histfunc=None, histnorm=None, hoverinfo=None, @@ -55819,61 +58825,61 @@ def __init__( hoverlabel=None, hovertemplate=None, hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, ids=None, idssrc=None, legendgroup=None, - line=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, - ncontours=None, + offsetgroup=None, opacity=None, - reversescale=None, + orientation=None, + selected=None, + selectedpoints=None, showlegend=None, - showscale=None, stream=None, + text=None, + textsrc=None, uid=None, uirevision=None, + unselected=None, visible=None, x=None, xaxis=None, - xbingroup=None, xbins=None, xcalendar=None, xsrc=None, y=None, yaxis=None, - ybingroup=None, ybins=None, ycalendar=None, ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, **kwargs ): """ - Construct a new Histogram2dContour object + Construct a new Histogram object The sample data from which statistics are computed is set in - `x` and `y` (where `x` and `y` represent marginal - distributions, binning is set in `xbins` and `ybins` in this - case) or `z` (where `z` represent the 2D distribution and - binning set, binning is set by `x` and `y` in this case). The - resulting distribution is visualized as a contour plot. + `x` for vertically spanning histograms and in `y` for + horizontally spanning histograms. Binning options are set + `xbins` and `ybins` respectively if no aggregation data is + provided. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Histogram2dContour + an instance of plotly.graph_objs.Histogram + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. autobinx Obsolete: since v1.42 each bin attribute is auto- determined separately and `autobinx` is not needed. @@ -55886,48 +58892,18 @@ def __init__( However, we accept `autobiny: true` or `false` and will update `ybins` accordingly before deleting `autobiny` from the trace. - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.histogram2dcontour.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - plotly.graph_objects.histogram2dcontour.Contours - instance or dict with compatible properties + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cumulative + plotly.graph_objects.histogram.Cumulative instance or + dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -55935,6 +58911,12 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + error_x + plotly.graph_objects.histogram.ErrorX instance or dict + with compatible properties + error_y + plotly.graph_objects.histogram.ErrorY instance or dict + with compatible properties histfunc Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by @@ -55968,8 +58950,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.histogram2dcontour.Hoverlabel - instance or dict with compatible properties + plotly.graph_objects.histogram.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -55978,20 +58960,29 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for + available. variable `binNumber` Anything contained in + tag `` is displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an @@ -56002,12 +58993,9 @@ def __init__( Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.histogram2dcontour.Line instance - or dict with compatible properties marker - plotly.graph_objects.histogram2dcontour.Marker instance - or dict with compatible properties + plotly.graph_objects.histogram.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -56038,27 +59026,39 @@ def __init__( optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. opacity Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + selected + plotly.graph_objects.histogram.Selected instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is displayed for - this trace. stream - plotly.graph_objects.histogram2dcontour.Stream instance - or dict with compatible properties + plotly.graph_objects.histogram.Stream instance or dict + with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on plot.ly for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -56081,6 +59081,9 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.histogram.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as @@ -56093,16 +59096,9 @@ def __init__( a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` xbins - plotly.graph_objects.histogram2dcontour.XBins instance - or dict with compatible properties + plotly.graph_objects.histogram.XBins instance or dict + with compatible properties xcalendar Sets the calendar system to use with `x` date data. xsrc @@ -56114,53 +59110,19 @@ def __init__( a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` ybins - plotly.graph_objects.histogram2dcontour.YBins instance - or dict with compatible properties + plotly.graph_objects.histogram.YBins instance or dict + with compatible properties ycalendar Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . Returns ------- - Histogram2dContour + Histogram """ - super(Histogram2dContour, self).__init__("histogram2dcontour") + super(Histogram, self).__init__("histogram") # Validate arg # ------------ @@ -56173,9 +59135,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Histogram2dContour +The first argument to the plotly.graph_objs.Histogram constructor must be a dict or -an instance of plotly.graph_objs.Histogram2dContour""" +an instance of plotly.graph_objs.Histogram""" ) # Handle skip_invalid @@ -56184,99 +59146,81 @@ def __init__( # Import validators # ----------------- - from plotly.validators import histogram2dcontour as v_histogram2dcontour + from plotly.validators import histogram as v_histogram # Initialize validators # --------------------- - self._validators["autobinx"] = v_histogram2dcontour.AutobinxValidator() - self._validators["autobiny"] = v_histogram2dcontour.AutobinyValidator() - self._validators[ - "autocolorscale" - ] = v_histogram2dcontour.AutocolorscaleValidator() - self._validators["autocontour"] = v_histogram2dcontour.AutocontourValidator() - self._validators["bingroup"] = v_histogram2dcontour.BingroupValidator() - self._validators["coloraxis"] = v_histogram2dcontour.ColoraxisValidator() - self._validators["colorbar"] = v_histogram2dcontour.ColorBarValidator() - self._validators["colorscale"] = v_histogram2dcontour.ColorscaleValidator() - self._validators["contours"] = v_histogram2dcontour.ContoursValidator() - self._validators["customdata"] = v_histogram2dcontour.CustomdataValidator() - self._validators[ - "customdatasrc" - ] = v_histogram2dcontour.CustomdatasrcValidator() - self._validators["histfunc"] = v_histogram2dcontour.HistfuncValidator() - self._validators["histnorm"] = v_histogram2dcontour.HistnormValidator() - self._validators["hoverinfo"] = v_histogram2dcontour.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_histogram2dcontour.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_histogram2dcontour.HoverlabelValidator() - self._validators[ - "hovertemplate" - ] = v_histogram2dcontour.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_histogram2dcontour.HovertemplatesrcValidator() - self._validators["ids"] = v_histogram2dcontour.IdsValidator() - self._validators["idssrc"] = v_histogram2dcontour.IdssrcValidator() - self._validators["legendgroup"] = v_histogram2dcontour.LegendgroupValidator() - self._validators["line"] = v_histogram2dcontour.LineValidator() - self._validators["marker"] = v_histogram2dcontour.MarkerValidator() - self._validators["meta"] = v_histogram2dcontour.MetaValidator() - self._validators["metasrc"] = v_histogram2dcontour.MetasrcValidator() - self._validators["name"] = v_histogram2dcontour.NameValidator() - self._validators["nbinsx"] = v_histogram2dcontour.NbinsxValidator() - self._validators["nbinsy"] = v_histogram2dcontour.NbinsyValidator() - self._validators["ncontours"] = v_histogram2dcontour.NcontoursValidator() - self._validators["opacity"] = v_histogram2dcontour.OpacityValidator() - self._validators["reversescale"] = v_histogram2dcontour.ReversescaleValidator() - self._validators["showlegend"] = v_histogram2dcontour.ShowlegendValidator() - self._validators["showscale"] = v_histogram2dcontour.ShowscaleValidator() - self._validators["stream"] = v_histogram2dcontour.StreamValidator() - self._validators["uid"] = v_histogram2dcontour.UidValidator() - self._validators["uirevision"] = v_histogram2dcontour.UirevisionValidator() - self._validators["visible"] = v_histogram2dcontour.VisibleValidator() - self._validators["x"] = v_histogram2dcontour.XValidator() - self._validators["xaxis"] = v_histogram2dcontour.XAxisValidator() - self._validators["xbingroup"] = v_histogram2dcontour.XbingroupValidator() - self._validators["xbins"] = v_histogram2dcontour.XBinsValidator() - self._validators["xcalendar"] = v_histogram2dcontour.XcalendarValidator() - self._validators["xsrc"] = v_histogram2dcontour.XsrcValidator() - self._validators["y"] = v_histogram2dcontour.YValidator() - self._validators["yaxis"] = v_histogram2dcontour.YAxisValidator() - self._validators["ybingroup"] = v_histogram2dcontour.YbingroupValidator() - self._validators["ybins"] = v_histogram2dcontour.YBinsValidator() - self._validators["ycalendar"] = v_histogram2dcontour.YcalendarValidator() - self._validators["ysrc"] = v_histogram2dcontour.YsrcValidator() - self._validators["z"] = v_histogram2dcontour.ZValidator() - self._validators["zauto"] = v_histogram2dcontour.ZautoValidator() - self._validators["zhoverformat"] = v_histogram2dcontour.ZhoverformatValidator() - self._validators["zmax"] = v_histogram2dcontour.ZmaxValidator() - self._validators["zmid"] = v_histogram2dcontour.ZmidValidator() - self._validators["zmin"] = v_histogram2dcontour.ZminValidator() - self._validators["zsrc"] = v_histogram2dcontour.ZsrcValidator() + self._validators["alignmentgroup"] = v_histogram.AlignmentgroupValidator() + self._validators["autobinx"] = v_histogram.AutobinxValidator() + self._validators["autobiny"] = v_histogram.AutobinyValidator() + self._validators["bingroup"] = v_histogram.BingroupValidator() + self._validators["cumulative"] = v_histogram.CumulativeValidator() + self._validators["customdata"] = v_histogram.CustomdataValidator() + self._validators["customdatasrc"] = v_histogram.CustomdatasrcValidator() + self._validators["error_x"] = v_histogram.ErrorXValidator() + self._validators["error_y"] = v_histogram.ErrorYValidator() + self._validators["histfunc"] = v_histogram.HistfuncValidator() + self._validators["histnorm"] = v_histogram.HistnormValidator() + self._validators["hoverinfo"] = v_histogram.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_histogram.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_histogram.HoverlabelValidator() + self._validators["hovertemplate"] = v_histogram.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_histogram.HovertemplatesrcValidator() + self._validators["hovertext"] = v_histogram.HovertextValidator() + self._validators["hovertextsrc"] = v_histogram.HovertextsrcValidator() + self._validators["ids"] = v_histogram.IdsValidator() + self._validators["idssrc"] = v_histogram.IdssrcValidator() + self._validators["legendgroup"] = v_histogram.LegendgroupValidator() + self._validators["marker"] = v_histogram.MarkerValidator() + self._validators["meta"] = v_histogram.MetaValidator() + self._validators["metasrc"] = v_histogram.MetasrcValidator() + self._validators["name"] = v_histogram.NameValidator() + self._validators["nbinsx"] = v_histogram.NbinsxValidator() + self._validators["nbinsy"] = v_histogram.NbinsyValidator() + self._validators["offsetgroup"] = v_histogram.OffsetgroupValidator() + self._validators["opacity"] = v_histogram.OpacityValidator() + self._validators["orientation"] = v_histogram.OrientationValidator() + self._validators["selected"] = v_histogram.SelectedValidator() + self._validators["selectedpoints"] = v_histogram.SelectedpointsValidator() + self._validators["showlegend"] = v_histogram.ShowlegendValidator() + self._validators["stream"] = v_histogram.StreamValidator() + self._validators["text"] = v_histogram.TextValidator() + self._validators["textsrc"] = v_histogram.TextsrcValidator() + self._validators["uid"] = v_histogram.UidValidator() + self._validators["uirevision"] = v_histogram.UirevisionValidator() + self._validators["unselected"] = v_histogram.UnselectedValidator() + self._validators["visible"] = v_histogram.VisibleValidator() + self._validators["x"] = v_histogram.XValidator() + self._validators["xaxis"] = v_histogram.XAxisValidator() + self._validators["xbins"] = v_histogram.XBinsValidator() + self._validators["xcalendar"] = v_histogram.XcalendarValidator() + self._validators["xsrc"] = v_histogram.XsrcValidator() + self._validators["y"] = v_histogram.YValidator() + self._validators["yaxis"] = v_histogram.YAxisValidator() + self._validators["ybins"] = v_histogram.YBinsValidator() + self._validators["ycalendar"] = v_histogram.YcalendarValidator() + self._validators["ysrc"] = v_histogram.YsrcValidator() # Populate data dict with properties # ---------------------------------- + _v = arg.pop("alignmentgroup", None) + self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v _v = arg.pop("autobinx", None) self["autobinx"] = autobinx if autobinx is not None else _v _v = arg.pop("autobiny", None) self["autobiny"] = autobiny if autobiny is not None else _v - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("autocontour", None) - self["autocontour"] = autocontour if autocontour is not None else _v _v = arg.pop("bingroup", None) self["bingroup"] = bingroup if bingroup is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v + _v = arg.pop("cumulative", None) + self["cumulative"] = cumulative if cumulative is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("error_x", None) + self["error_x"] = error_x if error_x is not None else _v + _v = arg.pop("error_y", None) + self["error_y"] = error_y if error_y is not None else _v _v = arg.pop("histfunc", None) self["histfunc"] = histfunc if histfunc is not None else _v _v = arg.pop("histnorm", None) @@ -56293,14 +59237,16 @@ def __init__( self["hovertemplatesrc"] = ( hovertemplatesrc if hovertemplatesrc is not None else _v ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) @@ -56313,30 +59259,36 @@ def __init__( self["nbinsx"] = nbinsx if nbinsx is not None else _v _v = arg.pop("nbinsy", None) self["nbinsy"] = nbinsy if nbinsy is not None else _v - _v = arg.pop("ncontours", None) - self["ncontours"] = ncontours if ncontours is not None else _v + _v = arg.pop("offsetgroup", None) + self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbingroup", None) - self["xbingroup"] = xbingroup if xbingroup is not None else _v _v = arg.pop("xbins", None) self["xbins"] = xbins if xbins is not None else _v _v = arg.pop("xcalendar", None) @@ -56347,38 +59299,20 @@ def __init__( self["y"] = y if y is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybingroup", None) - self["ybingroup"] = ybingroup if ybingroup is not None else _v _v = arg.pop("ybins", None) self["ybins"] = ybins if ybins is not None else _v _v = arg.pop("ycalendar", None) self["ycalendar"] = ycalendar if ycalendar is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "histogram2dcontour" + self._props["type"] = "histogram" self._validators["type"] = LiteralValidator( - plotly_name="type", - parent_name="histogram2dcontour", - val="histogram2dcontour", + plotly_name="type", parent_name="histogram", val="histogram" ) arg.pop("type", None) @@ -56395,53 +59329,7 @@ def __init__( import copy as _copy -class Histogram2d(_BaseTraceType): - - # autobinx - # -------- - @property - def autobinx(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobinx` is not needed. However, we accept - `autobinx: true` or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - - The 'autobinx' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobinx"] - - @autobinx.setter - def autobinx(self, val): - self["autobinx"] = val - - # autobiny - # -------- - @property - def autobiny(self): - """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobiny` is not needed. However, we accept - `autobiny: true` or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - - The 'autobiny' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autobiny"] - - @autobiny.setter - def autobiny(self, val): - self["autobiny"] = val +class Heatmapgl(_BaseTraceType): # autocolorscale # -------------- @@ -56468,29 +59356,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # bingroup - # -------- - @property - def bingroup(self): - """ - Set the `xbingroup` and `ybingroup` default prefix For example, - setting a `bingroup` of 1 on two histogram2d traces will make - them their x-bins and y-bins match separately. - - The 'bingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["bingroup"] - - @bingroup.setter - def bingroup(self, val): - self["bingroup"] = val - # coloraxis # --------- @property @@ -56525,7 +59390,7 @@ def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.histogram2d.ColorBar + - An instance of plotly.graph_objs.heatmapgl.ColorBar - A dict of string/value properties that will be passed to the ColorBar constructor @@ -56657,15 +59522,14 @@ def colorbar(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.histogram2d.col - orbar.Tickformatstop instances or dicts with + A tuple of plotly.graph_objects.heatmapgl.color + bar.Tickformatstop instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.dat - a.histogram2d.colorbar.tickformatstopdefaults), + a.heatmapgl.colorbar.tickformatstopdefaults), sets the default property values to use for - elements of - histogram2d.colorbar.tickformatstops + elements of heatmapgl.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -56706,17 +59570,17 @@ def colorbar(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.histogram2d.colorbar.Title + plotly.graph_objects.heatmapgl.colorbar.Title instance or dict with compatible properties titlefont Deprecated: Please use - histogram2d.colorbar.title.font instead. Sets + heatmapgl.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. titleside Deprecated: Please use - histogram2d.colorbar.title.side instead. + heatmapgl.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now @@ -56745,7 +59609,7 @@ def colorbar(self): Returns ------- - plotly.graph_objs.histogram2d.ColorBar + plotly.graph_objs.heatmapgl.ColorBar """ return self["colorbar"] @@ -56847,65 +59711,45 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # histfunc - # -------- + # dx + # -- @property - def histfunc(self): + def dx(self): """ - Specifies the binning function used for this histogram trace. - If "count", the histogram values are computed by counting the - number of values lying inside each bin. If "sum", "avg", "min", - "max", the histogram values are computed using the sum, the - average, the minimum or the maximum of the values lying inside - each bin respectively. + Sets the x coordinate step. See `x0` for more info. - The 'histfunc' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['count', 'sum', 'avg', 'min', 'max'] + The 'dx' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["histfunc"] + return self["dx"] - @histfunc.setter - def histfunc(self, val): - self["histfunc"] = val + @dx.setter + def dx(self, val): + self["dx"] = val - # histnorm - # -------- + # dy + # -- @property - def histnorm(self): + def dy(self): """ - Specifies the type of normalization used for this histogram - trace. If "", the span of each bar corresponds to the number of - occurrences (i.e. the number of data points lying inside the - bins). If "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences with - respect to the total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", the span of - each bar corresponds to the number of occurrences in a bin - divided by the size of the bin interval (here, the sum of all - bin AREAS equals the total number of sample points). If - *probability density*, the area of each bar corresponds to the - probability that an event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). + Sets the y coordinate step. See `y0` for more info. - The 'histnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'percent', 'probability', 'density', 'probability - density'] + The 'dy' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["histnorm"] + return self["dy"] - @histnorm.setter - def histnorm(self, val): - self["histnorm"] = val + @dy.setter + def dy(self, val): + self["dy"] = val # hoverinfo # --------- @@ -56960,7 +59804,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.histogram2d.Hoverlabel + - An instance of plotly.graph_objs.heatmapgl.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -57004,7 +59848,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.histogram2d.Hoverlabel + plotly.graph_objs.heatmapgl.Hoverlabel """ return self["hoverlabel"] @@ -57012,63 +59856,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `z` Anything contained in tag `` is displayed - in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - # ids # --- @property @@ -57111,35 +59898,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of plotly.graph_objs.histogram2d.Marker - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - color - Sets the aggregation data. - colorsrc - Sets the source reference on plot.ly for color - . - - Returns - ------- - plotly.graph_objs.histogram2d.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - # meta # ---- @property @@ -57210,54 +59968,6 @@ def name(self): def name(self, val): self["name"] = val - # nbinsx - # ------ - @property - def nbinsx(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `xbins.size` is provided. - - The 'nbinsx' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsx"] - - @nbinsx.setter - def nbinsx(self, val): - self["nbinsx"] = val - - # nbinsy - # ------ - @property - def nbinsy(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `ybins.size` is provided. - - The 'nbinsy' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsy"] - - @nbinsy.setter - def nbinsy(self, val): - self["nbinsy"] = val - # opacity # ------- @property @@ -57303,56 +60013,116 @@ def reversescale(self, val): # showscale # --------- @property - def showscale(self): + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.heatmapgl.Stream + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. + + Returns + ------- + plotly.graph_objs.heatmapgl.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Sets the source reference on plot.ly for text . - The 'showscale' property must be specified as a bool - (either True, or False) + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - bool + str """ - return self["showscale"] + return self["textsrc"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # stream - # ------ + # transpose + # --------- @property - def stream(self): + def transpose(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.histogram2d.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Transposes the z data. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'transpose' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.histogram2d.Stream + bool """ - return self["stream"] + return self["transpose"] - @stream.setter - def stream(self, val): - self["stream"] = val + @transpose.setter + def transpose(self, val): + self["transpose"] = val # uid # --- @@ -57437,7 +60207,7 @@ def visible(self, val): @property def x(self): """ - Sets the sample data to be binned on the x axis. + Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -57452,6 +60222,27 @@ def x(self): def x(self, val): self["x"] = val + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + # xaxis # ----- @property @@ -57477,159 +60268,56 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xbingroup - # --------- + # xsrc + # ---- @property - def xbingroup(self): + def xsrc(self): """ - Set a group of histogram traces which will have compatible - x-bin settings. Using `xbingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram `bingroup` + Sets the source reference on plot.ly for x . - The 'xbingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["xbingroup"] + return self["xsrc"] - @xbingroup.setter - def xbingroup(self, val): - self["xbingroup"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # xbins + # xtype # ----- @property - def xbins(self): - """ - The 'xbins' property is an instance of XBins - that may be specified as: - - An instance of plotly.graph_objs.histogram2d.XBins - - A dict of string/value properties that will be passed - to the XBins constructor - - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - - Returns - ------- - plotly.graph_objs.histogram2d.XBins - """ - return self["xbins"] - - @xbins.setter - def xbins(self, val): - self["xbins"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): + def xtype(self): """ - Sets the calendar system to use with `x` date data. + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). - The 'xcalendar' property is an enumeration that may be specified as: + The 'xtype' property is an enumeration that may be specified as: - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + ['array', 'scaled'] Returns ------- Any """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xgap - # ---- - @property - def xgap(self): - """ - Sets the horizontal gap (in pixels) between bricks. - - The 'xgap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xgap"] - - @xgap.setter - def xgap(self, val): - self["xgap"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on plot.ly for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] + return self["xtype"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @xtype.setter + def xtype(self, val): + self["xtype"] = val # y # - @property def y(self): """ - Sets the sample data to be binned on the y axis. + Sets the y coordinates. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -57644,6 +60332,27 @@ def y(self): def y(self, val): self["y"] = val + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + # yaxis # ----- @property @@ -57669,159 +60378,56 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ybingroup - # --------- + # ysrc + # ---- @property - def ybingroup(self): + def ysrc(self): """ - Set a group of histogram traces which will have compatible - y-bin settings. Using `ybingroup`, histogram2d and - histogram2dcontour traces (on axes of the same axis type) can - have compatible y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram `bingroup` + Sets the source reference on plot.ly for y . - The 'ybingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["ybingroup"] + return self["ysrc"] - @ybingroup.setter - def ybingroup(self, val): - self["ybingroup"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # ybins + # ytype # ----- @property - def ybins(self): - """ - The 'ybins' property is an instance of YBins - that may be specified as: - - An instance of plotly.graph_objs.histogram2d.YBins - - A dict of string/value properties that will be passed - to the YBins constructor - - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - - Returns - ------- - plotly.graph_objs.histogram2d.YBins - """ - return self["ybins"] - - @ybins.setter - def ybins(self, val): - self["ybins"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): + def ytype(self): """ - Sets the calendar system to use with `y` date data. + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) - The 'ycalendar' property is an enumeration that may be specified as: + The 'ytype' property is an enumeration that may be specified as: - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + ['array', 'scaled'] Returns ------- Any """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ygap - # ---- - @property - def ygap(self): - """ - Sets the vertical gap (in pixels) between bricks. - - The 'ygap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ygap"] - - @ygap.setter - def ygap(self, val): - self["ygap"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on plot.ly for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] + return self["ytype"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @ytype.setter + def ytype(self, val): + self["ytype"] = val # z # - @property def z(self): """ - Sets the aggregation data. + Sets the z data. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -57859,30 +60465,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - # zmax # ---- @property @@ -57947,27 +60529,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsmooth - # ------- - @property - def zsmooth(self): - """ - Picks a smoothing algorithm use to smooth `z` data. - - The 'zsmooth' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fast', 'best', False] - - Returns - ------- - Any - """ - return self["zsmooth"] - - @zsmooth.setter - def zsmooth(self, val): - self["zsmooth"] = val - # zsrc # ---- @property @@ -58005,18 +60566,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -58024,11 +60573,6 @@ def _prop_descriptions(self): `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -58037,7 +60581,7 @@ def _prop_descriptions(self): `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.histogram2d.ColorBar instance or + plotly.graph_objects.heatmapgl.ColorBar instance or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array @@ -58058,31 +60602,10 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -58091,39 +60614,14 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.histogram2d.Hoverlabel instance or + plotly.graph_objects.heatmapgl.Hoverlabel instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - marker - plotly.graph_objects.histogram2d.Marker instance or - dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -58142,18 +60640,6 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. opacity Sets the opacity of the trace. reversescale @@ -58164,8 +60650,14 @@ def _prop_descriptions(self): Determines whether or not a colorbar is displayed for this trace. stream - plotly.graph_objects.histogram2d.Stream instance or - dict with compatible properties + plotly.graph_objects.heatmapgl.Stream instance or dict + with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -58194,63 +60686,50 @@ def _prop_descriptions(self): a legend item (provided that the legend itself is visible). x - Sets the sample data to be binned on the x axis. + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - plotly.graph_objects.histogram2d.XBins instance or dict - with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. xsrc Sets the source reference on plot.ly for x . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). y - Sets the sample data to be binned on the y axis. + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - plotly.graph_objects.histogram2d.YBins instance or dict - with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. ysrc Sets the source reference on plot.ly for y . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) z - Sets the aggregation data. + Sets the z data. zauto Determines whether or not the color domain is computed with respect to the input data (here in `z`) or the bounds set in `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format zmax Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must @@ -58264,8 +60743,6 @@ def _prop_descriptions(self): Sets the lower bound of the color domain. Value should have the same units as in `z` and if set, `zmax` must be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. zsrc Sets the source reference on plot.ly for z . """ @@ -58273,88 +60750,60 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autobinx=None, - autobiny=None, autocolorscale=None, - bingroup=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, - histfunc=None, - histnorm=None, + dx=None, + dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, ids=None, idssrc=None, - marker=None, meta=None, metasrc=None, name=None, - nbinsx=None, - nbinsy=None, opacity=None, reversescale=None, showscale=None, stream=None, + text=None, + textsrc=None, + transpose=None, uid=None, uirevision=None, visible=None, x=None, + x0=None, xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xgap=None, xsrc=None, + xtype=None, y=None, + y0=None, yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - ygap=None, ysrc=None, + ytype=None, z=None, zauto=None, - zhoverformat=None, zmax=None, zmid=None, zmin=None, - zsmooth=None, zsrc=None, **kwargs ): """ - Construct a new Histogram2d object + Construct a new Heatmapgl object - The sample data from which statistics are computed is set in - `x` and `y` (where `x` and `y` represent marginal - distributions, binning is set in `xbins` and `ybins` in this - case) or `z` (where `z` represent the 2D distribution and - binning set, binning is set by `x` and `y` in this case). The - resulting distribution is visualized as a heatmap. + WebGL version of the heatmap trace type. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Histogram2d - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. + an instance of plotly.graph_objs.Heatmapgl autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -58362,11 +60811,6 @@ def __init__( `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - bingroup - Set the `xbingroup` and `ybingroup` default prefix For - example, setting a `bingroup` of 1 on two histogram2d - traces will make them their x-bins and y-bins match - separately. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -58375,7 +60819,7 @@ def __init__( `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.histogram2d.ColorBar instance or + plotly.graph_objects.heatmapgl.ColorBar instance or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array @@ -58396,31 +60840,10 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -58429,39 +60852,14 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.histogram2d.Hoverlabel instance or + plotly.graph_objects.heatmapgl.Hoverlabel instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variable `z` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - marker - plotly.graph_objects.histogram2d.Marker instance or - dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -58480,18 +60878,6 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. opacity Sets the opacity of the trace. reversescale @@ -58502,8 +60888,14 @@ def __init__( Determines whether or not a colorbar is displayed for this trace. stream - plotly.graph_objects.histogram2d.Stream instance or - dict with compatible properties + plotly.graph_objects.heatmapgl.Stream instance or dict + with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -58532,63 +60924,50 @@ def __init__( a legend item (provided that the legend itself is visible). x - Sets the sample data to be binned on the x axis. + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible x-bin settings. - Note that the same `xbingroup` value can be used to set - (1D) histogram `bingroup` - xbins - plotly.graph_objects.histogram2d.XBins instance or dict - with compatible properties - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. xsrc Sets the source reference on plot.ly for x . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). y - Sets the sample data to be binned on the y axis. + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on axes of - the same axis type) can have compatible y-bin settings. - Note that the same `ybingroup` value can be used to set - (1D) histogram `bingroup` - ybins - plotly.graph_objects.histogram2d.YBins instance or dict - with compatible properties - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. ysrc Sets the source reference on plot.ly for y . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) z - Sets the aggregation data. + Sets the z data. zauto Determines whether or not the color domain is computed with respect to the input data (here in `z`) or the bounds set in `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format zmax Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must @@ -58602,16 +60981,14 @@ def __init__( Sets the lower bound of the color domain. Value should have the same units as in `z` and if set, `zmax` must be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. zsrc Sets the source reference on plot.ly for z . Returns ------- - Histogram2d + Heatmapgl """ - super(Histogram2d, self).__init__("histogram2d") + super(Heatmapgl, self).__init__("heatmapgl") # Validate arg # ------------ @@ -58624,9 +61001,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Histogram2d +The first argument to the plotly.graph_objs.Heatmapgl constructor must be a dict or -an instance of plotly.graph_objs.Histogram2d""" +an instance of plotly.graph_objs.Heatmapgl""" ) # Handle skip_invalid @@ -58635,74 +61012,57 @@ def __init__( # Import validators # ----------------- - from plotly.validators import histogram2d as v_histogram2d + from plotly.validators import heatmapgl as v_heatmapgl # Initialize validators # --------------------- - self._validators["autobinx"] = v_histogram2d.AutobinxValidator() - self._validators["autobiny"] = v_histogram2d.AutobinyValidator() - self._validators["autocolorscale"] = v_histogram2d.AutocolorscaleValidator() - self._validators["bingroup"] = v_histogram2d.BingroupValidator() - self._validators["coloraxis"] = v_histogram2d.ColoraxisValidator() - self._validators["colorbar"] = v_histogram2d.ColorBarValidator() - self._validators["colorscale"] = v_histogram2d.ColorscaleValidator() - self._validators["customdata"] = v_histogram2d.CustomdataValidator() - self._validators["customdatasrc"] = v_histogram2d.CustomdatasrcValidator() - self._validators["histfunc"] = v_histogram2d.HistfuncValidator() - self._validators["histnorm"] = v_histogram2d.HistnormValidator() - self._validators["hoverinfo"] = v_histogram2d.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_histogram2d.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_histogram2d.HoverlabelValidator() - self._validators["hovertemplate"] = v_histogram2d.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_histogram2d.HovertemplatesrcValidator() - self._validators["ids"] = v_histogram2d.IdsValidator() - self._validators["idssrc"] = v_histogram2d.IdssrcValidator() - self._validators["marker"] = v_histogram2d.MarkerValidator() - self._validators["meta"] = v_histogram2d.MetaValidator() - self._validators["metasrc"] = v_histogram2d.MetasrcValidator() - self._validators["name"] = v_histogram2d.NameValidator() - self._validators["nbinsx"] = v_histogram2d.NbinsxValidator() - self._validators["nbinsy"] = v_histogram2d.NbinsyValidator() - self._validators["opacity"] = v_histogram2d.OpacityValidator() - self._validators["reversescale"] = v_histogram2d.ReversescaleValidator() - self._validators["showscale"] = v_histogram2d.ShowscaleValidator() - self._validators["stream"] = v_histogram2d.StreamValidator() - self._validators["uid"] = v_histogram2d.UidValidator() - self._validators["uirevision"] = v_histogram2d.UirevisionValidator() - self._validators["visible"] = v_histogram2d.VisibleValidator() - self._validators["x"] = v_histogram2d.XValidator() - self._validators["xaxis"] = v_histogram2d.XAxisValidator() - self._validators["xbingroup"] = v_histogram2d.XbingroupValidator() - self._validators["xbins"] = v_histogram2d.XBinsValidator() - self._validators["xcalendar"] = v_histogram2d.XcalendarValidator() - self._validators["xgap"] = v_histogram2d.XgapValidator() - self._validators["xsrc"] = v_histogram2d.XsrcValidator() - self._validators["y"] = v_histogram2d.YValidator() - self._validators["yaxis"] = v_histogram2d.YAxisValidator() - self._validators["ybingroup"] = v_histogram2d.YbingroupValidator() - self._validators["ybins"] = v_histogram2d.YBinsValidator() - self._validators["ycalendar"] = v_histogram2d.YcalendarValidator() - self._validators["ygap"] = v_histogram2d.YgapValidator() - self._validators["ysrc"] = v_histogram2d.YsrcValidator() - self._validators["z"] = v_histogram2d.ZValidator() - self._validators["zauto"] = v_histogram2d.ZautoValidator() - self._validators["zhoverformat"] = v_histogram2d.ZhoverformatValidator() - self._validators["zmax"] = v_histogram2d.ZmaxValidator() - self._validators["zmid"] = v_histogram2d.ZmidValidator() - self._validators["zmin"] = v_histogram2d.ZminValidator() - self._validators["zsmooth"] = v_histogram2d.ZsmoothValidator() - self._validators["zsrc"] = v_histogram2d.ZsrcValidator() + self._validators["autocolorscale"] = v_heatmapgl.AutocolorscaleValidator() + self._validators["coloraxis"] = v_heatmapgl.ColoraxisValidator() + self._validators["colorbar"] = v_heatmapgl.ColorBarValidator() + self._validators["colorscale"] = v_heatmapgl.ColorscaleValidator() + self._validators["customdata"] = v_heatmapgl.CustomdataValidator() + self._validators["customdatasrc"] = v_heatmapgl.CustomdatasrcValidator() + self._validators["dx"] = v_heatmapgl.DxValidator() + self._validators["dy"] = v_heatmapgl.DyValidator() + self._validators["hoverinfo"] = v_heatmapgl.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_heatmapgl.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_heatmapgl.HoverlabelValidator() + self._validators["ids"] = v_heatmapgl.IdsValidator() + self._validators["idssrc"] = v_heatmapgl.IdssrcValidator() + self._validators["meta"] = v_heatmapgl.MetaValidator() + self._validators["metasrc"] = v_heatmapgl.MetasrcValidator() + self._validators["name"] = v_heatmapgl.NameValidator() + self._validators["opacity"] = v_heatmapgl.OpacityValidator() + self._validators["reversescale"] = v_heatmapgl.ReversescaleValidator() + self._validators["showscale"] = v_heatmapgl.ShowscaleValidator() + self._validators["stream"] = v_heatmapgl.StreamValidator() + self._validators["text"] = v_heatmapgl.TextValidator() + self._validators["textsrc"] = v_heatmapgl.TextsrcValidator() + self._validators["transpose"] = v_heatmapgl.TransposeValidator() + self._validators["uid"] = v_heatmapgl.UidValidator() + self._validators["uirevision"] = v_heatmapgl.UirevisionValidator() + self._validators["visible"] = v_heatmapgl.VisibleValidator() + self._validators["x"] = v_heatmapgl.XValidator() + self._validators["x0"] = v_heatmapgl.X0Validator() + self._validators["xaxis"] = v_heatmapgl.XAxisValidator() + self._validators["xsrc"] = v_heatmapgl.XsrcValidator() + self._validators["xtype"] = v_heatmapgl.XtypeValidator() + self._validators["y"] = v_heatmapgl.YValidator() + self._validators["y0"] = v_heatmapgl.Y0Validator() + self._validators["yaxis"] = v_heatmapgl.YAxisValidator() + self._validators["ysrc"] = v_heatmapgl.YsrcValidator() + self._validators["ytype"] = v_heatmapgl.YtypeValidator() + self._validators["z"] = v_heatmapgl.ZValidator() + self._validators["zauto"] = v_heatmapgl.ZautoValidator() + self._validators["zmax"] = v_heatmapgl.ZmaxValidator() + self._validators["zmid"] = v_heatmapgl.ZmidValidator() + self._validators["zmin"] = v_heatmapgl.ZminValidator() + self._validators["zsrc"] = v_heatmapgl.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("autobinx", None) - self["autobinx"] = autobinx if autobinx is not None else _v - _v = arg.pop("autobiny", None) - self["autobiny"] = autobiny if autobiny is not None else _v _v = arg.pop("autocolorscale", None) self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("bingroup", None) - self["bingroup"] = bingroup if bingroup is not None else _v _v = arg.pop("coloraxis", None) self["coloraxis"] = coloraxis if coloraxis is not None else _v _v = arg.pop("colorbar", None) @@ -58713,38 +61073,26 @@ def __init__( self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("histfunc", None) - self["histfunc"] = histfunc if histfunc is not None else _v - _v = arg.pop("histnorm", None) - self["histnorm"] = histnorm if histnorm is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("nbinsx", None) - self["nbinsx"] = nbinsx if nbinsx is not None else _v - _v = arg.pop("nbinsy", None) - self["nbinsy"] = nbinsy if nbinsy is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("reversescale", None) @@ -58753,6 +61101,12 @@ def __init__( self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("transpose", None) + self["transpose"] = transpose if transpose is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -58761,46 +61115,34 @@ def __init__( self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbingroup", None) - self["xbingroup"] = xbingroup if xbingroup is not None else _v - _v = arg.pop("xbins", None) - self["xbins"] = xbins if xbins is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xgap", None) - self["xgap"] = xgap if xgap is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("xtype", None) + self["xtype"] = xtype if xtype is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybingroup", None) - self["ybingroup"] = ybingroup if ybingroup is not None else _v - _v = arg.pop("ybins", None) - self["ybins"] = ybins if ybins is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ygap", None) - self["ygap"] = ygap if ygap is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("ytype", None) + self["ytype"] = ytype if ytype is not None else _v _v = arg.pop("z", None) self["z"] = z if z is not None else _v _v = arg.pop("zauto", None) self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v _v = arg.pop("zmax", None) self["zmax"] = zmax if zmax is not None else _v _v = arg.pop("zmid", None) self["zmid"] = zmid if zmid is not None else _v _v = arg.pop("zmin", None) self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsmooth", None) - self["zsmooth"] = zsmooth if zsmooth is not None else _v _v = arg.pop("zsrc", None) self["zsrc"] = zsrc if zsrc is not None else _v @@ -58808,9 +61150,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "histogram2d" + self._props["type"] = "heatmapgl" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="histogram2d", val="histogram2d" + plotly_name="type", parent_name="heatmapgl", val="heatmapgl" ) arg.pop("type", None) @@ -58827,153 +61169,365 @@ def __init__( import copy as _copy -class Histogram(_BaseTraceType): +class Heatmap(_BaseTraceType): - # alignmentgroup + # autocolorscale # -------------- @property - def alignmentgroup(self): + def autocolorscale(self): """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["alignmentgroup"] + return self["autocolorscale"] - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # autobinx - # -------- + # coloraxis + # --------- @property - def autobinx(self): + def coloraxis(self): """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobinx` is not needed. However, we accept - `autobinx: true` or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. - The 'autobinx' property must be specified as a bool - (either True, or False) + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) Returns ------- - bool + str """ - return self["autobinx"] - - @autobinx.setter - def autobinx(self, val): - self["autobinx"] = val + return self["coloraxis"] - # autobiny + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar # -------- @property - def autobiny(self): + def colorbar(self): """ - Obsolete: since v1.42 each bin attribute is auto-determined - separately and `autobiny` is not needed. However, we accept - `autobiny: true` or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.heatmap.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor - The 'autobiny' property must be specified as a bool - (either True, or False) + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.heatmap.colorba + r.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.heatmap.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of heatmap.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.heatmap.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + heatmap.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. + titleside + Deprecated: Please use + heatmap.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - bool + plotly.graph_objs.heatmap.ColorBar """ - return self["autobiny"] + return self["colorbar"] - @autobiny.setter - def autobiny(self, val): - self["autobiny"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # bingroup - # -------- + # colorscale + # ---------- @property - def bingroup(self): + def colorscale(self): """ - Set a group of histogram traces which will have compatible bin - settings. Note that traces on the same subplot and with the - same "orientation" under `barmode` "stack", "relative" and - "group" are forced into the same bingroup, Using `bingroup`, - traces under `barmode` "overlay" and on different axes (of the - same axis type) can have compatible bin settings. Note that - histogram and histogram2d* trace can share the same `bingroup` + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'bingroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- str """ - return self["bingroup"] + return self["colorscale"] - @bingroup.setter - def bingroup(self, val): - self["bingroup"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # cumulative - # ---------- + # connectgaps + # ----------- @property - def cumulative(self): + def connectgaps(self): """ - The 'cumulative' property is an instance of Cumulative - that may be specified as: - - An instance of plotly.graph_objs.histogram.Cumulative - - A dict of string/value properties that will be passed - to the Cumulative constructor + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. - Supported dict properties: - - currentbin - Only applies if cumulative is enabled. Sets - whether the current bin is included, excluded, - or has half of its value included in the - current cumulative value. "include" is the - default for compatibility with various other - tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half- - bin bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If - "increasing" (default) we sum all prior bins, - so the result increases from left to right. If - "decreasing" we sum later bins so the result - decreases from left to right. - enabled - If true, display the cumulative distribution by - summing the binned values. Use the `direction` - and `centralbin` attributes to tune the - accumulation method. Note: in this mode, the - "density" `histnorm` settings behave the same - as their equivalents without "density": "" and - "density" both rise to the number of data - points, and "probability" and *probability - density* both rise to the number of sample - points. + The 'connectgaps' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.histogram.Cumulative + bool """ - return self["cumulative"] + return self["connectgaps"] - @cumulative.setter - def cumulative(self, val): - self["cumulative"] = val + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val # customdata # ---------- @@ -59010,233 +61564,53 @@ def customdatasrc(self): Returns ------- - str - """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # error_x - # ------- - @property - def error_x(self): - """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of plotly.graph_objs.histogram.ErrorX - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.histogram.ErrorX - """ - return self["error_x"] - - @error_x.setter - def error_x(self, val): - self["error_x"] = val - - # error_y - # ------- - @property - def error_y(self): - """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of plotly.graph_objs.histogram.ErrorY - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - - Returns - ------- - plotly.graph_objs.histogram.ErrorY + str """ - return self["error_y"] + return self["customdatasrc"] - @error_y.setter - def error_y(self, val): - self["error_y"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # histfunc - # -------- + # dx + # -- @property - def histfunc(self): + def dx(self): """ - Specifies the binning function used for this histogram trace. - If "count", the histogram values are computed by counting the - number of values lying inside each bin. If "sum", "avg", "min", - "max", the histogram values are computed using the sum, the - average, the minimum or the maximum of the values lying inside - each bin respectively. + Sets the x coordinate step. See `x0` for more info. - The 'histfunc' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['count', 'sum', 'avg', 'min', 'max'] + The 'dx' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["histfunc"] + return self["dx"] - @histfunc.setter - def histfunc(self, val): - self["histfunc"] = val + @dx.setter + def dx(self, val): + self["dx"] = val - # histnorm - # -------- + # dy + # -- @property - def histnorm(self): + def dy(self): """ - Specifies the type of normalization used for this histogram - trace. If "", the span of each bar corresponds to the number of - occurrences (i.e. the number of data points lying inside the - bins). If "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences with - respect to the total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", the span of - each bar corresponds to the number of occurrences in a bin - divided by the size of the bin interval (here, the sum of all - bin AREAS equals the total number of sample points). If - *probability density*, the area of each bar corresponds to the - probability that an event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). + Sets the y coordinate step. See `y0` for more info. - The 'histnorm' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['', 'percent', 'probability', 'density', 'probability - density'] + The 'dy' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["histnorm"] + return self["dy"] - @histnorm.setter - def histnorm(self, val): - self["histnorm"] = val + @dy.setter + def dy(self, val): + self["dy"] = val # hoverinfo # --------- @@ -59291,7 +61665,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.histogram.Hoverlabel + - An instance of plotly.graph_objs.heatmap.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -59335,7 +61709,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.histogram.Hoverlabel + plotly.graph_objs.heatmap.Hoverlabel """ return self["hoverlabel"] @@ -59355,15 +61729,19 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - variable `binNumber` Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. The 'hovertemplate' property is a string and must be specified as: - A string @@ -59407,14 +61785,12 @@ def hovertext(self): """ Same as `text`. - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["hovertext"] @@ -59484,147 +61860,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legendgroup - # ----------- - @property - def legendgroup(self): - """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. - - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["legendgroup"] - - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of plotly.graph_objs.histogram.Marker - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.histogram.marker.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - line - plotly.graph_objects.histogram.marker.Line - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on plot.ly for - opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. - - Returns - ------- - plotly.graph_objs.histogram.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - # meta # ---- @property @@ -59695,77 +61930,6 @@ def name(self): def name(self, val): self["name"] = val - # nbinsx - # ------ - @property - def nbinsx(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `xbins.size` is provided. - - The 'nbinsx' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsx"] - - @nbinsx.setter - def nbinsx(self, val): - self["nbinsx"] = val - - # nbinsy - # ------ - @property - def nbinsy(self): - """ - Specifies the maximum number of desired bins. This value will - be used in an algorithm that will decide the optimal bin size - such that the histogram best visualizes the distribution of the - data. Ignored if `ybins.size` is provided. - - The 'nbinsy' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [0, 9223372036854775807] - - Returns - ------- - int - """ - return self["nbinsy"] - - @nbinsy.setter - def nbinsy(self, val): - self["nbinsy"] = val - - # offsetgroup - # ----------- - @property - def offsetgroup(self): - """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. - - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["offsetgroup"] - - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val - # opacity # ------- @property @@ -59786,102 +61950,48 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the bars. With "v" ("h"), the value of - the each bar spans along the vertical (horizontal). - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.histogram.Selected - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - plotly.graph_objects.histogram.selected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.histogram.selected.Textfon - t instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.histogram.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- + # reversescale + # ------------ @property - def selectedpoints(self): + def reversescale(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. - The 'selectedpoints' property accepts values of any type + The 'reversescale' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["selectedpoints"] + return self["reversescale"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val - # showlegend - # ---------- + # showscale + # --------- @property - def showlegend(self): + def showscale(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + Determines whether or not a colorbar is displayed for this + trace. - The 'showlegend' property must be specified as a bool + The 'showscale' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["showlegend"] + return self["showscale"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @showscale.setter + def showscale(self, val): + self["showscale"] = val # stream # ------ @@ -59890,7 +62000,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.histogram.Stream + - An instance of plotly.graph_objs.heatmap.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -59908,7 +62018,7 @@ def stream(self): Returns ------- - plotly.graph_objs.histogram.Stream + plotly.graph_objs.heatmap.Stream """ return self["stream"] @@ -59921,19 +62031,14 @@ def stream(self, val): @property def text(self): """ - Sets hover text elements associated with each bar. If a single - string, the same string appears over all bars. If an array of - string, the items are mapped in order to the this trace's - coordinates. + Sets the text elements associated with each z value. - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["text"] @@ -59961,6 +62066,26 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + # uid # --- @property @@ -60016,36 +62141,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.histogram.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - plotly.graph_objects.histogram.unselected.Marke - r instance or dict with compatible properties - textfont - plotly.graph_objects.histogram.unselected.Textf - ont instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.histogram.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - # visible # ------- @property @@ -60074,7 +62169,7 @@ def visible(self, val): @property def x(self): """ - Sets the sample data to be binned on the x axis. + Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -60089,98 +62184,51 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- + # x0 + # -- @property - def xaxis(self): + def x0(self): """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + The 'x0' property accepts values of any type Returns ------- - str + Any """ - return self["xaxis"] + return self["x0"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @x0.setter + def x0(self, val): + self["x0"] = val - # xbins + # xaxis # ----- @property - def xbins(self): - """ - The 'xbins' property is an instance of XBins - that may be specified as: - - An instance of plotly.graph_objs.histogram.XBins - - A dict of string/value properties that will be passed - to the XBins constructor + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - plotly.graph_objs.histogram.XBins + str """ - return self["xbins"] + return self["xaxis"] - @xbins.setter - def xbins(self, val): - self["xbins"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val # xcalendar # --------- @@ -60206,6 +62254,26 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val + # xgap + # ---- + @property + def xgap(self): + """ + Sets the horizontal gap (in pixels) between bricks. + + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + # xsrc # ---- @property @@ -60226,12 +62294,36 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val + # xtype + # ----- + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + # y # - @property def y(self): """ - Sets the sample data to be binned on the y axis. + Sets the y coordinates. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -60246,6 +62338,27 @@ def y(self): def y(self, val): self["y"] = val + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + # yaxis # ----- @property @@ -60271,74 +62384,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ybins - # ----- - @property - def ybins(self): - """ - The 'ybins' property is an instance of YBins - that may be specified as: - - An instance of plotly.graph_objs.histogram.YBins - - A dict of string/value properties that will be passed - to the YBins constructor - - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. - - Returns - ------- - plotly.graph_objs.histogram.YBins - """ - return self["ybins"] - - @ybins.setter - def ybins(self, val): - self["ybins"] = val - # ycalendar # --------- @property @@ -60363,6 +62408,26 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val + # ygap + # ---- + @property + def ygap(self): + """ + Sets the vertical gap (in pixels) between bricks. + + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ygap"] + + @ygap.setter + def ygap(self, val): + self["ygap"] = val + # ysrc # ---- @property @@ -60383,6 +62448,202 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val + # ytype + # ----- + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + + # z + # - + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + # zauto + # ----- + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + # zhoverformat + # ------------ + @property + def zhoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + # zmax + # ---- + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsmooth + # ------- + @property + def zsmooth(self): + """ + Picks a smoothing algorithm use to smooth `z` data. + + The 'zsmooth' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fast', 'best', False] + + Returns + ------- + Any + """ + return self["zsmooth"] + + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + # type # ---- @property @@ -60400,73 +62661,49 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - bingroup - Set a group of histogram traces which will have - compatible bin settings. Note that traces on the same - subplot and with the same "orientation" under `barmode` - "stack", "relative" and "group" are forced into the - same bingroup, Using `bingroup`, traces under `barmode` - "overlay" and on different axes (of the same axis type) - can have compatible bin settings. Note that histogram - and histogram2d* trace can share the same `bingroup` - cumulative - plotly.graph_objects.histogram.Cumulative instance or - dict with compatible properties - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - error_x - plotly.graph_objects.histogram.ErrorX instance or dict - with compatible properties - error_y - plotly.graph_objects.histogram.ErrorY instance or dict + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.heatmap.ColorBar instance or dict with compatible properties - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -60475,7 +62712,7 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.histogram.Hoverlabel instance or + plotly.graph_objects.heatmap.Hoverlabel instance or dict with compatible properties hovertemplate Template string used for rendering the information that @@ -60485,17 +62722,21 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variable `binNumber` Anything contained in - tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -60509,13 +62750,6 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.histogram.Marker instance or dict - with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -60534,51 +62768,24 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. opacity Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - selected - plotly.graph_objects.histogram.Selected instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.histogram.Stream instance or dict + plotly.graph_objects.heatmap.Stream instance or dict with compatible properties text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. + Sets the text elements associated with each z value. textsrc Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -60601,58 +62808,100 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.histogram.Unselected instance or - dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x - Sets the sample data to be binned on the x axis. + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xbins - plotly.graph_objects.histogram.XBins instance or dict - with compatible properties xcalendar Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. xsrc Sets the source reference on plot.ly for x . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). y - Sets the sample data to be binned on the y axis. + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ybins - plotly.graph_objects.histogram.YBins instance or dict - with compatible properties ycalendar Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. ysrc Sets the source reference on plot.ly for y . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - alignmentgroup=None, - autobinx=None, - autobiny=None, - bingroup=None, - cumulative=None, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, customdata=None, customdatasrc=None, - error_x=None, - error_y=None, - histfunc=None, - histnorm=None, + dx=None, + dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -60662,81 +62911,101 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - legendgroup=None, - marker=None, meta=None, metasrc=None, name=None, - nbinsx=None, - nbinsy=None, - offsetgroup=None, opacity=None, - orientation=None, - selected=None, - selectedpoints=None, - showlegend=None, + reversescale=None, + showscale=None, stream=None, text=None, textsrc=None, + transpose=None, uid=None, uirevision=None, - unselected=None, visible=None, x=None, + x0=None, xaxis=None, - xbins=None, xcalendar=None, + xgap=None, xsrc=None, + xtype=None, y=None, + y0=None, yaxis=None, - ybins=None, ycalendar=None, + ygap=None, ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, **kwargs ): """ - Construct a new Histogram object + Construct a new Heatmap object - The sample data from which statistics are computed is set in - `x` for vertically spanning histograms and in `y` for - horizontally spanning histograms. Binning options are set - `xbins` and `ybins` respectively if no aggregation data is - provided. + The data that describes the heatmap value-to-color mapping is + set in `z`. Data in `z` can either be a 2D list of values + (ragged or not) or a 1D array of values. In the case where `z` + is a 2D list, say that `z` has N rows and M columns. Then, by + default, the resulting heatmap will have N partitions along the + y axis and M partitions along the x axis. In other words, the + i-th row/ j-th column cell in `z` is mapped to the i-th + partition of the y axis (starting from the bottom of the plot) + and the j-th partition of the x-axis (starting from the left of + the plot). This behavior can be flipped by using `transpose`. + Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) + elements. If M (N), then the coordinates correspond to the + center of the heatmap cells and the cells have equal width. If + M+1 (N+1), then the coordinates correspond to the edges of the + heatmap cells. In the case where `z` is a 1D list, the x and y + coordinates must be provided in `x` and `y` respectively to + form data triplets. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Histogram - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - autobinx - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobinx` is not needed. - However, we accept `autobinx: true` or `false` and will - update `xbins` accordingly before deleting `autobinx` - from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is auto- - determined separately and `autobiny` is not needed. - However, we accept `autobiny: true` or `false` and will - update `ybins` accordingly before deleting `autobiny` - from the trace. - bingroup - Set a group of histogram traces which will have - compatible bin settings. Note that traces on the same - subplot and with the same "orientation" under `barmode` - "stack", "relative" and "group" are forced into the - same bingroup, Using `bingroup`, traces under `barmode` - "overlay" and on different axes (of the same axis type) - can have compatible bin settings. Note that histogram - and histogram2d* trace can share the same `bingroup` - cumulative - plotly.graph_objects.histogram.Cumulative instance or - dict with compatible properties + an instance of plotly.graph_objs.Heatmap + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.heatmap.ColorBar instance or dict + with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -60744,37 +63013,10 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - error_x - plotly.graph_objects.histogram.ErrorX instance or dict - with compatible properties - error_y - plotly.graph_objects.histogram.ErrorY instance or dict - with compatible properties - histfunc - Specifies the binning function used for this histogram - trace. If "count", the histogram values are computed by - counting the number of values lying inside each bin. If - "sum", "avg", "min", "max", the histogram values are - computed using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for this - histogram trace. If "", the span of each bar - corresponds to the number of occurrences (i.e. the - number of data points lying inside the bins). If - "percent" / "probability", the span of each bar - corresponds to the percentage / fraction of occurrences - with respect to the total number of sample points - (here, the sum of all bin HEIGHTS equals 100% / 1). If - "density", the span of each bar corresponds to the - number of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin AREAS equals - the total number of sample points). If *probability - density*, the area of each bar corresponds to the - probability that an event will fall into the - corresponding bin (here, the sum of all bin AREAS - equals 1). + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -60783,7 +63025,7 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.histogram.Hoverlabel instance or + plotly.graph_objects.heatmap.Hoverlabel instance or dict with compatible properties hovertemplate Template string used for rendering the information that @@ -60793,17 +63035,21 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variable `binNumber` Anything contained in - tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -60817,13 +63063,6 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.histogram.Marker instance or dict - with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -60842,51 +63081,24 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. This - value will be used in an algorithm that will decide the - optimal bin size such that the histogram best - visualizes the distribution of the data. Ignored if - `ybins.size` is provided. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. opacity Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - selected - plotly.graph_objects.histogram.Selected instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.histogram.Stream instance or dict + plotly.graph_objects.heatmap.Stream instance or dict with compatible properties text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. + Sets the text elements associated with each z value. textsrc Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -60909,48 +63121,92 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.histogram.Unselected instance or - dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x - Sets the sample data to be binned on the x axis. + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xbins - plotly.graph_objects.histogram.XBins instance or dict - with compatible properties xcalendar Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. xsrc Sets the source reference on plot.ly for x . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). y - Sets the sample data to be binned on the y axis. + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ybins - plotly.graph_objects.histogram.YBins instance or dict - with compatible properties ycalendar Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. ysrc Sets the source reference on plot.ly for y . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Histogram + Heatmap """ - super(Histogram, self).__init__("histogram") + super(Heatmap, self).__init__("heatmap") # Validate arg # ------------ @@ -60963,96 +63219,95 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Histogram +The first argument to the plotly.graph_objs.Heatmap constructor must be a dict or -an instance of plotly.graph_objs.Histogram""" +an instance of plotly.graph_objs.Heatmap""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) - # Import validators - # ----------------- - from plotly.validators import histogram as v_histogram - - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_histogram.AlignmentgroupValidator() - self._validators["autobinx"] = v_histogram.AutobinxValidator() - self._validators["autobiny"] = v_histogram.AutobinyValidator() - self._validators["bingroup"] = v_histogram.BingroupValidator() - self._validators["cumulative"] = v_histogram.CumulativeValidator() - self._validators["customdata"] = v_histogram.CustomdataValidator() - self._validators["customdatasrc"] = v_histogram.CustomdatasrcValidator() - self._validators["error_x"] = v_histogram.ErrorXValidator() - self._validators["error_y"] = v_histogram.ErrorYValidator() - self._validators["histfunc"] = v_histogram.HistfuncValidator() - self._validators["histnorm"] = v_histogram.HistnormValidator() - self._validators["hoverinfo"] = v_histogram.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_histogram.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_histogram.HoverlabelValidator() - self._validators["hovertemplate"] = v_histogram.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_histogram.HovertemplatesrcValidator() - self._validators["hovertext"] = v_histogram.HovertextValidator() - self._validators["hovertextsrc"] = v_histogram.HovertextsrcValidator() - self._validators["ids"] = v_histogram.IdsValidator() - self._validators["idssrc"] = v_histogram.IdssrcValidator() - self._validators["legendgroup"] = v_histogram.LegendgroupValidator() - self._validators["marker"] = v_histogram.MarkerValidator() - self._validators["meta"] = v_histogram.MetaValidator() - self._validators["metasrc"] = v_histogram.MetasrcValidator() - self._validators["name"] = v_histogram.NameValidator() - self._validators["nbinsx"] = v_histogram.NbinsxValidator() - self._validators["nbinsy"] = v_histogram.NbinsyValidator() - self._validators["offsetgroup"] = v_histogram.OffsetgroupValidator() - self._validators["opacity"] = v_histogram.OpacityValidator() - self._validators["orientation"] = v_histogram.OrientationValidator() - self._validators["selected"] = v_histogram.SelectedValidator() - self._validators["selectedpoints"] = v_histogram.SelectedpointsValidator() - self._validators["showlegend"] = v_histogram.ShowlegendValidator() - self._validators["stream"] = v_histogram.StreamValidator() - self._validators["text"] = v_histogram.TextValidator() - self._validators["textsrc"] = v_histogram.TextsrcValidator() - self._validators["uid"] = v_histogram.UidValidator() - self._validators["uirevision"] = v_histogram.UirevisionValidator() - self._validators["unselected"] = v_histogram.UnselectedValidator() - self._validators["visible"] = v_histogram.VisibleValidator() - self._validators["x"] = v_histogram.XValidator() - self._validators["xaxis"] = v_histogram.XAxisValidator() - self._validators["xbins"] = v_histogram.XBinsValidator() - self._validators["xcalendar"] = v_histogram.XcalendarValidator() - self._validators["xsrc"] = v_histogram.XsrcValidator() - self._validators["y"] = v_histogram.YValidator() - self._validators["yaxis"] = v_histogram.YAxisValidator() - self._validators["ybins"] = v_histogram.YBinsValidator() - self._validators["ycalendar"] = v_histogram.YcalendarValidator() - self._validators["ysrc"] = v_histogram.YsrcValidator() + # Import validators + # ----------------- + from plotly.validators import heatmap as v_heatmap + + # Initialize validators + # --------------------- + self._validators["autocolorscale"] = v_heatmap.AutocolorscaleValidator() + self._validators["coloraxis"] = v_heatmap.ColoraxisValidator() + self._validators["colorbar"] = v_heatmap.ColorBarValidator() + self._validators["colorscale"] = v_heatmap.ColorscaleValidator() + self._validators["connectgaps"] = v_heatmap.ConnectgapsValidator() + self._validators["customdata"] = v_heatmap.CustomdataValidator() + self._validators["customdatasrc"] = v_heatmap.CustomdatasrcValidator() + self._validators["dx"] = v_heatmap.DxValidator() + self._validators["dy"] = v_heatmap.DyValidator() + self._validators["hoverinfo"] = v_heatmap.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_heatmap.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_heatmap.HoverlabelValidator() + self._validators["hovertemplate"] = v_heatmap.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_heatmap.HovertemplatesrcValidator() + self._validators["hovertext"] = v_heatmap.HovertextValidator() + self._validators["hovertextsrc"] = v_heatmap.HovertextsrcValidator() + self._validators["ids"] = v_heatmap.IdsValidator() + self._validators["idssrc"] = v_heatmap.IdssrcValidator() + self._validators["meta"] = v_heatmap.MetaValidator() + self._validators["metasrc"] = v_heatmap.MetasrcValidator() + self._validators["name"] = v_heatmap.NameValidator() + self._validators["opacity"] = v_heatmap.OpacityValidator() + self._validators["reversescale"] = v_heatmap.ReversescaleValidator() + self._validators["showscale"] = v_heatmap.ShowscaleValidator() + self._validators["stream"] = v_heatmap.StreamValidator() + self._validators["text"] = v_heatmap.TextValidator() + self._validators["textsrc"] = v_heatmap.TextsrcValidator() + self._validators["transpose"] = v_heatmap.TransposeValidator() + self._validators["uid"] = v_heatmap.UidValidator() + self._validators["uirevision"] = v_heatmap.UirevisionValidator() + self._validators["visible"] = v_heatmap.VisibleValidator() + self._validators["x"] = v_heatmap.XValidator() + self._validators["x0"] = v_heatmap.X0Validator() + self._validators["xaxis"] = v_heatmap.XAxisValidator() + self._validators["xcalendar"] = v_heatmap.XcalendarValidator() + self._validators["xgap"] = v_heatmap.XgapValidator() + self._validators["xsrc"] = v_heatmap.XsrcValidator() + self._validators["xtype"] = v_heatmap.XtypeValidator() + self._validators["y"] = v_heatmap.YValidator() + self._validators["y0"] = v_heatmap.Y0Validator() + self._validators["yaxis"] = v_heatmap.YAxisValidator() + self._validators["ycalendar"] = v_heatmap.YcalendarValidator() + self._validators["ygap"] = v_heatmap.YgapValidator() + self._validators["ysrc"] = v_heatmap.YsrcValidator() + self._validators["ytype"] = v_heatmap.YtypeValidator() + self._validators["z"] = v_heatmap.ZValidator() + self._validators["zauto"] = v_heatmap.ZautoValidator() + self._validators["zhoverformat"] = v_heatmap.ZhoverformatValidator() + self._validators["zmax"] = v_heatmap.ZmaxValidator() + self._validators["zmid"] = v_heatmap.ZmidValidator() + self._validators["zmin"] = v_heatmap.ZminValidator() + self._validators["zsmooth"] = v_heatmap.ZsmoothValidator() + self._validators["zsrc"] = v_heatmap.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("autobinx", None) - self["autobinx"] = autobinx if autobinx is not None else _v - _v = arg.pop("autobiny", None) - self["autobiny"] = autobiny if autobiny is not None else _v - _v = arg.pop("bingroup", None) - self["bingroup"] = bingroup if bingroup is not None else _v - _v = arg.pop("cumulative", None) - self["cumulative"] = cumulative if cumulative is not None else _v + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("connectgaps", None) + self["connectgaps"] = connectgaps if connectgaps is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("histfunc", None) - self["histfunc"] = histfunc if histfunc is not None else _v - _v = arg.pop("histnorm", None) - self["histnorm"] = histnorm if histnorm is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -61073,74 +63328,84 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("nbinsx", None) - self["nbinsx"] = nbinsx if nbinsx is not None else _v - _v = arg.pop("nbinsy", None) - self["nbinsy"] = nbinsy if nbinsy is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("transpose", None) + self["transpose"] = transpose if transpose is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xbins", None) - self["xbins"] = xbins if xbins is not None else _v _v = arg.pop("xcalendar", None) self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xgap", None) + self["xgap"] = xgap if xgap is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("xtype", None) + self["xtype"] = xtype if xtype is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ybins", None) - self["ybins"] = ybins if ybins is not None else _v _v = arg.pop("ycalendar", None) self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ygap", None) + self["ygap"] = ygap if ygap is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("ytype", None) + self["ytype"] = ytype if ytype is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zauto", None) + self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zhoverformat", None) + self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v + _v = arg.pop("zmax", None) + self["zmax"] = zmax if zmax is not None else _v + _v = arg.pop("zmid", None) + self["zmid"] = zmid if zmid is not None else _v + _v = arg.pop("zmin", None) + self["zmin"] = zmin if zmin is not None else _v + _v = arg.pop("zsmooth", None) + self["zsmooth"] = zsmooth if zsmooth is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "histogram" + self._props["type"] = "heatmap" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="histogram", val="histogram" + plotly_name="type", parent_name="heatmap", val="heatmap" ) arg.pop("type", None) @@ -61157,344 +63422,47 @@ def __init__( import copy as _copy -class Heatmapgl(_BaseTraceType): +class Funnelarea(_BaseTraceType): - # autocolorscale - # -------------- + # aspectratio + # ----------- @property - def autocolorscale(self): + def aspectratio(self): """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. + Sets the ratio between height and width - The 'autocolorscale' property must be specified as a bool - (either True, or False) + The 'aspectratio' property is a number and may be specified as: + - An int or float in the interval [0, inf] Returns ------- - bool + int|float """ - return self["autocolorscale"] + return self["aspectratio"] - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val + @aspectratio.setter + def aspectratio(self, val): + self["aspectratio"] = val - # coloraxis + # baseratio # --------- @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val - - # colorbar - # -------- - @property - def colorbar(self): - """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.heatmapgl.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor - - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.heatmapgl.color - bar.Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmapgl.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmapgl.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.heatmapgl.colorbar.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use - heatmapgl.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - heatmapgl.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.heatmapgl.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): + def baseratio(self): """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. + Sets the ratio between bottom length and maximum top length. - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + The 'baseratio' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - str + int|float """ - return self["colorscale"] + return self["baseratio"] - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + @baseratio.setter + def baseratio(self, val): + self["baseratio"] = val # customdata # ---------- @@ -61539,45 +63507,63 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- + # dlabel + # ------ @property - def dx(self): + def dlabel(self): """ - Sets the x coordinate step. See `x0` for more info. + Sets the label step. See `label0` for more info. - The 'dx' property is a number and may be specified as: + The 'dlabel' property is a number and may be specified as: - An int or float Returns ------- int|float """ - return self["dx"] + return self["dlabel"] - @dx.setter - def dx(self, val): - self["dx"] = val + @dlabel.setter + def dlabel(self, val): + self["dlabel"] = val - # dy - # -- + # domain + # ------ @property - def dy(self): + def domain(self): """ - Sets the y coordinate step. See `y0` for more info. + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of plotly.graph_objs.funnelarea.Domain + - A dict of string/value properties that will be passed + to the Domain constructor - The 'dy' property is a number and may be specified as: - - An int or float + Supported dict properties: + + column + If there is a layout grid, use the domain for + this column in the grid for this funnelarea + trace . + row + If there is a layout grid, use the domain for + this row in the grid for this funnelarea trace + . + x + Sets the horizontal domain of this funnelarea + trace (in plot fraction). + y + Sets the vertical domain of this funnelarea + trace (in plot fraction). Returns ------- - int|float + plotly.graph_objs.funnelarea.Domain """ - return self["dy"] + return self["domain"] - @dy.setter - def dy(self, val): - self["dy"] = val + @domain.setter + def domain(self, val): + self["domain"] = val # hoverinfo # --------- @@ -61590,8 +63576,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters + (e.g. 'label+text') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -61632,7 +63618,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.heatmapgl.Hoverlabel + - An instance of plotly.graph_objs.funnelarea.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -61676,7 +63662,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.heatmapgl.Hoverlabel + plotly.graph_objs.funnelarea.Hoverlabel """ return self["hoverlabel"] @@ -61684,6 +63670,114 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variables `label`, `color`, `value`, `text` and `percent`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + # hovertext + # --------- + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + # hovertextsrc + # ------------ + @property + def hovertextsrc(self): + """ + Sets the source reference on plot.ly for hovertext . + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + # ids # --- @property @@ -61726,241 +63820,241 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # meta - # ---- + # insidetextfont + # -------------- @property - def meta(self): + def insidetextfont(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Sets the font used for `textinfo` lying inside the sector. - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on plot.ly for meta . + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of plotly.graph_objs.funnelarea.Insidetextfont + - A dict of string/value properties that will be passed + to the Insidetextfont constructor - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - str + plotly.graph_objs.funnelarea.Insidetextfont """ - return self["metasrc"] + return self["insidetextfont"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val - # name - # ---- + # label0 + # ------ @property - def name(self): + def label0(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Alternate to `labels`. Builds a numeric set of labels. Use with + `dlabel` where `label0` is the starting label and `dlabel` the + step. - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'label0' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["name"] + return self["label0"] - @name.setter - def name(self, val): - self["name"] = val + @label0.setter + def label0(self, val): + self["label0"] = val - # opacity - # ------- + # labels + # ------ @property - def opacity(self): + def labels(self): """ - Sets the opacity of the trace. + Sets the sector labels. If `labels` entries are duplicated, we + sum associated `values` or simply count occurrences if `values` + is not provided. For other array attributes (including color) + we use the first non-empty entry among all occurrences of the + label. - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["opacity"] + return self["labels"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @labels.setter + def labels(self, val): + self["labels"] = val - # reversescale - # ------------ + # labelssrc + # --------- @property - def reversescale(self): + def labelssrc(self): """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. + Sets the source reference on plot.ly for labels . - The 'reversescale' property must be specified as a bool - (either True, or False) + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - bool + str """ - return self["reversescale"] + return self["labelssrc"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val - # showscale - # --------- + # legendgroup + # ----------- @property - def showscale(self): + def legendgroup(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - The 'showscale' property must be specified as a bool - (either True, or False) + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - bool + str """ - return self["showscale"] + return self["legendgroup"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # stream + # marker # ------ @property - def stream(self): + def marker(self): """ - The 'stream' property is an instance of Stream + The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.heatmapgl.Stream + - An instance of plotly.graph_objs.funnelarea.Marker - A dict of string/value properties that will be passed - to the Stream constructor + to the Marker constructor Supported dict properties: - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + colors + Sets the color of each sector. If not + specified, the default trace color set is used + to pick the sector colors. + colorssrc + Sets the source reference on plot.ly for + colors . + line + plotly.graph_objects.funnelarea.marker.Line + instance or dict with compatible properties Returns ------- - plotly.graph_objs.heatmapgl.Stream + plotly.graph_objs.funnelarea.Marker """ - return self["stream"] + return self["marker"] - @stream.setter - def stream(self, val): - self["stream"] = val + @marker.setter + def marker(self, val): + self["marker"] = val - # text + # meta # ---- @property - def text(self): + def meta(self): """ - Sets the text elements associated with each z value. + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'meta' property accepts values of any type Returns ------- - numpy.ndarray + Any|numpy.ndarray """ - return self["text"] + return self["meta"] - @text.setter - def text(self, val): - self["text"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # textsrc + # metasrc # ------- @property - def textsrc(self): + def metasrc(self): """ - Sets the source reference on plot.ly for text . + Sets the source reference on plot.ly for meta . - The 'textsrc' property must be specified as a string or + The 'metasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # transpose - # --------- - @property - def transpose(self): - """ - Transposes the z data. - - The 'transpose' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["transpose"] + return self["metasrc"] - @transpose.setter - def transpose(self, val): - self["transpose"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # uid - # --- + # name + # ---- @property - def uid(self): + def name(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Sets the trace name. The trace name appear as the legend item + and on hover. - The 'uid' property is a string and must be specified as: + The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string @@ -61968,461 +64062,508 @@ def uid(self): ------- str """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] + return self["name"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @name.setter + def name(self, val): + self["name"] = val - # visible + # opacity # ------- @property - def visible(self): + def opacity(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the opacity of the trace. - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - Any + int|float """ - return self["visible"] + return self["opacity"] - @visible.setter - def visible(self, val): - self["visible"] = val + @opacity.setter + def opacity(self, val): + self["opacity"] = val - # x - # - + # scalegroup + # ---------- @property - def x(self): + def scalegroup(self): """ - Sets the x coordinates. + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a non-empty + group id here shared by every trace in the same group. - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - numpy.ndarray + str """ - return self["x"] + return self["scalegroup"] - @x.setter - def x(self, val): - self["x"] = val + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val - # x0 - # -- + # showlegend + # ---------- @property - def x0(self): + def showlegend(self): """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. + Determines whether or not an item corresponding to this trace + is shown in the legend. - The 'x0' property accepts values of any type + The 'showlegend' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["x0"] + return self["showlegend"] - @x0.setter - def x0(self, val): - self["x0"] = val + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val - # xaxis - # ----- + # stream + # ------ @property - def xaxis(self): + def stream(self): """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.funnelarea.Stream + - A dict of string/value properties that will be passed + to the Stream constructor - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - str + plotly.graph_objs.funnelarea.Stream """ - return self["xaxis"] + return self["stream"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @stream.setter + def stream(self, val): + self["stream"] = val - # xsrc + # text # ---- @property - def xsrc(self): + def text(self): """ - Sets the source reference on plot.ly for x . + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["xsrc"] + return self["text"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @text.setter + def text(self, val): + self["text"] = val - # xtype - # ----- + # textfont + # -------- @property - def xtype(self): + def textfont(self): """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). + Sets the font used for `textinfo`. - The 'xtype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of plotly.graph_objs.funnelarea.Textfont + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - Any + plotly.graph_objs.funnelarea.Textfont """ - return self["xtype"] + return self["textfont"] - @xtype.setter - def xtype(self, val): - self["xtype"] = val + @textfont.setter + def textfont(self, val): + self["textfont"] = val - # y - # - + # textinfo + # -------- @property - def y(self): + def textinfo(self): """ - Sets the y coordinates. + Determines which trace information appear on the graph. - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') Returns ------- - numpy.ndarray + Any """ - return self["y"] + return self["textinfo"] - @y.setter - def y(self, val): - self["y"] = val + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val - # y0 - # -- + # textposition + # ------------ @property - def y0(self): + def textposition(self): """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. + Specifies the location of the `textinfo`. - The 'y0' property accepts values of any type + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'none'] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + Any|numpy.ndarray """ - return self["y0"] + return self["textposition"] - @y0.setter - def y0(self, val): - self["y0"] = val + @textposition.setter + def textposition(self, val): + self["textposition"] = val - # yaxis - # ----- + # textpositionsrc + # --------------- @property - def yaxis(self): + def textpositionsrc(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the source reference on plot.ly for textposition . - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["yaxis"] + return self["textpositionsrc"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val - # ysrc - # ---- + # textsrc + # ------- @property - def ysrc(self): + def textsrc(self): """ - Sets the source reference on plot.ly for y . + Sets the source reference on plot.ly for text . - The 'ysrc' property must be specified as a string or + The 'textsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["ysrc"] + return self["textsrc"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # ytype - # ----- + # texttemplate + # ------------ @property - def ytype(self): + def texttemplate(self): """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'ytype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, `text` and + `percent`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + str|numpy.ndarray """ - return self["ytype"] + return self["texttemplate"] - @ytype.setter - def ytype(self, val): - self["ytype"] = val + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val - # z - # - + # texttemplatesrc + # --------------- @property - def z(self): + def texttemplatesrc(self): """ - Sets the z data. + Sets the source reference on plot.ly for texttemplate . - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - numpy.ndarray + str """ - return self["z"] + return self["texttemplatesrc"] - @z.setter - def z(self, val): - self["z"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val - # zauto + # title # ----- @property - def zauto(self): + def title(self): """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. + The 'title' property is an instance of Title + that may be specified as: + - An instance of plotly.graph_objs.funnelarea.Title + - A dict of string/value properties that will be passed + to the Title constructor - The 'zauto' property must be specified as a bool - (either True, or False) + Supported dict properties: + + font + Sets the font used for `title`. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + position + Specifies the location of the `title`. Note + that the title's position used to be set by the + now deprecated `titleposition` attribute. + text + Sets the title of the chart. If it is empty, no + title is displayed. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. Returns ------- - bool + plotly.graph_objs.funnelarea.Title """ - return self["zauto"] + return self["title"] - @zauto.setter - def zauto(self, val): - self["zauto"] = val + @title.setter + def title(self, val): + self["title"] = val - # zmax - # ---- + # uid + # --- @property - def zmax(self): + def uid(self): """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. - The 'zmax' property is a number and may be specified as: - - An int or float + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - int|float + str """ - return self["zmax"] + return self["uid"] - @zmax.setter - def zmax(self, val): - self["zmax"] = val + @uid.setter + def uid(self, val): + self["uid"] = val - # zmid - # ---- + # uirevision + # ---------- @property - def zmid(self): + def uirevision(self): """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. - The 'zmid' property is a number and may be specified as: - - An int or float + The 'uirevision' property accepts values of any type Returns ------- - int|float + Any """ - return self["zmid"] + return self["uirevision"] - @zmid.setter - def zmid(self, val): - self["zmid"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # zmin - # ---- + # values + # ------ @property - def zmin(self): + def values(self): """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. + Sets the values of the sectors. If omitted, we count + occurrences of each label. - The 'zmin' property is a number and may be specified as: - - An int or float + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["zmin"] + return self["values"] - @zmin.setter - def zmin(self, val): - self["zmin"] = val + @values.setter + def values(self, val): + self["values"] = val - # zsrc - # ---- + # valuessrc + # --------- @property - def zsrc(self): + def valuessrc(self): """ - Sets the source reference on plot.ly for z . + Sets the source reference on plot.ly for values . - The 'zsrc' property must be specified as a string or + The 'valuessrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val + return self["valuessrc"] - # type - # ---- - @property - def type(self): - return self._props["type"] + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val - # property parent name - # -------------------- + # visible + # ------- @property - def _parent_path_str(self): - return "" + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.heatmapgl.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -62430,10 +64571,11 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. + dlabel + Sets the label step. See `label0` for more info. + domain + plotly.graph_objects.funnelarea.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -62442,14 +64584,71 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.heatmapgl.Hoverlabel instance or + plotly.graph_objects.funnelarea.Hoverlabel instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, `text` + and `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on plot.ly for labels . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + plotly.graph_objects.funnelarea.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -62470,22 +64669,57 @@ def _prop_descriptions(self): legend item and on hover. opacity Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.heatmapgl.Stream instance or dict + plotly.graph_objects.funnelarea.Stream instance or dict with compatible properties text - Sets the text elements associated with each z value. + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `text` and `percent`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + title + plotly.graph_objects.funnelarea.Title instance or dict + with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -62508,159 +64742,84 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, + aspectratio=None, + baseratio=None, customdata=None, customdatasrc=None, - dx=None, - dy=None, + dlabel=None, + domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, ids=None, idssrc=None, + insidetextfont=None, + label0=None, + labels=None, + labelssrc=None, + legendgroup=None, + marker=None, meta=None, metasrc=None, name=None, opacity=None, - reversescale=None, - showscale=None, + scalegroup=None, + showlegend=None, stream=None, text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, textsrc=None, - transpose=None, + texttemplate=None, + texttemplatesrc=None, + title=None, uid=None, uirevision=None, + values=None, + valuessrc=None, visible=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, **kwargs ): """ - Construct a new Heatmapgl object + Construct a new Funnelarea object - WebGL version of the heatmap trace type. + Visualize stages in a process using area-encoded trapezoids. + This trace can be used to show data in a part-to-whole + representation similar to a "pie" trace, wherein each item + appears in a single stage. See also the "funnel" trace type for + a different approach to visualizing funnel data. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Heatmapgl - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.heatmapgl.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. + an instance of plotly.graph_objs.Funnelarea + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -62668,10 +64827,11 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. + dlabel + Sets the label step. See `label0` for more info. + domain + plotly.graph_objects.funnelarea.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -62680,14 +64840,71 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.heatmapgl.Hoverlabel instance or + plotly.graph_objects.funnelarea.Hoverlabel instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, `text` + and `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on plot.ly for labels . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + plotly.graph_objects.funnelarea.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -62708,22 +64925,57 @@ def __init__( legend item and on hover. opacity Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.heatmapgl.Stream instance or dict + plotly.graph_objects.funnelarea.Stream instance or dict with compatible properties text - Sets the text elements associated with each z value. + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `text` and `percent`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + title + plotly.graph_objects.funnelarea.Title instance or dict + with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -62746,77 +64998,22 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . Returns ------- - Heatmapgl + Funnelarea """ - super(Heatmapgl, self).__init__("heatmapgl") + super(Funnelarea, self).__init__("funnelarea") # Validate arg # ------------ @@ -62829,9 +65026,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Heatmapgl +The first argument to the plotly.graph_objs.Funnelarea constructor must be a dict or -an instance of plotly.graph_objs.Heatmapgl""" +an instance of plotly.graph_objs.Funnelarea""" ) # Handle skip_invalid @@ -62840,81 +65037,99 @@ def __init__( # Import validators # ----------------- - from plotly.validators import heatmapgl as v_heatmapgl + from plotly.validators import funnelarea as v_funnelarea # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_heatmapgl.AutocolorscaleValidator() - self._validators["coloraxis"] = v_heatmapgl.ColoraxisValidator() - self._validators["colorbar"] = v_heatmapgl.ColorBarValidator() - self._validators["colorscale"] = v_heatmapgl.ColorscaleValidator() - self._validators["customdata"] = v_heatmapgl.CustomdataValidator() - self._validators["customdatasrc"] = v_heatmapgl.CustomdatasrcValidator() - self._validators["dx"] = v_heatmapgl.DxValidator() - self._validators["dy"] = v_heatmapgl.DyValidator() - self._validators["hoverinfo"] = v_heatmapgl.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_heatmapgl.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_heatmapgl.HoverlabelValidator() - self._validators["ids"] = v_heatmapgl.IdsValidator() - self._validators["idssrc"] = v_heatmapgl.IdssrcValidator() - self._validators["meta"] = v_heatmapgl.MetaValidator() - self._validators["metasrc"] = v_heatmapgl.MetasrcValidator() - self._validators["name"] = v_heatmapgl.NameValidator() - self._validators["opacity"] = v_heatmapgl.OpacityValidator() - self._validators["reversescale"] = v_heatmapgl.ReversescaleValidator() - self._validators["showscale"] = v_heatmapgl.ShowscaleValidator() - self._validators["stream"] = v_heatmapgl.StreamValidator() - self._validators["text"] = v_heatmapgl.TextValidator() - self._validators["textsrc"] = v_heatmapgl.TextsrcValidator() - self._validators["transpose"] = v_heatmapgl.TransposeValidator() - self._validators["uid"] = v_heatmapgl.UidValidator() - self._validators["uirevision"] = v_heatmapgl.UirevisionValidator() - self._validators["visible"] = v_heatmapgl.VisibleValidator() - self._validators["x"] = v_heatmapgl.XValidator() - self._validators["x0"] = v_heatmapgl.X0Validator() - self._validators["xaxis"] = v_heatmapgl.XAxisValidator() - self._validators["xsrc"] = v_heatmapgl.XsrcValidator() - self._validators["xtype"] = v_heatmapgl.XtypeValidator() - self._validators["y"] = v_heatmapgl.YValidator() - self._validators["y0"] = v_heatmapgl.Y0Validator() - self._validators["yaxis"] = v_heatmapgl.YAxisValidator() - self._validators["ysrc"] = v_heatmapgl.YsrcValidator() - self._validators["ytype"] = v_heatmapgl.YtypeValidator() - self._validators["z"] = v_heatmapgl.ZValidator() - self._validators["zauto"] = v_heatmapgl.ZautoValidator() - self._validators["zmax"] = v_heatmapgl.ZmaxValidator() - self._validators["zmid"] = v_heatmapgl.ZmidValidator() - self._validators["zmin"] = v_heatmapgl.ZminValidator() - self._validators["zsrc"] = v_heatmapgl.ZsrcValidator() + # --------------------- + self._validators["aspectratio"] = v_funnelarea.AspectratioValidator() + self._validators["baseratio"] = v_funnelarea.BaseratioValidator() + self._validators["customdata"] = v_funnelarea.CustomdataValidator() + self._validators["customdatasrc"] = v_funnelarea.CustomdatasrcValidator() + self._validators["dlabel"] = v_funnelarea.DlabelValidator() + self._validators["domain"] = v_funnelarea.DomainValidator() + self._validators["hoverinfo"] = v_funnelarea.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_funnelarea.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_funnelarea.HoverlabelValidator() + self._validators["hovertemplate"] = v_funnelarea.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_funnelarea.HovertemplatesrcValidator() + self._validators["hovertext"] = v_funnelarea.HovertextValidator() + self._validators["hovertextsrc"] = v_funnelarea.HovertextsrcValidator() + self._validators["ids"] = v_funnelarea.IdsValidator() + self._validators["idssrc"] = v_funnelarea.IdssrcValidator() + self._validators["insidetextfont"] = v_funnelarea.InsidetextfontValidator() + self._validators["label0"] = v_funnelarea.Label0Validator() + self._validators["labels"] = v_funnelarea.LabelsValidator() + self._validators["labelssrc"] = v_funnelarea.LabelssrcValidator() + self._validators["legendgroup"] = v_funnelarea.LegendgroupValidator() + self._validators["marker"] = v_funnelarea.MarkerValidator() + self._validators["meta"] = v_funnelarea.MetaValidator() + self._validators["metasrc"] = v_funnelarea.MetasrcValidator() + self._validators["name"] = v_funnelarea.NameValidator() + self._validators["opacity"] = v_funnelarea.OpacityValidator() + self._validators["scalegroup"] = v_funnelarea.ScalegroupValidator() + self._validators["showlegend"] = v_funnelarea.ShowlegendValidator() + self._validators["stream"] = v_funnelarea.StreamValidator() + self._validators["text"] = v_funnelarea.TextValidator() + self._validators["textfont"] = v_funnelarea.TextfontValidator() + self._validators["textinfo"] = v_funnelarea.TextinfoValidator() + self._validators["textposition"] = v_funnelarea.TextpositionValidator() + self._validators["textpositionsrc"] = v_funnelarea.TextpositionsrcValidator() + self._validators["textsrc"] = v_funnelarea.TextsrcValidator() + self._validators["texttemplate"] = v_funnelarea.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_funnelarea.TexttemplatesrcValidator() + self._validators["title"] = v_funnelarea.TitleValidator() + self._validators["uid"] = v_funnelarea.UidValidator() + self._validators["uirevision"] = v_funnelarea.UirevisionValidator() + self._validators["values"] = v_funnelarea.ValuesValidator() + self._validators["valuessrc"] = v_funnelarea.ValuessrcValidator() + self._validators["visible"] = v_funnelarea.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("aspectratio", None) + self["aspectratio"] = aspectratio if aspectratio is not None else _v + _v = arg.pop("baseratio", None) + self["baseratio"] = baseratio if baseratio is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v + _v = arg.pop("dlabel", None) + self["dlabel"] = dlabel if dlabel is not None else _v + _v = arg.pop("domain", None) + self["domain"] = domain if domain is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v + _v = arg.pop("label0", None) + self["label0"] = label0 if label0 is not None else _v + _v = arg.pop("labels", None) + self["labels"] = labels if labels is not None else _v + _v = arg.pop("labelssrc", None) + self["labelssrc"] = labelssrc if labelssrc is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) @@ -62923,64 +65138,48 @@ def __init__( self["name"] = name if name is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("scalegroup", None) + self["scalegroup"] = scalegroup if scalegroup is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textinfo", None) + self["textinfo"] = textinfo if textinfo is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("title", None) + self["title"] = title if title is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("values", None) + self["values"] = values if values is not None else _v + _v = arg.pop("valuessrc", None) + self["valuessrc"] = valuessrc if valuessrc is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xtype", None) - self["xtype"] = xtype if xtype is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("ytype", None) - self["ytype"] = ytype if ytype is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "heatmapgl" + self._props["type"] = "funnelarea" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="heatmapgl", val="heatmapgl" + plotly_name="type", parent_name="funnelarea", val="funnelarea" ) arg.pop("type", None) @@ -62997,365 +65196,107 @@ def __init__( import copy as _copy -class Heatmap(_BaseTraceType): +class Funnel(_BaseTraceType): - # autocolorscale + # alignmentgroup # -------------- @property - def autocolorscale(self): + def alignmentgroup(self): """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. - The 'autocolorscale' property must be specified as a bool - (either True, or False) + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - bool + str """ - return self["autocolorscale"] + return self["alignmentgroup"] - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val - # coloraxis - # --------- + # cliponaxis + # ---------- @property - def coloraxis(self): + def cliponaxis(self): """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + The 'cliponaxis' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["coloraxis"] + return self["cliponaxis"] - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val - # colorbar - # -------- + # connector + # --------- @property - def colorbar(self): + def connector(self): """ - The 'colorbar' property is an instance of ColorBar + The 'connector' property is an instance of Connector that may be specified as: - - An instance of plotly.graph_objs.heatmap.ColorBar + - An instance of plotly.graph_objs.funnel.Connector - A dict of string/value properties that will be passed - to the ColorBar constructor + to the Connector constructor Supported dict properties: - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.heatmap.colorba - r.Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmap.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.heatmap.colorbar.Title + fillcolor + Sets the fill color. + line + plotly.graph_objects.funnel.connector.Line instance or dict with compatible properties - titlefont - Deprecated: Please use - heatmap.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. - titleside - Deprecated: Please use - heatmap.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.heatmap.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + visible + Determines if connector regions and lines are + drawn. Returns ------- - str + plotly.graph_objs.funnel.Connector """ - return self["colorscale"] + return self["connector"] - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + @connector.setter + def connector(self, val): + self["connector"] = val - # connectgaps - # ----------- + # constraintext + # ------------- @property - def connectgaps(self): + def constraintext(self): """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data are filled in. + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. - The 'connectgaps' property must be specified as a bool - (either True, or False) + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] Returns ------- - bool + Any """ - return self["connectgaps"] + return self["constraintext"] - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val # customdata # ---------- @@ -63451,8 +65392,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters + (e.g. 'name+x') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -63493,7 +65434,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.heatmap.Hoverlabel + - An instance of plotly.graph_objs.funnel.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -63537,7 +65478,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.heatmap.Hoverlabel + plotly.graph_objs.funnel.Hoverlabel """ return self["hoverlabel"] @@ -63557,15 +65498,20 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. + variables `percentInitial`, `percentPrevious` and + `percentTotal`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. The 'hovertemplate' property is a string and must be specified as: - A string @@ -63607,14 +65553,20 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Same as `text`. + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["hovertext"] @@ -63684,6 +65636,224 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val + # insidetextanchor + # ---------------- + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of plotly.graph_objs.funnel.Insidetextfont + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.funnel.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.funnel.Marker + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.funnel.marker.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . + line + plotly.graph_objects.funnel.marker.Line + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. + + Returns + ------- + plotly.graph_objs.funnel.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + # meta # ---- @property @@ -63754,6 +65924,51 @@ def name(self): def name(self, val): self["name"] = val + # offset + # ------ + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + # opacity # ------- @property @@ -63774,101 +65989,344 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the funnels. With "v" ("h"), the value + of the each bar spans along the vertical (horizontal). By + default funnels are tend to be oriented horizontally; unless + only "y" array is presented or orientation is set to "v". Also + regarding graphs including only 'horizontal' funnels, + "autorange" on the "y-axis" are set to "reversed". + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # outsidetextfont + # --------------- + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of plotly.graph_objs.funnel.Outsidetextfont + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.funnel.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # stream + # ------ + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.funnel.Stream + - A dict of string/value properties that will be passed + to the Stream constructor + + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. + + Returns + ------- + plotly.graph_objs.funnel.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # textfont + # -------- @property - def reversescale(self): + def textfont(self): """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. + Sets the font used for `text`. - The 'reversescale' property must be specified as a bool - (either True, or False) + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of plotly.graph_objs.funnel.Textfont + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - bool + plotly.graph_objs.funnel.Textfont """ - return self["reversescale"] + return self["textfont"] - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val + @textfont.setter + def textfont(self, val): + self["textfont"] = val - # showscale - # --------- + # textinfo + # -------- @property - def showscale(self): + def textinfo(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Determines which trace information appear on the graph. In the + case of having multiple funnels, percentages & totals are + computed separately (per trace). - The 'showscale' property must be specified as a bool - (either True, or False) + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') Returns ------- - bool + Any """ - return self["showscale"] + return self["textinfo"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val - # stream - # ------ + # textposition + # ------------ @property - def stream(self): + def textposition(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.heatmap.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - plotly.graph_objs.heatmap.Stream + Any|numpy.ndarray """ - return self["stream"] + return self["textposition"] - @stream.setter - def stream(self, val): - self["stream"] = val + @textposition.setter + def textposition(self, val): + self["textposition"] = val - # text - # ---- + # textpositionsrc + # --------------- @property - def text(self): + def textpositionsrc(self): """ - Sets the text elements associated with each z value. + Sets the source reference on plot.ly for textposition . - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - numpy.ndarray + str """ - return self["text"] + return self["textpositionsrc"] - @text.setter - def text(self, val): - self["text"] = val + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val # textsrc # ------- @@ -63890,25 +66348,61 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # transpose - # --------- + # texttemplate + # ------------ @property - def transpose(self): + def texttemplate(self): """ - Transposes the z data. + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. variables `percentInitial`, `percentPrevious`, + `percentTotal`, `label` and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . - The 'transpose' property must be specified as a bool - (either True, or False) + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - bool + str """ - return self["transpose"] + return self["texttemplatesrc"] - @transpose.setter - def transpose(self, val): - self["transpose"] = val + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val # uid # --- @@ -63988,6 +66482,26 @@ def visible(self): def visible(self, val): self["visible"] = val + # width + # ----- + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + # x # - @property @@ -64054,50 +66568,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xgap - # ---- - @property - def xgap(self): - """ - Sets the horizontal gap (in pixels) between bricks. - - The 'xgap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["xgap"] - - @xgap.setter - def xgap(self, val): - self["xgap"] = val - # xsrc # ---- @property @@ -64118,30 +66588,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # xtype - # ----- - @property - def xtype(self): - """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). - - The 'xtype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["xtype"] - - @xtype.setter - def xtype(self, val): - self["xtype"] = val - # y # - @property @@ -64202,271 +66648,31 @@ def yaxis(self): ------- str """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ygap - # ---- - @property - def ygap(self): - """ - Sets the vertical gap (in pixels) between bricks. - - The 'ygap' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["ygap"] - - @ygap.setter - def ygap(self, val): - self["ygap"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on plot.ly for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # ytype - # ----- - @property - def ytype(self): - """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'ytype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["ytype"] - - @ytype.setter - def ytype(self, val): - self["ytype"] = val - - # z - # - - @property - def z(self): - """ - Sets the z data. - - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["z"] - - @z.setter - def z(self, val): - self["z"] = val - - # zauto - # ----- - @property - def zauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. - - The 'zauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["zauto"] - - @zauto.setter - def zauto(self, val): - self["zauto"] = val - - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - - # zmax - # ---- - @property - def zmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. - - The 'zmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmax"] - - @zmax.setter - def zmax(self, val): - self["zmax"] = val - - # zmid - # ---- - @property - def zmid(self): - """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. - - The 'zmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmid"] - - @zmid.setter - def zmid(self, val): - self["zmid"] = val - - # zmin - # ---- - @property - def zmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. - - The 'zmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["zmin"] - - @zmin.setter - def zmin(self, val): - self["zmin"] = val - - # zsmooth - # ------- - @property - def zsmooth(self): - """ - Picks a smoothing algorithm use to smooth `z` data. - - The 'zsmooth' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['fast', 'best', False] - - Returns - ------- - Any - """ - return self["zsmooth"] + return self["yaxis"] - @zsmooth.setter - def zsmooth(self, val): - self["zsmooth"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # zsrc + # ysrc # ---- @property - def zsrc(self): + def ysrc(self): """ - Sets the source reference on plot.ly for z . + Sets the source reference on plot.ly for y . - The 'zsrc' property must be specified as a string or + The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["zsrc"] + return self["ysrc"] - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val # type # ---- @@ -64485,38 +66691,22 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.heatmap.ColorBar instance or dict + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + plotly.graph_objects.funnel.Connector instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -64536,8 +66726,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.heatmap.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.funnel.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -64546,21 +66736,33 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example + available. variables `percentInitial`, + `percentPrevious` and `percentTotal`. Anything + contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -64569,6 +66771,18 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + plotly.graph_objects.funnel.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -64587,24 +66801,95 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. opacity Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.heatmap.Stream instance or dict + plotly.graph_objects.funnel.Stream instance or dict with compatible properties text - Sets the text elements associated with each z value. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `percentInitial`, `percentPrevious`, `percentTotal`, + `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -64632,6 +66917,8 @@ def _prop_descriptions(self): "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + width + Sets the bar width (in position axis units). x Sets the x coordinates. x0 @@ -64643,18 +66930,8 @@ def _prop_descriptions(self): a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. xsrc Sets the source reference on plot.ly for x . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). y Sets the y coordinates. y0 @@ -64666,57 +66943,17 @@ def _prop_descriptions(self): a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. ysrc Sets the source reference on plot.ly for y . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. - zsrc - Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, + alignmentgroup=None, + cliponaxis=None, + connector=None, + constraintext=None, customdata=None, customdatasrc=None, dx=None, @@ -64730,101 +66967,75 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legendgroup=None, + marker=None, meta=None, metasrc=None, name=None, + offset=None, + offsetgroup=None, opacity=None, - reversescale=None, - showscale=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, stream=None, text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, textsrc=None, - transpose=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, visible=None, + width=None, x=None, x0=None, xaxis=None, - xcalendar=None, - xgap=None, xsrc=None, - xtype=None, y=None, y0=None, yaxis=None, - ycalendar=None, - ygap=None, ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsmooth=None, - zsrc=None, **kwargs ): """ - Construct a new Heatmap object + Construct a new Funnel object - The data that describes the heatmap value-to-color mapping is - set in `z`. Data in `z` can either be a 2D list of values - (ragged or not) or a 1D array of values. In the case where `z` - is a 2D list, say that `z` has N rows and M columns. Then, by - default, the resulting heatmap will have N partitions along the - y axis and M partitions along the x axis. In other words, the - i-th row/ j-th column cell in `z` is mapped to the i-th - partition of the y axis (starting from the bottom of the plot) - and the j-th partition of the x-axis (starting from the left of - the plot). This behavior can be flipped by using `transpose`. - Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) - elements. If M (N), then the coordinates correspond to the - center of the heatmap cells and the cells have equal width. If - M+1 (N+1), then the coordinates correspond to the edges of the - heatmap cells. In the case where `z` is a 1D list, the x and y - coordinates must be provided in `x` and `y` respectively to - form data triplets. + Visualize stages in a process using length-encoded bars. This + trace can be used to show data in either a part-to-whole + representation wherein each item appears in a single stage, or + in a "drop-off" representation wherein each item appears in + each stage it traversed. See also the "funnelarea" trace type + for a different approach to visualizing funnel data. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Heatmap - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.heatmap.ColorBar instance or dict + an instance of plotly.graph_objs.Funnel + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + plotly.graph_objects.funnel.Connector instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -64844,8 +67055,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.heatmap.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.funnel.Hoverlabel instance or dict + with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -64854,21 +67065,33 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example + available. variables `percentInitial`, + `percentPrevious` and `percentTotal`. Anything + contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -64877,6 +67100,18 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + marker + plotly.graph_objects.funnel.Marker instance or dict + with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -64895,24 +67130,95 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. opacity Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is displayed for - this trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.heatmap.Stream instance or dict + plotly.graph_objects.funnel.Stream instance or dict with compatible properties text - Sets the text elements associated with each z value. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `percentInitial`, `percentPrevious`, `percentTotal`, + `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -64940,6 +67246,8 @@ def __init__( "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + width + Sets the bar width (in position axis units). x Sets the x coordinates. x0 @@ -64951,18 +67259,8 @@ def __init__( a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xgap - Sets the horizontal gap (in pixels) between bricks. xsrc Sets the source reference on plot.ly for x . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). y Sets the y coordinates. y0 @@ -64974,53 +67272,14 @@ def __init__( a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ygap - Sets the vertical gap (in pixels) between bricks. ysrc Sets the source reference on plot.ly for y . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` data. - zsrc - Sets the source reference on plot.ly for z . Returns ------- - Heatmap + Funnel """ - super(Heatmap, self).__init__("heatmap") + super(Funnel, self).__init__("funnel") # Validate arg # ------------ @@ -65033,9 +67292,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Heatmap +The first argument to the plotly.graph_objs.Funnel constructor must be a dict or -an instance of plotly.graph_objs.Heatmap""" +an instance of plotly.graph_objs.Funnel""" ) # Handle skip_invalid @@ -65044,76 +67303,74 @@ def __init__( # Import validators # ----------------- - from plotly.validators import heatmap as v_heatmap + from plotly.validators import funnel as v_funnel # Initialize validators # --------------------- - self._validators["autocolorscale"] = v_heatmap.AutocolorscaleValidator() - self._validators["coloraxis"] = v_heatmap.ColoraxisValidator() - self._validators["colorbar"] = v_heatmap.ColorBarValidator() - self._validators["colorscale"] = v_heatmap.ColorscaleValidator() - self._validators["connectgaps"] = v_heatmap.ConnectgapsValidator() - self._validators["customdata"] = v_heatmap.CustomdataValidator() - self._validators["customdatasrc"] = v_heatmap.CustomdatasrcValidator() - self._validators["dx"] = v_heatmap.DxValidator() - self._validators["dy"] = v_heatmap.DyValidator() - self._validators["hoverinfo"] = v_heatmap.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_heatmap.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_heatmap.HoverlabelValidator() - self._validators["hovertemplate"] = v_heatmap.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_heatmap.HovertemplatesrcValidator() - self._validators["hovertext"] = v_heatmap.HovertextValidator() - self._validators["hovertextsrc"] = v_heatmap.HovertextsrcValidator() - self._validators["ids"] = v_heatmap.IdsValidator() - self._validators["idssrc"] = v_heatmap.IdssrcValidator() - self._validators["meta"] = v_heatmap.MetaValidator() - self._validators["metasrc"] = v_heatmap.MetasrcValidator() - self._validators["name"] = v_heatmap.NameValidator() - self._validators["opacity"] = v_heatmap.OpacityValidator() - self._validators["reversescale"] = v_heatmap.ReversescaleValidator() - self._validators["showscale"] = v_heatmap.ShowscaleValidator() - self._validators["stream"] = v_heatmap.StreamValidator() - self._validators["text"] = v_heatmap.TextValidator() - self._validators["textsrc"] = v_heatmap.TextsrcValidator() - self._validators["transpose"] = v_heatmap.TransposeValidator() - self._validators["uid"] = v_heatmap.UidValidator() - self._validators["uirevision"] = v_heatmap.UirevisionValidator() - self._validators["visible"] = v_heatmap.VisibleValidator() - self._validators["x"] = v_heatmap.XValidator() - self._validators["x0"] = v_heatmap.X0Validator() - self._validators["xaxis"] = v_heatmap.XAxisValidator() - self._validators["xcalendar"] = v_heatmap.XcalendarValidator() - self._validators["xgap"] = v_heatmap.XgapValidator() - self._validators["xsrc"] = v_heatmap.XsrcValidator() - self._validators["xtype"] = v_heatmap.XtypeValidator() - self._validators["y"] = v_heatmap.YValidator() - self._validators["y0"] = v_heatmap.Y0Validator() - self._validators["yaxis"] = v_heatmap.YAxisValidator() - self._validators["ycalendar"] = v_heatmap.YcalendarValidator() - self._validators["ygap"] = v_heatmap.YgapValidator() - self._validators["ysrc"] = v_heatmap.YsrcValidator() - self._validators["ytype"] = v_heatmap.YtypeValidator() - self._validators["z"] = v_heatmap.ZValidator() - self._validators["zauto"] = v_heatmap.ZautoValidator() - self._validators["zhoverformat"] = v_heatmap.ZhoverformatValidator() - self._validators["zmax"] = v_heatmap.ZmaxValidator() - self._validators["zmid"] = v_heatmap.ZmidValidator() - self._validators["zmin"] = v_heatmap.ZminValidator() - self._validators["zsmooth"] = v_heatmap.ZsmoothValidator() - self._validators["zsrc"] = v_heatmap.ZsrcValidator() + self._validators["alignmentgroup"] = v_funnel.AlignmentgroupValidator() + self._validators["cliponaxis"] = v_funnel.CliponaxisValidator() + self._validators["connector"] = v_funnel.ConnectorValidator() + self._validators["constraintext"] = v_funnel.ConstraintextValidator() + self._validators["customdata"] = v_funnel.CustomdataValidator() + self._validators["customdatasrc"] = v_funnel.CustomdatasrcValidator() + self._validators["dx"] = v_funnel.DxValidator() + self._validators["dy"] = v_funnel.DyValidator() + self._validators["hoverinfo"] = v_funnel.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_funnel.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_funnel.HoverlabelValidator() + self._validators["hovertemplate"] = v_funnel.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_funnel.HovertemplatesrcValidator() + self._validators["hovertext"] = v_funnel.HovertextValidator() + self._validators["hovertextsrc"] = v_funnel.HovertextsrcValidator() + self._validators["ids"] = v_funnel.IdsValidator() + self._validators["idssrc"] = v_funnel.IdssrcValidator() + self._validators["insidetextanchor"] = v_funnel.InsidetextanchorValidator() + self._validators["insidetextfont"] = v_funnel.InsidetextfontValidator() + self._validators["legendgroup"] = v_funnel.LegendgroupValidator() + self._validators["marker"] = v_funnel.MarkerValidator() + self._validators["meta"] = v_funnel.MetaValidator() + self._validators["metasrc"] = v_funnel.MetasrcValidator() + self._validators["name"] = v_funnel.NameValidator() + self._validators["offset"] = v_funnel.OffsetValidator() + self._validators["offsetgroup"] = v_funnel.OffsetgroupValidator() + self._validators["opacity"] = v_funnel.OpacityValidator() + self._validators["orientation"] = v_funnel.OrientationValidator() + self._validators["outsidetextfont"] = v_funnel.OutsidetextfontValidator() + self._validators["selectedpoints"] = v_funnel.SelectedpointsValidator() + self._validators["showlegend"] = v_funnel.ShowlegendValidator() + self._validators["stream"] = v_funnel.StreamValidator() + self._validators["text"] = v_funnel.TextValidator() + self._validators["textangle"] = v_funnel.TextangleValidator() + self._validators["textfont"] = v_funnel.TextfontValidator() + self._validators["textinfo"] = v_funnel.TextinfoValidator() + self._validators["textposition"] = v_funnel.TextpositionValidator() + self._validators["textpositionsrc"] = v_funnel.TextpositionsrcValidator() + self._validators["textsrc"] = v_funnel.TextsrcValidator() + self._validators["texttemplate"] = v_funnel.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_funnel.TexttemplatesrcValidator() + self._validators["uid"] = v_funnel.UidValidator() + self._validators["uirevision"] = v_funnel.UirevisionValidator() + self._validators["visible"] = v_funnel.VisibleValidator() + self._validators["width"] = v_funnel.WidthValidator() + self._validators["x"] = v_funnel.XValidator() + self._validators["x0"] = v_funnel.X0Validator() + self._validators["xaxis"] = v_funnel.XAxisValidator() + self._validators["xsrc"] = v_funnel.XsrcValidator() + self._validators["y"] = v_funnel.YValidator() + self._validators["y0"] = v_funnel.Y0Validator() + self._validators["yaxis"] = v_funnel.YAxisValidator() + self._validators["ysrc"] = v_funnel.YsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v + _v = arg.pop("alignmentgroup", None) + self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v + _v = arg.pop("cliponaxis", None) + self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v + _v = arg.pop("connector", None) + self["connector"] = connector if connector is not None else _v + _v = arg.pop("constraintext", None) + self["constraintext"] = constraintext if constraintext is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) @@ -65142,84 +67399,88 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("insidetextanchor", None) + self["insidetextanchor"] = ( + insidetextanchor if insidetextanchor is not None else _v + ) + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v + _v = arg.pop("offset", None) + self["offset"] = offset if offset is not None else _v + _v = arg.pop("offsetgroup", None) + self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v + _v = arg.pop("outsidetextfont", None) + self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v + _v = arg.pop("textangle", None) + self["textangle"] = textangle if textangle is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textinfo", None) + self["textinfo"] = textinfo if textinfo is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("width", None) + self["width"] = width if width is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v _v = arg.pop("x0", None) self["x0"] = x0 if x0 is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xgap", None) - self["xgap"] = xgap if xgap is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xtype", None) - self["xtype"] = xtype if xtype is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v _v = arg.pop("y0", None) self["y0"] = y0 if y0 is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ygap", None) - self["ygap"] = ygap if ygap is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("ytype", None) - self["ytype"] = ytype if ytype is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsmooth", None) - self["zsmooth"] = zsmooth if zsmooth is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "heatmap" + self._props["type"] = "funnel" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="heatmap", val="heatmap" + plotly_name="type", parent_name="funnel", val="funnel" ) arg.pop("type", None) @@ -65236,47 +67497,369 @@ def __init__( import copy as _copy -class Funnelarea(_BaseTraceType): +class Densitymapbox(_BaseTraceType): - # aspectratio - # ----------- + # autocolorscale + # -------------- @property - def aspectratio(self): + def autocolorscale(self): """ - Sets the ratio between height and width + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. - The 'aspectratio' property is a number and may be specified as: - - An int or float in the interval [0, inf] + The 'autocolorscale' property must be specified as a bool + (either True, or False) Returns ------- - int|float + bool """ - return self["aspectratio"] + return self["autocolorscale"] - @aspectratio.setter - def aspectratio(self, val): - self["aspectratio"] = val + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val - # baseratio + # below + # ----- + @property + def below(self): + """ + Determines if the densitymapbox trace will be inserted before + the layer with the specified ID. By default, densitymapbox + traces are placed below the first layer of type symbol If set + to '', the layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + # coloraxis # --------- @property - def baseratio(self): + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.densitymapbox.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.densitymapbox.c + olorbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.densitymapbox.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + densitymapbox.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.densitymapbox.colorbar.Tit + le instance or dict with compatible properties + titlefont + Deprecated: Please use + densitymapbox.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + densitymapbox.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.densitymapbox.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colorscale + # ---------- + @property + def colorscale(self): """ - Sets the ratio between bottom length and maximum top length. + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'baseratio' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- - int|float + str """ - return self["baseratio"] + return self["colorscale"] - @baseratio.setter - def baseratio(self, val): - self["baseratio"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val # customdata # ---------- @@ -65321,64 +67904,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dlabel - # ------ - @property - def dlabel(self): - """ - Sets the label step. See `label0` for more info. - - The 'dlabel' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dlabel"] - - @dlabel.setter - def dlabel(self, val): - self["dlabel"] = val - - # domain - # ------ - @property - def domain(self): - """ - The 'domain' property is an instance of Domain - that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Domain - - A dict of string/value properties that will be passed - to the Domain constructor - - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this funnelarea - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this funnelarea trace - . - x - Sets the horizontal domain of this funnelarea - trace (in plot fraction). - y - Sets the vertical domain of this funnelarea - trace (in plot fraction). - - Returns - ------- - plotly.graph_objs.funnelarea.Domain - """ - return self["domain"] - - @domain.setter - def domain(self, val): - self["domain"] = val - # hoverinfo # --------- @property @@ -65390,8 +67915,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters - (e.g. 'label+text') + - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -65432,7 +67957,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Hoverlabel + - An instance of plotly.graph_objs.densitymapbox.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -65476,7 +68001,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.funnelarea.Hoverlabel + plotly.graph_objs.densitymapbox.Hoverlabel """ return self["hoverlabel"] @@ -65496,12 +68021,15 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `percent` and `text`. Anything contained in tag `` is displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag @@ -65547,11 +68075,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each sector. If a - single string, the same string appears for all data points. If - an array of string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` must contain a - "text" flag. + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -65630,183 +68158,85 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `textinfo` lying inside the sector. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Insidetextfont - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.funnelarea.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - - # label0 - # ------ - @property - def label0(self): - """ - Alternate to `labels`. Builds a numeric set of labels. Use with - `dlabel` where `label0` is the starting label and `dlabel` the - step. - - The 'label0' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["label0"] - - @label0.setter - def label0(self, val): - self["label0"] = val - - # labels - # ------ + # lat + # --- @property - def labels(self): + def lat(self): """ - Sets the sector labels. If `labels` entries are duplicated, we - sum associated `values` or simply count occurrences if `values` - is not provided. For other array attributes (including color) - we use the first non-empty entry among all occurrences of the - label. + Sets the latitude coordinates (in degrees North). - The 'labels' property is an array that may be specified as a tuple, + The 'lat' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["labels"] + return self["lat"] - @labels.setter - def labels(self, val): - self["labels"] = val + @lat.setter + def lat(self, val): + self["lat"] = val - # labelssrc - # --------- + # latsrc + # ------ @property - def labelssrc(self): + def latsrc(self): """ - Sets the source reference on plot.ly for labels . + Sets the source reference on plot.ly for lat . - The 'labelssrc' property must be specified as a string or + The 'latsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["labelssrc"] + return self["latsrc"] - @labelssrc.setter - def labelssrc(self, val): - self["labelssrc"] = val + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val - # legendgroup - # ----------- + # lon + # --- @property - def legendgroup(self): + def lon(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + Sets the longitude coordinates (in degrees East). - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["legendgroup"] + return self["lon"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @lon.setter + def lon(self, val): + self["lon"] = val - # marker + # lonsrc # ------ @property - def marker(self): + def lonsrc(self): """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Marker - - A dict of string/value properties that will be passed - to the Marker constructor + Sets the source reference on plot.ly for lon . - Supported dict properties: - - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on plot.ly for - colors . - line - plotly.graph_objects.funnelarea.marker.Line - instance or dict with compatible properties + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.funnelarea.Marker + str """ - return self["marker"] + return self["lonsrc"] - @marker.setter - def marker(self, val): - self["marker"] = val + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val # meta # ---- @@ -65898,49 +68328,91 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # scalegroup - # ---------- + # radius + # ------ @property - def scalegroup(self): + def radius(self): """ - If there are multiple funnelareas that should be sized - according to their totals, link them by providing a non-empty - group id here shared by every trace in the same group. + Sets the radius of influence of one `lon` / `lat` point in + pixels. Increasing the value makes the densitymapbox trace + smoother, but less detailed. - The 'scalegroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'radius' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["radius"] + + @radius.setter + def radius(self, val): + self["radius"] = val + + # radiussrc + # --------- + @property + def radiussrc(self): + """ + Sets the source reference on plot.ly for radius . + + The 'radiussrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["scalegroup"] + return self["radiussrc"] - @scalegroup.setter - def scalegroup(self, val): - self["scalegroup"] = val + @radiussrc.setter + def radiussrc(self, val): + self["radiussrc"] = val - # showlegend - # ---------- + # reversescale + # ------------ @property - def showlegend(self): + def reversescale(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. - The 'showlegend' property must be specified as a bool + The 'reversescale' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["showlegend"] + return self["reversescale"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val # stream # ------ @@ -65949,7 +68421,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Stream + - An instance of plotly.graph_objs.densitymapbox.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -65967,7 +68439,7 @@ def stream(self): Returns ------- - plotly.graph_objs.funnelarea.Stream + plotly.graph_objs.densitymapbox.Stream """ return self["stream"] @@ -65975,149 +68447,57 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- - @property - def text(self): - """ - Sets text elements associated with each sector. If trace - `textinfo` contains a "text" flag, these elements will be seen - on the chart. If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in the - hover labels. - - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `textinfo`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Textfont - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.funnelarea.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ + # subplot + # ------- @property - def textposition(self): + def subplot(self): """ - Specifies the location of the `textinfo`. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'none'] - - A tuple, list, or one-dimensional numpy array of the above + Sets a reference between this trace's data coordinates and a + mapbox subplot. If "mapbox" (the default value), the data refer + to `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as the string 'mapbox' + optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) Returns ------- - Any|numpy.ndarray + str """ - return self["textposition"] + return self["subplot"] - @textposition.setter - def textposition(self, val): - self["textposition"] = val + @subplot.setter + def subplot(self, val): + self["subplot"] = val - # textpositionsrc - # --------------- + # text + # ---- @property - def textpositionsrc(self): + def text(self): """ - Sets the source reference on plot.ly for textposition . + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ - return self["textpositionsrc"] + return self["text"] - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val + @text.setter + def text(self, val): + self["text"] = val # textsrc # ------- @@ -66139,44 +68519,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # title - # ----- - @property - def title(self): - """ - The 'title' property is an instance of Title - that may be specified as: - - An instance of plotly.graph_objs.funnelarea.Title - - A dict of string/value properties that will be passed - to the Title constructor - - Supported dict properties: - - font - Sets the font used for `title`. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - position - Specifies the location of the `title`. Note - that the title's position used to be set by the - now deprecated `titleposition` attribute. - text - Sets the title of the chart. If it is empty, no - title is displayed. Note that before the - existence of `title.text`, the title's contents - used to be defined as the `title` attribute - itself. This behavior has been deprecated. - - Returns - ------- - plotly.graph_objs.funnelarea.Title - """ - return self["title"] - - @title.setter - def title(self, val): - self["title"] = val - # uid # --- @property @@ -66232,69 +68574,156 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ + # visible + # ------- @property - def values(self): + def visible(self): """ - Sets the values of the sectors. If omitted, we count - occurrences of each label. + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). - The 'values' property is an array that may be specified as a tuple, + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # z + # - + @property + def z(self): + """ + Sets the points' weight. For example, a value of 10 would be + equivalent to having 10 points of weight 1 in the same spot + + The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["values"] + return self["z"] - @values.setter - def values(self, val): - self["values"] = val + @z.setter + def z(self, val): + self["z"] = val - # valuessrc - # --------- + # zauto + # ----- @property - def valuessrc(self): + def zauto(self): """ - Sets the source reference on plot.ly for values . + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. - The 'valuessrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'zauto' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["valuessrc"] + return self["zauto"] - @valuessrc.setter - def valuessrc(self, val): - self["valuessrc"] = val + @zauto.setter + def zauto(self, val): + self["zauto"] = val - # visible - # ------- + # zmax + # ---- @property - def visible(self): + def zmax(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'zmax' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["visible"] + return self["zmax"] - @visible.setter - def visible(self, val): - self["visible"] = val + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + # zmid + # ---- + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val # type # ---- @@ -66313,11 +68742,41 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - aspectratio - Sets the ratio between height and width - baseratio - Sets the ratio between bottom length and maximum top - length. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.densitymapbox.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -66325,11 +68784,6 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dlabel - Sets the label step. See `label0` for more info. - domain - plotly.graph_objects.funnelarea.Domain instance or dict - with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -66338,8 +68792,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.funnelarea.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.densitymapbox.Hoverlabel instance + or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -66348,27 +68802,31 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -66377,28 +68835,14 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on plot.ly for labels . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.funnelarea.Marker instance or dict - with compatible properties + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on plot.ly for lat . + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on plot.ly for lon . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -66419,37 +68863,37 @@ def _prop_descriptions(self): legend item and on hover. opacity Sets the opacity of the trace. - scalegroup - If there are multiple funnelareas that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on plot.ly for radius . + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.funnelarea.Stream instance or dict - with compatible properties + plotly.graph_objects.densitymapbox.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. textsrc Sets the source reference on plot.ly for text . - title - plotly.graph_objects.funnelarea.Title instance or dict - with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -66472,27 +68916,47 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - aspectratio=None, - baseratio=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, customdata=None, customdatasrc=None, - dlabel=None, - domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -66502,52 +68966,80 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - insidetextfont=None, - label0=None, - labels=None, - labelssrc=None, - legendgroup=None, - marker=None, + lat=None, + latsrc=None, + lon=None, + lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, - scalegroup=None, - showlegend=None, + radius=None, + radiussrc=None, + reversescale=None, + showscale=None, stream=None, + subplot=None, text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, textsrc=None, - title=None, uid=None, uirevision=None, - values=None, - valuessrc=None, visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, **kwargs ): """ - Construct a new Funnelarea object + Construct a new Densitymapbox object - Visualize stages in a process using area-encoded trapezoids. - This trace can be used to show data in a part-to-whole - representation similar to a "pie" trace, wherein each item - appears in a single stage. See also the "funnel" trace type for - a different approach to visualizing funnel data. + Draws a bivariate kernel density estimation with a Gaussian + kernel from `lon` and `lat` coordinates and optional `z` values + using a colorscale. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Funnelarea - aspectratio - Sets the ratio between height and width - baseratio - Sets the ratio between bottom length and maximum top - length. + an instance of plotly.graph_objs.Densitymapbox + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.densitymapbox.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -66555,11 +69047,6 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dlabel - Sets the label step. See `label0` for more info. - domain - plotly.graph_objects.funnelarea.Domain instance or dict - with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -66568,8 +69055,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.funnelarea.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.densitymapbox.Hoverlabel instance + or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -66578,27 +69065,31 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each sector. - If a single string, the same string appears for all - data points. If an array of string, the items are - mapped in order of this trace's sectors. To be seen, - trace `hoverinfo` must contain a "text" flag. + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -66607,28 +69098,14 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextfont - Sets the font used for `textinfo` lying inside the - sector. - label0 - Alternate to `labels`. Builds a numeric set of labels. - Use with `dlabel` where `label0` is the starting label - and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or simply count - occurrences if `values` is not provided. For other - array attributes (including color) we use the first - non-empty entry among all occurrences of the label. - labelssrc - Sets the source reference on plot.ly for labels . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.funnelarea.Marker instance or dict - with compatible properties + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on plot.ly for lat . + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on plot.ly for lon . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -66649,37 +69126,37 @@ def __init__( legend item and on hover. opacity Sets the opacity of the trace. - scalegroup - If there are multiple funnelareas that should be sized - according to their totals, link them by providing a - non-empty group id here shared by every trace in the - same group. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on plot.ly for radius . + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.funnelarea.Stream instance or dict - with compatible properties + plotly.graph_objects.densitymapbox.Stream instance or + dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. text - Sets text elements associated with each sector. If - trace `textinfo` contains a "text" flag, these elements - will be seen on the chart. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. textsrc Sets the source reference on plot.ly for text . - title - plotly.graph_objects.funnelarea.Title instance or dict - with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -66702,299 +69179,861 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we count - occurrences of each label. - valuessrc - Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on plot.ly for z . + + Returns + ------- + Densitymapbox + """ + super(Densitymapbox, self).__init__("densitymapbox") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Densitymapbox +constructor must be a dict or +an instance of plotly.graph_objs.Densitymapbox""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators import densitymapbox as v_densitymapbox + + # Initialize validators + # --------------------- + self._validators["autocolorscale"] = v_densitymapbox.AutocolorscaleValidator() + self._validators["below"] = v_densitymapbox.BelowValidator() + self._validators["coloraxis"] = v_densitymapbox.ColoraxisValidator() + self._validators["colorbar"] = v_densitymapbox.ColorBarValidator() + self._validators["colorscale"] = v_densitymapbox.ColorscaleValidator() + self._validators["customdata"] = v_densitymapbox.CustomdataValidator() + self._validators["customdatasrc"] = v_densitymapbox.CustomdatasrcValidator() + self._validators["hoverinfo"] = v_densitymapbox.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_densitymapbox.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_densitymapbox.HoverlabelValidator() + self._validators["hovertemplate"] = v_densitymapbox.HovertemplateValidator() + self._validators[ + "hovertemplatesrc" + ] = v_densitymapbox.HovertemplatesrcValidator() + self._validators["hovertext"] = v_densitymapbox.HovertextValidator() + self._validators["hovertextsrc"] = v_densitymapbox.HovertextsrcValidator() + self._validators["ids"] = v_densitymapbox.IdsValidator() + self._validators["idssrc"] = v_densitymapbox.IdssrcValidator() + self._validators["lat"] = v_densitymapbox.LatValidator() + self._validators["latsrc"] = v_densitymapbox.LatsrcValidator() + self._validators["lon"] = v_densitymapbox.LonValidator() + self._validators["lonsrc"] = v_densitymapbox.LonsrcValidator() + self._validators["meta"] = v_densitymapbox.MetaValidator() + self._validators["metasrc"] = v_densitymapbox.MetasrcValidator() + self._validators["name"] = v_densitymapbox.NameValidator() + self._validators["opacity"] = v_densitymapbox.OpacityValidator() + self._validators["radius"] = v_densitymapbox.RadiusValidator() + self._validators["radiussrc"] = v_densitymapbox.RadiussrcValidator() + self._validators["reversescale"] = v_densitymapbox.ReversescaleValidator() + self._validators["showscale"] = v_densitymapbox.ShowscaleValidator() + self._validators["stream"] = v_densitymapbox.StreamValidator() + self._validators["subplot"] = v_densitymapbox.SubplotValidator() + self._validators["text"] = v_densitymapbox.TextValidator() + self._validators["textsrc"] = v_densitymapbox.TextsrcValidator() + self._validators["uid"] = v_densitymapbox.UidValidator() + self._validators["uirevision"] = v_densitymapbox.UirevisionValidator() + self._validators["visible"] = v_densitymapbox.VisibleValidator() + self._validators["z"] = v_densitymapbox.ZValidator() + self._validators["zauto"] = v_densitymapbox.ZautoValidator() + self._validators["zmax"] = v_densitymapbox.ZmaxValidator() + self._validators["zmid"] = v_densitymapbox.ZmidValidator() + self._validators["zmin"] = v_densitymapbox.ZminValidator() + self._validators["zsrc"] = v_densitymapbox.ZsrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("below", None) + self["below"] = below if below is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("lat", None) + self["lat"] = lat if lat is not None else _v + _v = arg.pop("latsrc", None) + self["latsrc"] = latsrc if latsrc is not None else _v + _v = arg.pop("lon", None) + self["lon"] = lon if lon is not None else _v + _v = arg.pop("lonsrc", None) + self["lonsrc"] = lonsrc if lonsrc is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("radius", None) + self["radius"] = radius if radius is not None else _v + _v = arg.pop("radiussrc", None) + self["radiussrc"] = radiussrc if radiussrc is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("subplot", None) + self["subplot"] = subplot if subplot is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zauto", None) + self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zmax", None) + self["zmax"] = zmax if zmax is not None else _v + _v = arg.pop("zmid", None) + self["zmid"] = zmid if zmid is not None else _v + _v = arg.pop("zmin", None) + self["zmin"] = zmin if zmin is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v + + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator + + self._props["type"] = "densitymapbox" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="densitymapbox", val="densitymapbox" + ) + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Contourcarpet(_BaseTraceType): + + # a + # - + @property + def a(self): + """ + Sets the x coordinates. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + # a0 + # -- + @property + def a0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'a0' property accepts values of any type + + Returns + ------- + Any + """ + return self["a0"] + + @a0.setter + def a0(self, val): + self["a0"] = val + + # asrc + # ---- + @property + def asrc(self): + """ + Sets the source reference on plot.ly for a . + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + # atype + # ----- + @property + def atype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'atype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["atype"] + + @atype.setter + def atype(self, val): + self["atype"] = val + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # autocontour + # ----------- + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + # b + # - + @property + def b(self): + """ + Sets the y coordinates. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # b0 + # -- + @property + def b0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'b0' property accepts values of any type + + Returns + ------- + Any + """ + return self["b0"] + + @b0.setter + def b0(self, val): + self["b0"] = val + + # bsrc + # ---- + @property + def bsrc(self): + """ + Sets the source reference on plot.ly for b . + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Funnelarea + str """ - super(Funnelarea, self).__init__("funnelarea") - - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Funnelarea -constructor must be a dict or -an instance of plotly.graph_objs.Funnelarea""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators import funnelarea as v_funnelarea + return self["bsrc"] - # Initialize validators - # --------------------- - self._validators["aspectratio"] = v_funnelarea.AspectratioValidator() - self._validators["baseratio"] = v_funnelarea.BaseratioValidator() - self._validators["customdata"] = v_funnelarea.CustomdataValidator() - self._validators["customdatasrc"] = v_funnelarea.CustomdatasrcValidator() - self._validators["dlabel"] = v_funnelarea.DlabelValidator() - self._validators["domain"] = v_funnelarea.DomainValidator() - self._validators["hoverinfo"] = v_funnelarea.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_funnelarea.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_funnelarea.HoverlabelValidator() - self._validators["hovertemplate"] = v_funnelarea.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_funnelarea.HovertemplatesrcValidator() - self._validators["hovertext"] = v_funnelarea.HovertextValidator() - self._validators["hovertextsrc"] = v_funnelarea.HovertextsrcValidator() - self._validators["ids"] = v_funnelarea.IdsValidator() - self._validators["idssrc"] = v_funnelarea.IdssrcValidator() - self._validators["insidetextfont"] = v_funnelarea.InsidetextfontValidator() - self._validators["label0"] = v_funnelarea.Label0Validator() - self._validators["labels"] = v_funnelarea.LabelsValidator() - self._validators["labelssrc"] = v_funnelarea.LabelssrcValidator() - self._validators["legendgroup"] = v_funnelarea.LegendgroupValidator() - self._validators["marker"] = v_funnelarea.MarkerValidator() - self._validators["meta"] = v_funnelarea.MetaValidator() - self._validators["metasrc"] = v_funnelarea.MetasrcValidator() - self._validators["name"] = v_funnelarea.NameValidator() - self._validators["opacity"] = v_funnelarea.OpacityValidator() - self._validators["scalegroup"] = v_funnelarea.ScalegroupValidator() - self._validators["showlegend"] = v_funnelarea.ShowlegendValidator() - self._validators["stream"] = v_funnelarea.StreamValidator() - self._validators["text"] = v_funnelarea.TextValidator() - self._validators["textfont"] = v_funnelarea.TextfontValidator() - self._validators["textinfo"] = v_funnelarea.TextinfoValidator() - self._validators["textposition"] = v_funnelarea.TextpositionValidator() - self._validators["textpositionsrc"] = v_funnelarea.TextpositionsrcValidator() - self._validators["textsrc"] = v_funnelarea.TextsrcValidator() - self._validators["title"] = v_funnelarea.TitleValidator() - self._validators["uid"] = v_funnelarea.UidValidator() - self._validators["uirevision"] = v_funnelarea.UirevisionValidator() - self._validators["values"] = v_funnelarea.ValuesValidator() - self._validators["valuessrc"] = v_funnelarea.ValuessrcValidator() - self._validators["visible"] = v_funnelarea.VisibleValidator() + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("aspectratio", None) - self["aspectratio"] = aspectratio if aspectratio is not None else _v - _v = arg.pop("baseratio", None) - self["baseratio"] = baseratio if baseratio is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dlabel", None) - self["dlabel"] = dlabel if dlabel is not None else _v - _v = arg.pop("domain", None) - self["domain"] = domain if domain is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("label0", None) - self["label0"] = label0 if label0 is not None else _v - _v = arg.pop("labels", None) - self["labels"] = labels if labels is not None else _v - _v = arg.pop("labelssrc", None) - self["labelssrc"] = labelssrc if labelssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("scalegroup", None) - self["scalegroup"] = scalegroup if scalegroup is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("title", None) - self["title"] = title if title is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("values", None) - self["values"] = values if values is not None else _v - _v = arg.pop("valuessrc", None) - self["valuessrc"] = valuessrc if valuessrc is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v + # btype + # ----- + @property + def btype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'btype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + Any + """ + return self["btype"] - self._props["type"] = "funnelarea" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="funnelarea", val="funnelarea" - ) - arg.pop("type", None) + @btype.setter + def btype(self, val): + self["btype"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # carpet + # ------ + @property + def carpet(self): + """ + The `carpet` of the carpet axes on which this contour trace + lies + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + str + """ + return self["carpet"] + @carpet.setter + def carpet(self, val): + self["carpet"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + Returns + ------- + str + """ + return self["coloraxis"] -class Funnel(_BaseTraceType): + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # alignmentgroup - # -------------- + # colorbar + # -------- @property - def alignmentgroup(self): + def colorbar(self): """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.contourcarpet.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.contourcarpet.c + olorbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.contourcarpet.colorbar.tickformatstopdefaults + ), sets the default property values to use for + elements of + contourcarpet.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.contourcarpet.colorbar.Tit + le instance or dict with compatible properties + titlefont + Deprecated: Please use + contourcarpet.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + contourcarpet.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. Returns ------- - str + plotly.graph_objs.contourcarpet.ColorBar """ - return self["alignmentgroup"] + return self["colorbar"] - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val - # cliponaxis + # colorscale # ---------- @property - def cliponaxis(self): + def colorscale(self): """ - Determines whether the text nodes are clipped about the subplot - axes. To show the text nodes above axis lines and tick labels, - make sure to set `xaxis.layer` and `yaxis.layer` to *below - traces*. + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi + ridis,Cividis. - The 'cliponaxis' property must be specified as a bool - (either True, or False) + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] Returns ------- - bool + str """ - return self["cliponaxis"] + return self["colorscale"] - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # connector - # --------- + # contours + # -------- @property - def connector(self): + def contours(self): """ - The 'connector' property is an instance of Connector + The 'contours' property is an instance of Contours that may be specified as: - - An instance of plotly.graph_objs.funnel.Connector + - An instance of plotly.graph_objs.contourcarpet.Contours - A dict of string/value properties that will be passed - to the Connector constructor + to the Contours constructor Supported dict properties: - fillcolor - Sets the fill color. - line - plotly.graph_objects.funnel.connector.Line - instance or dict with compatible properties - visible - Determines if connector regions and lines are - drawn. - - Returns - ------- - plotly.graph_objs.funnel.Connector - """ - return self["connector"] - - @connector.setter - def connector(self, val): - self["connector"] = val - - # constraintext - # ------------- - @property - def constraintext(self): - """ - Constrain the size of text inside or outside a bar to be no - larger than the bar itself. - - The 'constraintext' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'both', 'none'] + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "lines", + coloring is done on the contour lines. If + "none", no coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. Returns ------- - Any + plotly.graph_objs.contourcarpet.Contours """ - return self["constraintext"] + return self["contours"] - @constraintext.setter - def constraintext(self, val): - self["constraintext"] = val + @contours.setter + def contours(self, val): + self["contours"] = val # customdata # ---------- @@ -67039,228 +70078,122 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx + # da # -- @property - def dx(self): + def da(self): """ Sets the x coordinate step. See `x0` for more info. - The 'dx' property is a number and may be specified as: + The 'da' property is a number and may be specified as: - An int or float Returns ------- int|float """ - return self["dx"] + return self["da"] - @dx.setter - def dx(self, val): - self["dx"] = val + @da.setter + def da(self, val): + self["da"] = val - # dy + # db # -- @property - def dy(self): + def db(self): """ Sets the y coordinate step. See `y0` for more info. - The 'dy' property is a number and may be specified as: + The 'db' property is a number and may be specified as: - An int or float Returns ------- int|float """ - return self["dy"] + return self["db"] - @dy.setter - def dy(self, val): - self["dy"] = val + @db.setter + def db(self, val): + self["db"] = val - # hoverinfo + # fillcolor # --------- @property - def hoverinfo(self): - """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. - - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters - (e.g. 'name+x') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on plot.ly for hoverinfo . - - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hoverinfosrc"] - - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val - - # hoverlabel - # ---------- - @property - def hoverlabel(self): - """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.funnel.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . - - Returns - ------- - plotly.graph_objs.funnel.Hoverlabel - """ - return self["hoverlabel"] - - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val - - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variables `percentInitial`, `percentPrevious` and - `percentTotal`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): + def fillcolor(self): """ - Sets the source reference on plot.ly for hovertemplate . + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line color, + marker color, or marker line color, whichever is available. - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to contourcarpet.colorscale Returns ------- str """ - return self["hovertemplatesrc"] + return self["fillcolor"] - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val # hovertext # --------- @property def hovertext(self): """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Same as `text`. - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["hovertext"] @@ -67330,83 +70263,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextanchor - # ---------------- - @property - def insidetextanchor(self): - """ - Determines if texts are kept at center or start/end points in - `textposition` "inside" mode. - - The 'insidetextanchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['end', 'middle', 'start'] - - Returns - ------- - Any - """ - return self["insidetextanchor"] - - @insidetextanchor.setter - def insidetextanchor(self, val): - self["insidetextanchor"] = val - - # insidetextfont - # -------------- - @property - def insidetextfont(self): - """ - Sets the font used for `text` lying inside the bar. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of plotly.graph_objs.funnel.Insidetextfont - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.funnel.Insidetextfont - """ - return self["insidetextfont"] - - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val - # legendgroup # ----------- @property @@ -67430,123 +70286,46 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # marker - # ------ + # line + # ---- @property - def marker(self): + def line(self): """ - The 'marker' property is an instance of Marker + The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.funnel.Marker + - An instance of plotly.graph_objs.contourcarpet.Line - A dict of string/value properties that will be passed - to the Marker constructor + to the Line constructor Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. + color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.funnel.marker.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - line - plotly.graph_objects.funnel.marker.Line - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on plot.ly for - opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". Returns ------- - plotly.graph_objs.funnel.Marker + plotly.graph_objs.contourcarpet.Line """ - return self["marker"] + return self["line"] - @marker.setter - def marker(self, val): - self["marker"] = val + @line.setter + def line(self, val): + self["line"] = val # meta # ---- @@ -67618,50 +70397,29 @@ def name(self): def name(self, val): self["name"] = val - # offset - # ------ - @property - def offset(self): - """ - Shifts the position where the bar is drawn (in position axis - units). In "group" barmode, traces that set "offset" will be - excluded and drawn in "overlay" mode instead. - - The 'offset' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # offsetgroup - # ----------- + # ncontours + # --------- @property - def offsetgroup(self): + def ncontours(self): """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] Returns ------- - str + int """ - return self["offsetgroup"] + return self["ncontours"] - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val # opacity # ------- @@ -67683,110 +70441,27 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- - @property - def orientation(self): - """ - Sets the orientation of the funnels. With "v" ("h"), the value - of the each bar spans along the vertical (horizontal). By - default funnels are tend to be oriented horizontally; unless - only "y" array is presented or orientation is set to "v". Also - regarding graphs including only 'horizontal' funnels, - "autorange" on the "y-axis" are set to "reversed". - - The 'orientation' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['v', 'h'] - - Returns - ------- - Any - """ - return self["orientation"] - - @orientation.setter - def orientation(self, val): - self["orientation"] = val - - # outsidetextfont - # --------------- - @property - def outsidetextfont(self): - """ - Sets the font used for `text` lying outside the bar. - - The 'outsidetextfont' property is an instance of Outsidetextfont - that may be specified as: - - An instance of plotly.graph_objs.funnel.Outsidetextfont - - A dict of string/value properties that will be passed - to the Outsidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.funnel.Outsidetextfont - """ - return self["outsidetextfont"] - - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val - - # selectedpoints - # -------------- + # reversescale + # ------------ @property - def selectedpoints(self): + def reversescale(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. - The 'selectedpoints' property accepts values of any type + The 'reversescale' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["selectedpoints"] + return self["reversescale"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val # showlegend # ---------- @@ -67809,6 +70484,27 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + # stream # ------ @property @@ -67816,7 +70512,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.funnel.Stream + - An instance of plotly.graph_objs.contourcarpet.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -67834,7 +70530,7 @@ def stream(self): Returns ------- - plotly.graph_objs.funnel.Stream + plotly.graph_objs.contourcarpet.Stream """ return self["stream"] @@ -67847,21 +70543,14 @@ def stream(self, val): @property def text(self): """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets the text elements associated with each z value. - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["text"] @@ -67869,159 +70558,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- - @property - def textangle(self): - """ - Sets the angle of the tick labels with respect to the bar. For - example, a `tickangle` of -90 draws the tick labels vertically. - With "auto" the texts may automatically be rotated to fit with - the maximum size in bars. - - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). - - Returns - ------- - int|float - """ - return self["textangle"] - - @textangle.setter - def textangle(self, val): - self["textangle"] = val - - # textfont - # -------- - @property - def textfont(self): - """ - Sets the font used for `text`. - - The 'textfont' property is an instance of Textfont - that may be specified as: - - An instance of plotly.graph_objs.funnel.Textfont - - A dict of string/value properties that will be passed - to the Textfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.funnel.Textfont - """ - return self["textfont"] - - @textfont.setter - def textfont(self, val): - self["textfont"] = val - - # textinfo - # -------- - @property - def textinfo(self): - """ - Determines which trace information appear on the graph. In the - case of having multiple funnels, percentages & totals are - computed separately (per trace). - - The 'textinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters - (e.g. 'label+text') - OR exactly one of ['none'] (e.g. 'none') - - Returns - ------- - Any - """ - return self["textinfo"] - - @textinfo.setter - def textinfo(self, val): - self["textinfo"] = val - - # textposition - # ------------ - @property - def textposition(self): - """ - Specifies the location of the `text`. "inside" positions `text` - inside, next to the bar end (rotated and scaled if needed). - "outside" positions `text` outside, next to the bar end (scaled - if needed), unless there is another bar stacked on this one, - then the text gets pushed inside. "auto" tries to position - `text` inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["textposition"] - - @textposition.setter - def textposition(self, val): - self["textposition"] = val - - # textpositionsrc - # --------------- - @property - def textpositionsrc(self): - """ - Sets the source reference on plot.ly for textposition . - - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textpositionsrc"] - - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val - # textsrc # ------- @property @@ -68042,6 +70578,26 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + # uid # --- @property @@ -68116,70 +70672,9 @@ def visible(self): """ return self["visible"] - @visible.setter - def visible(self, val): - self["visible"] = val - - # width - # ----- - @property - def width(self): - """ - Sets the bar width (in position axis units). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val + @visible.setter + def visible(self, val): + self["visible"] = val # xaxis # ----- @@ -68206,111 +70701,157 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xsrc - # ---- + # yaxis + # ----- @property - def xsrc(self): + def yaxis(self): """ - Sets the source reference on plot.ly for x . + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- str """ - return self["xsrc"] + return self["yaxis"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # y + # z # - @property - def y(self): + def z(self): """ - Sets the y coordinates. + Sets the z data. - The 'y' property is an array that may be specified as a tuple, + The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["y"] + return self["z"] - @y.setter - def y(self, val): - self["y"] = val + @z.setter + def z(self, val): + self["z"] = val - # y0 - # -- + # zauto + # ----- @property - def y0(self): + def zauto(self): """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. - The 'y0' property accepts values of any type + The 'zauto' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["y0"] + return self["zauto"] - @y0.setter - def y0(self, val): - self["y0"] = val + @zauto.setter + def zauto(self, val): + self["zauto"] = val - # yaxis - # ----- + # zmax + # ---- @property - def yaxis(self): + def zmax(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'zmax' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["yaxis"] + return self["zmax"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @zmax.setter + def zmax(self, val): + self["zmax"] = val - # ysrc + # zmid # ---- @property - def ysrc(self): + def zmid(self): """ - Sets the source reference on plot.ly for y . + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. - The 'ysrc' property must be specified as a string or + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + # zmin + # ---- + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + # zsrc + # ---- + @property + def zsrc(self): + """ + Sets the source reference on plot.ly for z . + + The 'zsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["ysrc"] + return self["zsrc"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val # type # ---- @@ -68329,22 +70870,74 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - plotly.graph_objects.funnel.Connector instance or dict - with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on plot.ly for a . + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on plot.ly for b . + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.contourcarpet.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + plotly.graph_objects.contourcarpet.Contours instance or + dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -68352,50 +70945,17 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx + da Sets the x coordinate step. See `x0` for more info. - dy + db Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.funnel.Hoverlabel instance or dict - with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `percentInitial`, - `percentPrevious` and `percentTotal`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Same as `text`. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -68404,18 +70964,13 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - marker - plotly.graph_objects.funnel.Marker instance or dict - with compatible properties + line + plotly.graph_objects.contourcarpet.Line instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -68434,74 +70989,33 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. opacity Sets the opacity of the trace. - orientation - Sets the orientation of the funnels. With "v" ("h"), - the value of the each bar spans along the vertical - (horizontal). By default funnels are tend to be - oriented horizontally; unless only "y" array is - presented or orientation is set to "v". Also regarding - graphs including only 'horizontal' funnels, "autorange" - on the "y-axis" are set to "reversed". - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.funnel.Stream instance or dict - with compatible properties + plotly.graph_objects.contourcarpet.Stream instance or + dict with compatible properties text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple funnels, percentages & - totals are computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets the text elements associated with each z value. textsrc Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -68529,123 +71043,174 @@ def _prop_descriptions(self): "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on plot.ly for z . """ def __init__( self, arg=None, - alignmentgroup=None, - cliponaxis=None, - connector=None, - constraintext=None, + a=None, + a0=None, + asrc=None, + atype=None, + autocolorscale=None, + autocontour=None, + b=None, + b0=None, + bsrc=None, + btype=None, + carpet=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, customdata=None, customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, + da=None, + db=None, + fillcolor=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - insidetextanchor=None, - insidetextfont=None, legendgroup=None, - marker=None, + line=None, meta=None, metasrc=None, name=None, - offset=None, - offsetgroup=None, + ncontours=None, opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, + reversescale=None, showlegend=None, + showscale=None, stream=None, text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, textsrc=None, + transpose=None, uid=None, uirevision=None, visible=None, - width=None, - x=None, - x0=None, xaxis=None, - xsrc=None, - y=None, - y0=None, yaxis=None, - ysrc=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, **kwargs ): """ - Construct a new Funnel object + Construct a new Contourcarpet object - Visualize stages in a process using length-encoded bars. This - trace can be used to show data in either a part-to-whole - representation wherein each item appears in a single stage, or - in a "drop-off" representation wherein each item appears in - each stage it traversed. See also the "funnelarea" trace type - for a different approach to visualizing funnel data. - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Funnel - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - connector - plotly.graph_objects.funnel.Connector instance or dict - with compatible properties - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. + Plots contours on either the first carpet axis or the carpet + axis with a matching `carpet` attribute. Data `z` is + interpreted as matching that of the corresponding carpet axis. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Contourcarpet + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on plot.ly for a . + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on plot.ly for b . + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.contourcarpet.ColorBar instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Greys,YlGnBu,Greens,YlOrR + d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H + ot,Blackbody,Earth,Electric,Viridis,Cividis. + contours + plotly.graph_objects.contourcarpet.Contours instance or + dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -68653,50 +71218,17 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx + da Sets the x coordinate step. See `x0` for more info. - dy + db Sets the y coordinate step. See `y0` for more info. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.funnel.Hoverlabel instance or dict - with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variables `percentInitial`, - `percentPrevious` and `percentTotal`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Same as `text`. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -68705,18 +71237,13 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - marker - plotly.graph_objects.funnel.Marker instance or dict - with compatible properties + line + plotly.graph_objects.contourcarpet.Line instance or + dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -68735,74 +71262,33 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. opacity Sets the opacity of the trace. - orientation - Sets the orientation of the funnels. With "v" ("h"), - the value of the each bar spans along the vertical - (horizontal). By default funnels are tend to be - oriented horizontally; unless only "y" array is - presented or orientation is set to "v". Also regarding - graphs including only 'horizontal' funnels, "autorange" - on the "y-axis" are set to "reversed". - outsidetextfont - Sets the font used for `text` lying outside the bar. - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. stream - plotly.graph_objects.funnel.Stream instance or dict - with compatible properties + plotly.graph_objects.contourcarpet.Stream instance or + dict with compatible properties text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on the graph. - In the case of having multiple funnels, percentages & - totals are computed separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on plot.ly for textposition - . + Sets the text elements associated with each z value. textsrc Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -68830,40 +71316,44 @@ def __init__( "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on plot.ly for z . Returns ------- - Funnel + Contourcarpet """ - super(Funnel, self).__init__("funnel") + super(Contourcarpet, self).__init__("contourcarpet") # Validate arg # ------------ @@ -68876,9 +71366,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Funnel +The first argument to the plotly.graph_objs.Contourcarpet constructor must be a dict or -an instance of plotly.graph_objs.Funnel""" +an instance of plotly.graph_objs.Contourcarpet""" ) # Handle skip_invalid @@ -68887,92 +71377,102 @@ def __init__( # Import validators # ----------------- - from plotly.validators import funnel as v_funnel + from plotly.validators import contourcarpet as v_contourcarpet # Initialize validators # --------------------- - self._validators["alignmentgroup"] = v_funnel.AlignmentgroupValidator() - self._validators["cliponaxis"] = v_funnel.CliponaxisValidator() - self._validators["connector"] = v_funnel.ConnectorValidator() - self._validators["constraintext"] = v_funnel.ConstraintextValidator() - self._validators["customdata"] = v_funnel.CustomdataValidator() - self._validators["customdatasrc"] = v_funnel.CustomdatasrcValidator() - self._validators["dx"] = v_funnel.DxValidator() - self._validators["dy"] = v_funnel.DyValidator() - self._validators["hoverinfo"] = v_funnel.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_funnel.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_funnel.HoverlabelValidator() - self._validators["hovertemplate"] = v_funnel.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_funnel.HovertemplatesrcValidator() - self._validators["hovertext"] = v_funnel.HovertextValidator() - self._validators["hovertextsrc"] = v_funnel.HovertextsrcValidator() - self._validators["ids"] = v_funnel.IdsValidator() - self._validators["idssrc"] = v_funnel.IdssrcValidator() - self._validators["insidetextanchor"] = v_funnel.InsidetextanchorValidator() - self._validators["insidetextfont"] = v_funnel.InsidetextfontValidator() - self._validators["legendgroup"] = v_funnel.LegendgroupValidator() - self._validators["marker"] = v_funnel.MarkerValidator() - self._validators["meta"] = v_funnel.MetaValidator() - self._validators["metasrc"] = v_funnel.MetasrcValidator() - self._validators["name"] = v_funnel.NameValidator() - self._validators["offset"] = v_funnel.OffsetValidator() - self._validators["offsetgroup"] = v_funnel.OffsetgroupValidator() - self._validators["opacity"] = v_funnel.OpacityValidator() - self._validators["orientation"] = v_funnel.OrientationValidator() - self._validators["outsidetextfont"] = v_funnel.OutsidetextfontValidator() - self._validators["selectedpoints"] = v_funnel.SelectedpointsValidator() - self._validators["showlegend"] = v_funnel.ShowlegendValidator() - self._validators["stream"] = v_funnel.StreamValidator() - self._validators["text"] = v_funnel.TextValidator() - self._validators["textangle"] = v_funnel.TextangleValidator() - self._validators["textfont"] = v_funnel.TextfontValidator() - self._validators["textinfo"] = v_funnel.TextinfoValidator() - self._validators["textposition"] = v_funnel.TextpositionValidator() - self._validators["textpositionsrc"] = v_funnel.TextpositionsrcValidator() - self._validators["textsrc"] = v_funnel.TextsrcValidator() - self._validators["uid"] = v_funnel.UidValidator() - self._validators["uirevision"] = v_funnel.UirevisionValidator() - self._validators["visible"] = v_funnel.VisibleValidator() - self._validators["width"] = v_funnel.WidthValidator() - self._validators["x"] = v_funnel.XValidator() - self._validators["x0"] = v_funnel.X0Validator() - self._validators["xaxis"] = v_funnel.XAxisValidator() - self._validators["xsrc"] = v_funnel.XsrcValidator() - self._validators["y"] = v_funnel.YValidator() - self._validators["y0"] = v_funnel.Y0Validator() - self._validators["yaxis"] = v_funnel.YAxisValidator() - self._validators["ysrc"] = v_funnel.YsrcValidator() + self._validators["a"] = v_contourcarpet.AValidator() + self._validators["a0"] = v_contourcarpet.A0Validator() + self._validators["asrc"] = v_contourcarpet.AsrcValidator() + self._validators["atype"] = v_contourcarpet.AtypeValidator() + self._validators["autocolorscale"] = v_contourcarpet.AutocolorscaleValidator() + self._validators["autocontour"] = v_contourcarpet.AutocontourValidator() + self._validators["b"] = v_contourcarpet.BValidator() + self._validators["b0"] = v_contourcarpet.B0Validator() + self._validators["bsrc"] = v_contourcarpet.BsrcValidator() + self._validators["btype"] = v_contourcarpet.BtypeValidator() + self._validators["carpet"] = v_contourcarpet.CarpetValidator() + self._validators["coloraxis"] = v_contourcarpet.ColoraxisValidator() + self._validators["colorbar"] = v_contourcarpet.ColorBarValidator() + self._validators["colorscale"] = v_contourcarpet.ColorscaleValidator() + self._validators["contours"] = v_contourcarpet.ContoursValidator() + self._validators["customdata"] = v_contourcarpet.CustomdataValidator() + self._validators["customdatasrc"] = v_contourcarpet.CustomdatasrcValidator() + self._validators["da"] = v_contourcarpet.DaValidator() + self._validators["db"] = v_contourcarpet.DbValidator() + self._validators["fillcolor"] = v_contourcarpet.FillcolorValidator() + self._validators["hovertext"] = v_contourcarpet.HovertextValidator() + self._validators["hovertextsrc"] = v_contourcarpet.HovertextsrcValidator() + self._validators["ids"] = v_contourcarpet.IdsValidator() + self._validators["idssrc"] = v_contourcarpet.IdssrcValidator() + self._validators["legendgroup"] = v_contourcarpet.LegendgroupValidator() + self._validators["line"] = v_contourcarpet.LineValidator() + self._validators["meta"] = v_contourcarpet.MetaValidator() + self._validators["metasrc"] = v_contourcarpet.MetasrcValidator() + self._validators["name"] = v_contourcarpet.NameValidator() + self._validators["ncontours"] = v_contourcarpet.NcontoursValidator() + self._validators["opacity"] = v_contourcarpet.OpacityValidator() + self._validators["reversescale"] = v_contourcarpet.ReversescaleValidator() + self._validators["showlegend"] = v_contourcarpet.ShowlegendValidator() + self._validators["showscale"] = v_contourcarpet.ShowscaleValidator() + self._validators["stream"] = v_contourcarpet.StreamValidator() + self._validators["text"] = v_contourcarpet.TextValidator() + self._validators["textsrc"] = v_contourcarpet.TextsrcValidator() + self._validators["transpose"] = v_contourcarpet.TransposeValidator() + self._validators["uid"] = v_contourcarpet.UidValidator() + self._validators["uirevision"] = v_contourcarpet.UirevisionValidator() + self._validators["visible"] = v_contourcarpet.VisibleValidator() + self._validators["xaxis"] = v_contourcarpet.XAxisValidator() + self._validators["yaxis"] = v_contourcarpet.YAxisValidator() + self._validators["z"] = v_contourcarpet.ZValidator() + self._validators["zauto"] = v_contourcarpet.ZautoValidator() + self._validators["zmax"] = v_contourcarpet.ZmaxValidator() + self._validators["zmid"] = v_contourcarpet.ZmidValidator() + self._validators["zmin"] = v_contourcarpet.ZminValidator() + self._validators["zsrc"] = v_contourcarpet.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("connector", None) - self["connector"] = connector if connector is not None else _v - _v = arg.pop("constraintext", None) - self["constraintext"] = constraintext if constraintext is not None else _v + _v = arg.pop("a", None) + self["a"] = a if a is not None else _v + _v = arg.pop("a0", None) + self["a0"] = a0 if a0 is not None else _v + _v = arg.pop("asrc", None) + self["asrc"] = asrc if asrc is not None else _v + _v = arg.pop("atype", None) + self["atype"] = atype if atype is not None else _v + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("autocontour", None) + self["autocontour"] = autocontour if autocontour is not None else _v + _v = arg.pop("b", None) + self["b"] = b if b is not None else _v + _v = arg.pop("b0", None) + self["b0"] = b0 if b0 is not None else _v + _v = arg.pop("bsrc", None) + self["bsrc"] = bsrc if bsrc is not None else _v + _v = arg.pop("btype", None) + self["btype"] = btype if btype is not None else _v + _v = arg.pop("carpet", None) + self["carpet"] = carpet if carpet is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("contours", None) + self["contours"] = contours if contours is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) + _v = arg.pop("da", None) + self["da"] = da if da is not None else _v + _v = arg.pop("db", None) + self["db"] = db if db is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hovertext", None) self["hovertext"] = hovertext if hovertext is not None else _v _v = arg.pop("hovertextsrc", None) @@ -68981,84 +71481,64 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextanchor", None) - self["insidetextanchor"] = ( - insidetextanchor if insidetextanchor is not None else _v - ) - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v + _v = arg.pop("ncontours", None) + self["ncontours"] = ncontours if ncontours is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textinfo", None) - self["textinfo"] = textinfo if textinfo is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("transpose", None) + self["transpose"] = transpose if transpose is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("z", None) + self["z"] = z if z is not None else _v + _v = arg.pop("zauto", None) + self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zmax", None) + self["zmax"] = zmax if zmax is not None else _v + _v = arg.pop("zmid", None) + self["zmid"] = zmid if zmid is not None else _v + _v = arg.pop("zmin", None) + self["zmin"] = zmin if zmin is not None else _v + _v = arg.pop("zsrc", None) + self["zsrc"] = zsrc if zsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "funnel" + self._props["type"] = "contourcarpet" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="funnel", val="funnel" + plotly_name="type", parent_name="contourcarpet", val="contourcarpet" ) arg.pop("type", None) @@ -69075,7 +71555,7 @@ def __init__( import copy as _copy -class Densitymapbox(_BaseTraceType): +class Contour(_BaseTraceType): # autocolorscale # -------------- @@ -69102,29 +71582,28 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # below - # ----- + # autocontour + # ----------- @property - def below(self): + def autocontour(self): """ - Determines if the densitymapbox trace will be inserted before - the layer with the specified ID. By default, densitymapbox - traces are placed below the first layer of type symbol If set - to '', the layer will be inserted above every existing layer. + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. - The 'below' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'autocontour' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["below"] + return self["autocontour"] - @below.setter - def below(self, val): - self["below"] = val + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val # coloraxis # --------- @@ -69160,7 +71639,7 @@ def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.densitymapbox.ColorBar + - An instance of plotly.graph_objs.contour.ColorBar - A dict of string/value properties that will be passed to the ColorBar constructor @@ -69292,15 +71771,14 @@ def colorbar(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.densitymapbox.c - olorbar.Tickformatstop instances or dicts with + A tuple of plotly.graph_objects.contour.colorba + r.Tickformatstop instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.dat - a.densitymapbox.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - densitymapbox.colorbar.tickformatstops + a.contour.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of contour.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -69341,21 +71819,21 @@ def colorbar(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.densitymapbox.colorbar.Tit - le instance or dict with compatible properties + plotly.graph_objects.contour.colorbar.Title + instance or dict with compatible properties titlefont Deprecated: Please use - densitymapbox.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. + contour.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's + font used to be set by the now deprecated + `titlefont` attribute. titleside Deprecated: Please use - densitymapbox.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. + contour.colorbar.title.side instead. Determines + the location of color bar's title with respect + to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. x Sets the x position of the color bar (in plot fraction). @@ -69380,7 +71858,7 @@ def colorbar(self): Returns ------- - plotly.graph_objs.densitymapbox.ColorBar + plotly.graph_objs.contour.ColorBar """ return self["colorbar"] @@ -69439,6 +71917,114 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val + # connectgaps + # ----------- + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. + + The 'connectgaps' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + # contours + # -------- + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of plotly.graph_objs.contour.Contours + - A dict of string/value properties that will be passed + to the Contours constructor + + Supported dict properties: + + coloring + Determines the coloring method showing the + contour values. If "fill", coloring is done + evenly between each contour level If "heatmap", + a heatmap gradient coloring is applied between + each contour level. If "lines", coloring is + done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more + than `contours.start` + labelfont + Sets the font used for labeling the contour + levels. The default color comes from the lines, + if shown. The default family and size come from + `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-language which is very similar + to Python, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + operation + Sets the constraint operation. "=" keeps + regions equal to `value` "<" and "<=" keep + regions less than `value` ">" and ">=" keep + regions greater than `value` "[]", "()", "[)", + and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions + outside `value[0]` to value[1]` Open vs. closed + intervals make no difference to constraint + display, but all versions are allowed for + consistency with filter transforms. + showlabels + Determines whether to label the contour lines + with their values. + showlines + Determines whether or not the contour lines are + drawn. Has an effect only if + `contours.coloring` is set to "fill". + size + Sets the step between each contour level. Must + be positive. + start + Sets the starting contour level value. Must be + less than `contours.end` + type + If `levels`, the data is represented as a + contour plot with multiple levels displayed. If + `constraint`, the data is represented as + constraints with the invalid region shaded as + specified by the `operation` and `value` + parameters. + value + Sets the value or values of the constraint + boundary. When `operation` is set to one of the + comparison values (=,<,>=,>,<=) "value" is + expected to be a number. When `operation` is + set to one of the interval values + ([],(),[),(],][,)(,](,)[) "value" is expected + to be an array of two numbers where the first + is the lower bound and the second is the upper + bound. + + Returns + ------- + plotly.graph_objs.contour.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + # customdata # ---------- @property @@ -69482,6 +72068,109 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val + # dx + # -- + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # fillcolor + # --------- + @property + def fillcolor(self): + """ + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line color, + marker color, or marker line color, whichever is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A number that will be interpreted as a color + according to contour.colorscale + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + # hoverinfo # --------- @property @@ -69493,8 +72182,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'lon+lat') + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -69535,7 +72224,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.densitymapbox.Hoverlabel + - An instance of plotly.graph_objs.contour.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -69579,7 +72268,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.densitymapbox.Hoverlabel + plotly.graph_objs.contour.Hoverlabel """ return self["hoverlabel"] @@ -69599,7 +72288,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -69649,20 +72342,14 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Sets hover text elements associated with each (lon,lat) pair If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Same as `text`. - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["hovertext"] @@ -69732,85 +72419,69 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- - @property - def lat(self): - """ - Sets the latitude coordinates (in degrees North). - - The 'lat' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lat"] - - @lat.setter - def lat(self, val): - self["lat"] = val - - # latsrc - # ------ + # legendgroup + # ----------- @property - def latsrc(self): + def legendgroup(self): """ - Sets the source reference on plot.ly for lat . + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - The 'latsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["latsrc"] - - @latsrc.setter - def latsrc(self, val): - self["latsrc"] = val - - # lon - # --- - @property - def lon(self): - """ - Sets the longitude coordinates (in degrees East). - - The 'lon' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["lon"] + return self["legendgroup"] - @lon.setter - def lon(self, val): - self["lon"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # lonsrc - # ------ + # line + # ---- @property - def lonsrc(self): + def line(self): """ - Sets the source reference on plot.ly for lon . + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.contour.Line + - A dict of string/value properties that will be passed + to the Line constructor - The 'lonsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + color + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". + dash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour + lines, where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". Returns ------- - str + plotly.graph_objs.contour.Line """ - return self["lonsrc"] + return self["line"] - @lonsrc.setter - def lonsrc(self, val): - self["lonsrc"] = val + @line.setter + def line(self, val): + self["line"] = val # meta # ---- @@ -69882,6 +72553,30 @@ def name(self): def name(self, val): self["name"] = val + # ncontours + # --------- + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + # opacity # ------- @property @@ -69902,49 +72597,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # radius - # ------ - @property - def radius(self): - """ - Sets the radius of influence of one `lon` / `lat` point in - pixels. Increasing the value makes the densitymapbox trace - smoother, but less detailed. - - The 'radius' property is a number and may be specified as: - - An int or float in the interval [1, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["radius"] - - @radius.setter - def radius(self, val): - self["radius"] = val - - # radiussrc - # --------- - @property - def radiussrc(self): - """ - Sets the source reference on plot.ly for radius . - - The 'radiussrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["radiussrc"] - - @radiussrc.setter - def radiussrc(self, val): - self["radiussrc"] = val - # reversescale # ------------ @property @@ -69967,6 +72619,27 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + # showscale # --------- @property @@ -69995,7 +72668,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.densitymapbox.Stream + - An instance of plotly.graph_objs.contour.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -70013,7 +72686,7 @@ def stream(self): Returns ------- - plotly.graph_objs.densitymapbox.Stream + plotly.graph_objs.contour.Stream """ return self["stream"] @@ -70021,51 +72694,19 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - mapbox subplot. If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data refer to - `layout.mapbox2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'mapbox', that may be specified as the string 'mapbox' - optionally followed by an integer >= 1 - (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - # text # ---- @property def text(self): """ - Sets text elements associated with each (lon,lat) pair If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (lon,lat) coordinates. If trace `hoverinfo` - contains a "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. + Sets the text elements associated with each z value. - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ return self["text"] @@ -70093,6 +72734,26 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # transpose + # --------- + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + # uid # --- @property @@ -70171,13 +72832,280 @@ def visible(self): def visible(self, val): self["visible"] = val + # x + # - + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + # xaxis + # ----- + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + # xsrc + # ---- + @property + def xsrc(self): + """ + Sets the source reference on plot.ly for x . + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # xtype + # ----- + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + + # y + # - + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # y0 + # -- + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + # ysrc + # ---- + @property + def ysrc(self): + """ + Sets the source reference on plot.ly for y . + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + # ytype + # ----- + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + # z # - @property def z(self): """ - Sets the points' weight. For example, a value of 10 would be - equivalent to having 10 points of weight 1 in the same spot + Sets the z data. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -70215,6 +73143,30 @@ def zauto(self): def zauto(self, val): self["zauto"] = val + # zhoverformat + # ------------ + @property + def zhoverformat(self): + """ + Sets the hover text formatting rule using d3 formatting mini- + languages which are very similar to those in Python. See: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + # zmax # ---- @property @@ -70323,12 +73275,11 @@ def _prop_descriptions(self): `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - below - Determines if the densitymapbox trace will be inserted - before the layer with the specified ID. By default, - densitymapbox traces are placed below the first layer - of type symbol If set to '', the layer will be inserted - above every existing layer. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -70337,8 +73288,8 @@ def _prop_descriptions(self): `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.densitymapbox.ColorBar instance or - dict with compatible properties + plotly.graph_objects.contour.ColorBar instance or dict + with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -70351,6 +73302,12 @@ def _prop_descriptions(self): string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + plotly.graph_objects.contour.Contours instance or dict + with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -70358,6 +73315,15 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -70366,8 +73332,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.densitymapbox.Hoverlabel instance - or dict with compatible properties + plotly.graph_objects.contour.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -70376,7 +73342,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -70390,12 +73361,7 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Same as `text`. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -70404,14 +73370,13 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on plot.ly for lat . - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on plot.ly for lon . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.contour.Line instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -70430,39 +73395,33 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. opacity Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / `lat` point - in pixels. Increasing the value makes the densitymapbox - trace smoother, but less detailed. - radiussrc - Sets the source reference on plot.ly for radius . reversescale Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. showscale Determines whether or not a colorbar is displayed for this trace. stream - plotly.graph_objects.densitymapbox.Stream instance or - dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. + plotly.graph_objects.contour.Stream instance or dict + with compatible properties text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets the text elements associated with each z value. textsrc Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -70490,15 +73449,60 @@ def _prop_descriptions(self): "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) z - Sets the points' weight. For example, a value of 10 - would be equivalent to having 10 points of weight 1 in - the same spot + Sets the z data. zauto Determines whether or not the color domain is computed with respect to the input data (here in `z`) or the bounds set in `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format zmax Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must @@ -70520,12 +73524,17 @@ def __init__( self, arg=None, autocolorscale=None, - below=None, + autocontour=None, coloraxis=None, colorbar=None, colorscale=None, + connectgaps=None, + contours=None, customdata=None, customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -70535,27 +73544,38 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - lat=None, - latsrc=None, - lon=None, - lonsrc=None, + legendgroup=None, + line=None, meta=None, metasrc=None, name=None, + ncontours=None, opacity=None, - radius=None, - radiussrc=None, reversescale=None, + showlegend=None, showscale=None, stream=None, - subplot=None, text=None, textsrc=None, + transpose=None, uid=None, uirevision=None, visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ysrc=None, + ytype=None, z=None, zauto=None, + zhoverformat=None, zmax=None, zmid=None, zmin=None, @@ -70563,17 +73583,21 @@ def __init__( **kwargs ): """ - Construct a new Densitymapbox object + Construct a new Contour object - Draws a bivariate kernel density estimation with a Gaussian - kernel from `lon` and `lat` coordinates and optional `z` values - using a colorscale. + The data from which contour lines are computed is set in `z`. + Data in `z` must be a 2D list of numbers. Say that `z` has N + rows and M columns, then by default, these N rows correspond to + N y coordinates (set in `y` or auto-generated) and the M + columns correspond to M x coordinates (set in `x` or auto- + generated). By setting `transpose` to True, the above behavior + is flipped. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Densitymapbox + an instance of plotly.graph_objs.Contour autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -70581,12 +73605,11 @@ def __init__( `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - below - Determines if the densitymapbox trace will be inserted - before the layer with the specified ID. By default, - densitymapbox traces are placed below the first layer - of type symbol If set to '', the layer will be inserted - above every existing layer. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -70595,8 +73618,8 @@ def __init__( `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.densitymapbox.ColorBar instance or - dict with compatible properties + plotly.graph_objects.contour.ColorBar instance or dict + with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -70609,6 +73632,12 @@ def __init__( string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + plotly.graph_objects.contour.Contours instance or dict + with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -70616,6 +73645,15 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -70624,8 +73662,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.densitymapbox.Hoverlabel instance - or dict with compatible properties + plotly.graph_objects.contour.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -70634,7 +73672,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -70648,12 +73691,7 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Sets hover text elements associated with each (lon,lat) - pair If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (lon,lat) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Same as `text`. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -70662,14 +73700,13 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lat - Sets the latitude coordinates (in degrees North). - latsrc - Sets the source reference on plot.ly for lat . - lon - Sets the longitude coordinates (in degrees East). - lonsrc - Sets the source reference on plot.ly for lon . + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.contour.Line instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -70688,39 +73725,33 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. opacity Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / `lat` point - in pixels. Increasing the value makes the densitymapbox - trace smoother, but less detailed. - radiussrc - Sets the source reference on plot.ly for radius . reversescale Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. showscale Determines whether or not a colorbar is displayed for this trace. stream - plotly.graph_objects.densitymapbox.Stream instance or - dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. + plotly.graph_objects.contour.Stream instance or dict + with compatible properties text - Sets text elements associated with each (lon,lat) pair - If a single string, the same string appears over all - the data points. If an array of string, the items are - mapped in order to the this trace's (lon,lat) - coordinates. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Sets the text elements associated with each z value. textsrc Sets the source reference on plot.ly for text . + transpose + Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -70748,15 +73779,60 @@ def __init__( "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ysrc + Sets the source reference on plot.ly for y . + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) z - Sets the points' weight. For example, a value of 10 - would be equivalent to having 10 points of weight 1 in - the same spot + Sets the z data. zauto Determines whether or not the color domain is computed with respect to the input data (here in `z`) or the bounds set in `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. See: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format zmax Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must @@ -70775,9 +73851,9 @@ def __init__( Returns ------- - Densitymapbox + Contour """ - super(Densitymapbox, self).__init__("densitymapbox") + super(Contour, self).__init__("contour") # Validate arg # ------------ @@ -70790,9 +73866,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Densitymapbox +The first argument to the plotly.graph_objs.Contour constructor must be a dict or -an instance of plotly.graph_objs.Densitymapbox""" +an instance of plotly.graph_objs.Contour""" ) # Handle skip_invalid @@ -70801,70 +73877,94 @@ def __init__( # Import validators # ----------------- - from plotly.validators import densitymapbox as v_densitymapbox + from plotly.validators import contour as v_contour # Initialize validators # --------------------- - self._validators["autocolorscale"] = v_densitymapbox.AutocolorscaleValidator() - self._validators["below"] = v_densitymapbox.BelowValidator() - self._validators["coloraxis"] = v_densitymapbox.ColoraxisValidator() - self._validators["colorbar"] = v_densitymapbox.ColorBarValidator() - self._validators["colorscale"] = v_densitymapbox.ColorscaleValidator() - self._validators["customdata"] = v_densitymapbox.CustomdataValidator() - self._validators["customdatasrc"] = v_densitymapbox.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_densitymapbox.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_densitymapbox.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_densitymapbox.HoverlabelValidator() - self._validators["hovertemplate"] = v_densitymapbox.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_densitymapbox.HovertemplatesrcValidator() - self._validators["hovertext"] = v_densitymapbox.HovertextValidator() - self._validators["hovertextsrc"] = v_densitymapbox.HovertextsrcValidator() - self._validators["ids"] = v_densitymapbox.IdsValidator() - self._validators["idssrc"] = v_densitymapbox.IdssrcValidator() - self._validators["lat"] = v_densitymapbox.LatValidator() - self._validators["latsrc"] = v_densitymapbox.LatsrcValidator() - self._validators["lon"] = v_densitymapbox.LonValidator() - self._validators["lonsrc"] = v_densitymapbox.LonsrcValidator() - self._validators["meta"] = v_densitymapbox.MetaValidator() - self._validators["metasrc"] = v_densitymapbox.MetasrcValidator() - self._validators["name"] = v_densitymapbox.NameValidator() - self._validators["opacity"] = v_densitymapbox.OpacityValidator() - self._validators["radius"] = v_densitymapbox.RadiusValidator() - self._validators["radiussrc"] = v_densitymapbox.RadiussrcValidator() - self._validators["reversescale"] = v_densitymapbox.ReversescaleValidator() - self._validators["showscale"] = v_densitymapbox.ShowscaleValidator() - self._validators["stream"] = v_densitymapbox.StreamValidator() - self._validators["subplot"] = v_densitymapbox.SubplotValidator() - self._validators["text"] = v_densitymapbox.TextValidator() - self._validators["textsrc"] = v_densitymapbox.TextsrcValidator() - self._validators["uid"] = v_densitymapbox.UidValidator() - self._validators["uirevision"] = v_densitymapbox.UirevisionValidator() - self._validators["visible"] = v_densitymapbox.VisibleValidator() - self._validators["z"] = v_densitymapbox.ZValidator() - self._validators["zauto"] = v_densitymapbox.ZautoValidator() - self._validators["zmax"] = v_densitymapbox.ZmaxValidator() - self._validators["zmid"] = v_densitymapbox.ZmidValidator() - self._validators["zmin"] = v_densitymapbox.ZminValidator() - self._validators["zsrc"] = v_densitymapbox.ZsrcValidator() + self._validators["autocolorscale"] = v_contour.AutocolorscaleValidator() + self._validators["autocontour"] = v_contour.AutocontourValidator() + self._validators["coloraxis"] = v_contour.ColoraxisValidator() + self._validators["colorbar"] = v_contour.ColorBarValidator() + self._validators["colorscale"] = v_contour.ColorscaleValidator() + self._validators["connectgaps"] = v_contour.ConnectgapsValidator() + self._validators["contours"] = v_contour.ContoursValidator() + self._validators["customdata"] = v_contour.CustomdataValidator() + self._validators["customdatasrc"] = v_contour.CustomdatasrcValidator() + self._validators["dx"] = v_contour.DxValidator() + self._validators["dy"] = v_contour.DyValidator() + self._validators["fillcolor"] = v_contour.FillcolorValidator() + self._validators["hoverinfo"] = v_contour.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_contour.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_contour.HoverlabelValidator() + self._validators["hovertemplate"] = v_contour.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_contour.HovertemplatesrcValidator() + self._validators["hovertext"] = v_contour.HovertextValidator() + self._validators["hovertextsrc"] = v_contour.HovertextsrcValidator() + self._validators["ids"] = v_contour.IdsValidator() + self._validators["idssrc"] = v_contour.IdssrcValidator() + self._validators["legendgroup"] = v_contour.LegendgroupValidator() + self._validators["line"] = v_contour.LineValidator() + self._validators["meta"] = v_contour.MetaValidator() + self._validators["metasrc"] = v_contour.MetasrcValidator() + self._validators["name"] = v_contour.NameValidator() + self._validators["ncontours"] = v_contour.NcontoursValidator() + self._validators["opacity"] = v_contour.OpacityValidator() + self._validators["reversescale"] = v_contour.ReversescaleValidator() + self._validators["showlegend"] = v_contour.ShowlegendValidator() + self._validators["showscale"] = v_contour.ShowscaleValidator() + self._validators["stream"] = v_contour.StreamValidator() + self._validators["text"] = v_contour.TextValidator() + self._validators["textsrc"] = v_contour.TextsrcValidator() + self._validators["transpose"] = v_contour.TransposeValidator() + self._validators["uid"] = v_contour.UidValidator() + self._validators["uirevision"] = v_contour.UirevisionValidator() + self._validators["visible"] = v_contour.VisibleValidator() + self._validators["x"] = v_contour.XValidator() + self._validators["x0"] = v_contour.X0Validator() + self._validators["xaxis"] = v_contour.XAxisValidator() + self._validators["xcalendar"] = v_contour.XcalendarValidator() + self._validators["xsrc"] = v_contour.XsrcValidator() + self._validators["xtype"] = v_contour.XtypeValidator() + self._validators["y"] = v_contour.YValidator() + self._validators["y0"] = v_contour.Y0Validator() + self._validators["yaxis"] = v_contour.YAxisValidator() + self._validators["ycalendar"] = v_contour.YcalendarValidator() + self._validators["ysrc"] = v_contour.YsrcValidator() + self._validators["ytype"] = v_contour.YtypeValidator() + self._validators["z"] = v_contour.ZValidator() + self._validators["zauto"] = v_contour.ZautoValidator() + self._validators["zhoverformat"] = v_contour.ZhoverformatValidator() + self._validators["zmax"] = v_contour.ZmaxValidator() + self._validators["zmid"] = v_contour.ZmidValidator() + self._validators["zmin"] = v_contour.ZminValidator() + self._validators["zsrc"] = v_contour.ZsrcValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop("autocolorscale", None) self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v + _v = arg.pop("autocontour", None) + self["autocontour"] = autocontour if autocontour is not None else _v _v = arg.pop("coloraxis", None) self["coloraxis"] = coloraxis if coloraxis is not None else _v _v = arg.pop("colorbar", None) self["colorbar"] = colorbar if colorbar is not None else _v _v = arg.pop("colorscale", None) self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("connectgaps", None) + self["connectgaps"] = connectgaps if connectgaps is not None else _v + _v = arg.pop("contours", None) + self["contours"] = contours if contours is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -70885,48 +73985,70 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lat", None) - self["lat"] = lat if lat is not None else _v - _v = arg.pop("latsrc", None) - self["latsrc"] = latsrc if latsrc is not None else _v - _v = arg.pop("lon", None) - self["lon"] = lon if lon is not None else _v - _v = arg.pop("lonsrc", None) - self["lonsrc"] = lonsrc if lonsrc is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v + _v = arg.pop("ncontours", None) + self["ncontours"] = ncontours if ncontours is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("radius", None) - self["radius"] = radius if radius is not None else _v - _v = arg.pop("radiussrc", None) - self["radiussrc"] = radiussrc if radiussrc is not None else _v _v = arg.pop("reversescale", None) self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("showscale", None) self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("transpose", None) + self["transpose"] = transpose if transpose is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("xtype", None) + self["xtype"] = xtype if xtype is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v + _v = arg.pop("ytype", None) + self["ytype"] = ytype if ytype is not None else _v _v = arg.pop("z", None) self["z"] = z if z is not None else _v _v = arg.pop("zauto", None) self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zhoverformat", None) + self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v _v = arg.pop("zmax", None) self["zmax"] = zmax if zmax is not None else _v _v = arg.pop("zmid", None) @@ -70940,9 +74062,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "densitymapbox" + self._props["type"] = "contour" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="densitymapbox", val="densitymapbox" + plotly_name="type", parent_name="contour", val="contour" ) arg.pop("type", None) @@ -70959,92 +74081,30 @@ def __init__( import copy as _copy -class Contourcarpet(_BaseTraceType): - - # a - # - - @property - def a(self): - """ - Sets the x coordinates. - - The 'a' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["a"] - - @a.setter - def a(self, val): - self["a"] = val - - # a0 - # -- - @property - def a0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'a0' property accepts values of any type - - Returns - ------- - Any - """ - return self["a0"] - - @a0.setter - def a0(self, val): - self["a0"] = val - - # asrc - # ---- - @property - def asrc(self): - """ - Sets the source reference on plot.ly for a . - - The 'asrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val +class Cone(_BaseTraceType): - # atype - # ----- + # anchor + # ------ @property - def atype(self): + def anchor(self): """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). + Sets the cones' anchor with respect to their x/y/z positions. + Note that "cm" denote the cone's center of mass which + corresponds to 1/4 from the tail to tip. - The 'atype' property is an enumeration that may be specified as: + The 'anchor' property is an enumeration that may be specified as: - One of the following enumeration values: - ['array', 'scaled'] + ['tip', 'tail', 'cm', 'center'] Returns ------- Any """ - return self["atype"] + return self["anchor"] - @atype.setter - def atype(self, val): - self["atype"] = val + @anchor.setter + def anchor(self, val): + self["anchor"] = val # autocolorscale # -------------- @@ -71071,135 +74131,95 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # autocontour - # ----------- + # cauto + # ----- @property - def autocontour(self): + def cauto(self): """ - Determines whether or not the contour level attributes are - picked by an algorithm. If True, the number of contour levels - can be set in `ncontours`. If False, set the contour level - attributes in `contours`. + Determines whether or not the color domain is computed with + respect to the input data (here u/v/w norm) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and + `cmax` are set by the user. - The 'autocontour' property must be specified as a bool + The 'cauto' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["autocontour"] - - @autocontour.setter - def autocontour(self, val): - self["autocontour"] = val - - # b - # - - @property - def b(self): - """ - Sets the y coordinates. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["b"] - - @b.setter - def b(self, val): - self["b"] = val - - # b0 - # -- - @property - def b0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'b0' property accepts values of any type - - Returns - ------- - Any - """ - return self["b0"] + return self["cauto"] - @b0.setter - def b0(self, val): - self["b0"] = val + @cauto.setter + def cauto(self, val): + self["cauto"] = val - # bsrc + # cmax # ---- @property - def bsrc(self): + def cmax(self): """ - Sets the source reference on plot.ly for b . + Sets the upper bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmin` must be set as + well. - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'cmax' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["bsrc"] + return self["cmax"] - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val + @cmax.setter + def cmax(self, val): + self["cmax"] = val - # btype - # ----- + # cmid + # ---- @property - def btype(self): + def cmid(self): """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as u/v/w norm. Has no effect when `cauto` is + `false`. - The 'btype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] + The 'cmid' property is a number and may be specified as: + - An int or float Returns ------- - Any + int|float """ - return self["btype"] + return self["cmid"] - @btype.setter - def btype(self, val): - self["btype"] = val + @cmid.setter + def cmid(self, val): + self["cmid"] = val - # carpet - # ------ + # cmin + # ---- @property - def carpet(self): + def cmin(self): """ - The `carpet` of the carpet axes on which this contour trace - lies + Sets the lower bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmax` must be set as + well. - The 'carpet' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'cmin' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["carpet"] + return self["cmin"] - @carpet.setter - def carpet(self, val): - self["carpet"] = val + @cmin.setter + def cmin(self, val): + self["cmin"] = val # coloraxis # --------- @@ -71235,7 +74255,7 @@ def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.contourcarpet.ColorBar + - An instance of plotly.graph_objs.cone.ColorBar - A dict of string/value properties that will be passed to the ColorBar constructor @@ -71367,15 +74387,14 @@ def colorbar(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.contourcarpet.c - olorbar.Tickformatstop instances or dicts with + A tuple of plotly.graph_objects.cone.colorbar.T + ickformatstop instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.dat - a.contourcarpet.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - contourcarpet.colorbar.tickformatstops + a.cone.colorbar.tickformatstopdefaults), sets + the default property values to use for elements + of cone.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -71416,20 +74435,18 @@ def colorbar(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.contourcarpet.colorbar.Tit - le instance or dict with compatible properties + plotly.graph_objects.cone.colorbar.Title + instance or dict with compatible properties titlefont - Deprecated: Please use - contourcarpet.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now + Deprecated: Please use cone.colorbar.title.font + instead. Sets this color bar's title font. Note + that the title's font used to be set by the now deprecated `titlefont` attribute. titleside - Deprecated: Please use - contourcarpet.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now + Deprecated: Please use cone.colorbar.title.side + instead. Determines the location of color bar's + title with respect to the color bar. Note that + the title's location used to be set by the now deprecated `titleside` attribute. x Sets the x position of the color bar (in plot @@ -71455,7 +74472,7 @@ def colorbar(self): Returns ------- - plotly.graph_objs.contourcarpet.ColorBar + plotly.graph_objs.cone.ColorBar """ return self["colorbar"] @@ -71473,7 +74490,7 @@ def colorscale(self): hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. + bounds of the colorscale in color space, use`cmin` and `cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi @@ -71514,91 +74531,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of plotly.graph_objs.contourcarpet.Contours - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "lines", - coloring is done on the contour lines. If - "none", no coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - - Returns - ------- - plotly.graph_objs.contourcarpet.Contours - """ - return self["contours"] - - @contours.setter - def contours(self, val): - self["contours"] = val - # customdata # ---------- @property @@ -71642,109 +74574,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # da - # -- - @property - def da(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'da' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["da"] - - @da.setter - def da(self, val): - self["da"] = val - - # db - # -- - @property - def db(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'db' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["db"] - - @db.setter - def db(self, val): - self["db"] = val - - # fillcolor - # --------- - @property - def fillcolor(self): - """ - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line color, - marker color, or marker line color, whichever is available. - - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to contourcarpet.colorscale - - Returns - ------- - str - """ - return self["fillcolor"] - - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val - # hoverinfo # --------- @property @@ -71756,7 +74585,7 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -71798,7 +74627,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.contourcarpet.Hoverlabel + - An instance of plotly.graph_objs.cone.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -71842,7 +74671,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.contourcarpet.Hoverlabel + plotly.graph_objs.cone.Hoverlabel """ return self["hoverlabel"] @@ -71850,6 +74679,67 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + variable `norm` Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + # hovertext # --------- @property @@ -71857,12 +74747,14 @@ def hovertext(self): """ Same as `text`. - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["hovertext"] @@ -71932,65 +74824,86 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legendgroup - # ----------- + # lighting + # -------- @property - def legendgroup(self): + def lighting(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of plotly.graph_objs.cone.Lighting + - A dict of string/value properties that will be passed + to the Lighting constructor - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + ambient + Ambient light increases overall color + visibility but can wash out the image. + diffuse + Represents the extent that incident rays are + reflected in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids + math issues arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of + the viewing angle; e.g. paper is reflective + when viewing it from the edge of the paper + (almost 90 degrees), causing shine. + roughness + Alters specular reflection; the rougher the + surface, the wider and less contrasty the + shine. + specular + Represents the level that incident rays are + reflected in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids + math issues arising from degenerate geometry. Returns ------- - str + plotly.graph_objs.cone.Lighting """ - return self["legendgroup"] + return self["lighting"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @lighting.setter + def lighting(self, val): + self["lighting"] = val - # line - # ---- + # lightposition + # ------------- @property - def line(self): + def lightposition(self): """ - The 'line' property is an instance of Line + The 'lightposition' property is an instance of Lightposition that may be specified as: - - An instance of plotly.graph_objs.contourcarpet.Line + - An instance of plotly.graph_objs.cone.Lightposition - A dict of string/value properties that will be passed - to the Line constructor + to the Lightposition constructor Supported dict properties: - color - Sets the color of the contour level. Has no if - `contours.coloring` is set to "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the line width (in px). + x + Numeric vector, representing the X coordinate + for each vertex. + y + Numeric vector, representing the Y coordinate + for each vertex. + z + Numeric vector, representing the Z coordinate + for each vertex. Returns ------- - plotly.graph_objs.contourcarpet.Line + plotly.graph_objs.cone.Lightposition """ - return self["line"] + return self["lightposition"] - @line.setter - def line(self, val): - self["line"] = val + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val # meta # ---- @@ -72062,36 +74975,17 @@ def name(self): def name(self, val): self["name"] = val - # ncontours - # --------- - @property - def ncontours(self): - """ - Sets the maximum number of contour levels. The actual number of - contours will be chosen automatically to be less than or equal - to the value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is missing. - - The 'ncontours' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["ncontours"] - - @ncontours.setter - def ncontours(self, val): - self["ncontours"] = val - # opacity # ------- @property def opacity(self): """ - Sets the opacity of the trace. + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] @@ -72111,8 +75005,8 @@ def opacity(self, val): @property def reversescale(self): """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool @@ -72128,47 +75022,104 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- + # scene + # ----- @property - def showlegend(self): + def scene(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. - The 'showlegend' property must be specified as a bool + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as the string 'scene' + optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property must be specified as a bool (either True, or False) Returns ------- - bool + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # sizemode + # -------- + @property + def sizemode(self): + """ + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in the + vector field) or as "absolute" value (in the same units as the + vector field). + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['scaled', 'absolute'] + + Returns + ------- + Any """ - return self["showlegend"] + return self["sizemode"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val - # showscale - # --------- + # sizeref + # ------- @property - def showscale(self): + def sizeref(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) corresponds to the + minimum "time" to travel across two successive x/y/z positions + at the average velocity of those two successive positions. All + cones in a given trace use the same factor. With `sizemode` set + to "scaled", `sizeref` is unitless, its default value is 0.5 + With `sizemode` set to "absolute", `sizeref` has the same units + as the u/v/w vector field, its the default value is half the + sample's maximum vector norm. - The 'showscale' property must be specified as a bool - (either True, or False) + The 'sizeref' property is a number and may be specified as: + - An int or float in the interval [0, inf] Returns ------- - bool + int|float """ - return self["showscale"] + return self["sizeref"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val # stream # ------ @@ -72177,7 +75128,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.contourcarpet.Stream + - An instance of plotly.graph_objs.cone.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -72195,7 +75146,7 @@ def stream(self): Returns ------- - plotly.graph_objs.contourcarpet.Stream + plotly.graph_objs.cone.Stream """ return self["stream"] @@ -72208,14 +75159,18 @@ def stream(self, val): @property def text(self): """ - Sets the text elements associated with each z value. + Sets the text elements associated with the cones. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["text"] @@ -72243,25 +75198,25 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # transpose - # --------- + # u + # - @property - def transpose(self): + def u(self): """ - Transposes the z data. + Sets the x components of the vector field. - The 'transpose' property must be specified as a bool - (either True, or False) + The 'u' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - bool + numpy.ndarray """ - return self["transpose"] + return self["u"] - @transpose.setter - def transpose(self, val): - self["transpose"] = val + @u.setter + def u(self, val): + self["u"] = val # uid # --- @@ -72318,6 +75273,46 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # usrc + # ---- + @property + def usrc(self): + """ + Sets the source reference on plot.ly for u . + + The 'usrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["usrc"] + + @usrc.setter + def usrc(self, val): + self["usrc"] = val + + # v + # - + @property + def v(self): + """ + Sets the y components of the vector field. + + The 'v' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["v"] + + @v.setter + def v(self, val): + self["v"] = val + # visible # ------- @property @@ -72341,162 +75336,168 @@ def visible(self): def visible(self, val): self["visible"] = val - # xaxis - # ----- + # vsrc + # ---- @property - def xaxis(self): + def vsrc(self): """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + Sets the source reference on plot.ly for v . - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + The 'vsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["xaxis"] + return self["vsrc"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @vsrc.setter + def vsrc(self, val): + self["vsrc"] = val - # yaxis - # ----- + # w + # - @property - def yaxis(self): + def w(self): """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. + Sets the z components of the vector field. - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) + The 'w' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["w"] + + @w.setter + def w(self, val): + self["w"] = val + + # wsrc + # ---- + @property + def wsrc(self): + """ + Sets the source reference on plot.ly for w . + + The 'wsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["yaxis"] + return self["wsrc"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @wsrc.setter + def wsrc(self, val): + self["wsrc"] = val - # z + # x # - @property - def z(self): + def x(self): """ - Sets the z data. + Sets the x coordinates of the vector field and of the displayed + cones. - The 'z' property is an array that may be specified as a tuple, + The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["z"] + return self["x"] - @z.setter - def z(self, val): - self["z"] = val + @x.setter + def x(self, val): + self["x"] = val - # zauto - # ----- + # xsrc + # ---- @property - def zauto(self): + def xsrc(self): """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. + Sets the source reference on plot.ly for x . - The 'zauto' property must be specified as a bool - (either True, or False) + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - bool + str """ - return self["zauto"] + return self["xsrc"] - @zauto.setter - def zauto(self, val): - self["zauto"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # zmax - # ---- + # y + # - @property - def zmax(self): + def y(self): """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. + Sets the y coordinates of the vector field and of the displayed + cones. - The 'zmax' property is a number and may be specified as: - - An int or float + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["zmax"] + return self["y"] - @zmax.setter - def zmax(self, val): - self["zmax"] = val + @y.setter + def y(self, val): + self["y"] = val - # zmid + # ysrc # ---- @property - def zmid(self): + def ysrc(self): """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. + Sets the source reference on plot.ly for y . - The 'zmid' property is a number and may be specified as: - - An int or float + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["zmid"] + return self["ysrc"] - @zmid.setter - def zmid(self, val): - self["zmid"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val - # zmin - # ---- + # z + # - @property - def zmin(self): + def z(self): """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. + Sets the z coordinates of the vector field and of the displayed + cones. - The 'zmin' property is a number and may be specified as: - - An int or float + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["zmin"] + return self["z"] - @zmin.setter - def zmin(self, val): - self["zmin"] = val + @z.setter + def z(self, val): + self["z"] = val # zsrc # ---- @@ -72535,20 +75536,10 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - a - Sets the x coordinates. - a0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - asrc - Sets the source reference on plot.ly for a . - atype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -72556,28 +75547,24 @@ def _prop_descriptions(self): `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - b - Sets the y coordinates. - b0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - bsrc - Sets the source reference on plot.ly for b . - btype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - carpet - The `carpet` of the carpet axes on which this contour - trace lies + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -72586,8 +75573,8 @@ def _prop_descriptions(self): `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.contourcarpet.ColorBar instance or - dict with compatible properties + plotly.graph_objects.cone.ColorBar instance or dict + with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -72595,14 +75582,11 @@ def _prop_descriptions(self): a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. + colorscale in color space, use`cmin` and `cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - plotly.graph_objects.contourcarpet.Contours instance or - dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -72610,15 +75594,6 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - da - Sets the x coordinate step. See `x0` for more info. - db - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -72627,8 +75602,35 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.contourcarpet.Hoverlabel instance - or dict with compatible properties + plotly.graph_objects.cone.Hoverlabel instance or dict + with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variable `norm` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . hovertext Same as `text`. hovertextsrc @@ -72639,12 +75641,11 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.contourcarpet.Line instance or + lighting + plotly.graph_objects.cone.Lighting instance or dict + with compatible properties + lightposition + plotly.graph_objects.cone.Lightposition instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -72664,33 +75665,56 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. opacity - Sets the opacity of the trace. + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. reversescale - Reverses the color mapping if true. If true, `zmin` + Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. showscale Determines whether or not a colorbar is displayed for this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5 With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. stream - plotly.graph_objects.contourcarpet.Stream instance or - dict with compatible properties + plotly.graph_objects.cone.Stream instance or dict with + compatible properties text - Sets the text elements associated with each z value. + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. + u + Sets the x components of the vector field. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -72713,41 +75737,34 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + usrc + Sets the source reference on plot.ly for u . + v + Sets the y components of the vector field. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. + vsrc + Sets the source reference on plot.ly for v . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on plot.ly for w . + x + Sets the x coordinates of the vector field and of the + displayed cones. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates of the vector field and of the + displayed cones. + ysrc + Sets the source reference on plot.ly for y . + z + Sets the z coordinates of the vector field and of the + displayed cones. zsrc Sets the source reference on plot.ly for z . """ @@ -72755,86 +75772,74 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - a0=None, - asrc=None, - atype=None, + anchor=None, autocolorscale=None, - autocontour=None, - b=None, - b0=None, - bsrc=None, - btype=None, - carpet=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, coloraxis=None, colorbar=None, colorscale=None, - contours=None, customdata=None, customdatasrc=None, - da=None, - db=None, - fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - legendgroup=None, - line=None, + lighting=None, + lightposition=None, meta=None, metasrc=None, name=None, - ncontours=None, opacity=None, reversescale=None, - showlegend=None, + scene=None, showscale=None, + sizemode=None, + sizeref=None, stream=None, text=None, textsrc=None, - transpose=None, + u=None, uid=None, uirevision=None, + usrc=None, + v=None, visible=None, - xaxis=None, - yaxis=None, + vsrc=None, + w=None, + wsrc=None, + x=None, + xsrc=None, + y=None, + ysrc=None, z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, zsrc=None, **kwargs ): """ - Construct a new Contourcarpet object + Construct a new Cone object - Plots contours on either the first carpet axis or the carpet - axis with a matching `carpet` attribute. Data `z` is - interpreted as matching that of the corresponding carpet axis. + Use cone traces to visualize vector fields. Specify a vector + field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and + 3 vector component arrays `u`, `v`, `w`. The cones are drawn + exactly at the positions given by `x`, `y` and `z`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Contourcarpet - a - Sets the x coordinates. - a0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - asrc - Sets the source reference on plot.ly for a . - atype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). + an instance of plotly.graph_objs.Cone + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -72842,28 +75847,24 @@ def __init__( `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. - b - Sets the y coordinates. - b0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - bsrc - Sets the source reference on plot.ly for b . - btype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) - carpet - The `carpet` of the carpet axes on which this contour - trace lies + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -72872,8 +75873,8 @@ def __init__( `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.contourcarpet.ColorBar instance or - dict with compatible properties + plotly.graph_objects.cone.ColorBar instance or dict + with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -72881,14 +75882,11 @@ def __init__( a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. + colorscale in color space, use`cmin` and `cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. - contours - plotly.graph_objects.contourcarpet.Contours instance or - dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -72896,15 +75894,6 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - da - Sets the x coordinate step. See `x0` for more info. - db - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -72913,8 +75902,35 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.contourcarpet.Hoverlabel instance - or dict with compatible properties + plotly.graph_objects.cone.Hoverlabel instance or dict + with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. variable `norm` Anything contained in tag + `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . hovertext Same as `text`. hovertextsrc @@ -72925,12 +75941,11 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.contourcarpet.Line instance or + lighting + plotly.graph_objects.cone.Lighting instance or dict + with compatible properties + lightposition + plotly.graph_objects.cone.Lightposition instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -72950,33 +75965,56 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. opacity - Sets the opacity of the trace. + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. reversescale - Reverses the color mapping if true. If true, `zmin` + Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and - `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. showscale Determines whether or not a colorbar is displayed for this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5 With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. stream - plotly.graph_objects.contourcarpet.Stream instance or - dict with compatible properties + plotly.graph_objects.cone.Stream instance or dict with + compatible properties text - Sets the text elements associated with each z value. + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. + u + Sets the x components of the vector field. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -72999,49 +76037,42 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + usrc + Sets the source reference on plot.ly for u . + v + Sets the y components of the vector field. visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. + vsrc + Sets the source reference on plot.ly for v . + w + Sets the z components of the vector field. + wsrc + Sets the source reference on plot.ly for w . + x + Sets the x coordinates of the vector field and of the + displayed cones. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y coordinates of the vector field and of the + displayed cones. + ysrc + Sets the source reference on plot.ly for y . z - Sets the z data. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. + Sets the z coordinates of the vector field and of the + displayed cones. zsrc Sets the source reference on plot.ly for z . Returns ------- - Contourcarpet + Cone """ - super(Contourcarpet, self).__init__("contourcarpet") + super(Cone, self).__init__("cone") # Validate arg # ------------ @@ -73054,9 +76085,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Contourcarpet +The first argument to the plotly.graph_objs.Cone constructor must be a dict or -an instance of plotly.graph_objs.Contourcarpet""" +an instance of plotly.graph_objs.Cone""" ) # Handle skip_invalid @@ -73065,111 +76096,96 @@ def __init__( # Import validators # ----------------- - from plotly.validators import contourcarpet as v_contourcarpet + from plotly.validators import cone as v_cone # Initialize validators # --------------------- - self._validators["a"] = v_contourcarpet.AValidator() - self._validators["a0"] = v_contourcarpet.A0Validator() - self._validators["asrc"] = v_contourcarpet.AsrcValidator() - self._validators["atype"] = v_contourcarpet.AtypeValidator() - self._validators["autocolorscale"] = v_contourcarpet.AutocolorscaleValidator() - self._validators["autocontour"] = v_contourcarpet.AutocontourValidator() - self._validators["b"] = v_contourcarpet.BValidator() - self._validators["b0"] = v_contourcarpet.B0Validator() - self._validators["bsrc"] = v_contourcarpet.BsrcValidator() - self._validators["btype"] = v_contourcarpet.BtypeValidator() - self._validators["carpet"] = v_contourcarpet.CarpetValidator() - self._validators["coloraxis"] = v_contourcarpet.ColoraxisValidator() - self._validators["colorbar"] = v_contourcarpet.ColorBarValidator() - self._validators["colorscale"] = v_contourcarpet.ColorscaleValidator() - self._validators["contours"] = v_contourcarpet.ContoursValidator() - self._validators["customdata"] = v_contourcarpet.CustomdataValidator() - self._validators["customdatasrc"] = v_contourcarpet.CustomdatasrcValidator() - self._validators["da"] = v_contourcarpet.DaValidator() - self._validators["db"] = v_contourcarpet.DbValidator() - self._validators["fillcolor"] = v_contourcarpet.FillcolorValidator() - self._validators["hoverinfo"] = v_contourcarpet.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_contourcarpet.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_contourcarpet.HoverlabelValidator() - self._validators["hovertext"] = v_contourcarpet.HovertextValidator() - self._validators["hovertextsrc"] = v_contourcarpet.HovertextsrcValidator() - self._validators["ids"] = v_contourcarpet.IdsValidator() - self._validators["idssrc"] = v_contourcarpet.IdssrcValidator() - self._validators["legendgroup"] = v_contourcarpet.LegendgroupValidator() - self._validators["line"] = v_contourcarpet.LineValidator() - self._validators["meta"] = v_contourcarpet.MetaValidator() - self._validators["metasrc"] = v_contourcarpet.MetasrcValidator() - self._validators["name"] = v_contourcarpet.NameValidator() - self._validators["ncontours"] = v_contourcarpet.NcontoursValidator() - self._validators["opacity"] = v_contourcarpet.OpacityValidator() - self._validators["reversescale"] = v_contourcarpet.ReversescaleValidator() - self._validators["showlegend"] = v_contourcarpet.ShowlegendValidator() - self._validators["showscale"] = v_contourcarpet.ShowscaleValidator() - self._validators["stream"] = v_contourcarpet.StreamValidator() - self._validators["text"] = v_contourcarpet.TextValidator() - self._validators["textsrc"] = v_contourcarpet.TextsrcValidator() - self._validators["transpose"] = v_contourcarpet.TransposeValidator() - self._validators["uid"] = v_contourcarpet.UidValidator() - self._validators["uirevision"] = v_contourcarpet.UirevisionValidator() - self._validators["visible"] = v_contourcarpet.VisibleValidator() - self._validators["xaxis"] = v_contourcarpet.XAxisValidator() - self._validators["yaxis"] = v_contourcarpet.YAxisValidator() - self._validators["z"] = v_contourcarpet.ZValidator() - self._validators["zauto"] = v_contourcarpet.ZautoValidator() - self._validators["zmax"] = v_contourcarpet.ZmaxValidator() - self._validators["zmid"] = v_contourcarpet.ZmidValidator() - self._validators["zmin"] = v_contourcarpet.ZminValidator() - self._validators["zsrc"] = v_contourcarpet.ZsrcValidator() + self._validators["anchor"] = v_cone.AnchorValidator() + self._validators["autocolorscale"] = v_cone.AutocolorscaleValidator() + self._validators["cauto"] = v_cone.CautoValidator() + self._validators["cmax"] = v_cone.CmaxValidator() + self._validators["cmid"] = v_cone.CmidValidator() + self._validators["cmin"] = v_cone.CminValidator() + self._validators["coloraxis"] = v_cone.ColoraxisValidator() + self._validators["colorbar"] = v_cone.ColorBarValidator() + self._validators["colorscale"] = v_cone.ColorscaleValidator() + self._validators["customdata"] = v_cone.CustomdataValidator() + self._validators["customdatasrc"] = v_cone.CustomdatasrcValidator() + self._validators["hoverinfo"] = v_cone.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_cone.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_cone.HoverlabelValidator() + self._validators["hovertemplate"] = v_cone.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_cone.HovertemplatesrcValidator() + self._validators["hovertext"] = v_cone.HovertextValidator() + self._validators["hovertextsrc"] = v_cone.HovertextsrcValidator() + self._validators["ids"] = v_cone.IdsValidator() + self._validators["idssrc"] = v_cone.IdssrcValidator() + self._validators["lighting"] = v_cone.LightingValidator() + self._validators["lightposition"] = v_cone.LightpositionValidator() + self._validators["meta"] = v_cone.MetaValidator() + self._validators["metasrc"] = v_cone.MetasrcValidator() + self._validators["name"] = v_cone.NameValidator() + self._validators["opacity"] = v_cone.OpacityValidator() + self._validators["reversescale"] = v_cone.ReversescaleValidator() + self._validators["scene"] = v_cone.SceneValidator() + self._validators["showscale"] = v_cone.ShowscaleValidator() + self._validators["sizemode"] = v_cone.SizemodeValidator() + self._validators["sizeref"] = v_cone.SizerefValidator() + self._validators["stream"] = v_cone.StreamValidator() + self._validators["text"] = v_cone.TextValidator() + self._validators["textsrc"] = v_cone.TextsrcValidator() + self._validators["u"] = v_cone.UValidator() + self._validators["uid"] = v_cone.UidValidator() + self._validators["uirevision"] = v_cone.UirevisionValidator() + self._validators["usrc"] = v_cone.UsrcValidator() + self._validators["v"] = v_cone.VValidator() + self._validators["visible"] = v_cone.VisibleValidator() + self._validators["vsrc"] = v_cone.VsrcValidator() + self._validators["w"] = v_cone.WValidator() + self._validators["wsrc"] = v_cone.WsrcValidator() + self._validators["x"] = v_cone.XValidator() + self._validators["xsrc"] = v_cone.XsrcValidator() + self._validators["y"] = v_cone.YValidator() + self._validators["ysrc"] = v_cone.YsrcValidator() + self._validators["z"] = v_cone.ZValidator() + self._validators["zsrc"] = v_cone.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("a0", None) - self["a0"] = a0 if a0 is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("atype", None) - self["atype"] = atype if atype is not None else _v + _v = arg.pop("anchor", None) + self["anchor"] = anchor if anchor is not None else _v _v = arg.pop("autocolorscale", None) self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("autocontour", None) - self["autocontour"] = autocontour if autocontour is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("b0", None) - self["b0"] = b0 if b0 is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("btype", None) - self["btype"] = btype if btype is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v _v = arg.pop("coloraxis", None) self["coloraxis"] = coloraxis if coloraxis is not None else _v _v = arg.pop("colorbar", None) self["colorbar"] = colorbar if colorbar is not None else _v _v = arg.pop("colorscale", None) self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("da", None) - self["da"] = da if da is not None else _v - _v = arg.pop("db", None) - self["db"] = db if db is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) _v = arg.pop("hovertext", None) self["hovertext"] = hovertext if hovertext is not None else _v _v = arg.pop("hovertextsrc", None) @@ -73178,54 +76194,62 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v + _v = arg.pop("lighting", None) + self["lighting"] = lighting if lighting is not None else _v + _v = arg.pop("lightposition", None) + self["lightposition"] = lightposition if lightposition is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("ncontours", None) - self["ncontours"] = ncontours if ncontours is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("reversescale", None) self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v _v = arg.pop("showscale", None) self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("sizemode", None) + self["sizemode"] = sizemode if sizemode is not None else _v + _v = arg.pop("sizeref", None) + self["sizeref"] = sizeref if sizeref is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v + _v = arg.pop("u", None) + self["u"] = u if u is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("usrc", None) + self["usrc"] = usrc if usrc is not None else _v + _v = arg.pop("v", None) + self["v"] = v if v is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("vsrc", None) + self["vsrc"] = vsrc if vsrc is not None else _v + _v = arg.pop("w", None) + self["w"] = w if w is not None else _v + _v = arg.pop("wsrc", None) + self["wsrc"] = wsrc if wsrc is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v _v = arg.pop("z", None) self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v _v = arg.pop("zsrc", None) self["zsrc"] = zsrc if zsrc is not None else _v @@ -73233,9 +76257,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "contourcarpet" + self._props["type"] = "cone" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="contourcarpet", val="contourcarpet" + plotly_name="type", parent_name="cone", val="cone" ) arg.pop("type", None) @@ -73252,7 +76276,7 @@ def __init__( import copy as _copy -class Contour(_BaseTraceType): +class Choroplethmapbox(_BaseTraceType): # autocolorscale # -------------- @@ -73279,28 +76303,29 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # autocontour - # ----------- + # below + # ----- @property - def autocontour(self): + def below(self): """ - Determines whether or not the contour level attributes are - picked by an algorithm. If True, the number of contour levels - can be set in `ncontours`. If False, set the contour level - attributes in `contours`. + Determines if the choropleth polygons will be inserted before + the layer with the specified ID. By default, choroplethmapbox + traces are placed above the water layers. If set to '', the + layer will be inserted above every existing layer. - The 'autocontour' property must be specified as a bool - (either True, or False) + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - bool + str """ - return self["autocontour"] + return self["below"] - @autocontour.setter - def autocontour(self, val): - self["autocontour"] = val + @below.setter + def below(self, val): + self["below"] = val # coloraxis # --------- @@ -73336,7 +76361,7 @@ def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.contour.ColorBar + - An instance of plotly.graph_objs.choroplethmapbox.ColorBar - A dict of string/value properties that will be passed to the ColorBar constructor @@ -73468,14 +76493,15 @@ def colorbar(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.contour.colorba - r.Tickformatstop instances or dicts with - compatible properties + A tuple of plotly.graph_objects.choroplethmapbo + x.colorbar.Tickformatstop instances or dicts + with compatible properties tickformatstopdefaults When used in a template (as layout.template.dat - a.contour.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of contour.colorbar.tickformatstops + a.choroplethmapbox.colorbar.tickformatstopdefau + lts), sets the default property values to use + for elements of + choroplethmapbox.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -73516,21 +76542,22 @@ def colorbar(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.contour.colorbar.Title - instance or dict with compatible properties + plotly.graph_objects.choroplethmapbox.colorbar. + Title instance or dict with compatible + properties titlefont Deprecated: Please use - contour.colorbar.title.font instead. Sets this - color bar's title font. Note that the title's - font used to be set by the now deprecated - `titlefont` attribute. + choroplethmapbox.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. titleside Deprecated: Please use - contour.colorbar.title.side instead. Determines - the location of color bar's title with respect - to the color bar. Note that the title's - location used to be set by the now deprecated - `titleside` attribute. + choroplethmapbox.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. x Sets the x position of the color bar (in plot fraction). @@ -73555,7 +76582,7 @@ def colorbar(self): Returns ------- - plotly.graph_objs.contour.ColorBar + plotly.graph_objs.choroplethmapbox.ColorBar """ return self["colorbar"] @@ -73614,114 +76641,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # connectgaps - # ----------- - @property - def connectgaps(self): - """ - Determines whether or not gaps (i.e. {nan} or missing values) - in the `z` data are filled in. - - The 'connectgaps' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["connectgaps"] - - @connectgaps.setter - def connectgaps(self, val): - self["connectgaps"] = val - - # contours - # -------- - @property - def contours(self): - """ - The 'contours' property is an instance of Contours - that may be specified as: - - An instance of plotly.graph_objs.contour.Contours - - A dict of string/value properties that will be passed - to the Contours constructor - - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-language which is very similar - to Python, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - - Returns - ------- - plotly.graph_objs.contour.Contours - """ - return self["contours"] - - @contours.setter - def contours(self, val): - self["contours"] = val - # customdata # ---------- @property @@ -73765,108 +76684,27 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- - @property - def dx(self): - """ - Sets the x coordinate step. See `x0` for more info. - - The 'dx' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dx"] - - @dx.setter - def dx(self, val): - self["dx"] = val - - # dy - # -- - @property - def dy(self): - """ - Sets the y coordinate step. See `y0` for more info. - - The 'dy' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dy"] - - @dy.setter - def dy(self, val): - self["dy"] = val - - # fillcolor - # --------- + # geojson + # ------- @property - def fillcolor(self): + def geojson(self): """ - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line color, - marker color, or marker line color, whichever is available. + Sets the GeoJSON data associated with this trace. Can be set as + a valid GeoJSON object or as URL string Note that we only + accept GeoJSON of type "FeatureCollection" and "Feature" with + geometries of type "Polygon" and "MultiPolygon". - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A number that will be interpreted as a color - according to contour.colorscale + The 'geojson' property accepts values of any type Returns ------- - str + Any """ - return self["fillcolor"] + return self["geojson"] - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val + @geojson.setter + def geojson(self, val): + self["geojson"] = val # hoverinfo # --------- @@ -73879,8 +76717,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -73921,7 +76759,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.contour.Hoverlabel + - An instance of plotly.graph_objs.choroplethmapbox.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -73965,7 +76803,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.contour.Hoverlabel + plotly.graph_objs.choroplethmapbox.Hoverlabel """ return self["hoverlabel"] @@ -73985,15 +76823,19 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. + variable `properties` Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary box + completely, use an empty tag ``. The 'hovertemplate' property is a string and must be specified as: - A string @@ -74037,12 +76879,14 @@ def hovertext(self): """ Same as `text`. - The 'hovertext' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["hovertext"] @@ -74112,66 +76956,78 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legendgroup - # ----------- + # locations + # --------- @property - def legendgroup(self): + def locations(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + Sets which features found in "geojson" to plot using their + feature `id` field. - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on plot.ly for locations . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["legendgroup"] + return self["locationssrc"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val - # line - # ---- + # marker + # ------ @property - def line(self): + def marker(self): """ - The 'line' property is an instance of Line + The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.contour.Line + - An instance of plotly.graph_objs.choroplethmapbox.Marker - A dict of string/value properties that will be passed - to the Line constructor + to the Marker constructor Supported dict properties: - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the line width (in px). + line + plotly.graph_objects.choroplethmapbox.marker.Li + ne instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on plot.ly for + opacity . Returns ------- - plotly.graph_objs.contour.Line + plotly.graph_objs.choroplethmapbox.Marker """ - return self["line"] + return self["marker"] - @line.setter - def line(self, val): - self["line"] = val + @marker.setter + def marker(self, val): + self["marker"] = val # meta # ---- @@ -74243,50 +77099,6 @@ def name(self): def name(self, val): self["name"] = val - # ncontours - # --------- - @property - def ncontours(self): - """ - Sets the maximum number of contour levels. The actual number of - contours will be chosen automatically to be less than or equal - to the value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is missing. - - The 'ncontours' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [1, 9223372036854775807] - - Returns - ------- - int - """ - return self["ncontours"] - - @ncontours.setter - def ncontours(self, val): - self["ncontours"] = val - - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the trace. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - # reversescale # ------------ @property @@ -74309,26 +77121,57 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- + # selected + # -------- @property - def showlegend(self): + def selected(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.choroplethmapbox.Selected + - A dict of string/value properties that will be passed + to the Selected constructor - The 'showlegend' property must be specified as a bool - (either True, or False) + Supported dict properties: + + marker + plotly.graph_objects.choroplethmapbox.selected. + Marker instance or dict with compatible + properties Returns ------- - bool + plotly.graph_objs.choroplethmapbox.Selected """ - return self["showlegend"] + return self["selected"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val # showscale # --------- @@ -74358,7 +77201,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.contour.Stream + - An instance of plotly.graph_objs.choroplethmapbox.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -74376,27 +77219,54 @@ def stream(self): Returns ------- - plotly.graph_objs.contour.Stream + plotly.graph_objs.choroplethmapbox.Stream """ return self["stream"] - @stream.setter - def stream(self, val): - self["stream"] = val + @stream.setter + def stream(self, val): + self["stream"] = val + + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + mapbox subplot. If "mapbox" (the default value), the data refer + to `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as the string 'mapbox' + optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val # text # ---- @property def text(self): """ - Sets the text elements associated with each z value. + Sets the text elements associated with each location. - The 'text' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - numpy.ndarray + str|numpy.ndarray """ return self["text"] @@ -74424,26 +77294,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # transpose - # --------- - @property - def transpose(self): - """ - Transposes the z data. - - The 'transpose' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["transpose"] - - @transpose.setter - def transpose(self, val): - self["transpose"] = val - # uid # --- @property @@ -74499,6 +77349,34 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.choroplethmapbox.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.choroplethmapbox.unselecte + d.Marker instance or dict with compatible + properties + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + # visible # ------- @property @@ -74522,280 +77400,12 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - - @property - def x(self): - """ - Sets the x coordinates. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # x0 - # -- - @property - def x0(self): - """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. - - The 'x0' property accepts values of any type - - Returns - ------- - Any - """ - return self["x0"] - - @x0.setter - def x0(self, val): - self["x0"] = val - - # xaxis - # ----- - @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): - """ - Sets the calendar system to use with `x` date data. - - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["xcalendar"] - - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val - - # xsrc - # ---- - @property - def xsrc(self): - """ - Sets the source reference on plot.ly for x . - - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # xtype - # ----- - @property - def xtype(self): - """ - If "array", the heatmap's x coordinates are given by "x" (the - default behavior when `x` is provided). If "scaled", the - heatmap's x coordinates are given by "x0" and "dx" (the default - behavior when `x` is not provided). - - The 'xtype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["xtype"] - - @xtype.setter - def xtype(self, val): - self["xtype"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. - - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["y"] - - @y.setter - def y(self, val): - self["y"] = val - - # y0 - # -- - @property - def y0(self): - """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. - - The 'y0' property accepts values of any type - - Returns - ------- - Any - """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] - - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val - - # ycalendar - # --------- - @property - def ycalendar(self): - """ - Sets the calendar system to use with `y` date data. - - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] - - Returns - ------- - Any - """ - return self["ycalendar"] - - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val - - # ysrc - # ---- - @property - def ysrc(self): - """ - Sets the source reference on plot.ly for y . - - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # ytype - # ----- - @property - def ytype(self): - """ - If "array", the heatmap's y coordinates are given by "y" (the - default behavior when `y` is provided) If "scaled", the - heatmap's y coordinates are given by "y0" and "dy" (the default - behavior when `y` is not provided) - - The 'ytype' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['array', 'scaled'] - - Returns - ------- - Any - """ - return self["ytype"] - - @ytype.setter - def ytype(self, val): - self["ytype"] = val - # z # - @property def z(self): """ - Sets the z data. + Sets the color values. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -74833,30 +77443,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zhoverformat - # ------------ - @property - def zhoverformat(self): - """ - Sets the hover text formatting rule using d3 formatting mini- - languages which are very similar to those in Python. See: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - - The 'zhoverformat' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["zhoverformat"] - - @zhoverformat.setter - def zhoverformat(self, val): - self["zhoverformat"] = val - # zmax # ---- @property @@ -74965,11 +77551,12 @@ def _prop_descriptions(self): `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -74978,8 +77565,8 @@ def _prop_descriptions(self): `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.contour.ColorBar instance or dict - with compatible properties + plotly.graph_objects.choroplethmapbox.ColorBar instance + or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -74992,12 +77579,6 @@ def _prop_descriptions(self): string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. - contours - plotly.graph_objects.contour.Contours instance or dict - with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -75005,15 +77586,12 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. + geojson + Sets the GeoJSON data associated with this trace. Can + be set as a valid GeoJSON object or as URL string Note + that we only accept GeoJSON of type "FeatureCollection" + and "Feature" with geometries of type "Polygon" and + "MultiPolygon". hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -75022,8 +77600,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.contour.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.choroplethmapbox.Hoverlabel + instance or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -75032,16 +77610,22 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. + available. variable `properties` Anything contained in + tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -75055,13 +77639,14 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.contour.Line instance or dict with - compatible properties + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on plot.ly for locations . + marker + plotly.graph_objects.choroplethmapbox.Marker instance + or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -75080,33 +77665,35 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. reversescale Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + selected + plotly.graph_objects.choroplethmapbox.Selected instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showscale Determines whether or not a colorbar is displayed for this trace. stream - plotly.graph_objects.contour.Stream instance or dict - with compatible properties + plotly.graph_objects.choroplethmapbox.Stream instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. text - Sets the text elements associated with each z value. + Sets the text elements associated with each location. textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -75129,65 +77716,21 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.choroplethmapbox.Unselected + instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) z - Sets the z data. + Sets the color values. zauto Determines whether or not the color domain is computed with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. zmax Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must @@ -75209,17 +77752,13 @@ def __init__( self, arg=None, autocolorscale=None, - autocontour=None, + below=None, coloraxis=None, colorbar=None, colorscale=None, - connectgaps=None, - contours=None, customdata=None, customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, + geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -75229,38 +77768,26 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - legendgroup=None, - line=None, + locations=None, + locationssrc=None, + marker=None, meta=None, metasrc=None, name=None, - ncontours=None, - opacity=None, reversescale=None, - showlegend=None, + selected=None, + selectedpoints=None, showscale=None, stream=None, + subplot=None, text=None, textsrc=None, - transpose=None, uid=None, uirevision=None, + unselected=None, visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - ytype=None, z=None, zauto=None, - zhoverformat=None, zmax=None, zmid=None, zmin=None, @@ -75268,21 +77795,17 @@ def __init__( **kwargs ): """ - Construct a new Contour object + Construct a new Choroplethmapbox object - The data from which contour lines are computed is set in `z`. - Data in `z` must be a 2D list of numbers. Say that `z` has N - rows and M columns, then by default, these N rows correspond to - N y coordinates (set in `y` or auto-generated) and the M - columns correspond to M x coordinates (set in `x` or auto- - generated). By setting `transpose` to True, the above behavior - is flipped. + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Contour + an instance of plotly.graph_objs.Choroplethmapbox autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -75290,11 +77813,12 @@ def __init__( `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level attributes - are picked by an algorithm. If True, the number of - contour levels can be set in `ncontours`. If False, set - the contour level attributes in `contours`. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -75303,8 +77827,8 @@ def __init__( `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.contour.ColorBar instance or dict - with compatible properties + plotly.graph_objects.choroplethmapbox.ColorBar instance + or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -75317,12 +77841,6 @@ def __init__( string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. - connectgaps - Determines whether or not gaps (i.e. {nan} or missing - values) in the `z` data are filled in. - contours - plotly.graph_objects.contour.Contours instance or dict - with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -75330,15 +77848,12 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - fillcolor - Sets the fill color if `contours.type` is "constraint". - Defaults to a half-transparent variant of the line - color, marker color, or marker line color, whichever is - available. + geojson + Sets the GeoJSON data associated with this trace. Can + be set as a valid GeoJSON object or as URL string Note + that we only accept GeoJSON of type "FeatureCollection" + and "Feature" with geometries of type "Polygon" and + "MultiPolygon". hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -75347,8 +77862,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.contour.Hoverlabel instance or - dict with compatible properties + plotly.graph_objects.choroplethmapbox.Hoverlabel + instance or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -75357,16 +77872,22 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. + available. variable `properties` Anything contained in + tag `` is displayed in the secondary box, for + example "{fullData.name}". To hide the + secondary box completely, use an empty tag + ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -75380,13 +77901,14 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.contour.Line instance or dict with - compatible properties + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on plot.ly for locations . + marker + plotly.graph_objects.choroplethmapbox.Marker instance + or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -75405,33 +77927,35 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The actual - number of contours will be chosen automatically to be - less than or equal to the value of `ncontours`. Has an - effect only if `autocontour` is True or if - `contours.size` is missing. - opacity - Sets the opacity of the trace. reversescale Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. + selected + plotly.graph_objects.choroplethmapbox.Selected instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showscale Determines whether or not a colorbar is displayed for this trace. stream - plotly.graph_objects.contour.Stream instance or dict - with compatible properties + plotly.graph_objects.choroplethmapbox.Stream instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a mapbox subplot. If "mapbox" (the default value), + the data refer to `layout.mapbox`. If "mapbox2", the + data refer to `layout.mapbox2`, and so on. text - Sets the text elements associated with each z value. + Sets the text elements associated with each location. textsrc Sets the source reference on plot.ly for text . - transpose - Transposes the z data. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -75454,65 +77978,21 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.choroplethmapbox.Unselected + instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - xtype - If "array", the heatmap's x coordinates are given by - "x" (the default behavior when `x` is provided). If - "scaled", the heatmap's x coordinates are given by "x0" - and "dx" (the default behavior when `x` is not - provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . - ytype - If "array", the heatmap's y coordinates are given by - "y" (the default behavior when `y` is provided) If - "scaled", the heatmap's y coordinates are given by "y0" - and "dy" (the default behavior when `y` is not - provided) z - Sets the z data. + Sets the color values. zauto Determines whether or not the color domain is computed with respect to the input data (here in `z`) or the bounds set in `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` are set by the user. - zhoverformat - Sets the hover text formatting rule using d3 formatting - mini-languages which are very similar to those in - Python. See: https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format zmax Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must @@ -75531,9 +78011,9 @@ def __init__( Returns ------- - Contour + Choroplethmapbox """ - super(Contour, self).__init__("contour") + super(Choroplethmapbox, self).__init__("choroplethmapbox") # Validate arg # ------------ @@ -75546,9 +78026,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Contour +The first argument to the plotly.graph_objs.Choroplethmapbox constructor must be a dict or -an instance of plotly.graph_objs.Contour""" +an instance of plotly.graph_objs.Choroplethmapbox""" ) # Handle skip_invalid @@ -75557,94 +78037,76 @@ def __init__( # Import validators # ----------------- - from plotly.validators import contour as v_contour + from plotly.validators import choroplethmapbox as v_choroplethmapbox # Initialize validators # --------------------- - self._validators["autocolorscale"] = v_contour.AutocolorscaleValidator() - self._validators["autocontour"] = v_contour.AutocontourValidator() - self._validators["coloraxis"] = v_contour.ColoraxisValidator() - self._validators["colorbar"] = v_contour.ColorBarValidator() - self._validators["colorscale"] = v_contour.ColorscaleValidator() - self._validators["connectgaps"] = v_contour.ConnectgapsValidator() - self._validators["contours"] = v_contour.ContoursValidator() - self._validators["customdata"] = v_contour.CustomdataValidator() - self._validators["customdatasrc"] = v_contour.CustomdatasrcValidator() - self._validators["dx"] = v_contour.DxValidator() - self._validators["dy"] = v_contour.DyValidator() - self._validators["fillcolor"] = v_contour.FillcolorValidator() - self._validators["hoverinfo"] = v_contour.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_contour.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_contour.HoverlabelValidator() - self._validators["hovertemplate"] = v_contour.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_contour.HovertemplatesrcValidator() - self._validators["hovertext"] = v_contour.HovertextValidator() - self._validators["hovertextsrc"] = v_contour.HovertextsrcValidator() - self._validators["ids"] = v_contour.IdsValidator() - self._validators["idssrc"] = v_contour.IdssrcValidator() - self._validators["legendgroup"] = v_contour.LegendgroupValidator() - self._validators["line"] = v_contour.LineValidator() - self._validators["meta"] = v_contour.MetaValidator() - self._validators["metasrc"] = v_contour.MetasrcValidator() - self._validators["name"] = v_contour.NameValidator() - self._validators["ncontours"] = v_contour.NcontoursValidator() - self._validators["opacity"] = v_contour.OpacityValidator() - self._validators["reversescale"] = v_contour.ReversescaleValidator() - self._validators["showlegend"] = v_contour.ShowlegendValidator() - self._validators["showscale"] = v_contour.ShowscaleValidator() - self._validators["stream"] = v_contour.StreamValidator() - self._validators["text"] = v_contour.TextValidator() - self._validators["textsrc"] = v_contour.TextsrcValidator() - self._validators["transpose"] = v_contour.TransposeValidator() - self._validators["uid"] = v_contour.UidValidator() - self._validators["uirevision"] = v_contour.UirevisionValidator() - self._validators["visible"] = v_contour.VisibleValidator() - self._validators["x"] = v_contour.XValidator() - self._validators["x0"] = v_contour.X0Validator() - self._validators["xaxis"] = v_contour.XAxisValidator() - self._validators["xcalendar"] = v_contour.XcalendarValidator() - self._validators["xsrc"] = v_contour.XsrcValidator() - self._validators["xtype"] = v_contour.XtypeValidator() - self._validators["y"] = v_contour.YValidator() - self._validators["y0"] = v_contour.Y0Validator() - self._validators["yaxis"] = v_contour.YAxisValidator() - self._validators["ycalendar"] = v_contour.YcalendarValidator() - self._validators["ysrc"] = v_contour.YsrcValidator() - self._validators["ytype"] = v_contour.YtypeValidator() - self._validators["z"] = v_contour.ZValidator() - self._validators["zauto"] = v_contour.ZautoValidator() - self._validators["zhoverformat"] = v_contour.ZhoverformatValidator() - self._validators["zmax"] = v_contour.ZmaxValidator() - self._validators["zmid"] = v_contour.ZmidValidator() - self._validators["zmin"] = v_contour.ZminValidator() - self._validators["zsrc"] = v_contour.ZsrcValidator() + self._validators[ + "autocolorscale" + ] = v_choroplethmapbox.AutocolorscaleValidator() + self._validators["below"] = v_choroplethmapbox.BelowValidator() + self._validators["coloraxis"] = v_choroplethmapbox.ColoraxisValidator() + self._validators["colorbar"] = v_choroplethmapbox.ColorBarValidator() + self._validators["colorscale"] = v_choroplethmapbox.ColorscaleValidator() + self._validators["customdata"] = v_choroplethmapbox.CustomdataValidator() + self._validators["customdatasrc"] = v_choroplethmapbox.CustomdatasrcValidator() + self._validators["geojson"] = v_choroplethmapbox.GeojsonValidator() + self._validators["hoverinfo"] = v_choroplethmapbox.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_choroplethmapbox.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_choroplethmapbox.HoverlabelValidator() + self._validators["hovertemplate"] = v_choroplethmapbox.HovertemplateValidator() + self._validators[ + "hovertemplatesrc" + ] = v_choroplethmapbox.HovertemplatesrcValidator() + self._validators["hovertext"] = v_choroplethmapbox.HovertextValidator() + self._validators["hovertextsrc"] = v_choroplethmapbox.HovertextsrcValidator() + self._validators["ids"] = v_choroplethmapbox.IdsValidator() + self._validators["idssrc"] = v_choroplethmapbox.IdssrcValidator() + self._validators["locations"] = v_choroplethmapbox.LocationsValidator() + self._validators["locationssrc"] = v_choroplethmapbox.LocationssrcValidator() + self._validators["marker"] = v_choroplethmapbox.MarkerValidator() + self._validators["meta"] = v_choroplethmapbox.MetaValidator() + self._validators["metasrc"] = v_choroplethmapbox.MetasrcValidator() + self._validators["name"] = v_choroplethmapbox.NameValidator() + self._validators["reversescale"] = v_choroplethmapbox.ReversescaleValidator() + self._validators["selected"] = v_choroplethmapbox.SelectedValidator() + self._validators[ + "selectedpoints" + ] = v_choroplethmapbox.SelectedpointsValidator() + self._validators["showscale"] = v_choroplethmapbox.ShowscaleValidator() + self._validators["stream"] = v_choroplethmapbox.StreamValidator() + self._validators["subplot"] = v_choroplethmapbox.SubplotValidator() + self._validators["text"] = v_choroplethmapbox.TextValidator() + self._validators["textsrc"] = v_choroplethmapbox.TextsrcValidator() + self._validators["uid"] = v_choroplethmapbox.UidValidator() + self._validators["uirevision"] = v_choroplethmapbox.UirevisionValidator() + self._validators["unselected"] = v_choroplethmapbox.UnselectedValidator() + self._validators["visible"] = v_choroplethmapbox.VisibleValidator() + self._validators["z"] = v_choroplethmapbox.ZValidator() + self._validators["zauto"] = v_choroplethmapbox.ZautoValidator() + self._validators["zmax"] = v_choroplethmapbox.ZmaxValidator() + self._validators["zmid"] = v_choroplethmapbox.ZmidValidator() + self._validators["zmin"] = v_choroplethmapbox.ZminValidator() + self._validators["zsrc"] = v_choroplethmapbox.ZsrcValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop("autocolorscale", None) self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("autocontour", None) - self["autocontour"] = autocontour if autocontour is not None else _v + _v = arg.pop("below", None) + self["below"] = below if below is not None else _v _v = arg.pop("coloraxis", None) self["coloraxis"] = coloraxis if coloraxis is not None else _v _v = arg.pop("colorbar", None) self["colorbar"] = colorbar if colorbar is not None else _v _v = arg.pop("colorscale", None) self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("connectgaps", None) - self["connectgaps"] = connectgaps if connectgaps is not None else _v - _v = arg.pop("contours", None) - self["contours"] = contours if contours is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v + _v = arg.pop("geojson", None) + self["geojson"] = geojson if geojson is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -75665,70 +78127,46 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v + _v = arg.pop("locations", None) + self["locations"] = locations if locations is not None else _v + _v = arg.pop("locationssrc", None) + self["locationssrc"] = locationssrc if locationssrc is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("ncontours", None) - self["ncontours"] = ncontours if ncontours is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("reversescale", None) self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showscale", None) self["showscale"] = showscale if showscale is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("subplot", None) + self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("transpose", None) - self["transpose"] = transpose if transpose is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("xtype", None) - self["xtype"] = xtype if xtype is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v - _v = arg.pop("ytype", None) - self["ytype"] = ytype if ytype is not None else _v _v = arg.pop("z", None) self["z"] = z if z is not None else _v _v = arg.pop("zauto", None) self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zhoverformat", None) - self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v _v = arg.pop("zmax", None) self["zmax"] = zmax if zmax is not None else _v _v = arg.pop("zmid", None) @@ -75742,9 +78180,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "contour" + self._props["type"] = "choroplethmapbox" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="contour", val="contour" + plotly_name="type", parent_name="choroplethmapbox", val="choroplethmapbox" ) arg.pop("type", None) @@ -75761,30 +78199,7 @@ def __init__( import copy as _copy -class Cone(_BaseTraceType): - - # anchor - # ------ - @property - def anchor(self): - """ - Sets the cones' anchor with respect to their x/y/z positions. - Note that "cm" denote the cone's center of mass which - corresponds to 1/4 from the tail to tip. - - The 'anchor' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['tip', 'tail', 'cm', 'center'] - - Returns - ------- - Any - """ - return self["anchor"] - - @anchor.setter - def anchor(self, val): - self["anchor"] = val +class Choropleth(_BaseTraceType): # autocolorscale # -------------- @@ -75811,96 +78226,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- - @property - def cauto(self): - """ - Determines whether or not the color domain is computed with - respect to the input data (here u/v/w norm) or the bounds set - in `cmin` and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - - The 'cauto' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["cauto"] - - @cauto.setter - def cauto(self, val): - self["cauto"] = val - - # cmax - # ---- - @property - def cmax(self): - """ - Sets the upper bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmin` must be set as - well. - - The 'cmax' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmax"] - - @cmax.setter - def cmax(self, val): - self["cmax"] = val - - # cmid - # ---- - @property - def cmid(self): - """ - Sets the mid-point of the color domain by scaling `cmin` and/or - `cmax` to be equidistant to this point. Value should have the - same units as u/v/w norm. Has no effect when `cauto` is - `false`. - - The 'cmid' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmid"] - - @cmid.setter - def cmid(self, val): - self["cmid"] = val - - # cmin - # ---- - @property - def cmin(self): - """ - Sets the lower bound of the color domain. Value should have the - same units as u/v/w norm and if set, `cmax` must be set as - well. - - The 'cmin' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["cmin"] - - @cmin.setter - def cmin(self, val): - self["cmin"] = val - # coloraxis # --------- @property @@ -75935,7 +78260,7 @@ def colorbar(self): """ The 'colorbar' property is an instance of ColorBar that may be specified as: - - An instance of plotly.graph_objs.cone.ColorBar + - An instance of plotly.graph_objs.choropleth.ColorBar - A dict of string/value properties that will be passed to the ColorBar constructor @@ -76067,14 +78392,14 @@ def colorbar(self): tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.cone.colorbar.T - ickformatstop instances or dicts with + A tuple of plotly.graph_objects.choropleth.colo + rbar.Tickformatstop instances or dicts with compatible properties tickformatstopdefaults - When used in a template (as layout.template.dat - a.cone.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of cone.colorbar.tickformatstops + When used in a template (as layout.template.dat + a.choropleth.colorbar.tickformatstopdefaults), + sets the default property values to use for + elements of choropleth.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode @@ -76115,18 +78440,20 @@ def colorbar(self): tickwidth Sets the tick width (in px). title - plotly.graph_objects.cone.colorbar.Title + plotly.graph_objects.choropleth.colorbar.Title instance or dict with compatible properties titlefont - Deprecated: Please use cone.colorbar.title.font - instead. Sets this color bar's title font. Note - that the title's font used to be set by the now + Deprecated: Please use + choropleth.colorbar.title.font instead. Sets + this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` attribute. titleside - Deprecated: Please use cone.colorbar.title.side - instead. Determines the location of color bar's - title with respect to the color bar. Note that - the title's location used to be set by the now + Deprecated: Please use + choropleth.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now deprecated `titleside` attribute. x Sets the x position of the color bar (in plot @@ -76152,7 +78479,7 @@ def colorbar(self): Returns ------- - plotly.graph_objs.cone.ColorBar + plotly.graph_objs.choropleth.ColorBar """ return self["colorbar"] @@ -76170,7 +78497,7 @@ def colorscale(self): hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`cmin` and `cmax`. + bounds of the colorscale in color space, use`zmin` and `zmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi @@ -76254,6 +78581,31 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val + # geo + # --- + @property + def geo(self): + """ + Sets a reference between this trace's geospatial coordinates + and a geographic map. If "geo" (the default value), the + geospatial coordinates refer to `layout.geo`. If "geo2", the + geospatial coordinates refer to `layout.geo2`, and so on. + + The 'geo' property is an identifier of a particular + subplot, of type 'geo', that may be specified as the string 'geo' + optionally followed by an integer >= 1 + (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + + Returns + ------- + str + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + # hoverinfo # --------- @property @@ -76265,8 +78617,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -76307,7 +78659,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.cone.Hoverlabel + - An instance of plotly.graph_objs.choropleth.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -76351,7 +78703,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.cone.Hoverlabel + plotly.graph_objs.choropleth.Hoverlabel """ return self["hoverlabel"] @@ -76371,15 +78723,19 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- point (the ones that are `arrayOk: true`) are available. - variable `norm` Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. The 'hovertemplate' property is a string and must be specified as: - A string @@ -76500,86 +78856,100 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lighting - # -------- + # locationmode + # ------------ @property - def lighting(self): + def locationmode(self): """ - The 'lighting' property is an instance of Lighting - that may be specified as: - - An instance of plotly.graph_objs.cone.Lighting - - A dict of string/value properties that will be passed - to the Lighting constructor + Determines the set of locations used to match entries in + `locations` to regions on the map. - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. + The 'locationmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['ISO-3', 'USA-states', 'country names'] Returns ------- - plotly.graph_objs.cone.Lighting + Any """ - return self["lighting"] + return self["locationmode"] - @lighting.setter - def lighting(self, val): - self["lighting"] = val + @locationmode.setter + def locationmode(self, val): + self["locationmode"] = val - # lightposition - # ------------- + # locations + # --------- @property - def lightposition(self): + def locations(self): """ - The 'lightposition' property is an instance of Lightposition + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + # locationssrc + # ------------ + @property + def locationssrc(self): + """ + Sets the source reference on plot.ly for locations . + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.cone.Lightposition + - An instance of plotly.graph_objs.choropleth.Marker - A dict of string/value properties that will be passed - to the Lightposition constructor + to the Marker constructor Supported dict properties: - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. + line + plotly.graph_objects.choropleth.marker.Line + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on plot.ly for + opacity . Returns ------- - plotly.graph_objs.cone.Lightposition + plotly.graph_objs.choropleth.Marker """ - return self["lightposition"] + return self["marker"] - @lightposition.setter - def lightposition(self, val): - self["lightposition"] = val + @marker.setter + def marker(self, val): + self["marker"] = val # meta # ---- @@ -76651,38 +79021,13 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- - @property - def opacity(self): - """ - Sets the opacity of the surface. Please note that in the case - of using high `opacity` values for example a value greater than - or equal to 0.5 on two surfaces (and 0.25 with four surfaces), - an overlay of multiple transparent surfaces may not perfectly - be sorted in depth by the webgl API. This behavior may be - improved in the near future and is subject to change. - - The 'opacity' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["opacity"] - - @opacity.setter - def opacity(self, val): - self["opacity"] = val - # reversescale # ------------ @property def reversescale(self): """ - Reverses the color mapping if true. If true, `cmin` will - correspond to the last color in the array and `cmax` will + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will correspond to the first color. The 'reversescale' property must be specified as a bool @@ -76698,30 +79043,56 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- + # selected + # -------- @property - def scene(self): + def selected(self): """ - Sets a reference between this trace's 3D coordinate system and - a 3D scene. If "scene" (the default value), the (x,y,z) - coordinates refer to `layout.scene`. If "scene2", the (x,y,z) - coordinates refer to `layout.scene2`, and so on. + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.choropleth.Selected + - A dict of string/value properties that will be passed + to the Selected constructor - The 'scene' property is an identifier of a particular - subplot, of type 'scene', that may be specified as the string 'scene' - optionally followed by an integer >= 1 - (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + Supported dict properties: + + marker + plotly.graph_objects.choropleth.selected.Marker + instance or dict with compatible properties Returns ------- - str + plotly.graph_objs.choropleth.Selected """ - return self["scene"] + return self["selected"] - @scene.setter - def scene(self, val): - self["scene"] = val + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val # showscale # --------- @@ -76744,59 +79115,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # sizemode - # -------- - @property - def sizemode(self): - """ - Determines whether `sizeref` is set as a "scaled" (i.e - unitless) scalar (normalized by the max u/v/w norm in the - vector field) or as "absolute" value (in the same units as the - vector field). - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['scaled', 'absolute'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - # sizeref - # ------- - @property - def sizeref(self): - """ - Adjusts the cone size scaling. The size of the cones is - determined by their u/v/w norm multiplied a factor and - `sizeref`. This factor (computed internally) corresponds to the - minimum "time" to travel across two successive x/y/z positions - at the average velocity of those two successive positions. All - cones in a given trace use the same factor. With `sizemode` set - to "scaled", `sizeref` is unitless, its default value is 0.5 - With `sizemode` set to "absolute", `sizeref` has the same units - as the u/v/w vector field, its the default value is half the - sample's maximum vector norm. - - The 'sizeref' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - Returns - ------- - int|float - """ - return self["sizeref"] - - @sizeref.setter - def sizeref(self, val): - self["sizeref"] = val - # stream # ------ @property @@ -76804,7 +79122,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.cone.Stream + - An instance of plotly.graph_objs.choropleth.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -76822,7 +79140,7 @@ def stream(self): Returns ------- - plotly.graph_objs.cone.Stream + plotly.graph_objs.choropleth.Stream """ return self["stream"] @@ -76835,9 +79153,7 @@ def stream(self, val): @property def text(self): """ - Sets the text elements associated with the cones. If trace - `hoverinfo` contains a "text" flag and "hovertext" is not set, - these elements will be seen in the hover labels. + Sets the text elements associated with each location. The 'text' property is a string and must be specified as: - A string @@ -76874,26 +79190,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # u - # - - @property - def u(self): - """ - Sets the x components of the vector field. - - The 'u' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["u"] - - @u.setter - def u(self, val): - self["u"] = val - # uid # --- @property @@ -76949,45 +79245,32 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # usrc - # ---- - @property - def usrc(self): - """ - Sets the source reference on plot.ly for u . - - The 'usrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["usrc"] - - @usrc.setter - def usrc(self, val): - self["usrc"] = val - - # v - # - + # unselected + # ---------- @property - def v(self): + def unselected(self): """ - Sets the y components of the vector field. + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.choropleth.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor - The 'v' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + marker + plotly.graph_objects.choropleth.unselected.Mark + er instance or dict with compatible properties Returns ------- - numpy.ndarray + plotly.graph_objs.choropleth.Unselected """ - return self["v"] + return self["unselected"] - @v.setter - def v(self, val): - self["v"] = val + @unselected.setter + def unselected(self, val): + self["unselected"] = val # visible # ------- @@ -77012,168 +79295,112 @@ def visible(self): def visible(self, val): self["visible"] = val - # vsrc - # ---- - @property - def vsrc(self): - """ - Sets the source reference on plot.ly for v . - - The 'vsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["vsrc"] - - @vsrc.setter - def vsrc(self, val): - self["vsrc"] = val - - # w - # - - @property - def w(self): - """ - Sets the z components of the vector field. - - The 'w' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["w"] - - @w.setter - def w(self, val): - self["w"] = val - - # wsrc - # ---- - @property - def wsrc(self): - """ - Sets the source reference on plot.ly for w . - - The 'wsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["wsrc"] - - @wsrc.setter - def wsrc(self, val): - self["wsrc"] = val - - # x + # z # - @property - def x(self): + def z(self): """ - Sets the x coordinates of the vector field and of the displayed - cones. + Sets the color values. - The 'x' property is an array that may be specified as a tuple, + The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["x"] + return self["z"] - @x.setter - def x(self, val): - self["x"] = val + @z.setter + def z(self, val): + self["z"] = val - # xsrc - # ---- + # zauto + # ----- @property - def xsrc(self): + def zauto(self): """ - Sets the source reference on plot.ly for x . + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'zauto' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["xsrc"] + return self["zauto"] - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val + @zauto.setter + def zauto(self, val): + self["zauto"] = val - # y - # - + # zmax + # ---- @property - def y(self): + def zmax(self): """ - Sets the y coordinates of the vector field and of the displayed - cones. + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'zmax' property is a number and may be specified as: + - An int or float Returns ------- - numpy.ndarray + int|float """ - return self["y"] + return self["zmax"] - @y.setter - def y(self, val): - self["y"] = val + @zmax.setter + def zmax(self, val): + self["zmax"] = val - # ysrc + # zmid # ---- @property - def ysrc(self): + def zmid(self): """ - Sets the source reference on plot.ly for y . + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'zmid' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["ysrc"] + return self["zmid"] - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val + @zmid.setter + def zmid(self, val): + self["zmid"] = val - # z - # - + # zmin + # ---- @property - def z(self): + def zmin(self): """ - Sets the z coordinates of the vector field and of the displayed - cones. + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'zmin' property is a number and may be specified as: + - An int or float Returns ------- - numpy.ndarray + int|float """ - return self["z"] + return self["zmin"] - @z.setter - def z(self, val): - self["z"] = val + @zmin.setter + def zmin(self, val): + self["zmin"] = val # zsrc # ---- @@ -77212,10 +79439,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - anchor - Sets the cones' anchor with respect to their x/y/z - positions. Note that "cm" denote the cone's center of - mass which corresponds to 1/4 from the tail to tip. autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -77223,24 +79446,6 @@ def _prop_descriptions(self): `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -77249,8 +79454,8 @@ def _prop_descriptions(self): `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.cone.ColorBar instance or dict - with compatible properties + plotly.graph_objects.choropleth.ColorBar instance or + dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -77258,7 +79463,7 @@ def _prop_descriptions(self): a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. + colorscale in color space, use`zmin` and `zmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H @@ -77270,6 +79475,12 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -77278,8 +79489,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.cone.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.choropleth.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -77288,17 +79499,21 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variable `norm` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -77312,12 +79527,17 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lighting - plotly.graph_objects.cone.Lighting instance or dict + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on plot.ly for locations . + marker + plotly.graph_objects.choropleth.Marker instance or dict with compatible properties - lightposition - plotly.graph_objects.cone.Lightposition instance or - dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -77336,56 +79556,30 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. reversescale - Reverses the color mapping if true. If true, `cmin` + Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. + `zmax` will correspond to the first color. + selected + plotly.graph_objects.choropleth.Selected instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showscale Determines whether or not a colorbar is displayed for this trace. - sizemode - Determines whether `sizeref` is set as a "scaled" (i.e - unitless) scalar (normalized by the max u/v/w norm in - the vector field) or as "absolute" value (in the same - units as the vector field). - sizeref - Adjusts the cone size scaling. The size of the cones is - determined by their u/v/w norm multiplied a factor and - `sizeref`. This factor (computed internally) - corresponds to the minimum "time" to travel across two - successive x/y/z positions at the average velocity of - those two successive positions. All cones in a given - trace use the same factor. With `sizemode` set to - "scaled", `sizeref` is unitless, its default value is - 0.5 With `sizemode` set to "absolute", `sizeref` has - the same units as the u/v/w vector field, its the - default value is half the sample's maximum vector norm. stream - plotly.graph_objects.cone.Stream instance or dict with - compatible properties + plotly.graph_objects.choropleth.Stream instance or dict + with compatible properties text - Sets the text elements associated with the cones. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets the text elements associated with each location. textsrc Sets the source reference on plot.ly for text . - u - Sets the x components of the vector field. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -77408,34 +79602,34 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - usrc - Sets the source reference on plot.ly for u . - v - Sets the y components of the vector field. + unselected + plotly.graph_objects.choropleth.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - vsrc - Sets the source reference on plot.ly for v . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on plot.ly for w . - x - Sets the x coordinates of the vector field and of the - displayed cones. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates of the vector field and of the - displayed cones. - ysrc - Sets the source reference on plot.ly for y . z - Sets the z coordinates of the vector field and of the - displayed cones. + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. zsrc Sets the source reference on plot.ly for z . """ @@ -77443,17 +79637,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - anchor=None, autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, + geo=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, @@ -77463,54 +79653,44 @@ def __init__( hovertextsrc=None, ids=None, idssrc=None, - lighting=None, - lightposition=None, + locationmode=None, + locations=None, + locationssrc=None, + marker=None, meta=None, metasrc=None, name=None, - opacity=None, reversescale=None, - scene=None, + selected=None, + selectedpoints=None, showscale=None, - sizemode=None, - sizeref=None, stream=None, text=None, textsrc=None, - u=None, uid=None, uirevision=None, - usrc=None, - v=None, + unselected=None, visible=None, - vsrc=None, - w=None, - wsrc=None, - x=None, - xsrc=None, - y=None, - ysrc=None, z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, zsrc=None, **kwargs ): """ - Construct a new Cone object + Construct a new Choropleth object - Use cone traces to visualize vector fields. Specify a vector - field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and - 3 vector component arrays `u`, `v`, `w`. The cones are drawn - exactly at the positions given by `x`, `y` and `z`. + The data that describes the choropleth value-to-color mapping + is set in `z`. The geographic locations corresponding to each + value in `z` are set in `locations`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Cone - anchor - Sets the cones' anchor with respect to their x/y/z - positions. Note that "cm" denote the cone's center of - mass which corresponds to 1/4 from the tail to tip. + an instance of plotly.graph_objs.Choropleth autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by @@ -77518,24 +79698,6 @@ def __init__( `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is computed - with respect to the input data (here u/v/w norm) or the - bounds set in `cmin` and `cmax` Defaults to `false` - when `cmin` and `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmin` - must be set as well. - cmid - Sets the mid-point of the color domain by scaling - `cmin` and/or `cmax` to be equidistant to this point. - Value should have the same units as u/v/w norm. Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value should - have the same units as u/v/w norm and if set, `cmax` - must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", @@ -77544,8 +79706,8 @@ def __init__( `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar - plotly.graph_objects.cone.ColorBar instance or dict - with compatible properties + plotly.graph_objects.choropleth.ColorBar instance or + dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, @@ -77553,7 +79715,7 @@ def __init__( a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`cmin` and `cmax`. + colorscale in color space, use`zmin` and `zmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H @@ -77565,6 +79727,12 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -77573,8 +79741,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.cone.Hoverlabel instance or dict - with compatible properties + plotly.graph_objects.choropleth.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -77583,17 +79751,21 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variable `norm` Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -77607,12 +79779,17 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - lighting - plotly.graph_objects.cone.Lighting instance or dict + locationmode + Determines the set of locations used to match entries + in `locations` to regions on the map. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on plot.ly for locations . + marker + plotly.graph_objects.choropleth.Marker instance or dict with compatible properties - lightposition - plotly.graph_objects.cone.Lightposition instance or - dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -77631,56 +79808,30 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - opacity - Sets the opacity of the surface. Please note that in - the case of using high `opacity` values for example a - value greater than or equal to 0.5 on two surfaces (and - 0.25 with four surfaces), an overlay of multiple - transparent surfaces may not perfectly be sorted in - depth by the webgl API. This behavior may be improved - in the near future and is subject to change. reversescale - Reverses the color mapping if true. If true, `cmin` + Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and - `cmax` will correspond to the first color. - scene - Sets a reference between this trace's 3D coordinate - system and a 3D scene. If "scene" (the default value), - the (x,y,z) coordinates refer to `layout.scene`. If - "scene2", the (x,y,z) coordinates refer to - `layout.scene2`, and so on. + `zmax` will correspond to the first color. + selected + plotly.graph_objects.choropleth.Selected instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. showscale Determines whether or not a colorbar is displayed for this trace. - sizemode - Determines whether `sizeref` is set as a "scaled" (i.e - unitless) scalar (normalized by the max u/v/w norm in - the vector field) or as "absolute" value (in the same - units as the vector field). - sizeref - Adjusts the cone size scaling. The size of the cones is - determined by their u/v/w norm multiplied a factor and - `sizeref`. This factor (computed internally) - corresponds to the minimum "time" to travel across two - successive x/y/z positions at the average velocity of - those two successive positions. All cones in a given - trace use the same factor. With `sizemode` set to - "scaled", `sizeref` is unitless, its default value is - 0.5 With `sizemode` set to "absolute", `sizeref` has - the same units as the u/v/w vector field, its the - default value is half the sample's maximum vector norm. stream - plotly.graph_objects.cone.Stream instance or dict with - compatible properties + plotly.graph_objects.choropleth.Stream instance or dict + with compatible properties text - Sets the text elements associated with the cones. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. + Sets the text elements associated with each location. textsrc Sets the source reference on plot.ly for text . - u - Sets the x components of the vector field. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -77703,42 +79854,42 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - usrc - Sets the source reference on plot.ly for u . - v - Sets the y components of the vector field. + unselected + plotly.graph_objects.choropleth.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - vsrc - Sets the source reference on plot.ly for v . - w - Sets the z components of the vector field. - wsrc - Sets the source reference on plot.ly for w . - x - Sets the x coordinates of the vector field and of the - displayed cones. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates of the vector field and of the - displayed cones. - ysrc - Sets the source reference on plot.ly for y . z - Sets the z coordinates of the vector field and of the - displayed cones. + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. zsrc Sets the source reference on plot.ly for z . Returns ------- - Cone + Choropleth """ - super(Cone, self).__init__("cone") + super(Choropleth, self).__init__("choropleth") # Validate arg # ------------ @@ -77751,9 +79902,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Cone +The first argument to the plotly.graph_objs.Choropleth constructor must be a dict or -an instance of plotly.graph_objs.Cone""" +an instance of plotly.graph_objs.Choropleth""" ) # Handle skip_invalid @@ -77762,74 +79913,55 @@ def __init__( # Import validators # ----------------- - from plotly.validators import cone as v_cone + from plotly.validators import choropleth as v_choropleth # Initialize validators # --------------------- - self._validators["anchor"] = v_cone.AnchorValidator() - self._validators["autocolorscale"] = v_cone.AutocolorscaleValidator() - self._validators["cauto"] = v_cone.CautoValidator() - self._validators["cmax"] = v_cone.CmaxValidator() - self._validators["cmid"] = v_cone.CmidValidator() - self._validators["cmin"] = v_cone.CminValidator() - self._validators["coloraxis"] = v_cone.ColoraxisValidator() - self._validators["colorbar"] = v_cone.ColorBarValidator() - self._validators["colorscale"] = v_cone.ColorscaleValidator() - self._validators["customdata"] = v_cone.CustomdataValidator() - self._validators["customdatasrc"] = v_cone.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_cone.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_cone.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_cone.HoverlabelValidator() - self._validators["hovertemplate"] = v_cone.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_cone.HovertemplatesrcValidator() - self._validators["hovertext"] = v_cone.HovertextValidator() - self._validators["hovertextsrc"] = v_cone.HovertextsrcValidator() - self._validators["ids"] = v_cone.IdsValidator() - self._validators["idssrc"] = v_cone.IdssrcValidator() - self._validators["lighting"] = v_cone.LightingValidator() - self._validators["lightposition"] = v_cone.LightpositionValidator() - self._validators["meta"] = v_cone.MetaValidator() - self._validators["metasrc"] = v_cone.MetasrcValidator() - self._validators["name"] = v_cone.NameValidator() - self._validators["opacity"] = v_cone.OpacityValidator() - self._validators["reversescale"] = v_cone.ReversescaleValidator() - self._validators["scene"] = v_cone.SceneValidator() - self._validators["showscale"] = v_cone.ShowscaleValidator() - self._validators["sizemode"] = v_cone.SizemodeValidator() - self._validators["sizeref"] = v_cone.SizerefValidator() - self._validators["stream"] = v_cone.StreamValidator() - self._validators["text"] = v_cone.TextValidator() - self._validators["textsrc"] = v_cone.TextsrcValidator() - self._validators["u"] = v_cone.UValidator() - self._validators["uid"] = v_cone.UidValidator() - self._validators["uirevision"] = v_cone.UirevisionValidator() - self._validators["usrc"] = v_cone.UsrcValidator() - self._validators["v"] = v_cone.VValidator() - self._validators["visible"] = v_cone.VisibleValidator() - self._validators["vsrc"] = v_cone.VsrcValidator() - self._validators["w"] = v_cone.WValidator() - self._validators["wsrc"] = v_cone.WsrcValidator() - self._validators["x"] = v_cone.XValidator() - self._validators["xsrc"] = v_cone.XsrcValidator() - self._validators["y"] = v_cone.YValidator() - self._validators["ysrc"] = v_cone.YsrcValidator() - self._validators["z"] = v_cone.ZValidator() - self._validators["zsrc"] = v_cone.ZsrcValidator() + self._validators["autocolorscale"] = v_choropleth.AutocolorscaleValidator() + self._validators["coloraxis"] = v_choropleth.ColoraxisValidator() + self._validators["colorbar"] = v_choropleth.ColorBarValidator() + self._validators["colorscale"] = v_choropleth.ColorscaleValidator() + self._validators["customdata"] = v_choropleth.CustomdataValidator() + self._validators["customdatasrc"] = v_choropleth.CustomdatasrcValidator() + self._validators["geo"] = v_choropleth.GeoValidator() + self._validators["hoverinfo"] = v_choropleth.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_choropleth.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_choropleth.HoverlabelValidator() + self._validators["hovertemplate"] = v_choropleth.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_choropleth.HovertemplatesrcValidator() + self._validators["hovertext"] = v_choropleth.HovertextValidator() + self._validators["hovertextsrc"] = v_choropleth.HovertextsrcValidator() + self._validators["ids"] = v_choropleth.IdsValidator() + self._validators["idssrc"] = v_choropleth.IdssrcValidator() + self._validators["locationmode"] = v_choropleth.LocationmodeValidator() + self._validators["locations"] = v_choropleth.LocationsValidator() + self._validators["locationssrc"] = v_choropleth.LocationssrcValidator() + self._validators["marker"] = v_choropleth.MarkerValidator() + self._validators["meta"] = v_choropleth.MetaValidator() + self._validators["metasrc"] = v_choropleth.MetasrcValidator() + self._validators["name"] = v_choropleth.NameValidator() + self._validators["reversescale"] = v_choropleth.ReversescaleValidator() + self._validators["selected"] = v_choropleth.SelectedValidator() + self._validators["selectedpoints"] = v_choropleth.SelectedpointsValidator() + self._validators["showscale"] = v_choropleth.ShowscaleValidator() + self._validators["stream"] = v_choropleth.StreamValidator() + self._validators["text"] = v_choropleth.TextValidator() + self._validators["textsrc"] = v_choropleth.TextsrcValidator() + self._validators["uid"] = v_choropleth.UidValidator() + self._validators["uirevision"] = v_choropleth.UirevisionValidator() + self._validators["unselected"] = v_choropleth.UnselectedValidator() + self._validators["visible"] = v_choropleth.VisibleValidator() + self._validators["z"] = v_choropleth.ZValidator() + self._validators["zauto"] = v_choropleth.ZautoValidator() + self._validators["zmax"] = v_choropleth.ZmaxValidator() + self._validators["zmid"] = v_choropleth.ZmidValidator() + self._validators["zmin"] = v_choropleth.ZminValidator() + self._validators["zsrc"] = v_choropleth.ZsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("anchor", None) - self["anchor"] = anchor if anchor is not None else _v _v = arg.pop("autocolorscale", None) self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("cauto", None) - self["cauto"] = cauto if cauto is not None else _v - _v = arg.pop("cmax", None) - self["cmax"] = cmax if cmax is not None else _v - _v = arg.pop("cmid", None) - self["cmid"] = cmid if cmid is not None else _v - _v = arg.pop("cmin", None) - self["cmin"] = cmin if cmin is not None else _v _v = arg.pop("coloraxis", None) self["coloraxis"] = coloraxis if coloraxis is not None else _v _v = arg.pop("colorbar", None) @@ -77840,6 +79972,8 @@ def __init__( self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("geo", None) + self["geo"] = geo if geo is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) @@ -77860,62 +79994,52 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("lighting", None) - self["lighting"] = lighting if lighting is not None else _v - _v = arg.pop("lightposition", None) - self["lightposition"] = lightposition if lightposition is not None else _v + _v = arg.pop("locationmode", None) + self["locationmode"] = locationmode if locationmode is not None else _v + _v = arg.pop("locations", None) + self["locations"] = locations if locations is not None else _v + _v = arg.pop("locationssrc", None) + self["locationssrc"] = locationssrc if locationssrc is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("reversescale", None) self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("scene", None) - self["scene"] = scene if scene is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showscale", None) self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("sizemode", None) - self["sizemode"] = sizemode if sizemode is not None else _v - _v = arg.pop("sizeref", None) - self["sizeref"] = sizeref if sizeref is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("u", None) - self["u"] = u if u is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("usrc", None) - self["usrc"] = usrc if usrc is not None else _v - _v = arg.pop("v", None) - self["v"] = v if v is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("vsrc", None) - self["vsrc"] = vsrc if vsrc is not None else _v - _v = arg.pop("w", None) - self["w"] = w if w is not None else _v - _v = arg.pop("wsrc", None) - self["wsrc"] = wsrc if wsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v _v = arg.pop("z", None) self["z"] = z if z is not None else _v + _v = arg.pop("zauto", None) + self["zauto"] = zauto if zauto is not None else _v + _v = arg.pop("zmax", None) + self["zmax"] = zmax if zmax is not None else _v + _v = arg.pop("zmid", None) + self["zmid"] = zmid if zmid is not None else _v + _v = arg.pop("zmin", None) + self["zmin"] = zmin if zmin is not None else _v _v = arg.pop("zsrc", None) self["zsrc"] = zsrc if zsrc is not None else _v @@ -77923,9 +80047,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "cone" + self._props["type"] = "choropleth" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="cone", val="cone" + plotly_name="type", parent_name="choropleth", val="choropleth" ) arg.pop("type", None) @@ -77942,132 +80066,409 @@ def __init__( import copy as _copy -class Choroplethmapbox(_BaseTraceType): +class Carpet(_BaseTraceType): - # autocolorscale - # -------------- + # a + # - @property - def autocolorscale(self): + def a(self): """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. + An array containing values of the first parameter value - The 'autocolorscale' property must be specified as a bool - (either True, or False) + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - bool + numpy.ndarray """ - return self["autocolorscale"] + return self["a"] - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val + @a.setter + def a(self, val): + self["a"] = val - # below + # a0 + # -- + @property + def a0(self): + """ + Alternate to `a`. Builds a linear space of a coordinates. Use + with `da` where `a0` is the starting coordinate and `da` the + step. + + The 'a0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["a0"] + + @a0.setter + def a0(self, val): + self["a0"] = val + + # aaxis # ----- @property - def below(self): + def aaxis(self): """ - Determines if the choropleth polygons will be inserted before - the layer with the specified ID. By default, choroplethmapbox - traces are placed above the water layers. If set to '', the - layer will be inserted above every existing layer. + The 'aaxis' property is an instance of Aaxis + that may be specified as: + - An instance of plotly.graph_objs.carpet.Aaxis + - A dict of string/value properties that will be passed + to the Aaxis constructor - The 'below' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on plot.ly for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at + along the final value of this axis. If True, + the end line is drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major + grid tick + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showticklabels + Determines whether axis labels are drawn on the + low side, the high side, both, or neither side + of the axis. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at + along the starting value of this axis. If True, + the start line is drawn on top of the grid + lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: We add one item to d3's + date formatter: "%{n}f" for fractional seconds + with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" + would display "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.carpet.aaxis.Ti + ckformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.carpet.aaxis.tickformatstopdefaults), sets + the default property values to use for elements + of carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + title + plotly.graph_objects.carpet.aaxis.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use carpet.aaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be set by the now + deprecated `titlefont` attribute. + titleoffset + Deprecated: Please use + carpet.aaxis.title.offset instead. An + additional amount by which to offset the title + from the tick labels, given in pixels. Note + that this used to be set by the now deprecated + `titleoffset` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. Returns ------- - str + plotly.graph_objs.carpet.Aaxis """ - return self["below"] + return self["aaxis"] - @below.setter - def below(self, val): - self["below"] = val + @aaxis.setter + def aaxis(self, val): + self["aaxis"] = val - # coloraxis - # --------- + # asrc + # ---- @property - def coloraxis(self): + def asrc(self): """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. + Sets the source reference on plot.ly for a . - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["coloraxis"] + return self["asrc"] - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val + @asrc.setter + def asrc(self, val): + self["asrc"] = val - # colorbar - # -------- + # b + # - @property - def colorbar(self): + def b(self): """ - The 'colorbar' property is an instance of ColorBar + A two dimensional array of y coordinates at each carpet point. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # b0 + # -- + @property + def b0(self): + """ + Alternate to `b`. Builds a linear space of a coordinates. Use + with `db` where `b0` is the starting coordinate and `db` the + step. + + The 'b0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["b0"] + + @b0.setter + def b0(self, val): + self["b0"] = val + + # baxis + # ----- + @property + def baxis(self): + """ + The 'baxis' property is an instance of Baxis that may be specified as: - - An instance of plotly.graph_objs.choroplethmapbox.ColorBar + - An instance of plotly.graph_objs.carpet.Baxis - A dict of string/value properties that will be passed - to the ColorBar constructor + to the Baxis constructor Supported dict properties: - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on plot.ly for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at + along the final value of this axis. If True, + the end line is drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. exponentformat Determines a formatting rule for the tick exponents. For example, consider the number @@ -78075,26 +80476,54 @@ def colorbar(self): 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the axis line color. + gridwidth + Sets the width (in px) of the axis line. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major + grid tick + minorgridwidth + Sets the width (in px) of the grid lines. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. separatethousands If "true", even 4-digit integers are separated showexponent @@ -78103,9 +80532,17 @@ def colorbar(self): the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. showticklabels - Determines whether or not the tick labels are - drawn. + Determines whether axis labels are drawn on the + low side, the high side, both, or neither side + of the axis. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is @@ -78114,80 +80551,49 @@ def colorbar(self): "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. + smoothing + + startline + Determines whether or not a line is drawn at + along the starting value of this axis. If True, + the start line is drawn on top of the grid + lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. + The starting index of grid lines along the axis tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. tickfont - Sets the color bar's tick label font + Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" + And for dates see: We add one item to d3's + date formatter: "%{n}f" for fractional seconds + with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" + would display "09~15~23.46" tickformatstops - A tuple of plotly.graph_objects.choroplethmapbo - x.colorbar.Tickformatstop instances or dicts - with compatible properties + A tuple of plotly.graph_objects.carpet.baxis.Ti + ckformatstop instances or dicts with compatible + properties tickformatstopdefaults When used in a template (as layout.template.dat - a.choroplethmapbox.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - choroplethmapbox.colorbar.tickformatstops - ticklen - Sets the tick length (in px). + a.carpet.baxis.tickformatstopdefaults), sets + the default property values to use for elements + of carpet.baxis.tickformatstops tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). + tickprefix Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext @@ -78205,376 +80611,290 @@ def colorbar(self): tickvalssrc Sets the source reference on plot.ly for tickvals . - tickwidth - Sets the tick width (in px). title - plotly.graph_objects.choroplethmapbox.colorbar. - Title instance or dict with compatible - properties + plotly.graph_objects.carpet.baxis.Title + instance or dict with compatible properties titlefont - Deprecated: Please use - choroplethmapbox.colorbar.title.font instead. - Sets this color bar's title font. Note that the - title's font used to be set by the now + Deprecated: Please use carpet.baxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be set by the now deprecated `titlefont` attribute. - titleside + titleoffset Deprecated: Please use - choroplethmapbox.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. - - Returns - ------- - plotly.graph_objs.choroplethmapbox.ColorBar - """ - return self["colorbar"] - - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val - - # colorscale - # ---------- - @property - def colorscale(self): - """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. - - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] - - Returns - ------- - str - """ - return self["colorscale"] - - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + carpet.baxis.title.offset instead. An + additional amount by which to offset the title + from the tick labels, given in pixels. Note + that this used to be set by the now deprecated + `titleoffset` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. Returns ------- - numpy.ndarray + plotly.graph_objs.carpet.Baxis """ - return self["customdata"] + return self["baxis"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @baxis.setter + def baxis(self, val): + self["baxis"] = val - # customdatasrc - # ------------- + # bsrc + # ---- @property - def customdatasrc(self): + def bsrc(self): """ - Sets the source reference on plot.ly for customdata . + Sets the source reference on plot.ly for b . - The 'customdatasrc' property must be specified as a string or + The 'bsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["customdatasrc"] - - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val - - # geojson - # ------- - @property - def geojson(self): - """ - Sets the GeoJSON data associated with this trace. Can be set as - a valid GeoJSON object or as URL string Note that we only - accept GeoJSON of type "FeatureCollection" and "Feature" with - geometries of type "Polygon" and "MultiPolygon". - - The 'geojson' property accepts values of any type - - Returns - ------- - Any - """ - return self["geojson"] + return self["bsrc"] - @geojson.setter - def geojson(self, val): - self["geojson"] = val + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val - # hoverinfo - # --------- + # carpet + # ------ @property - def hoverinfo(self): + def carpet(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + An identifier for this carpet, so that `scattercarpet` and + `contourcarpet` traces can specify a carpet plot on which they + lie - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'location+z') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - Any|numpy.ndarray + str """ - return self["hoverinfo"] + return self["carpet"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @carpet.setter + def carpet(self, val): + self["carpet"] = val - # hoverinfosrc + # cheaterslope # ------------ @property - def hoverinfosrc(self): + def cheaterslope(self): """ - Sets the source reference on plot.ly for hoverinfo . + The shift applied to each successive row of data in creating a + cheater plot. Only used if `x` is been ommitted. - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'cheaterslope' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["hoverinfosrc"] + return self["cheaterslope"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @cheaterslope.setter + def cheaterslope(self, val): + self["cheaterslope"] = val - # hoverlabel - # ---------- + # color + # ----- @property - def hoverlabel(self): + def color(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.choroplethmapbox.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen Returns ------- - plotly.graph_objs.choroplethmapbox.Hoverlabel + str """ - return self["hoverlabel"] + return self["color"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @color.setter + def color(self, val): + self["color"] = val - # hovertemplate - # ------------- + # customdata + # ---------- @property - def hovertemplate(self): + def customdata(self): """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - variable `properties` Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary box - completely, use an empty tag ``. + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str|numpy.ndarray + numpy.ndarray """ - return self["hovertemplate"] + return self["customdata"] - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # hovertemplatesrc - # ---------------- + # customdatasrc + # ------------- @property - def hovertemplatesrc(self): + def customdatasrc(self): """ - Sets the source reference on plot.ly for hovertemplate . + Sets the source reference on plot.ly for customdata . - The 'hovertemplatesrc' property must be specified as a string or + The 'customdatasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["hovertemplatesrc"] + return self["customdatasrc"] - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # hovertext - # --------- + # da + # -- @property - def hovertext(self): + def da(self): """ - Same as `text`. + Sets the a coordinate step. See `a0` for more info. - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'da' property is a number and may be specified as: + - An int or float Returns ------- - str|numpy.ndarray + int|float """ - return self["hovertext"] + return self["da"] - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val + @da.setter + def da(self, val): + self["da"] = val - # hovertextsrc - # ------------ + # db + # -- @property - def hovertextsrc(self): + def db(self): """ - Sets the source reference on plot.ly for hovertext . + Sets the b coordinate step. See `b0` for more info. - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'db' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["hovertextsrc"] + return self["db"] - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val + @db.setter + def db(self, val): + self["db"] = val + + # font + # ---- + @property + def font(self): + """ + The default font used for axis & tick labels on this carpet + + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.carpet.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.carpet.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val # ids # --- @@ -78618,79 +80938,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # locations - # --------- - @property - def locations(self): - """ - Sets which features found in "geojson" to plot using their - feature `id` field. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on plot.ly for locations . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # marker - # ------ - @property - def marker(self): - """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of plotly.graph_objs.choroplethmapbox.Marker - - A dict of string/value properties that will be passed - to the Marker constructor - - Supported dict properties: - - line - plotly.graph_objects.choroplethmapbox.marker.Li - ne instance or dict with compatible properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on plot.ly for - opacity . - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - # meta # ---- @property @@ -78761,100 +81008,25 @@ def name(self): def name(self, val): self["name"] = val - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.choroplethmapbox.Selected - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - plotly.graph_objects.choroplethmapbox.selected. - Marker instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showscale - # --------- + # opacity + # ------- @property - def showscale(self): + def opacity(self): """ - Determines whether or not a colorbar is displayed for this - trace. + Sets the opacity of the trace. - The 'showscale' property must be specified as a bool - (either True, or False) + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - bool + int|float """ - return self["showscale"] + return self["opacity"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @opacity.setter + def opacity(self, val): + self["opacity"] = val # stream # ------ @@ -78863,7 +81035,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.choroplethmapbox.Stream + - An instance of plotly.graph_objs.carpet.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -78881,7 +81053,7 @@ def stream(self): Returns ------- - plotly.graph_objs.choroplethmapbox.Stream + plotly.graph_objs.carpet.Stream """ return self["stream"] @@ -78889,73 +81061,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - mapbox subplot. If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data refer to - `layout.mapbox2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'mapbox', that may be specified as the string 'mapbox' - optionally followed by an integer >= 1 - (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each location. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on plot.ly for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - # uid # --- @property @@ -79011,34 +81116,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.choroplethmapbox.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - plotly.graph_objects.choroplethmapbox.unselecte - d.Marker instance or dict with compatible - properties - - Returns - ------- - plotly.graph_objs.choroplethmapbox.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - # visible # ------- @property @@ -79062,132 +81139,137 @@ def visible(self): def visible(self, val): self["visible"] = val - # z + # x # - @property - def z(self): + def x(self): """ - Sets the color values. + A two dimensional array of x coordinates at each carpet point. + If ommitted, the plot is a cheater plot and the xaxis is hidden + by default. - The 'z' property is an array that may be specified as a tuple, + The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["z"] + return self["x"] - @z.setter - def z(self, val): - self["z"] = val + @x.setter + def x(self, val): + self["x"] = val - # zauto + # xaxis # ----- @property - def zauto(self): + def xaxis(self): """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - The 'zauto' property must be specified as a bool - (either True, or False) + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - bool + str """ - return self["zauto"] + return self["xaxis"] - @zauto.setter - def zauto(self, val): - self["zauto"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # zmax + # xsrc # ---- @property - def zmax(self): + def xsrc(self): """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. + Sets the source reference on plot.ly for x . - The 'zmax' property is a number and may be specified as: - - An int or float + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["zmax"] + return self["xsrc"] - @zmax.setter - def zmax(self, val): - self["zmax"] = val + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val - # zmid - # ---- + # y + # - @property - def zmid(self): + def y(self): """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. + A two dimensional array of y coordinates at each carpet point. - The 'zmid' property is a number and may be specified as: - - An int or float + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - int|float + numpy.ndarray """ - return self["zmid"] + return self["y"] - @zmid.setter - def zmid(self, val): - self["zmid"] = val + @y.setter + def y(self, val): + self["y"] = val - # zmin - # ---- + # yaxis + # ----- @property - def zmin(self): + def yaxis(self): """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. - The 'zmin' property is a number and may be specified as: - - An int or float + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) Returns ------- - int|float + str """ - return self["zmin"] + return self["yaxis"] - @zmin.setter - def zmin(self, val): - self["zmin"] = val + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val - # zsrc + # ysrc # ---- @property - def zsrc(self): + def ysrc(self): """ - Sets the source reference on plot.ly for z . + Sets the source reference on plot.ly for y . - The 'zsrc' property must be specified as a string or + The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["zsrc"] + return self["ysrc"] - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val # type # ---- @@ -79206,41 +81288,42 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be inserted - before the layer with the specified ID. By default, - choroplethmapbox traces are placed above the water - layers. If set to '', the layer will be inserted above - every existing layer. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.choroplethmapbox.ColorBar instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + plotly.graph_objects.carpet.Aaxis instance or dict with + compatible properties + asrc + Sets the source reference on plot.ly for a . + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + plotly.graph_objects.carpet.Baxis instance or dict with + compatible properties + bsrc + Sets the source reference on plot.ly for b . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + ommitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -79248,62 +81331,19 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - geojson - Sets the GeoJSON data associated with this trace. Can - be set as a valid GeoJSON object or as URL string Note - that we only accept GeoJSON of type "FeatureCollection" - and "Feature" with geometries of type "Polygon" and - "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.choroplethmapbox.Hoverlabel - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variable `properties` Anything contained in - tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - locations - Sets which features found in "geojson" to plot using - their feature `id` field. - locationssrc - Sets the source reference on plot.ly for locations . - marker - plotly.graph_objects.choroplethmapbox.Marker instance - or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -79322,35 +81362,11 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - plotly.graph_objects.choroplethmapbox.Selected instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showscale - Determines whether or not a colorbar is displayed for - this trace. + opacity + Sets the opacity of the trace. stream - plotly.graph_objects.choroplethmapbox.Stream instance - or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on plot.ly for text . + plotly.graph_objects.carpet.Stream instance or dict + with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -79373,131 +81389,122 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.choroplethmapbox.Unselected - instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . + x + A two dimensional array of x coordinates at each carpet + point. If ommitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . """ def __init__( self, arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, + a=None, + a0=None, + aaxis=None, + asrc=None, + b=None, + b0=None, + baxis=None, + bsrc=None, + carpet=None, + cheaterslope=None, + color=None, customdata=None, customdatasrc=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, + da=None, + db=None, + font=None, ids=None, idssrc=None, - locations=None, - locationssrc=None, - marker=None, meta=None, metasrc=None, name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showscale=None, + opacity=None, stream=None, - subplot=None, - text=None, - textsrc=None, uid=None, uirevision=None, - unselected=None, visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + x=None, + xaxis=None, + xsrc=None, + y=None, + yaxis=None, + ysrc=None, **kwargs ): """ - Construct a new Choroplethmapbox object + Construct a new Carpet object - GeoJSON features to be filled are set in `geojson` The data - that describes the choropleth value-to-color mapping is set in - `locations` and `z`. + The data describing carpet axis layout is set in `y` and + (optionally) also `x`. If only `y` is present, `x` the plot is + interpreted as a cheater plot and is filled in using the `y` + values. `x` and `y` may either be 2D arrays matching with each + dimension matching that of `a` and `b`, or they may be 1D + arrays with total length equal to that of `a` and `b`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Choroplethmapbox - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be inserted - before the layer with the specified ID. By default, - choroplethmapbox traces are placed above the water - layers. If set to '', the layer will be inserted above - every existing layer. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.choroplethmapbox.ColorBar instance - or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. + an instance of plotly.graph_objs.Carpet + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + plotly.graph_objects.carpet.Aaxis instance or dict with + compatible properties + asrc + Sets the source reference on plot.ly for a . + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + plotly.graph_objects.carpet.Baxis instance or dict with + compatible properties + bsrc + Sets the source reference on plot.ly for b . + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + ommitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -79505,62 +81512,19 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - geojson - Sets the GeoJSON data associated with this trace. Can - be set as a valid GeoJSON object or as URL string Note - that we only accept GeoJSON of type "FeatureCollection" - and "Feature" with geometries of type "Polygon" and - "MultiPolygon". - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.choroplethmapbox.Hoverlabel - instance or dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. variable `properties` Anything contained in - tag `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - locations - Sets which features found in "geojson" to plot using - their feature `id` field. - locationssrc - Sets the source reference on plot.ly for locations . - marker - plotly.graph_objects.choroplethmapbox.Marker instance - or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -79579,35 +81543,11 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - plotly.graph_objects.choroplethmapbox.Selected instance - or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showscale - Determines whether or not a colorbar is displayed for - this trace. + opacity + Sets the opacity of the trace. stream - plotly.graph_objects.choroplethmapbox.Stream instance - or dict with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a mapbox subplot. If "mapbox" (the default value), - the data refer to `layout.mapbox`. If "mapbox2", the - data refer to `layout.mapbox2`, and so on. - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on plot.ly for text . + plotly.graph_objects.carpet.Stream instance or dict + with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -79625,47 +81565,43 @@ def __init__( (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.choroplethmapbox.Unselected - instance or dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If ommitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . Returns ------- - Choroplethmapbox + Carpet """ - super(Choroplethmapbox, self).__init__("choroplethmapbox") + super(Carpet, self).__init__("carpet") # Validate arg # ------------ @@ -79678,9 +81614,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Choroplethmapbox +The first argument to the plotly.graph_objs.Carpet constructor must be a dict or -an instance of plotly.graph_objs.Choroplethmapbox""" +an instance of plotly.graph_objs.Carpet""" ) # Handle skip_invalid @@ -79689,152 +81625,117 @@ def __init__( # Import validators # ----------------- - from plotly.validators import choroplethmapbox as v_choroplethmapbox + from plotly.validators import carpet as v_carpet # Initialize validators # --------------------- - self._validators[ - "autocolorscale" - ] = v_choroplethmapbox.AutocolorscaleValidator() - self._validators["below"] = v_choroplethmapbox.BelowValidator() - self._validators["coloraxis"] = v_choroplethmapbox.ColoraxisValidator() - self._validators["colorbar"] = v_choroplethmapbox.ColorBarValidator() - self._validators["colorscale"] = v_choroplethmapbox.ColorscaleValidator() - self._validators["customdata"] = v_choroplethmapbox.CustomdataValidator() - self._validators["customdatasrc"] = v_choroplethmapbox.CustomdatasrcValidator() - self._validators["geojson"] = v_choroplethmapbox.GeojsonValidator() - self._validators["hoverinfo"] = v_choroplethmapbox.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_choroplethmapbox.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_choroplethmapbox.HoverlabelValidator() - self._validators["hovertemplate"] = v_choroplethmapbox.HovertemplateValidator() - self._validators[ - "hovertemplatesrc" - ] = v_choroplethmapbox.HovertemplatesrcValidator() - self._validators["hovertext"] = v_choroplethmapbox.HovertextValidator() - self._validators["hovertextsrc"] = v_choroplethmapbox.HovertextsrcValidator() - self._validators["ids"] = v_choroplethmapbox.IdsValidator() - self._validators["idssrc"] = v_choroplethmapbox.IdssrcValidator() - self._validators["locations"] = v_choroplethmapbox.LocationsValidator() - self._validators["locationssrc"] = v_choroplethmapbox.LocationssrcValidator() - self._validators["marker"] = v_choroplethmapbox.MarkerValidator() - self._validators["meta"] = v_choroplethmapbox.MetaValidator() - self._validators["metasrc"] = v_choroplethmapbox.MetasrcValidator() - self._validators["name"] = v_choroplethmapbox.NameValidator() - self._validators["reversescale"] = v_choroplethmapbox.ReversescaleValidator() - self._validators["selected"] = v_choroplethmapbox.SelectedValidator() - self._validators[ - "selectedpoints" - ] = v_choroplethmapbox.SelectedpointsValidator() - self._validators["showscale"] = v_choroplethmapbox.ShowscaleValidator() - self._validators["stream"] = v_choroplethmapbox.StreamValidator() - self._validators["subplot"] = v_choroplethmapbox.SubplotValidator() - self._validators["text"] = v_choroplethmapbox.TextValidator() - self._validators["textsrc"] = v_choroplethmapbox.TextsrcValidator() - self._validators["uid"] = v_choroplethmapbox.UidValidator() - self._validators["uirevision"] = v_choroplethmapbox.UirevisionValidator() - self._validators["unselected"] = v_choroplethmapbox.UnselectedValidator() - self._validators["visible"] = v_choroplethmapbox.VisibleValidator() - self._validators["z"] = v_choroplethmapbox.ZValidator() - self._validators["zauto"] = v_choroplethmapbox.ZautoValidator() - self._validators["zmax"] = v_choroplethmapbox.ZmaxValidator() - self._validators["zmid"] = v_choroplethmapbox.ZmidValidator() - self._validators["zmin"] = v_choroplethmapbox.ZminValidator() - self._validators["zsrc"] = v_choroplethmapbox.ZsrcValidator() + self._validators["a"] = v_carpet.AValidator() + self._validators["a0"] = v_carpet.A0Validator() + self._validators["aaxis"] = v_carpet.AaxisValidator() + self._validators["asrc"] = v_carpet.AsrcValidator() + self._validators["b"] = v_carpet.BValidator() + self._validators["b0"] = v_carpet.B0Validator() + self._validators["baxis"] = v_carpet.BaxisValidator() + self._validators["bsrc"] = v_carpet.BsrcValidator() + self._validators["carpet"] = v_carpet.CarpetValidator() + self._validators["cheaterslope"] = v_carpet.CheaterslopeValidator() + self._validators["color"] = v_carpet.ColorValidator() + self._validators["customdata"] = v_carpet.CustomdataValidator() + self._validators["customdatasrc"] = v_carpet.CustomdatasrcValidator() + self._validators["da"] = v_carpet.DaValidator() + self._validators["db"] = v_carpet.DbValidator() + self._validators["font"] = v_carpet.FontValidator() + self._validators["ids"] = v_carpet.IdsValidator() + self._validators["idssrc"] = v_carpet.IdssrcValidator() + self._validators["meta"] = v_carpet.MetaValidator() + self._validators["metasrc"] = v_carpet.MetasrcValidator() + self._validators["name"] = v_carpet.NameValidator() + self._validators["opacity"] = v_carpet.OpacityValidator() + self._validators["stream"] = v_carpet.StreamValidator() + self._validators["uid"] = v_carpet.UidValidator() + self._validators["uirevision"] = v_carpet.UirevisionValidator() + self._validators["visible"] = v_carpet.VisibleValidator() + self._validators["x"] = v_carpet.XValidator() + self._validators["xaxis"] = v_carpet.XAxisValidator() + self._validators["xsrc"] = v_carpet.XsrcValidator() + self._validators["y"] = v_carpet.YValidator() + self._validators["yaxis"] = v_carpet.YAxisValidator() + self._validators["ysrc"] = v_carpet.YsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("below", None) - self["below"] = below if below is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("a", None) + self["a"] = a if a is not None else _v + _v = arg.pop("a0", None) + self["a0"] = a0 if a0 is not None else _v + _v = arg.pop("aaxis", None) + self["aaxis"] = aaxis if aaxis is not None else _v + _v = arg.pop("asrc", None) + self["asrc"] = asrc if asrc is not None else _v + _v = arg.pop("b", None) + self["b"] = b if b is not None else _v + _v = arg.pop("b0", None) + self["b0"] = b0 if b0 is not None else _v + _v = arg.pop("baxis", None) + self["baxis"] = baxis if baxis is not None else _v + _v = arg.pop("bsrc", None) + self["bsrc"] = bsrc if bsrc is not None else _v + _v = arg.pop("carpet", None) + self["carpet"] = carpet if carpet is not None else _v + _v = arg.pop("cheaterslope", None) + self["cheaterslope"] = cheaterslope if cheaterslope is not None else _v + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("geojson", None) - self["geojson"] = geojson if geojson is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("da", None) + self["da"] = da if da is not None else _v + _v = arg.pop("db", None) + self["db"] = db if db is not None else _v + _v = arg.pop("font", None) + self["font"] = font if font is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ysrc", None) + self["ysrc"] = ysrc if ysrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "choroplethmapbox" + self._props["type"] = "carpet" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="choroplethmapbox", val="choroplethmapbox" + plotly_name="type", parent_name="carpet", val="carpet" ) arg.pop("type", None) @@ -79851,344 +81752,47 @@ def __init__( import copy as _copy -class Choropleth(_BaseTraceType): - - # autocolorscale - # -------------- - @property - def autocolorscale(self): - """ - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be chosen - according to whether numbers in the `color` array are all - positive, all negative or mixed. - - The 'autocolorscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["autocolorscale"] - - @autocolorscale.setter - def autocolorscale(self, val): - self["autocolorscale"] = val - - # coloraxis - # --------- - @property - def coloraxis(self): - """ - Sets a reference to a shared color axis. References to these - shared color axes are "coloraxis", "coloraxis2", "coloraxis3", - etc. Settings for these shared color axes are set in the - layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. - Note that multiple color scales can be linked to the same color - axis. - - The 'coloraxis' property is an identifier of a particular - subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' - optionally followed by an integer >= 1 - (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) - - Returns - ------- - str - """ - return self["coloraxis"] - - @coloraxis.setter - def coloraxis(self, val): - self["coloraxis"] = val +class Candlestick(_BaseTraceType): - # colorbar - # -------- + # close + # ----- @property - def colorbar(self): + def close(self): """ - The 'colorbar' property is an instance of ColorBar - that may be specified as: - - An instance of plotly.graph_objs.choropleth.ColorBar - - A dict of string/value properties that will be passed - to the ColorBar constructor + Sets the close values. - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Time-Formatting.md#format - We add one item to d3's date formatter: "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.choropleth.colo - rbar.Tickformatstop instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choropleth.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of choropleth.colorbar.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - tickwidth - Sets the tick width (in px). - title - plotly.graph_objects.choropleth.colorbar.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use - choropleth.colorbar.title.font instead. Sets - this color bar's title font. Note that the - title's font used to be set by the now - deprecated `titlefont` attribute. - titleside - Deprecated: Please use - choropleth.colorbar.title.side instead. - Determines the location of color bar's title - with respect to the color bar. Note that the - title's location used to be set by the now - deprecated `titleside` attribute. - x - Sets the x position of the color bar (in plot - fraction). - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. - xpad - Sets the amount of padding (in px) along the x - direction. - y - Sets the y position of the color bar (in plot - fraction). - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - ypad - Sets the amount of padding (in px) along the y - direction. + The 'close' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.choropleth.ColorBar + numpy.ndarray """ - return self["colorbar"] + return self["close"] - @colorbar.setter - def colorbar(self, val): - self["colorbar"] = val + @close.setter + def close(self, val): + self["close"] = val - # colorscale - # ---------- + # closesrc + # -------- @property - def colorscale(self): + def closesrc(self): """ - Sets the colorscale. The colorscale must be an array containing - arrays mapping a normalized value to an rgb, rgba, hex, hsl, - hsv, or named color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the - bounds of the colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name string of the - following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi - ridis,Cividis. + Sets the source reference on plot.ly for close . - The 'colorscale' property is a colorscale and may be - specified as: - - A list of colors that will be spaced evenly to create the colorscale. - Many predefined colorscale lists are included in the sequential, diverging, - and cyclical modules in the plotly.colors package. - - A list of 2-element lists where the first element is the - normalized color level value (starting at 0 and ending at 1), - and the second item is a valid color string. - (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - - One of the following named colorscales: - ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', - 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', - 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', - 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', - 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', - 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', - 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', - 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', - 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', - 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', - 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', - 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', - 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + The 'closesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["colorscale"] + return self["closesrc"] - @colorscale.setter - def colorscale(self, val): - self["colorscale"] = val + @closesrc.setter + def closesrc(self, val): + self["closesrc"] = val # customdata # ---------- @@ -80233,30 +81837,77 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # geo - # --- + # decreasing + # ---------- @property - def geo(self): + def decreasing(self): """ - Sets a reference between this trace's geospatial coordinates - and a geographic map. If "geo" (the default value), the - geospatial coordinates refer to `layout.geo`. If "geo2", the - geospatial coordinates refer to `layout.geo2`, and so on. + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of plotly.graph_objs.candlestick.Decreasing + - A dict of string/value properties that will be passed + to the Decreasing constructor - The 'geo' property is an identifier of a particular - subplot, of type 'geo', that may be specified as the string 'geo' - optionally followed by an integer >= 1 - (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + Supported dict properties: + + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. + line + plotly.graph_objects.candlestick.decreasing.Lin + e instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.candlestick.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + # high + # ---- + @property + def high(self): + """ + Sets the high values. + + The 'high' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["high"] + + @high.setter + def high(self, val): + self["high"] = val + + # highsrc + # ------- + @property + def highsrc(self): + """ + Sets the source reference on plot.ly for high . + + The 'highsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["geo"] + return self["highsrc"] - @geo.setter - def geo(self, val): - self["geo"] = val + @highsrc.setter + def highsrc(self, val): + self["highsrc"] = val # hoverinfo # --------- @@ -80269,8 +81920,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'location+z') + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -80311,7 +81962,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.choropleth.Hoverlabel + - An instance of plotly.graph_objs.candlestick.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -80352,10 +82003,13 @@ def hoverlabel(self): namelengthsrc Sets the source reference on plot.ly for namelength . + split + Show hover information (open, close, high, low) + in separate labels. Returns ------- - plotly.graph_objs.choropleth.Hoverlabel + plotly.graph_objs.candlestick.Hoverlabel """ return self["hoverlabel"] @@ -80363,63 +82017,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - # hovertext # --------- @property @@ -80504,158 +82101,48 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # locationmode - # ------------ - @property - def locationmode(self): - """ - Determines the set of locations used to match entries in - `locations` to regions on the map. - - The 'locationmode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['ISO-3', 'USA-states', 'country names'] - - Returns - ------- - Any - """ - return self["locationmode"] - - @locationmode.setter - def locationmode(self, val): - self["locationmode"] = val - - # locations - # --------- - @property - def locations(self): - """ - Sets the coordinates via location IDs or names. See - `locationmode` for more info. - - The 'locations' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["locations"] - - @locations.setter - def locations(self, val): - self["locations"] = val - - # locationssrc - # ------------ - @property - def locationssrc(self): - """ - Sets the source reference on plot.ly for locations . - - The 'locationssrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["locationssrc"] - - @locationssrc.setter - def locationssrc(self, val): - self["locationssrc"] = val - - # marker - # ------ + # increasing + # ---------- @property - def marker(self): + def increasing(self): """ - The 'marker' property is an instance of Marker + The 'increasing' property is an instance of Increasing that may be specified as: - - An instance of plotly.graph_objs.choropleth.Marker + - An instance of plotly.graph_objs.candlestick.Increasing - A dict of string/value properties that will be passed - to the Marker constructor + to the Increasing constructor Supported dict properties: + fillcolor + Sets the fill color. Defaults to a half- + transparent variant of the line color, marker + color, or marker line color, whichever is + available. line - plotly.graph_objects.choropleth.marker.Line - instance or dict with compatible properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on plot.ly for - opacity . - - Returns - ------- - plotly.graph_objs.choropleth.Marker - """ - return self["marker"] - - @marker.setter - def marker(self, val): - self["marker"] = val - - # meta - # ---- - @property - def meta(self): - """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. - - The 'meta' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["meta"] - - @meta.setter - def meta(self, val): - self["meta"] = val - - # metasrc - # ------- - @property - def metasrc(self): - """ - Sets the source reference on plot.ly for meta . - - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + plotly.graph_objects.candlestick.increasing.Lin + e instance or dict with compatible properties Returns ------- - str + plotly.graph_objs.candlestick.Increasing """ - return self["metasrc"] + return self["increasing"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @increasing.setter + def increasing(self, val): + self["increasing"] = val - # name - # ---- + # legendgroup + # ----------- @property - def name(self): + def legendgroup(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. - The 'name' property is a string and must be specified as: + The 'legendgroup' property is a string and must be specified as: - A string - A number that will be converted to a string @@ -80663,1698 +82150,1221 @@ def name(self): ------- str """ - return self["name"] - - @name.setter - def name(self, val): - self["name"] = val - - # reversescale - # ------------ - @property - def reversescale(self): - """ - Reverses the color mapping if true. If true, `zmin` will - correspond to the last color in the array and `zmax` will - correspond to the first color. - - The 'reversescale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["reversescale"] - - @reversescale.setter - def reversescale(self, val): - self["reversescale"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.choropleth.Selected - - A dict of string/value properties that will be passed - to the Selected constructor - - Supported dict properties: - - marker - plotly.graph_objects.choropleth.selected.Marker - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.choropleth.Selected - """ - return self["selected"] - - @selected.setter - def selected(self, val): - self["selected"] = val - - # selectedpoints - # -------------- - @property - def selectedpoints(self): - """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. - - The 'selectedpoints' property accepts values of any type - - Returns - ------- - Any - """ - return self["selectedpoints"] - - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val - - # showscale - # --------- - @property - def showscale(self): - """ - Determines whether or not a colorbar is displayed for this - trace. - - The 'showscale' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["showscale"] + return self["legendgroup"] - @showscale.setter - def showscale(self, val): - self["showscale"] = val + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val - # stream - # ------ + # line + # ---- @property - def stream(self): + def line(self): """ - The 'stream' property is an instance of Stream + The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.choropleth.Stream + - An instance of plotly.graph_objs.candlestick.Line - A dict of string/value properties that will be passed - to the Stream constructor + to the Line constructor Supported dict properties: - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. - - Returns - ------- - plotly.graph_objs.choropleth.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # text - # ---- - @property - def text(self): - """ - Sets the text elements associated with each location. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + width + Sets the width (in px) of line bounding the + box(es). Note that this style setting can also + be set per direction via + `increasing.line.width` and + `decreasing.line.width`. Returns ------- - str|numpy.ndarray + plotly.graph_objs.candlestick.Line """ - return self["text"] + return self["line"] - @text.setter - def text(self, val): - self["text"] = val + @line.setter + def line(self, val): + self["line"] = val - # textsrc - # ------- + # low + # --- @property - def textsrc(self): + def low(self): """ - Sets the source reference on plot.ly for text . + Sets the low values. - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'low' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["textsrc"] + return self["low"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @low.setter + def low(self, val): + self["low"] = val - # uid - # --- + # lowsrc + # ------ @property - def uid(self): + def lowsrc(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Sets the source reference on plot.ly for low . - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'lowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["uid"] + return self["lowsrc"] - @uid.setter - def uid(self, val): - self["uid"] = val + @lowsrc.setter + def lowsrc(self, val): + self["lowsrc"] = val - # uirevision - # ---------- + # meta + # ---- @property - def uirevision(self): + def meta(self): """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. - The 'uirevision' property accepts values of any type + The 'meta' property accepts values of any type Returns ------- - Any + Any|numpy.ndarray """ - return self["uirevision"] + return self["meta"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # unselected - # ---------- + # metasrc + # ------- @property - def unselected(self): + def metasrc(self): """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.choropleth.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor + Sets the source reference on plot.ly for meta . - Supported dict properties: - - marker - plotly.graph_objects.choropleth.unselected.Mark - er instance or dict with compatible properties + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.choropleth.Unselected + str """ - return self["unselected"] + return self["metasrc"] - @unselected.setter - def unselected(self, val): - self["unselected"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # visible - # ------- + # name + # ---- @property - def visible(self): + def name(self): """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). + Sets the trace name. The trace name appear as the legend item + and on hover. - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- - Any + str """ - return self["visible"] + return self["name"] - @visible.setter - def visible(self, val): - self["visible"] = val + @name.setter + def name(self, val): + self["name"] = val - # z - # - + # opacity + # ------- @property - def z(self): + def opacity(self): """ - Sets the color values. + Sets the opacity of the trace. - The 'z' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - numpy.ndarray + int|float """ - return self["z"] + return self["opacity"] - @z.setter - def z(self, val): - self["z"] = val + @opacity.setter + def opacity(self, val): + self["opacity"] = val - # zauto - # ----- + # open + # ---- @property - def zauto(self): + def open(self): """ - Determines whether or not the color domain is computed with - respect to the input data (here in `z`) or the bounds set in - `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` - are set by the user. + Sets the open values. - The 'zauto' property must be specified as a bool - (either True, or False) + The 'open' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - bool + numpy.ndarray """ - return self["zauto"] + return self["open"] - @zauto.setter - def zauto(self, val): - self["zauto"] = val + @open.setter + def open(self, val): + self["open"] = val - # zmax - # ---- + # opensrc + # ------- @property - def zmax(self): + def opensrc(self): """ - Sets the upper bound of the color domain. Value should have the - same units as in `z` and if set, `zmin` must be set as well. + Sets the source reference on plot.ly for open . - The 'zmax' property is a number and may be specified as: - - An int or float + The 'opensrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["zmax"] + return self["opensrc"] - @zmax.setter - def zmax(self, val): - self["zmax"] = val + @opensrc.setter + def opensrc(self, val): + self["opensrc"] = val - # zmid - # ---- + # selectedpoints + # -------------- @property - def zmid(self): + def selectedpoints(self): """ - Sets the mid-point of the color domain by scaling `zmin` and/or - `zmax` to be equidistant to this point. Value should have the - same units as in `z`. Has no effect when `zauto` is `false`. + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. - The 'zmid' property is a number and may be specified as: - - An int or float + The 'selectedpoints' property accepts values of any type Returns ------- - int|float + Any """ - return self["zmid"] + return self["selectedpoints"] - @zmid.setter - def zmid(self, val): - self["zmid"] = val + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val - # zmin - # ---- + # showlegend + # ---------- @property - def zmin(self): + def showlegend(self): """ - Sets the lower bound of the color domain. Value should have the - same units as in `z` and if set, `zmax` must be set as well. + Determines whether or not an item corresponding to this trace + is shown in the legend. - The 'zmin' property is a number and may be specified as: - - An int or float + The 'showlegend' property must be specified as a bool + (either True, or False) Returns ------- - int|float + bool """ - return self["zmin"] + return self["showlegend"] - @zmin.setter - def zmin(self, val): - self["zmin"] = val + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val - # zsrc - # ---- + # stream + # ------ @property - def zsrc(self): + def stream(self): """ - Sets the source reference on plot.ly for z . + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of plotly.graph_objs.candlestick.Stream + - A dict of string/value properties that will be passed + to the Stream constructor - The 'zsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. Returns ------- - str + plotly.graph_objs.candlestick.Stream """ - return self["zsrc"] - - @zsrc.setter - def zsrc(self, val): - self["zsrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.choropleth.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.choropleth.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. - locations - Sets the coordinates via location IDs or names. See - `locationmode` for more info. - locationssrc - Sets the source reference on plot.ly for locations . - marker - plotly.graph_objects.choropleth.Marker instance or dict - with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - plotly.graph_objects.choropleth.Selected instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - plotly.graph_objects.choropleth.Stream instance or dict - with compatible properties - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.choropleth.Unselected instance or - dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + # text + # ---- + @property + def text(self): """ + Sets hover text elements associated with each sample point. If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + this trace's sample points. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above - def __init__( - self, - arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - geo=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - locationmode=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, - **kwargs - ): + Returns + ------- + str|numpy.ndarray """ - Construct a new Choropleth object - - The data that describes the choropleth value-to-color mapping - is set in `z`. The geographic locations corresponding to each - value in `z` are set in `locations`. + return self["text"] - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Choropleth - autocolorscale - Determines whether the colorscale is a default palette - (`autocolorscale: true`) or the palette determined by - `colorscale`. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette will be - chosen according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. References to - these shared color axes are "coloraxis", "coloraxis2", - "coloraxis3", etc. Settings for these shared color axes - are set in the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple color - scales can be linked to the same color axis. - colorbar - plotly.graph_objects.choropleth.ColorBar instance or - dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an array - containing arrays mapping a normalized value to an rgb, - rgba, hex, hsl, hsv, or named color string. At minimum, - a mapping for the lowest (0) and highest (1) values are - required. For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use`zmin` and `zmax`. - Alternatively, `colorscale` may be a palette name - string of the following list: Greys,YlGnBu,Greens,YlOrR - d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H - ot,Blackbody,Earth,Electric,Viridis,Cividis. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - geo - Sets a reference between this trace's geospatial - coordinates and a geographic map. If "geo" (the default - value), the geospatial coordinates refer to - `layout.geo`. If "geo2", the geospatial coordinates - refer to `layout.geo2`, and so on. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.choropleth.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - locationmode - Determines the set of locations used to match entries - in `locations` to regions on the map. - locations - Sets the coordinates via location IDs or names. See - `locationmode` for more info. - locationssrc - Sets the source reference on plot.ly for locations . - marker - plotly.graph_objects.choropleth.Marker instance or dict - with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - reversescale - Reverses the color mapping if true. If true, `zmin` - will correspond to the last color in the array and - `zmax` will correspond to the first color. - selected - plotly.graph_objects.choropleth.Selected instance or - dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showscale - Determines whether or not a colorbar is displayed for - this trace. - stream - plotly.graph_objects.choropleth.Stream instance or dict - with compatible properties - text - Sets the text elements associated with each location. - textsrc - Sets the source reference on plot.ly for text . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.choropleth.Unselected instance or - dict with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is computed - with respect to the input data (here in `z`) or the - bounds set in `zmin` and `zmax` Defaults to `false` - when `zmin` and `zmax` are set by the user. - zmax - Sets the upper bound of the color domain. Value should - have the same units as in `z` and if set, `zmin` must - be set as well. - zmid - Sets the mid-point of the color domain by scaling - `zmin` and/or `zmax` to be equidistant to this point. - Value should have the same units as in `z`. Has no - effect when `zauto` is `false`. - zmin - Sets the lower bound of the color domain. Value should - have the same units as in `z` and if set, `zmax` must - be set as well. - zsrc - Sets the source reference on plot.ly for z . + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Choropleth + str """ - super(Choropleth, self).__init__("choropleth") + return self["textsrc"] - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Choropleth -constructor must be a dict or -an instance of plotly.graph_objs.Choropleth""" - ) + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) + # uid + # --- + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string - # Import validators - # ----------------- - from plotly.validators import choropleth as v_choropleth + Returns + ------- + str + """ + return self["uid"] - # Initialize validators - # --------------------- - self._validators["autocolorscale"] = v_choropleth.AutocolorscaleValidator() - self._validators["coloraxis"] = v_choropleth.ColoraxisValidator() - self._validators["colorbar"] = v_choropleth.ColorBarValidator() - self._validators["colorscale"] = v_choropleth.ColorscaleValidator() - self._validators["customdata"] = v_choropleth.CustomdataValidator() - self._validators["customdatasrc"] = v_choropleth.CustomdatasrcValidator() - self._validators["geo"] = v_choropleth.GeoValidator() - self._validators["hoverinfo"] = v_choropleth.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_choropleth.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_choropleth.HoverlabelValidator() - self._validators["hovertemplate"] = v_choropleth.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_choropleth.HovertemplatesrcValidator() - self._validators["hovertext"] = v_choropleth.HovertextValidator() - self._validators["hovertextsrc"] = v_choropleth.HovertextsrcValidator() - self._validators["ids"] = v_choropleth.IdsValidator() - self._validators["idssrc"] = v_choropleth.IdssrcValidator() - self._validators["locationmode"] = v_choropleth.LocationmodeValidator() - self._validators["locations"] = v_choropleth.LocationsValidator() - self._validators["locationssrc"] = v_choropleth.LocationssrcValidator() - self._validators["marker"] = v_choropleth.MarkerValidator() - self._validators["meta"] = v_choropleth.MetaValidator() - self._validators["metasrc"] = v_choropleth.MetasrcValidator() - self._validators["name"] = v_choropleth.NameValidator() - self._validators["reversescale"] = v_choropleth.ReversescaleValidator() - self._validators["selected"] = v_choropleth.SelectedValidator() - self._validators["selectedpoints"] = v_choropleth.SelectedpointsValidator() - self._validators["showscale"] = v_choropleth.ShowscaleValidator() - self._validators["stream"] = v_choropleth.StreamValidator() - self._validators["text"] = v_choropleth.TextValidator() - self._validators["textsrc"] = v_choropleth.TextsrcValidator() - self._validators["uid"] = v_choropleth.UidValidator() - self._validators["uirevision"] = v_choropleth.UirevisionValidator() - self._validators["unselected"] = v_choropleth.UnselectedValidator() - self._validators["visible"] = v_choropleth.VisibleValidator() - self._validators["z"] = v_choropleth.ZValidator() - self._validators["zauto"] = v_choropleth.ZautoValidator() - self._validators["zmax"] = v_choropleth.ZmaxValidator() - self._validators["zmid"] = v_choropleth.ZmidValidator() - self._validators["zmin"] = v_choropleth.ZminValidator() - self._validators["zsrc"] = v_choropleth.ZsrcValidator() + @uid.setter + def uid(self, val): + self["uid"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v - _v = arg.pop("coloraxis", None) - self["coloraxis"] = coloraxis if coloraxis is not None else _v - _v = arg.pop("colorbar", None) - self["colorbar"] = colorbar if colorbar is not None else _v - _v = arg.pop("colorscale", None) - self["colorscale"] = colorscale if colorscale is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("geo", None) - self["geo"] = geo if geo is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("locationmode", None) - self["locationmode"] = locationmode if locationmode is not None else _v - _v = arg.pop("locations", None) - self["locations"] = locations if locations is not None else _v - _v = arg.pop("locationssrc", None) - self["locationssrc"] = locationssrc if locationssrc is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("reversescale", None) - self["reversescale"] = reversescale if reversescale is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showscale", None) - self["showscale"] = showscale if showscale is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("z", None) - self["z"] = z if z is not None else _v - _v = arg.pop("zauto", None) - self["zauto"] = zauto if zauto is not None else _v - _v = arg.pop("zmax", None) - self["zmax"] = zmax if zmax is not None else _v - _v = arg.pop("zmid", None) - self["zmid"] = zmid if zmid is not None else _v - _v = arg.pop("zmin", None) - self["zmin"] = zmin if zmin is not None else _v - _v = arg.pop("zsrc", None) - self["zsrc"] = zsrc if zsrc is not None else _v + # uirevision + # ---------- + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + Any + """ + return self["uirevision"] - self._props["type"] = "choropleth" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="choropleth", val="choropleth" - ) - arg.pop("type", None) + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # visible + # ------- + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + Any + """ + return self["visible"] + @visible.setter + def visible(self, val): + self["visible"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # whiskerwidth + # ------------ + @property + def whiskerwidth(self): + """ + Sets the width of the whiskers relative to the box' width. For + example, with 1, the whiskers are as wide as the box(es). + + The 'whiskerwidth' property is a number and may be specified as: + - An int or float in the interval [0, 1] + Returns + ------- + int|float + """ + return self["whiskerwidth"] -class Carpet(_BaseTraceType): + @whiskerwidth.setter + def whiskerwidth(self, val): + self["whiskerwidth"] = val - # a + # x # - @property - def a(self): + def x(self): """ - An array containing values of the first parameter value + Sets the x coordinates. If absent, linear coordinate will be + generated. - The 'a' property is an array that may be specified as a tuple, + The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["a"] + return self["x"] - @a.setter - def a(self, val): - self["a"] = val + @x.setter + def x(self, val): + self["x"] = val - # a0 - # -- + # xaxis + # ----- @property - def a0(self): + def xaxis(self): """ - Alternate to `a`. Builds a linear space of a coordinates. Use - with `da` where `a0` is the starting coordinate and `da` the - step. + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. - The 'a0' property is a number and may be specified as: - - An int or float + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as the string 'x' + optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) Returns ------- - int|float + str """ - return self["a0"] + return self["xaxis"] - @a0.setter - def a0(self, val): - self["a0"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # aaxis - # ----- + # xcalendar + # --------- @property - def aaxis(self): + def xcalendar(self): """ - The 'aaxis' property is an instance of Aaxis - that may be specified as: - - An instance of plotly.graph_objs.carpet.Aaxis - - A dict of string/value properties that will be passed - to the Aaxis constructor - - Supported dict properties: - - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on plot.ly for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: We add one item to d3's - date formatter: "%{n}f" for fractional seconds - with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" - would display "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.carpet.aaxis.Ti - ckformatstop instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.aaxis.tickformatstops - tickmode + Sets the calendar system to use with `x` date data. - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - title - plotly.graph_objects.carpet.aaxis.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.aaxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be set by the now - deprecated `titlefont` attribute. - titleoffset - Deprecated: Please use - carpet.aaxis.title.offset instead. An - additional amount by which to offset the title - from the tick labels, given in pixels. Note - that this used to be set by the now deprecated - `titleoffset` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - plotly.graph_objs.carpet.Aaxis + Any """ - return self["aaxis"] + return self["xcalendar"] - @aaxis.setter - def aaxis(self, val): - self["aaxis"] = val + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val - # asrc + # xsrc # ---- @property - def asrc(self): + def xsrc(self): """ - Sets the source reference on plot.ly for a . + Sets the source reference on plot.ly for x . - The 'asrc' property must be specified as a string or + The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["asrc"] - - @asrc.setter - def asrc(self, val): - self["asrc"] = val + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + # yaxis + # ----- + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as the string 'y' + optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + # type + # ---- + @property + def type(self): + return self._props["type"] + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + close + Sets the close values. + closesrc + Sets the source reference on plot.ly for close . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + decreasing + plotly.graph_objects.candlestick.Decreasing instance or + dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on plot.ly for high . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.candlestick.Hoverlabel instance or + dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + increasing + plotly.graph_objects.candlestick.Increasing instance or + dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.candlestick.Line instance or dict + with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on plot.ly for low . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on plot.ly for open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + plotly.graph_objects.candlestick.Stream instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + """ - # b - # - - @property - def b(self): + def __init__( + self, + arg=None, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legendgroup=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + whiskerwidth=None, + x=None, + xaxis=None, + xcalendar=None, + xsrc=None, + yaxis=None, + **kwargs + ): """ - A two dimensional array of y coordinates at each carpet point. - - The 'b' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Construct a new Candlestick object + + The candlestick is a style of financial chart describing open, + high, low and close for a given `x` coordinate (most likely + time). The boxes represent the spread between the `open` and + `close` values and the lines represent the spread between the + `low` and `high` values Sample points where the close value is + higher (lower) then the open value are called increasing + (decreasing). By default, increasing candles are drawn in green + whereas decreasing are drawn in red. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.Candlestick + close + Sets the close values. + closesrc + Sets the source reference on plot.ly for close . + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + decreasing + plotly.graph_objects.candlestick.Decreasing instance or + dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on plot.ly for high . + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.candlestick.Hoverlabel instance or + dict with compatible properties + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + increasing + plotly.graph_objects.candlestick.Increasing instance or + dict with compatible properties + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.candlestick.Line instance or dict + with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on plot.ly for low . + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on plot.ly for open . + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + plotly.graph_objects.candlestick.Stream instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xsrc + Sets the source reference on plot.ly for x . + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. Returns ------- - numpy.ndarray + Candlestick """ - return self["b"] + super(Candlestick, self).__init__("candlestick") - @b.setter - def b(self, val): - self["b"] = val + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.Candlestick +constructor must be a dict or +an instance of plotly.graph_objs.Candlestick""" + ) - # b0 - # -- - @property - def b0(self): - """ - Alternate to `b`. Builds a linear space of a coordinates. Use - with `db` where `b0` is the starting coordinate and `db` the - step. - - The 'b0' property is a number and may be specified as: - - An int or float + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) - Returns - ------- - int|float - """ - return self["b0"] + # Import validators + # ----------------- + from plotly.validators import candlestick as v_candlestick - @b0.setter - def b0(self, val): - self["b0"] = val + # Initialize validators + # --------------------- + self._validators["close"] = v_candlestick.CloseValidator() + self._validators["closesrc"] = v_candlestick.ClosesrcValidator() + self._validators["customdata"] = v_candlestick.CustomdataValidator() + self._validators["customdatasrc"] = v_candlestick.CustomdatasrcValidator() + self._validators["decreasing"] = v_candlestick.DecreasingValidator() + self._validators["high"] = v_candlestick.HighValidator() + self._validators["highsrc"] = v_candlestick.HighsrcValidator() + self._validators["hoverinfo"] = v_candlestick.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_candlestick.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_candlestick.HoverlabelValidator() + self._validators["hovertext"] = v_candlestick.HovertextValidator() + self._validators["hovertextsrc"] = v_candlestick.HovertextsrcValidator() + self._validators["ids"] = v_candlestick.IdsValidator() + self._validators["idssrc"] = v_candlestick.IdssrcValidator() + self._validators["increasing"] = v_candlestick.IncreasingValidator() + self._validators["legendgroup"] = v_candlestick.LegendgroupValidator() + self._validators["line"] = v_candlestick.LineValidator() + self._validators["low"] = v_candlestick.LowValidator() + self._validators["lowsrc"] = v_candlestick.LowsrcValidator() + self._validators["meta"] = v_candlestick.MetaValidator() + self._validators["metasrc"] = v_candlestick.MetasrcValidator() + self._validators["name"] = v_candlestick.NameValidator() + self._validators["opacity"] = v_candlestick.OpacityValidator() + self._validators["open"] = v_candlestick.OpenValidator() + self._validators["opensrc"] = v_candlestick.OpensrcValidator() + self._validators["selectedpoints"] = v_candlestick.SelectedpointsValidator() + self._validators["showlegend"] = v_candlestick.ShowlegendValidator() + self._validators["stream"] = v_candlestick.StreamValidator() + self._validators["text"] = v_candlestick.TextValidator() + self._validators["textsrc"] = v_candlestick.TextsrcValidator() + self._validators["uid"] = v_candlestick.UidValidator() + self._validators["uirevision"] = v_candlestick.UirevisionValidator() + self._validators["visible"] = v_candlestick.VisibleValidator() + self._validators["whiskerwidth"] = v_candlestick.WhiskerwidthValidator() + self._validators["x"] = v_candlestick.XValidator() + self._validators["xaxis"] = v_candlestick.XAxisValidator() + self._validators["xcalendar"] = v_candlestick.XcalendarValidator() + self._validators["xsrc"] = v_candlestick.XsrcValidator() + self._validators["yaxis"] = v_candlestick.YAxisValidator() - # baxis - # ----- - @property - def baxis(self): - """ - The 'baxis' property is an instance of Baxis - that may be specified as: - - An instance of plotly.graph_objs.carpet.Baxis - - A dict of string/value properties that will be passed - to the Baxis constructor - - Supported dict properties: - - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on plot.ly for - categoryarray . - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - gridwidth - Sets the width (in px) of the axis line. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("close", None) + self["close"] = close if close is not None else _v + _v = arg.pop("closesrc", None) + self["closesrc"] = closesrc if closesrc is not None else _v + _v = arg.pop("customdata", None) + self["customdata"] = customdata if customdata is not None else _v + _v = arg.pop("customdatasrc", None) + self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v + _v = arg.pop("decreasing", None) + self["decreasing"] = decreasing if decreasing is not None else _v + _v = arg.pop("high", None) + self["high"] = high if high is not None else _v + _v = arg.pop("highsrc", None) + self["highsrc"] = highsrc if highsrc is not None else _v + _v = arg.pop("hoverinfo", None) + self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v + _v = arg.pop("hoverinfosrc", None) + self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("hoverlabel", None) + self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v + _v = arg.pop("ids", None) + self["ids"] = ids if ids is not None else _v + _v = arg.pop("idssrc", None) + self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("increasing", None) + self["increasing"] = increasing if increasing is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("low", None) + self["low"] = low if low is not None else _v + _v = arg.pop("lowsrc", None) + self["lowsrc"] = lowsrc if lowsrc is not None else _v + _v = arg.pop("meta", None) + self["meta"] = meta if meta is not None else _v + _v = arg.pop("metasrc", None) + self["metasrc"] = metasrc if metasrc is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("opacity", None) + self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("open", None) + self["open"] = open if open is not None else _v + _v = arg.pop("opensrc", None) + self["opensrc"] = opensrc if opensrc is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v + _v = arg.pop("stream", None) + self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("uid", None) + self["uid"] = uid if uid is not None else _v + _v = arg.pop("uirevision", None) + self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + _v = arg.pop("whiskerwidth", None) + self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v + _v = arg.pop("xsrc", None) + self["xsrc"] = xsrc if xsrc is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v + + # Read-only literals + # ------------------ + from _plotly_utils.basevalidators import LiteralValidator + + self._props["type"] = "candlestick" + self._validators["type"] = LiteralValidator( + plotly_name="type", parent_name="candlestick", val="candlestick" + ) + arg.pop("type", None) + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Box(_BaseTraceType): + + # alignmentgroup + # -------------- + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format - And for dates see: We add one item to d3's - date formatter: "%{n}f" for fractional seconds - with n digits. For example, *2016-10-13 - 09:15:23.456* with tickformat "%H~%M~%S.%2f" - would display "09~15~23.46" - tickformatstops - A tuple of plotly.graph_objects.carpet.baxis.Ti - ckformatstop instances or dicts with compatible - properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.baxis.tickformatstops - tickmode + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + # boxmean + # ------- + @property + def boxmean(self): + """ + If True, the mean of the box(es)' underlying distribution is + drawn as a dashed line inside the box(es). If "sd" the standard + deviation is also drawn. - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on plot.ly for - ticktext . - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on plot.ly for - tickvals . - title - plotly.graph_objects.carpet.baxis.Title - instance or dict with compatible properties - titlefont - Deprecated: Please use carpet.baxis.title.font - instead. Sets this axis' title font. Note that - the title's font used to be set by the now - deprecated `titlefont` attribute. - titleoffset - Deprecated: Please use - carpet.baxis.title.offset instead. An - additional amount by which to offset the title - from the tick labels, given in pixels. Note - that this used to be set by the now deprecated - `titleoffset` attribute. - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. + The 'boxmean' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'sd', False] Returns ------- - plotly.graph_objs.carpet.Baxis + Any """ - return self["baxis"] + return self["boxmean"] - @baxis.setter - def baxis(self, val): - self["baxis"] = val + @boxmean.setter + def boxmean(self, val): + self["boxmean"] = val - # bsrc - # ---- + # boxpoints + # --------- @property - def bsrc(self): + def boxpoints(self): """ - Sets the source reference on plot.ly for b . + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier points + are shown and points either less than 4*Q1-3*Q3 or greater than + 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all + sample points are shown If False, only the box(es) are shown + with no sample points - The 'bsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'boxpoints' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'outliers', 'suspectedoutliers', False] Returns ------- - str + Any """ - return self["bsrc"] + return self["boxpoints"] - @bsrc.setter - def bsrc(self, val): - self["bsrc"] = val + @boxpoints.setter + def boxpoints(self, val): + self["boxpoints"] = val - # carpet - # ------ + # customdata + # ---------- @property - def carpet(self): + def customdata(self): """ - An identifier for this carpet, so that `scattercarpet` and - `scattercontour` traces can specify a carpet plot on which they - lie + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements - The 'carpet' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - str + numpy.ndarray """ - return self["carpet"] + return self["customdata"] - @carpet.setter - def carpet(self, val): - self["carpet"] = val + @customdata.setter + def customdata(self, val): + self["customdata"] = val - # cheaterslope - # ------------ + # customdatasrc + # ------------- @property - def cheaterslope(self): + def customdatasrc(self): """ - The shift applied to each successive row of data in creating a - cheater plot. Only used if `x` is been ommitted. + Sets the source reference on plot.ly for customdata . - The 'cheaterslope' property is a number and may be specified as: - - An int or float + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - int|float + str """ - return self["cheaterslope"] + return self["customdatasrc"] - @cheaterslope.setter - def cheaterslope(self, val): - self["cheaterslope"] = val + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val - # color - # ----- + # fillcolor + # --------- @property - def color(self): + def fillcolor(self): """ - Sets default for all colors associated with this axis all at - once: line, font, tick, and grid colors. Grid color is - lightened by blending this with the plot background Individual - pieces can override this. + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. - The 'color' property is a color and may be specified as: + The 'fillcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') @@ -82400,244 +83410,242 @@ def color(self): ------- str """ - return self["color"] + return self["fillcolor"] - @color.setter - def color(self, val): - self["color"] = val + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val - # customdata - # ---------- + # hoverinfo + # --------- @property - def customdata(self): + def hoverinfo(self): """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above Returns ------- - numpy.ndarray + Any|numpy.ndarray """ - return self["customdata"] + return self["hoverinfo"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val - # customdatasrc - # ------------- + # hoverinfosrc + # ------------ @property - def customdatasrc(self): + def hoverinfosrc(self): """ - Sets the source reference on plot.ly for customdata . + Sets the source reference on plot.ly for hoverinfo . - The 'customdatasrc' property must be specified as a string or + The 'hoverinfosrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["customdatasrc"] + return self["hoverinfosrc"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val - # da - # -- + # hoverlabel + # ---------- @property - def da(self): + def hoverlabel(self): """ - Sets the a coordinate step. See `a0` for more info. + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.box.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor - The 'da' property is a number and may be specified as: - - An int or float + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . Returns ------- - int|float + plotly.graph_objs.box.Hoverlabel """ - return self["da"] + return self["hoverlabel"] - @da.setter - def da(self, val): - self["da"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # db - # -- + # hoveron + # ------- @property - def db(self): + def hoveron(self): """ - Sets the b coordinate step. See `b0` for more info. + Do the hover effects highlight individual boxes or sample + points or both? - The 'db' property is a number and may be specified as: - - An int or float + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['boxes', 'points'] joined with '+' characters + (e.g. 'boxes+points') Returns ------- - int|float + Any """ - return self["db"] + return self["hoveron"] - @db.setter - def db(self, val): - self["db"] = val + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val - # font - # ---- + # hovertemplate + # ------------- @property - def font(self): + def hovertemplate(self): """ - The default font used for axis & tick labels on this carpet - - The 'font' property is an instance of Font - that may be specified as: - - An instance of plotly.graph_objs.carpet.Font - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - plotly.graph_objs.carpet.Font + str|numpy.ndarray """ - return self["font"] + return self["hovertemplate"] - @font.setter - def font(self, val): - self["font"] = val + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val - # hoverinfo - # --------- + # hovertemplatesrc + # ---------------- @property - def hoverinfo(self): + def hovertemplatesrc(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Sets the source reference on plot.ly for hovertemplate . - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any|numpy.ndarray + str """ - return self["hoverinfo"] + return self["hovertemplatesrc"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val - # hoverinfosrc - # ------------ + # hovertext + # --------- @property - def hoverinfosrc(self): + def hovertext(self): """ - Sets the source reference on plot.ly for hoverinfo . + Same as `text`. - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - str + str|numpy.ndarray """ - return self["hoverinfosrc"] + return self["hovertext"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val - # hoverlabel - # ---------- + # hovertextsrc + # ------------ @property - def hoverlabel(self): + def hovertextsrc(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.carpet.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor + Sets the source reference on plot.ly for hovertext . - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - plotly.graph_objs.carpet.Hoverlabel + str """ - return self["hoverlabel"] + return self["hovertextsrc"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val # ids # --- @@ -82681,6 +83689,127 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val + # jitter + # ------ + @property + def jitter(self): + """ + Sets the amount of jitter in the sample points drawn. If 0, the + sample points align along the distribution axis. If 1, the + sample points are drawn in a random jitter of width equal to + the width of the box(es). + + The 'jitter' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["jitter"] + + @jitter.setter + def jitter(self, val): + self["jitter"] = val + + # legendgroup + # ----------- + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces part of the same + legend group hide/show at the same time when toggling legend + items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.box.Line + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the + box(es). + + Returns + ------- + plotly.graph_objs.box.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # marker + # ------ + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of plotly.graph_objs.box.Marker + - A dict of string/value properties that will be passed + to the Marker constructor + + Supported dict properties: + + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + line + plotly.graph_objects.box.marker.Line instance + or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is + equivalent to appending "-open" to a symbol + name. Adding 200 is equivalent to appending + "-dot" to a symbol name. Adding 300 is + equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + plotly.graph_objs.box.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + # meta # ---- @property @@ -82735,7 +83864,9 @@ def metasrc(self, val): def name(self): """ Sets the trace name. The trace name appear as the legend item - and on hover. + and on hover. For box traces, the name will also be used for + the position coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis is categorical The 'name' property is a string and must be specified as: - A string @@ -82751,6 +83882,70 @@ def name(self): def name(self, val): self["name"] = val + # notched + # ------- + @property + def notched(self): + """ + Determines whether or not notches should be drawn. + + The 'notched' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["notched"] + + @notched.setter + def notched(self, val): + self["notched"] = val + + # notchwidth + # ---------- + @property + def notchwidth(self): + """ + Sets the width of the notches relative to the box' width. For + example, with 0, the notches are as wide as the box(es). + + The 'notchwidth' property is a number and may be specified as: + - An int or float in the interval [0, 0.5] + + Returns + ------- + int|float + """ + return self["notchwidth"] + + @notchwidth.setter + def notchwidth(self, val): + self["notchwidth"] = val + + # offsetgroup + # ----------- + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + # opacity # ------- @property @@ -82771,6 +83966,124 @@ def opacity(self): def opacity(self, val): self["opacity"] = val + # orientation + # ----------- + @property + def orientation(self): + """ + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + # pointpos + # -------- + @property + def pointpos(self): + """ + Sets the position of the sample points in relation to the + box(es). If 0, the sample points are places over the center of + the box(es). Positive (negative) values correspond to positions + to the right (left) for vertical boxes and above (below) for + horizontal boxes + + The 'pointpos' property is a number and may be specified as: + - An int or float in the interval [-2, 2] + + Returns + ------- + int|float + """ + return self["pointpos"] + + @pointpos.setter + def pointpos(self, val): + self["pointpos"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.box.Selected + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + plotly.graph_objects.box.selected.Marker + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.box.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + # selectedpoints + # -------------- + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + # stream # ------ @property @@ -82778,7 +84091,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.carpet.Stream + - An instance of plotly.graph_objs.box.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -82796,7 +84109,7 @@ def stream(self): Returns ------- - plotly.graph_objs.carpet.Stream + plotly.graph_objs.box.Stream """ return self["stream"] @@ -82804,6 +84117,52 @@ def stream(self): def stream(self, val): self["stream"] = val + # text + # ---- + @property + def text(self): + """ + Sets the text elements associated with each sample value. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # textsrc + # ------- + @property + def textsrc(self): + """ + Sets the source reference on plot.ly for text . + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + # uid # --- @property @@ -82859,6 +84218,33 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.box.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.box.unselected.Marker + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.box.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + # visible # ------- @property @@ -82882,14 +84268,56 @@ def visible(self): def visible(self, val): self["visible"] = val + # whiskerwidth + # ------------ + @property + def whiskerwidth(self): + """ + Sets the width of the whiskers relative to the box' width. For + example, with 1, the whiskers are as wide as the box(es). + + The 'whiskerwidth' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["whiskerwidth"] + + @whiskerwidth.setter + def whiskerwidth(self, val): + self["whiskerwidth"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width of the box in data coordinate If 0 (default + value) the width is automatically selected based on the + positions of other box traces in the same subplot. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + # x # - @property def x(self): """ - A two dimensional array of x coordinates at each carpet point. - If ommitted, the plot is a cheater plot and the xaxis is hidden - by default. + Sets the x sample data or coordinates. See overview for more + info. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -82900,9 +84328,28 @@ def x(self): """ return self["x"] - @x.setter - def x(self, val): - self["x"] = val + @x.setter + def x(self, val): + self["x"] = val + + # x0 + # -- + @property + def x0(self): + """ + Sets the x coordinate of the box. See overview for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val # xaxis # ----- @@ -82929,6 +84376,30 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val + # xcalendar + # --------- + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + # xsrc # ---- @property @@ -82954,7 +84425,8 @@ def xsrc(self, val): @property def y(self): """ - A two dimensional array of y coordinates at each carpet point. + Sets the y sample data or coordinates. See overview for more + info. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -82969,6 +84441,25 @@ def y(self): def y(self, val): self["y"] = val + # y0 + # -- + @property + def y0(self): + """ + Sets the y coordinate of the box. See overview for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + # yaxis # ----- @property @@ -82994,6 +84485,30 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val + # ycalendar + # --------- + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + # ysrc # ---- @property @@ -83031,42 +84546,23 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - a - An array containing values of the first parameter value - a0 - Alternate to `a`. Builds a linear space of a - coordinates. Use with `da` where `a0` is the starting - coordinate and `da` the step. - aaxis - plotly.graph_objects.carpet.Aaxis instance or dict with - compatible properties - asrc - Sets the source reference on plot.ly for a . - b - A two dimensional array of y coordinates at each carpet - point. - b0 - Alternate to `b`. Builds a linear space of a - coordinates. Use with `db` where `b0` is the starting - coordinate and `db` the step. - baxis - plotly.graph_objects.carpet.Baxis instance or dict with - compatible properties - bsrc - Sets the source reference on plot.ly for b . - carpet - An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie - cheaterslope - The shift applied to each successive row of data in - creating a cheater plot. Only used if `x` is been - ommitted. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -83074,13 +84570,10 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - da - Sets the a coordinate step. See `a0` for more info. - db - Sets the b coordinate step. See `b0` for more info. - font - The default font used for axis & tick labels on this - carpet + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -83089,14 +84582,62 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.carpet.Hoverlabel instance or dict + plotly.graph_objects.box.Hoverlabel instance or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.box.Line instance or dict with + compatible properties + marker + plotly.graph_objects.box.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -83114,12 +84655,57 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for meta . name Sets the trace name. The trace name appear as the - legend item and on hover. + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches should be drawn. + notchwidth + Sets the width of the notches relative to the box' + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. opacity Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + selected + plotly.graph_objects.box.Selected instance or dict with + compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.carpet.Stream instance or dict - with compatible properties + plotly.graph_objects.box.Stream instance or dict with + compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on plot.ly for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -83142,30 +84728,51 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.box.Unselected instance or dict + with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. x - A two dimensional array of x coordinates at each carpet - point. If ommitted, the plot is a cheater plot and the - xaxis is hidden by default. + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate of the box. See overview for more + info. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. xsrc Sets the source reference on plot.ly for x . y - A two dimensional array of y coordinates at each carpet - point. + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate of the box. See overview for more + info. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . """ @@ -83173,94 +84780,95 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - a0=None, - aaxis=None, - asrc=None, - b=None, - b0=None, - baxis=None, - bsrc=None, - carpet=None, - cheaterslope=None, - color=None, + alignmentgroup=None, + boxmean=None, + boxpoints=None, customdata=None, customdatasrc=None, - da=None, - db=None, - font=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, ids=None, idssrc=None, + jitter=None, + legendgroup=None, + line=None, + marker=None, meta=None, metasrc=None, name=None, + notched=None, + notchwidth=None, + offsetgroup=None, opacity=None, + orientation=None, + pointpos=None, + selected=None, + selectedpoints=None, + showlegend=None, stream=None, + text=None, + textsrc=None, uid=None, uirevision=None, + unselected=None, visible=None, + whiskerwidth=None, + width=None, x=None, + x0=None, xaxis=None, + xcalendar=None, xsrc=None, y=None, + y0=None, yaxis=None, + ycalendar=None, ysrc=None, **kwargs ): """ - Construct a new Carpet object + Construct a new Box object - The data describing carpet axis layout is set in `y` and - (optionally) also `x`. If only `y` is present, `x` the plot is - interpreted as a cheater plot and is filled in using the `y` - values. `x` and `y` may either be 2D arrays matching with each - dimension matching that of `a` and `b`, or they may be 1D - arrays with total length equal to that of `a` and `b`. + In vertical (horizontal) box plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + box per distinct x (y) value is drawn If no `x` (`y`) list is + provided, a single box is drawn. That box position is then + positioned with with `name` or with `x0` (`y0`) if provided. + Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The + second quartile (Q2) is marked by a line inside the box. By + default, the whiskers correspond to the box' edges +/- 1.5 + times the interquartile range (IQR: Q3-Q1), see "boxpoints" for + other options. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Carpet - a - An array containing values of the first parameter value - a0 - Alternate to `a`. Builds a linear space of a - coordinates. Use with `da` where `a0` is the starting - coordinate and `da` the step. - aaxis - plotly.graph_objects.carpet.Aaxis instance or dict with - compatible properties - asrc - Sets the source reference on plot.ly for a . - b - A two dimensional array of y coordinates at each carpet - point. - b0 - Alternate to `b`. Builds a linear space of a - coordinates. Use with `db` where `b0` is the starting - coordinate and `db` the step. - baxis - plotly.graph_objects.carpet.Baxis instance or dict with - compatible properties - bsrc - Sets the source reference on plot.ly for b . - carpet - An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie - cheaterslope - The shift applied to each successive row of data in - creating a cheater plot. Only used if `x` is been - ommitted. - color - Sets default for all colors associated with this axis - all at once: line, font, tick, and grid colors. Grid - color is lightened by blending this with the plot - background Individual pieces can override this. + an instance of plotly.graph_objs.Box + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -83268,13 +84876,10 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - da - Sets the a coordinate step. See `a0` for more info. - db - Sets the b coordinate step. See `b0` for more info. - font - The default font used for axis & tick labels on this - carpet + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -83283,14 +84888,62 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.carpet.Hoverlabel instance or dict + plotly.graph_objects.box.Hoverlabel instance or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.box.Line instance or dict with + compatible properties + marker + plotly.graph_objects.box.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -83308,12 +84961,57 @@ def __init__( Sets the source reference on plot.ly for meta . name Sets the trace name. The trace name appear as the - legend item and on hover. + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches should be drawn. + notchwidth + Sets the width of the notches relative to the box' + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. opacity Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + selected + plotly.graph_objects.box.Selected instance or dict with + compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. stream - plotly.graph_objects.carpet.Stream instance or dict - with compatible properties + plotly.graph_objects.box.Stream instance or dict with + compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on plot.ly for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -83336,38 +85034,59 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.box.Unselected instance or dict + with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). + whiskerwidth + Sets the width of the whiskers relative to the box' + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. x - A two dimensional array of x coordinates at each carpet - point. If ommitted, the plot is a cheater plot and the - xaxis is hidden by default. + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate of the box. See overview for more + info. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. xsrc Sets the source reference on plot.ly for x . y - A two dimensional array of y coordinates at each carpet - point. + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate of the box. See overview for more + info. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. ysrc Sets the source reference on plot.ly for y . Returns ------- - Carpet + Box """ - super(Carpet, self).__init__("carpet") + super(Box, self).__init__("box") # Validate arg # ------------ @@ -83380,9 +85099,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Carpet +The first argument to the plotly.graph_objs.Box constructor must be a dict or -an instance of plotly.graph_objs.Carpet""" +an instance of plotly.graph_objs.Box""" ) # Handle skip_invalid @@ -83391,116 +85110,166 @@ def __init__( # Import validators # ----------------- - from plotly.validators import carpet as v_carpet + from plotly.validators import box as v_box # Initialize validators # --------------------- - self._validators["a"] = v_carpet.AValidator() - self._validators["a0"] = v_carpet.A0Validator() - self._validators["aaxis"] = v_carpet.AaxisValidator() - self._validators["asrc"] = v_carpet.AsrcValidator() - self._validators["b"] = v_carpet.BValidator() - self._validators["b0"] = v_carpet.B0Validator() - self._validators["baxis"] = v_carpet.BaxisValidator() - self._validators["bsrc"] = v_carpet.BsrcValidator() - self._validators["carpet"] = v_carpet.CarpetValidator() - self._validators["cheaterslope"] = v_carpet.CheaterslopeValidator() - self._validators["color"] = v_carpet.ColorValidator() - self._validators["customdata"] = v_carpet.CustomdataValidator() - self._validators["customdatasrc"] = v_carpet.CustomdatasrcValidator() - self._validators["da"] = v_carpet.DaValidator() - self._validators["db"] = v_carpet.DbValidator() - self._validators["font"] = v_carpet.FontValidator() - self._validators["hoverinfo"] = v_carpet.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_carpet.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_carpet.HoverlabelValidator() - self._validators["ids"] = v_carpet.IdsValidator() - self._validators["idssrc"] = v_carpet.IdssrcValidator() - self._validators["meta"] = v_carpet.MetaValidator() - self._validators["metasrc"] = v_carpet.MetasrcValidator() - self._validators["name"] = v_carpet.NameValidator() - self._validators["opacity"] = v_carpet.OpacityValidator() - self._validators["stream"] = v_carpet.StreamValidator() - self._validators["uid"] = v_carpet.UidValidator() - self._validators["uirevision"] = v_carpet.UirevisionValidator() - self._validators["visible"] = v_carpet.VisibleValidator() - self._validators["x"] = v_carpet.XValidator() - self._validators["xaxis"] = v_carpet.XAxisValidator() - self._validators["xsrc"] = v_carpet.XsrcValidator() - self._validators["y"] = v_carpet.YValidator() - self._validators["yaxis"] = v_carpet.YAxisValidator() - self._validators["ysrc"] = v_carpet.YsrcValidator() + self._validators["alignmentgroup"] = v_box.AlignmentgroupValidator() + self._validators["boxmean"] = v_box.BoxmeanValidator() + self._validators["boxpoints"] = v_box.BoxpointsValidator() + self._validators["customdata"] = v_box.CustomdataValidator() + self._validators["customdatasrc"] = v_box.CustomdatasrcValidator() + self._validators["fillcolor"] = v_box.FillcolorValidator() + self._validators["hoverinfo"] = v_box.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_box.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_box.HoverlabelValidator() + self._validators["hoveron"] = v_box.HoveronValidator() + self._validators["hovertemplate"] = v_box.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_box.HovertemplatesrcValidator() + self._validators["hovertext"] = v_box.HovertextValidator() + self._validators["hovertextsrc"] = v_box.HovertextsrcValidator() + self._validators["ids"] = v_box.IdsValidator() + self._validators["idssrc"] = v_box.IdssrcValidator() + self._validators["jitter"] = v_box.JitterValidator() + self._validators["legendgroup"] = v_box.LegendgroupValidator() + self._validators["line"] = v_box.LineValidator() + self._validators["marker"] = v_box.MarkerValidator() + self._validators["meta"] = v_box.MetaValidator() + self._validators["metasrc"] = v_box.MetasrcValidator() + self._validators["name"] = v_box.NameValidator() + self._validators["notched"] = v_box.NotchedValidator() + self._validators["notchwidth"] = v_box.NotchwidthValidator() + self._validators["offsetgroup"] = v_box.OffsetgroupValidator() + self._validators["opacity"] = v_box.OpacityValidator() + self._validators["orientation"] = v_box.OrientationValidator() + self._validators["pointpos"] = v_box.PointposValidator() + self._validators["selected"] = v_box.SelectedValidator() + self._validators["selectedpoints"] = v_box.SelectedpointsValidator() + self._validators["showlegend"] = v_box.ShowlegendValidator() + self._validators["stream"] = v_box.StreamValidator() + self._validators["text"] = v_box.TextValidator() + self._validators["textsrc"] = v_box.TextsrcValidator() + self._validators["uid"] = v_box.UidValidator() + self._validators["uirevision"] = v_box.UirevisionValidator() + self._validators["unselected"] = v_box.UnselectedValidator() + self._validators["visible"] = v_box.VisibleValidator() + self._validators["whiskerwidth"] = v_box.WhiskerwidthValidator() + self._validators["width"] = v_box.WidthValidator() + self._validators["x"] = v_box.XValidator() + self._validators["x0"] = v_box.X0Validator() + self._validators["xaxis"] = v_box.XAxisValidator() + self._validators["xcalendar"] = v_box.XcalendarValidator() + self._validators["xsrc"] = v_box.XsrcValidator() + self._validators["y"] = v_box.YValidator() + self._validators["y0"] = v_box.Y0Validator() + self._validators["yaxis"] = v_box.YAxisValidator() + self._validators["ycalendar"] = v_box.YcalendarValidator() + self._validators["ysrc"] = v_box.YsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("a", None) - self["a"] = a if a is not None else _v - _v = arg.pop("a0", None) - self["a0"] = a0 if a0 is not None else _v - _v = arg.pop("aaxis", None) - self["aaxis"] = aaxis if aaxis is not None else _v - _v = arg.pop("asrc", None) - self["asrc"] = asrc if asrc is not None else _v - _v = arg.pop("b", None) - self["b"] = b if b is not None else _v - _v = arg.pop("b0", None) - self["b0"] = b0 if b0 is not None else _v - _v = arg.pop("baxis", None) - self["baxis"] = baxis if baxis is not None else _v - _v = arg.pop("bsrc", None) - self["bsrc"] = bsrc if bsrc is not None else _v - _v = arg.pop("carpet", None) - self["carpet"] = carpet if carpet is not None else _v - _v = arg.pop("cheaterslope", None) - self["cheaterslope"] = cheaterslope if cheaterslope is not None else _v - _v = arg.pop("color", None) - self["color"] = color if color is not None else _v + _v = arg.pop("alignmentgroup", None) + self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v + _v = arg.pop("boxmean", None) + self["boxmean"] = boxmean if boxmean is not None else _v + _v = arg.pop("boxpoints", None) + self["boxpoints"] = boxpoints if boxpoints is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("da", None) - self["da"] = da if da is not None else _v - _v = arg.pop("db", None) - self["db"] = db if db is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v + _v = arg.pop("fillcolor", None) + self["fillcolor"] = fillcolor if fillcolor is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hoveron", None) + self["hoveron"] = hoveron if hoveron is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) + _v = arg.pop("hovertext", None) + self["hovertext"] = hovertext if hovertext is not None else _v + _v = arg.pop("hovertextsrc", None) + self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v + _v = arg.pop("jitter", None) + self["jitter"] = jitter if jitter is not None else _v + _v = arg.pop("legendgroup", None) + self["legendgroup"] = legendgroup if legendgroup is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v + _v = arg.pop("notched", None) + self["notched"] = notched if notched is not None else _v + _v = arg.pop("notchwidth", None) + self["notchwidth"] = notchwidth if notchwidth is not None else _v + _v = arg.pop("offsetgroup", None) + self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v + _v = arg.pop("pointpos", None) + self["pointpos"] = pointpos if pointpos is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v + _v = arg.pop("selectedpoints", None) + self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v + _v = arg.pop("showlegend", None) + self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + _v = arg.pop("textsrc", None) + self["textsrc"] = textsrc if textsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v + _v = arg.pop("whiskerwidth", None) + self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v + _v = arg.pop("width", None) + self["width"] = width if width is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v + _v = arg.pop("x0", None) + self["x0"] = x0 if x0 is not None else _v _v = arg.pop("xaxis", None) self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("xcalendar", None) + self["xcalendar"] = xcalendar if xcalendar is not None else _v _v = arg.pop("xsrc", None) self["xsrc"] = xsrc if xsrc is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _v + _v = arg.pop("y0", None) + self["y0"] = y0 if y0 is not None else _v _v = arg.pop("yaxis", None) self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("ycalendar", None) + self["ycalendar"] = ycalendar if ycalendar is not None else _v _v = arg.pop("ysrc", None) self["ysrc"] = ysrc if ysrc is not None else _v @@ -83508,9 +85277,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "carpet" + self._props["type"] = "box" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="carpet", val="carpet" + plotly_name="type", parent_name="box", val="box" ) arg.pop("type", None) @@ -83527,47 +85296,48 @@ def __init__( import copy as _copy -class Candlestick(_BaseTraceType): +class Barpolar(_BaseTraceType): - # close - # ----- + # base + # ---- @property - def close(self): + def base(self): """ - Sets the close values. + Sets where the bar base is drawn (in radial axis units). In + "stack" barmode, traces that set "base" will be excluded and + drawn in "overlay" mode instead. - The 'close' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'base' property accepts values of any type Returns ------- - numpy.ndarray + Any|numpy.ndarray """ - return self["close"] + return self["base"] - @close.setter - def close(self, val): - self["close"] = val + @base.setter + def base(self, val): + self["base"] = val - # closesrc - # -------- + # basesrc + # ------- @property - def closesrc(self): + def basesrc(self): """ - Sets the source reference on plot.ly for close . + Sets the source reference on plot.ly for base . - The 'closesrc' property must be specified as a string or + The 'basesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["closesrc"] + return self["basesrc"] - @closesrc.setter - def closesrc(self, val): - self["closesrc"] = val + @basesrc.setter + def basesrc(self, val): + self["basesrc"] = val # customdata # ---------- @@ -83612,77 +85382,47 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # decreasing - # ---------- - @property - def decreasing(self): - """ - The 'decreasing' property is an instance of Decreasing - that may be specified as: - - An instance of plotly.graph_objs.candlestick.Decreasing - - A dict of string/value properties that will be passed - to the Decreasing constructor - - Supported dict properties: - - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - plotly.graph_objects.candlestick.decreasing.Lin - e instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.candlestick.Decreasing - """ - return self["decreasing"] - - @decreasing.setter - def decreasing(self, val): - self["decreasing"] = val - - # high - # ---- + # dr + # -- @property - def high(self): + def dr(self): """ - Sets the high values. + Sets the r coordinate step. - The 'high' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'dr' property is a number and may be specified as: + - An int or float Returns ------- - numpy.ndarray + int|float """ - return self["high"] + return self["dr"] - @high.setter - def high(self, val): - self["high"] = val + @dr.setter + def dr(self, val): + self["dr"] = val - # highsrc - # ------- + # dtheta + # ------ @property - def highsrc(self): + def dtheta(self): """ - Sets the source reference on plot.ly for high . + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. - The 'highsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'dtheta' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["highsrc"] + return self["dtheta"] - @highsrc.setter - def highsrc(self, val): - self["highsrc"] = val + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val # hoverinfo # --------- @@ -83695,8 +85435,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -83737,7 +85477,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.candlestick.Hoverlabel + - An instance of plotly.graph_objs.barpolar.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -83778,13 +85518,10 @@ def hoverlabel(self): namelengthsrc Sets the source reference on plot.ly for namelength . - split - Show hover information (open, close, high, low) - in separate labels. Returns ------- - plotly.graph_objs.candlestick.Hoverlabel + plotly.graph_objs.barpolar.Hoverlabel """ return self["hoverlabel"] @@ -83792,6 +85529,67 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val + # hovertemplate + # ------------- + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plot.ly/javascript/plotlyjs-events/#event- + data. Additionally, every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To + hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + # hovertemplatesrc + # ---------------- + @property + def hovertemplatesrc(self): + """ + Sets the source reference on plot.ly for hovertemplate . + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + # hovertext # --------- @property @@ -83876,38 +85674,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # increasing - # ---------- - @property - def increasing(self): - """ - The 'increasing' property is an instance of Increasing - that may be specified as: - - An instance of plotly.graph_objs.candlestick.Increasing - - A dict of string/value properties that will be passed - to the Increasing constructor - - Supported dict properties: - - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - plotly.graph_objects.candlestick.increasing.Lin - e instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.candlestick.Increasing - """ - return self["increasing"] - - @increasing.setter - def increasing(self, val): - self["increasing"] = val - # legendgroup # ----------- @property @@ -83931,75 +85697,123 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # line - # ---- + # marker + # ------ @property - def line(self): + def marker(self): """ - The 'line' property is an instance of Line + The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.candlestick.Line + - An instance of plotly.graph_objs.barpolar.Marker - A dict of string/value properties that will be passed - to the Line constructor + to the Marker constructor Supported dict properties: - width - Sets the width (in px) of line bounding the - box(es). Note that this style setting can also - be set per direction via - `increasing.line.width` and - `decreasing.line.width`. - - Returns - ------- - plotly.graph_objs.candlestick.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - - # low - # --- - @property - def low(self): - """ - Sets the low values. - - The 'low' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["low"] - - @low.setter - def low(self, val): - self["low"] = val - - # lowsrc - # ------ - @property - def lowsrc(self): - """ - Sets the source reference on plot.ly for low . - - The 'lowsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. + color + Sets themarkercolor. It accepts either a + specific color or an array of numbers that are + mapped to the colorscale relative to the max + and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.barpolar.marker.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . + line + plotly.graph_objects.barpolar.marker.Line + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. Returns ------- - str + plotly.graph_objs.barpolar.Marker """ - return self["lowsrc"] + return self["marker"] - @lowsrc.setter - def lowsrc(self, val): - self["lowsrc"] = val + @marker.setter + def marker(self, val): + self["marker"] = val # meta # ---- @@ -84071,6 +85885,48 @@ def name(self): def name(self, val): self["name"] = val + # offset + # ------ + @property + def offset(self): + """ + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + # offsetsrc + # --------- + @property + def offsetsrc(self): + """ + Sets the source reference on plot.ly for offset . + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + # opacity # ------- @property @@ -84091,45 +85947,96 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # open - # ---- + # r + # - @property - def open(self): + def r(self): """ - Sets the open values. + Sets the radial coordinates - The 'open' property is an array that may be specified as a tuple, + The 'r' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["open"] + return self["r"] - @open.setter - def open(self, val): - self["open"] = val + @r.setter + def r(self, val): + self["r"] = val - # opensrc - # ------- + # r0 + # -- @property - def opensrc(self): + def r0(self): """ - Sets the source reference on plot.ly for open . + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. - The 'opensrc' property must be specified as a string or + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on plot.ly for r . + + The 'rsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["opensrc"] + return self["rsrc"] - @opensrc.setter - def opensrc(self, val): - self["opensrc"] = val + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + # selected + # -------- + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of plotly.graph_objs.barpolar.Selected + - A dict of string/value properties that will be passed + to the Selected constructor + + Supported dict properties: + + marker + plotly.graph_objects.barpolar.selected.Marker + instance or dict with compatible properties + textfont + plotly.graph_objects.barpolar.selected.Textfont + instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.barpolar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val # selectedpoints # -------------- @@ -84183,7 +86090,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.candlestick.Stream + - An instance of plotly.graph_objs.barpolar.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -84201,7 +86108,7 @@ def stream(self): Returns ------- - plotly.graph_objs.candlestick.Stream + plotly.graph_objs.barpolar.Stream """ return self["stream"] @@ -84209,15 +86116,40 @@ def stream(self): def stream(self, val): self["stream"] = val + # subplot + # ------- + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as the string 'polar' + optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + # text # ---- @property def text(self): """ - Sets hover text elements associated with each sample point. If - a single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - this trace's sample points. + Sets hover text elements associated with each bar. If a single + string, the same string appears over all bars. If an array of + string, the items are mapped in order to the this trace's + coordinates. The 'text' property is a string and must be specified as: - A string @@ -84254,6 +86186,89 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # theta + # ----- + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + # theta0 + # ------ + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + # thetasrc + # -------- + @property + def thetasrc(self): + """ + Sets the source reference on plot.ly for theta . + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + # thetaunit + # --------- + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + # uid # --- @property @@ -84309,6 +86324,36 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val + # unselected + # ---------- + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of plotly.graph_objs.barpolar.Unselected + - A dict of string/value properties that will be passed + to the Unselected constructor + + Supported dict properties: + + marker + plotly.graph_objects.barpolar.unselected.Marker + instance or dict with compatible properties + textfont + plotly.graph_objects.barpolar.unselected.Textfo + nt instance or dict with compatible properties + + Returns + ------- + plotly.graph_objs.barpolar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + # visible # ------- @property @@ -84332,141 +86377,46 @@ def visible(self): def visible(self, val): self["visible"] = val - # whiskerwidth - # ------------ - @property - def whiskerwidth(self): - """ - Sets the width of the whiskers relative to the box' width. For - example, with 1, the whiskers are as wide as the box(es). - - The 'whiskerwidth' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["whiskerwidth"] - - @whiskerwidth.setter - def whiskerwidth(self, val): - self["whiskerwidth"] = val - - # x - # - - @property - def x(self): - """ - Sets the x coordinates. If absent, linear coordinate will be - generated. - - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["x"] - - @x.setter - def x(self, val): - self["x"] = val - - # xaxis + # width # ----- @property - def xaxis(self): - """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. - - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) - - Returns - ------- - str - """ - return self["xaxis"] - - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val - - # xcalendar - # --------- - @property - def xcalendar(self): + def width(self): """ - Sets the calendar system to use with `x` date data. + Sets the bar angular width (in "thetaunit" units). - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - Any + int|float|numpy.ndarray """ - return self["xcalendar"] + return self["width"] - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val + @width.setter + def width(self, val): + self["width"] = val - # xsrc - # ---- + # widthsrc + # -------- @property - def xsrc(self): + def widthsrc(self): """ - Sets the source reference on plot.ly for x . + Sets the source reference on plot.ly for width . - The 'xsrc' property must be specified as a string or + The 'widthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] + return self["widthsrc"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val # type # ---- @@ -84485,10 +86435,12 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - close - Sets the close values. - closesrc - Sets the source reference on plot.ly for close . + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on plot.ly for base . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -84496,13 +86448,12 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - decreasing - plotly.graph_objects.candlestick.Decreasing instance or - dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on plot.ly for high . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -84511,8 +86462,34 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.candlestick.Hoverlabel instance or + plotly.graph_objects.barpolar.Hoverlabel instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . hovertext Same as `text`. hovertextsrc @@ -84523,20 +86500,13 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - increasing - plotly.graph_objects.candlestick.Increasing instance or - dict with compatible properties legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.candlestick.Line instance or dict + marker + plotly.graph_objects.barpolar.Marker instance or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on plot.ly for low . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -84555,12 +86525,24 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on plot.ly for offset . opacity Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on plot.ly for open . + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on plot.ly for r . + selected + plotly.graph_objects.barpolar.Selected instance or dict + with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -84572,15 +86554,31 @@ def _prop_descriptions(self): Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.candlestick.Stream instance or - dict with compatible properties + plotly.graph_objects.barpolar.Stream instance or dict + with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. textsrc Sets the source reference on plot.ly for text . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on plot.ly for theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -84603,99 +86601,85 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.barpolar.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). - x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on plot.ly for width . """ def __init__( self, arg=None, - close=None, - closesrc=None, + base=None, + basesrc=None, customdata=None, customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, + dr=None, + dtheta=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - increasing=None, legendgroup=None, - line=None, - low=None, - lowsrc=None, + marker=None, meta=None, metasrc=None, name=None, + offset=None, + offsetsrc=None, opacity=None, - open=None, - opensrc=None, + r=None, + r0=None, + rsrc=None, + selected=None, selectedpoints=None, showlegend=None, stream=None, + subplot=None, text=None, textsrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, uid=None, uirevision=None, + unselected=None, visible=None, - whiskerwidth=None, - x=None, - xaxis=None, - xcalendar=None, - xsrc=None, - yaxis=None, + width=None, + widthsrc=None, **kwargs ): """ - Construct a new Candlestick object + Construct a new Barpolar object - The candlestick is a style of financial chart describing open, - high, low and close for a given `x` coordinate (most likely - time). The boxes represent the spread between the `open` and - `close` values and the lines represent the spread between the - `low` and `high` values Sample points where the close value is - higher (lower) then the open value are called increasing - (decreasing). By default, increasing candles are drawn in green - whereas decreasing are drawn in red. + The data visualized by the radial span of the bars is set in + `r` Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Candlestick - close - Sets the close values. - closesrc - Sets the source reference on plot.ly for close . + an instance of plotly.graph_objs.Barpolar + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on plot.ly for base . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -84703,13 +86687,12 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - decreasing - plotly.graph_objects.candlestick.Decreasing instance or - dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on plot.ly for high . + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -84718,8 +86701,34 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.candlestick.Hoverlabel instance or + plotly.graph_objects.barpolar.Hoverlabel instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . hovertext Same as `text`. hovertextsrc @@ -84730,20 +86739,13 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - increasing - plotly.graph_objects.candlestick.Increasing instance or - dict with compatible properties legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.candlestick.Line instance or dict + marker + plotly.graph_objects.barpolar.Marker instance or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on plot.ly for low . meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -84762,12 +86764,24 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on plot.ly for offset . opacity Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on plot.ly for open . + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on plot.ly for r . + selected + plotly.graph_objects.barpolar.Selected instance or dict + with compatible properties selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -84779,15 +86793,31 @@ def __init__( Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.candlestick.Stream instance or - dict with compatible properties + plotly.graph_objects.barpolar.Stream instance or dict + with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. text - Sets hover text elements associated with each sample - point. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to this trace's sample points. + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. textsrc Sets the source reference on plot.ly for text . + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on plot.ly for theta . + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -84810,38 +86840,24 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. + unselected + plotly.graph_objects.barpolar.Unselected instance or + dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). - x - Sets the x coordinates. If absent, linear coordinate - will be generated. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on plot.ly for width . Returns ------- - Candlestick + Barpolar """ - super(Candlestick, self).__init__("candlestick") + super(Barpolar, self).__init__("barpolar") # Validate arg # ------------ @@ -84854,9 +86870,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Candlestick +The first argument to the plotly.graph_objs.Barpolar constructor must be a dict or -an instance of plotly.graph_objs.Candlestick""" +an instance of plotly.graph_objs.Barpolar""" ) # Handle skip_invalid @@ -84865,72 +86881,80 @@ def __init__( # Import validators # ----------------- - from plotly.validators import candlestick as v_candlestick + from plotly.validators import barpolar as v_barpolar # Initialize validators # --------------------- - self._validators["close"] = v_candlestick.CloseValidator() - self._validators["closesrc"] = v_candlestick.ClosesrcValidator() - self._validators["customdata"] = v_candlestick.CustomdataValidator() - self._validators["customdatasrc"] = v_candlestick.CustomdatasrcValidator() - self._validators["decreasing"] = v_candlestick.DecreasingValidator() - self._validators["high"] = v_candlestick.HighValidator() - self._validators["highsrc"] = v_candlestick.HighsrcValidator() - self._validators["hoverinfo"] = v_candlestick.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_candlestick.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_candlestick.HoverlabelValidator() - self._validators["hovertext"] = v_candlestick.HovertextValidator() - self._validators["hovertextsrc"] = v_candlestick.HovertextsrcValidator() - self._validators["ids"] = v_candlestick.IdsValidator() - self._validators["idssrc"] = v_candlestick.IdssrcValidator() - self._validators["increasing"] = v_candlestick.IncreasingValidator() - self._validators["legendgroup"] = v_candlestick.LegendgroupValidator() - self._validators["line"] = v_candlestick.LineValidator() - self._validators["low"] = v_candlestick.LowValidator() - self._validators["lowsrc"] = v_candlestick.LowsrcValidator() - self._validators["meta"] = v_candlestick.MetaValidator() - self._validators["metasrc"] = v_candlestick.MetasrcValidator() - self._validators["name"] = v_candlestick.NameValidator() - self._validators["opacity"] = v_candlestick.OpacityValidator() - self._validators["open"] = v_candlestick.OpenValidator() - self._validators["opensrc"] = v_candlestick.OpensrcValidator() - self._validators["selectedpoints"] = v_candlestick.SelectedpointsValidator() - self._validators["showlegend"] = v_candlestick.ShowlegendValidator() - self._validators["stream"] = v_candlestick.StreamValidator() - self._validators["text"] = v_candlestick.TextValidator() - self._validators["textsrc"] = v_candlestick.TextsrcValidator() - self._validators["uid"] = v_candlestick.UidValidator() - self._validators["uirevision"] = v_candlestick.UirevisionValidator() - self._validators["visible"] = v_candlestick.VisibleValidator() - self._validators["whiskerwidth"] = v_candlestick.WhiskerwidthValidator() - self._validators["x"] = v_candlestick.XValidator() - self._validators["xaxis"] = v_candlestick.XAxisValidator() - self._validators["xcalendar"] = v_candlestick.XcalendarValidator() - self._validators["xsrc"] = v_candlestick.XsrcValidator() - self._validators["yaxis"] = v_candlestick.YAxisValidator() + self._validators["base"] = v_barpolar.BaseValidator() + self._validators["basesrc"] = v_barpolar.BasesrcValidator() + self._validators["customdata"] = v_barpolar.CustomdataValidator() + self._validators["customdatasrc"] = v_barpolar.CustomdatasrcValidator() + self._validators["dr"] = v_barpolar.DrValidator() + self._validators["dtheta"] = v_barpolar.DthetaValidator() + self._validators["hoverinfo"] = v_barpolar.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_barpolar.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_barpolar.HoverlabelValidator() + self._validators["hovertemplate"] = v_barpolar.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_barpolar.HovertemplatesrcValidator() + self._validators["hovertext"] = v_barpolar.HovertextValidator() + self._validators["hovertextsrc"] = v_barpolar.HovertextsrcValidator() + self._validators["ids"] = v_barpolar.IdsValidator() + self._validators["idssrc"] = v_barpolar.IdssrcValidator() + self._validators["legendgroup"] = v_barpolar.LegendgroupValidator() + self._validators["marker"] = v_barpolar.MarkerValidator() + self._validators["meta"] = v_barpolar.MetaValidator() + self._validators["metasrc"] = v_barpolar.MetasrcValidator() + self._validators["name"] = v_barpolar.NameValidator() + self._validators["offset"] = v_barpolar.OffsetValidator() + self._validators["offsetsrc"] = v_barpolar.OffsetsrcValidator() + self._validators["opacity"] = v_barpolar.OpacityValidator() + self._validators["r"] = v_barpolar.RValidator() + self._validators["r0"] = v_barpolar.R0Validator() + self._validators["rsrc"] = v_barpolar.RsrcValidator() + self._validators["selected"] = v_barpolar.SelectedValidator() + self._validators["selectedpoints"] = v_barpolar.SelectedpointsValidator() + self._validators["showlegend"] = v_barpolar.ShowlegendValidator() + self._validators["stream"] = v_barpolar.StreamValidator() + self._validators["subplot"] = v_barpolar.SubplotValidator() + self._validators["text"] = v_barpolar.TextValidator() + self._validators["textsrc"] = v_barpolar.TextsrcValidator() + self._validators["theta"] = v_barpolar.ThetaValidator() + self._validators["theta0"] = v_barpolar.Theta0Validator() + self._validators["thetasrc"] = v_barpolar.ThetasrcValidator() + self._validators["thetaunit"] = v_barpolar.ThetaunitValidator() + self._validators["uid"] = v_barpolar.UidValidator() + self._validators["uirevision"] = v_barpolar.UirevisionValidator() + self._validators["unselected"] = v_barpolar.UnselectedValidator() + self._validators["visible"] = v_barpolar.VisibleValidator() + self._validators["width"] = v_barpolar.WidthValidator() + self._validators["widthsrc"] = v_barpolar.WidthsrcValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("close", None) - self["close"] = close if close is not None else _v - _v = arg.pop("closesrc", None) - self["closesrc"] = closesrc if closesrc is not None else _v + _v = arg.pop("base", None) + self["base"] = base if base is not None else _v + _v = arg.pop("basesrc", None) + self["basesrc"] = basesrc if basesrc is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("decreasing", None) - self["decreasing"] = decreasing if decreasing is not None else _v - _v = arg.pop("high", None) - self["high"] = high if high is not None else _v - _v = arg.pop("highsrc", None) - self["highsrc"] = highsrc if highsrc is not None else _v + _v = arg.pop("dr", None) + self["dr"] = dr if dr is not None else _v + _v = arg.pop("dtheta", None) + self["dtheta"] = dtheta if dtheta is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v + _v = arg.pop("hovertemplate", None) + self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v + _v = arg.pop("hovertemplatesrc", None) + self["hovertemplatesrc"] = ( + hovertemplatesrc if hovertemplatesrc is not None else _v + ) _v = arg.pop("hovertext", None) self["hovertext"] = hovertext if hovertext is not None else _v _v = arg.pop("hovertextsrc", None) @@ -84939,64 +86963,70 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("increasing", None) - self["increasing"] = increasing if increasing is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v - _v = arg.pop("low", None) - self["low"] = low if low is not None else _v - _v = arg.pop("lowsrc", None) - self["lowsrc"] = lowsrc if lowsrc is not None else _v + _v = arg.pop("marker", None) + self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v + _v = arg.pop("offset", None) + self["offset"] = offset if offset is not None else _v + _v = arg.pop("offsetsrc", None) + self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("open", None) - self["open"] = open if open is not None else _v - _v = arg.pop("opensrc", None) - self["opensrc"] = opensrc if opensrc is not None else _v + _v = arg.pop("r", None) + self["r"] = r if r is not None else _v + _v = arg.pop("r0", None) + self["r0"] = r0 if r0 is not None else _v + _v = arg.pop("rsrc", None) + self["rsrc"] = rsrc if rsrc is not None else _v + _v = arg.pop("selected", None) + self["selected"] = selected if selected is not None else _v _v = arg.pop("selectedpoints", None) self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("subplot", None) + self["subplot"] = subplot if subplot is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("theta", None) + self["theta"] = theta if theta is not None else _v + _v = arg.pop("theta0", None) + self["theta0"] = theta0 if theta0 is not None else _v + _v = arg.pop("thetasrc", None) + self["thetasrc"] = thetasrc if thetasrc is not None else _v + _v = arg.pop("thetaunit", None) + self["thetaunit"] = thetaunit if thetaunit is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v + _v = arg.pop("unselected", None) + self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("whiskerwidth", None) - self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v + _v = arg.pop("width", None) + self["width"] = width if width is not None else _v + _v = arg.pop("widthsrc", None) + self["widthsrc"] = widthsrc if widthsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "candlestick" + self._props["type"] = "barpolar" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="candlestick", val="candlestick" + plotly_name="type", parent_name="barpolar", val="barpolar" ) arg.pop("type", None) @@ -85013,7 +87043,7 @@ def __init__( import copy as _copy -class Box(_BaseTraceType): +class Bar(_BaseTraceType): # alignmentgroup # -------------- @@ -85038,54 +87068,91 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # boxmean + # base + # ---- + @property + def base(self): + """ + Sets where the bar base is drawn (in position axis units). In + "stack" or "relative" barmode, traces that set "base" will be + excluded and drawn in "overlay" mode instead. + + The 'base' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + # basesrc # ------- @property - def boxmean(self): + def basesrc(self): """ - If True, the mean of the box(es)' underlying distribution is - drawn as a dashed line inside the box(es). If "sd" the standard - deviation is also drawn. + Sets the source reference on plot.ly for base . - The 'boxmean' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, 'sd', False] + The 'basesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["basesrc"] + + @basesrc.setter + def basesrc(self, val): + self["basesrc"] = val + + # cliponaxis + # ---------- + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property must be specified as a bool + (either True, or False) Returns ------- - Any + bool """ - return self["boxmean"] + return self["cliponaxis"] - @boxmean.setter - def boxmean(self, val): - self["boxmean"] = val + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val - # boxpoints - # --------- + # constraintext + # ------------- @property - def boxpoints(self): + def constraintext(self): """ - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier points - are shown and points either less than 4*Q1-3*Q3 or greater than - 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all - sample points are shown If False, only the box(es) are shown - with no sample points + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. - The 'boxpoints' property is an enumeration that may be specified as: + The 'constraintext' property is an enumeration that may be specified as: - One of the following enumeration values: - ['all', 'outliers', 'suspectedoutliers', False] + ['inside', 'outside', 'both', 'none'] Returns ------- Any """ - return self["boxpoints"] + return self["constraintext"] - @boxpoints.setter - def boxpoints(self, val): - self["boxpoints"] = val + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val # customdata # ---------- @@ -85130,66 +87197,205 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fillcolor - # --------- + # dx + # -- @property - def fillcolor(self): + def dx(self): """ - Sets the fill color. Defaults to a half-transparent variant of - the line color, marker color, or marker line color, whichever - is available. + Sets the x coordinate step. See `x0` for more info. - The 'fillcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + The 'dx' property is a number and may be specified as: + - An int or float Returns ------- - str + int|float """ - return self["fillcolor"] + return self["dx"] - @fillcolor.setter - def fillcolor(self, val): - self["fillcolor"] = val + @dx.setter + def dx(self, val): + self["dx"] = val + + # dy + # -- + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + # error_x + # ------- + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of plotly.graph_objs.bar.ErrorX + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.bar.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + # error_y + # ------- + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of plotly.graph_objs.bar.ErrorY + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Supported dict properties: + + array + Sets the data corresponding the length of each + error bar. Values are plotted relative to the + underlying data. + arrayminus + Sets the data corresponding the length of each + error bar in the bottom (left) direction for + vertical (horizontal) bars Values are plotted + relative to the underlying data. + arrayminussrc + Sets the source reference on plot.ly for + arrayminus . + arraysrc + Sets the source reference on plot.ly for array + . + color + Sets the stoke color of the error bars. + symmetric + Determines whether or not the error bars have + the same length in both direction (top/bottom + for vertical bars, left/right for horizontal + bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error + bars. If *constant`, the bar lengths are of a + constant value. Set this constant in `value`. + If "percent", the bar lengths correspond to a + percentage of underlying data. Set this + percentage in `value`. If "sqrt", the bar + lengths correspond to the sqaure of the + underlying data. If "data", the bar lengths are + set with data set `array`. + value + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars. + valueminus + Sets the value of either the percentage (if + `type` is set to "percent") or the constant (if + `type` is set to "constant") corresponding to + the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + visible + Determines whether or not this set of error + bars is visible. + width + Sets the width (in px) of the cross-bar at both + ends of the error bars. + + Returns + ------- + plotly.graph_objs.bar.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val # hoverinfo # --------- @@ -85244,7 +87450,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.box.Hoverlabel + - An instance of plotly.graph_objs.bar.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -85288,7 +87494,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.box.Hoverlabel + plotly.graph_objs.bar.Hoverlabel """ return self["hoverlabel"] @@ -85296,29 +87502,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- - @property - def hoveron(self): - """ - Do the hover effects highlight individual boxes or sample - points or both? - - The 'hoveron' property is a flaglist and may be specified - as a string containing: - - Any combination of ['boxes', 'points'] joined with '+' characters - (e.g. 'boxes+points') - - Returns - ------- - Any - """ - return self["hoveron"] - - @hoveron.setter - def hoveron(self, val): - self["hoveron"] = val - # hovertemplate # ------------- @property @@ -85331,7 +87514,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -85381,7 +87568,11 @@ def hovertemplatesrc(self, val): @property def hovertext(self): """ - Same as `text`. + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. The 'hovertext' property is a string and must be specified as: - A string @@ -85460,28 +87651,82 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # jitter - # ------ + # insidetextanchor + # ---------------- @property - def jitter(self): + def insidetextanchor(self): """ - Sets the amount of jitter in the sample points drawn. If 0, the - sample points align along the distribution axis. If 1, the - sample points are drawn in a random jitter of width equal to - the width of the box(es). + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. - The 'jitter' property is a number and may be specified as: - - An int or float in the interval [0, 1] + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] Returns ------- - int|float + Any """ - return self["jitter"] + return self["insidetextanchor"] - @jitter.setter - def jitter(self, val): - self["jitter"] = val + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + # insidetextfont + # -------------- + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of plotly.graph_objs.bar.Insidetextfont + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.bar.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val # legendgroup # ----------- @@ -85506,35 +87751,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # line - # ---- - @property - def line(self): - """ - The 'line' property is an instance of Line - that may be specified as: - - An instance of plotly.graph_objs.box.Line - - A dict of string/value properties that will be passed - to the Line constructor - - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - - Returns - ------- - plotly.graph_objs.box.Line - """ - return self["line"] - - @line.setter - def line(self, val): - self["line"] = val - # marker # ------ @property @@ -85542,38 +87758,110 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.box.Marker + - An instance of plotly.graph_objs.bar.Marker - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if in `marker.color`is set to a + numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the + default palette will be chosen according to + whether numbers in the `color` array are all + positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + in `marker.color`) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color`is set to a numerical + array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if in `marker.color`is set to a numerical + array. Value should have the same units as in + `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if in `marker.color`is set to a + numerical array. Value should have the same + units as in `marker.color` and if set, + `marker.cmax` must be set as well. color Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.bar.marker.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color`is set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorsrc + Sets the source reference on plot.ly for color + . line - plotly.graph_objects.box.marker.Line instance - or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. + plotly.graph_objects.bar.marker.Line instance + or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on plot.ly for + opacity . + reversescale + Reverses the color mapping if true. Has an + effect only if in `marker.color`is set to a + numerical array. If true, `marker.cmin` will + correspond to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + in `marker.color`is set to a numerical array. Returns ------- - plotly.graph_objs.box.Marker + plotly.graph_objs.bar.Marker """ return self["marker"] @@ -85635,9 +87923,7 @@ def metasrc(self, val): def name(self): """ Sets the trace name. The trace name appear as the legend item - and on hover. For box traces, the name will also be used for - the position coordinate, if `x` and `x0` (`y` and `y0` if - horizontal) are missing and the position axis is categorical + and on hover. The 'name' property is a string and must be specified as: - A string @@ -85653,46 +87939,28 @@ def name(self): def name(self, val): self["name"] = val - # notched - # ------- - @property - def notched(self): - """ - Determines whether or not notches should be drawn. - - The 'notched' property must be specified as a bool - (either True, or False) - - Returns - ------- - bool - """ - return self["notched"] - - @notched.setter - def notched(self, val): - self["notched"] = val - - # notchwidth - # ---------- + # offset + # ------ @property - def notchwidth(self): + def offset(self): """ - Sets the width of the notches relative to the box' width. For - example, with 0, the notches are as wide as the box(es). + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. - The 'notchwidth' property is a number and may be specified as: - - An int or float in the interval [0, 0.5] + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - int|float + int|float|numpy.ndarray """ - return self["notchwidth"] + return self["offset"] - @notchwidth.setter - def notchwidth(self, val): - self["notchwidth"] = val + @offset.setter + def offset(self, val): + self["offset"] = val # offsetgroup # ----------- @@ -85717,6 +87985,26 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val + # offsetsrc + # --------- + @property + def offsetsrc(self): + """ + Sets the source reference on plot.ly for offset . + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + # opacity # ------- @property @@ -85742,8 +88030,8 @@ def opacity(self, val): @property def orientation(self): """ - Sets the orientation of the box(es). If "v" ("h"), the - distribution is visualized along the vertical (horizontal). + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). The 'orientation' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -85759,29 +88047,102 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # pointpos - # -------- + # outsidetextfont + # --------------- @property - def pointpos(self): + def outsidetextfont(self): """ - Sets the position of the sample points in relation to the - box(es). If 0, the sample points are places over the center of - the box(es). Positive (negative) values correspond to positions - to the right (left) for vertical boxes and above (below) for - horizontal boxes + Sets the font used for `text` lying outside the bar. - The 'pointpos' property is a number and may be specified as: - - An int or float in the interval [-2, 2] + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of plotly.graph_objs.bar.Outsidetextfont + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . Returns ------- - int|float + plotly.graph_objs.bar.Outsidetextfont """ - return self["pointpos"] + return self["outsidetextfont"] - @pointpos.setter - def pointpos(self, val): - self["pointpos"] = val + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + # r + # - + @property + def r(self): + """ + r coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the radial coordinatesfor + legacy polar chart only. + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # rsrc + # ---- + @property + def rsrc(self): + """ + Sets the source reference on plot.ly for r . + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val # selected # -------- @@ -85790,19 +88151,22 @@ def selected(self): """ The 'selected' property is an instance of Selected that may be specified as: - - An instance of plotly.graph_objs.box.Selected + - An instance of plotly.graph_objs.bar.Selected - A dict of string/value properties that will be passed to the Selected constructor Supported dict properties: marker - plotly.graph_objects.box.selected.Marker + plotly.graph_objects.bar.selected.Marker + instance or dict with compatible properties + textfont + plotly.graph_objects.bar.selected.Textfont instance or dict with compatible properties Returns ------- - plotly.graph_objs.box.Selected + plotly.graph_objs.bar.Selected """ return self["selected"] @@ -85862,7 +88226,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.box.Stream + - An instance of plotly.graph_objs.bar.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -85880,7 +88244,7 @@ def stream(self): Returns ------- - plotly.graph_objs.box.Stream + plotly.graph_objs.bar.Stream """ return self["stream"] @@ -85888,16 +88252,39 @@ def stream(self): def stream(self, val): self["stream"] = val + # t + # - + @property + def t(self): + """ + t coordinates in scatter traces are deprecated!Please switch to + the "scatterpolar" trace type.Sets the angular coordinatesfor + legacy polar chart only. + + The 't' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + # text # ---- @property def text(self): """ - Sets the text elements associated with each sample value. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. The 'text' property is a string and must be specified as: - A string @@ -85914,6 +88301,134 @@ def text(self): def text(self, val): self["text"] = val + # textangle + # --------- + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of plotly.graph_objs.bar.Textfont + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.bar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # textposition + # ------------ + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + # textpositionsrc + # --------------- + @property + def textpositionsrc(self): + """ + Sets the source reference on plot.ly for textposition . + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + # textsrc # ------- @property @@ -85934,6 +88449,81 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val + # texttemplate + # ------------ + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appear on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for details on + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. Every attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + # texttemplatesrc + # --------------- + @property + def texttemplatesrc(self): + """ + Sets the source reference on plot.ly for texttemplate . + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + # tsrc + # ---- + @property + def tsrc(self): + """ + Sets the source reference on plot.ly for t . + + The 'tsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tsrc"] + + @tsrc.setter + def tsrc(self, val): + self["tsrc"] = val + # uid # --- @property @@ -85996,19 +88586,22 @@ def unselected(self): """ The 'unselected' property is an instance of Unselected that may be specified as: - - An instance of plotly.graph_objs.box.Unselected + - An instance of plotly.graph_objs.bar.Unselected - A dict of string/value properties that will be passed to the Unselected constructor Supported dict properties: marker - plotly.graph_objects.box.unselected.Marker + plotly.graph_objects.bar.unselected.Marker + instance or dict with compatible properties + textfont + plotly.graph_objects.bar.unselected.Textfont instance or dict with compatible properties Returns ------- - plotly.graph_objs.box.Unselected + plotly.graph_objs.bar.Unselected """ return self["unselected"] @@ -86039,42 +88632,20 @@ def visible(self): def visible(self, val): self["visible"] = val - # whiskerwidth - # ------------ - @property - def whiskerwidth(self): - """ - Sets the width of the whiskers relative to the box' width. For - example, with 1, the whiskers are as wide as the box(es). - - The 'whiskerwidth' property is a number and may be specified as: - - An int or float in the interval [0, 1] - - Returns - ------- - int|float - """ - return self["whiskerwidth"] - - @whiskerwidth.setter - def whiskerwidth(self, val): - self["whiskerwidth"] = val - # width # ----- @property def width(self): """ - Sets the width of the box in data coordinate If 0 (default - value) the width is automatically selected based on the - positions of other box traces in the same subplot. + Sets the bar width (in position axis units). The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above Returns ------- - int|float + int|float|numpy.ndarray """ return self["width"] @@ -86082,13 +88653,32 @@ def width(self): def width(self, val): self["width"] = val + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on plot.ly for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + # x # - @property def x(self): """ - Sets the x sample data or coordinates. See overview for more - info. + Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -86108,7 +88698,9 @@ def x(self, val): @property def x0(self): """ - Sets the x coordinate of the box. See overview for more info. + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. The 'x0' property accepts values of any type @@ -86196,8 +88788,7 @@ def xsrc(self, val): @property def y(self): """ - Sets the y sample data or coordinates. See overview for more - info. + Sets the y coordinates. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -86217,7 +88808,9 @@ def y(self, val): @property def y0(self): """ - Sets the y coordinate of the box. See overview for more info. + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. The 'y0' property accepts values of any type @@ -86314,26 +88907,29 @@ def _parent_path_str(self): # Self properties description # --------------------------- - @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - boxmean - If True, the mean of the box(es)' underlying - distribution is drawn as a dashed line inside the - box(es). If "sd" the standard deviation is also drawn. - boxpoints - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the box(es) are shown with no sample - points + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on plot.ly for base . + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -86341,10 +88937,16 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + plotly.graph_objects.bar.ErrorX instance or dict with + compatible properties + error_y + plotly.graph_objects.bar.ErrorY instance or dict with + compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -86353,11 +88955,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.box.Hoverlabel instance or dict + plotly.graph_objects.bar.Hoverlabel instance or dict with compatible properties - hoveron - Do the hover effects highlight individual boxes or - sample points or both? hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -86366,7 +88965,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -86380,7 +88984,12 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -86389,20 +88998,17 @@ def _prop_descriptions(self): array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the box(es). + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.box.Line instance or dict with - compatible properties marker - plotly.graph_objects.box.Marker instance or dict with + plotly.graph_objects.bar.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -86421,34 +89027,34 @@ def _prop_descriptions(self): Sets the source reference on plot.ly for meta . name Sets the trace name. The trace name appear as the - legend item and on hover. For box traces, the name will - also be used for the position coordinate, if `x` and - `x0` (`y` and `y0` if horizontal) are missing and the - position axis is categorical - notched - Determines whether or not notches should be drawn. - notchwidth - Sets the width of the notches relative to the box' - width. For example, with 0, the notches are as wide as - the box(es). + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. offsetgroup Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up. + offsetsrc + Sets the source reference on plot.ly for offset . opacity Sets the opacity of the trace. orientation - Sets the orientation of the box(es). If "v" ("h"), the - distribution is visualized along the vertical + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical (horizontal). - pointpos - Sets the position of the sample points in relation to - the box(es). If 0, the sample points are places over - the center of the box(es). Positive (negative) values - correspond to positions to the right (left) for - vertical boxes and above (below) for horizontal boxes + outsidetextfont + Sets the font used for `text` lying outside the bar. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on plot.ly for r . selected - plotly.graph_objects.box.Selected instance or dict with + plotly.graph_objects.bar.Selected instance or dict with compatible properties selectedpoints Array containing integer indices of selected points. @@ -86461,17 +89067,63 @@ def _prop_descriptions(self): Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.box.Stream instance or dict with + plotly.graph_objects.bar.Stream instance or dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tsrc + Sets the source reference on plot.ly for t . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -86495,28 +89147,23 @@ def _prop_descriptions(self): preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.box.Unselected instance or dict + plotly.graph_objects.bar.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). width - Sets the width of the box in data coordinate If 0 - (default value) the width is automatically selected - based on the positions of other box traces in the same - subplot. + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on plot.ly for width . x - Sets the x sample data or coordinates. See overview for - more info. + Sets the x coordinates. x0 - Sets the x coordinate of the box. See overview for more - info. + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the @@ -86527,11 +89174,11 @@ def _prop_descriptions(self): xsrc Sets the source reference on plot.ly for x . y - Sets the y sample data or coordinates. See overview for - more info. + Sets the y coordinates. y0 - Sets the y coordinate of the box. See overview for more - info. + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the @@ -86547,46 +89194,60 @@ def __init__( self, arg=None, alignmentgroup=None, - boxmean=None, - boxpoints=None, + base=None, + basesrc=None, + cliponaxis=None, + constraintext=None, customdata=None, customdatasrc=None, - fillcolor=None, + dx=None, + dy=None, + error_x=None, + error_y=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - jitter=None, + insidetextanchor=None, + insidetextfont=None, legendgroup=None, - line=None, marker=None, meta=None, metasrc=None, name=None, - notched=None, - notchwidth=None, + offset=None, offsetgroup=None, + offsetsrc=None, opacity=None, orientation=None, - pointpos=None, + outsidetextfont=None, + r=None, + rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, + t=None, text=None, + textangle=None, + textfont=None, + textposition=None, + textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tsrc=None, uid=None, uirevision=None, unselected=None, visible=None, - whiskerwidth=None, width=None, + widthsrc=None, x=None, x0=None, xaxis=None, @@ -86600,41 +89261,38 @@ def __init__( **kwargs ): """ - Construct a new Box object + Construct a new Bar object - In vertical (horizontal) box plots, statistics are computed - using `y` (`x`) values. By supplying an `x` (`y`) array, one - box per distinct x (y) value is drawn If no `x` (`y`) list is - provided, a single box is drawn. That box position is then - positioned with with `name` or with `x0` (`y0`) if provided. - Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The - second quartile (Q2) is marked by a line inside the box. By - default, the whiskers correspond to the box' edges +/- 1.5 - times the interquartile range (IQR: Q3-Q1), see "boxpoints" for - other options. + The data visualized by the span of the bars is set in `y` if + `orientation` is set th "v" (the default) and the labels are + set in `x`. By setting `orientation` to "h", the roles are + interchanged. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Box + an instance of plotly.graph_objs.Bar alignmentgroup Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently. - boxmean - If True, the mean of the box(es)' underlying - distribution is drawn as a dashed line inside the - box(es). If "sd" the standard deviation is also drawn. - boxpoints - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the box(es) are shown with no sample - points + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on plot.ly for base . + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -86642,10 +89300,16 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + plotly.graph_objects.bar.ErrorX instance or dict with + compatible properties + error_y + plotly.graph_objects.bar.ErrorY instance or dict with + compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -86654,11 +89318,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.box.Hoverlabel instance or dict + plotly.graph_objects.bar.Hoverlabel instance or dict with compatible properties - hoveron - Do the hover effects highlight individual boxes or - sample points or both? hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -86667,7 +89328,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -86681,7 +89347,12 @@ def __init__( Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -86690,20 +89361,17 @@ def __init__( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the box(es). + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. - line - plotly.graph_objects.box.Line instance or dict with - compatible properties marker - plotly.graph_objects.box.Marker instance or dict with + plotly.graph_objects.bar.Marker instance or dict with compatible properties meta Assigns extra meta information associated with this @@ -86722,34 +89390,34 @@ def __init__( Sets the source reference on plot.ly for meta . name Sets the trace name. The trace name appear as the - legend item and on hover. For box traces, the name will - also be used for the position coordinate, if `x` and - `x0` (`y` and `y0` if horizontal) are missing and the - position axis is categorical - notched - Determines whether or not notches should be drawn. - notchwidth - Sets the width of the notches relative to the box' - width. For example, with 0, the notches are as wide as - the box(es). + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. offsetgroup Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up. + offsetsrc + Sets the source reference on plot.ly for offset . opacity Sets the opacity of the trace. orientation - Sets the orientation of the box(es). If "v" ("h"), the - distribution is visualized along the vertical + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical (horizontal). - pointpos - Sets the position of the sample points in relation to - the box(es). If 0, the sample points are places over - the center of the box(es). Positive (negative) values - correspond to positions to the right (left) for - vertical boxes and above (below) for horizontal boxes + outsidetextfont + Sets the font used for `text` lying outside the bar. + r + r coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the radial + coordinatesfor legacy polar chart only. + rsrc + Sets the source reference on plot.ly for r . selected - plotly.graph_objects.box.Selected instance or dict with + plotly.graph_objects.bar.Selected instance or dict with compatible properties selectedpoints Array containing integer indices of selected points. @@ -86762,17 +89430,63 @@ def __init__( Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.box.Stream instance or dict with + plotly.graph_objects.bar.Stream instance or dict with compatible properties + t + t coordinates in scatter traces are deprecated!Please + switch to the "scatterpolar" trace type.Sets the + angular coordinatesfor legacy polar chart only. text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. + textpositionsrc + Sets the source reference on plot.ly for textposition + . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tsrc + Sets the source reference on plot.ly for t . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -86796,28 +89510,23 @@ def __init__( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected - plotly.graph_objects.box.Unselected instance or dict + plotly.graph_objects.bar.Unselected instance or dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the box' - width. For example, with 1, the whiskers are as wide as - the box(es). width - Sets the width of the box in data coordinate If 0 - (default value) the width is automatically selected - based on the positions of other box traces in the same - subplot. + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on plot.ly for width . x - Sets the x sample data or coordinates. See overview for - more info. + Sets the x coordinates. x0 - Sets the x coordinate of the box. See overview for more - info. + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. xaxis Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the @@ -86828,11 +89537,11 @@ def __init__( xsrc Sets the source reference on plot.ly for x . y - Sets the y sample data or coordinates. See overview for - more info. + Sets the y coordinates. y0 - Sets the y coordinate of the box. See overview for more - info. + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. yaxis Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the @@ -86845,9 +89554,9 @@ def __init__( Returns ------- - Box + Bar """ - super(Box, self).__init__("box") + super(Bar, self).__init__("bar") # Validate arg # ------------ @@ -86860,9 +89569,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Box +The first argument to the plotly.graph_objs.Bar constructor must be a dict or -an instance of plotly.graph_objs.Box""" +an instance of plotly.graph_objs.Bar""" ) # Handle skip_invalid @@ -86871,84 +89580,106 @@ def __init__( # Import validators # ----------------- - from plotly.validators import box as v_box + from plotly.validators import bar as v_bar # Initialize validators # --------------------- - self._validators["alignmentgroup"] = v_box.AlignmentgroupValidator() - self._validators["boxmean"] = v_box.BoxmeanValidator() - self._validators["boxpoints"] = v_box.BoxpointsValidator() - self._validators["customdata"] = v_box.CustomdataValidator() - self._validators["customdatasrc"] = v_box.CustomdatasrcValidator() - self._validators["fillcolor"] = v_box.FillcolorValidator() - self._validators["hoverinfo"] = v_box.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_box.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_box.HoverlabelValidator() - self._validators["hoveron"] = v_box.HoveronValidator() - self._validators["hovertemplate"] = v_box.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_box.HovertemplatesrcValidator() - self._validators["hovertext"] = v_box.HovertextValidator() - self._validators["hovertextsrc"] = v_box.HovertextsrcValidator() - self._validators["ids"] = v_box.IdsValidator() - self._validators["idssrc"] = v_box.IdssrcValidator() - self._validators["jitter"] = v_box.JitterValidator() - self._validators["legendgroup"] = v_box.LegendgroupValidator() - self._validators["line"] = v_box.LineValidator() - self._validators["marker"] = v_box.MarkerValidator() - self._validators["meta"] = v_box.MetaValidator() - self._validators["metasrc"] = v_box.MetasrcValidator() - self._validators["name"] = v_box.NameValidator() - self._validators["notched"] = v_box.NotchedValidator() - self._validators["notchwidth"] = v_box.NotchwidthValidator() - self._validators["offsetgroup"] = v_box.OffsetgroupValidator() - self._validators["opacity"] = v_box.OpacityValidator() - self._validators["orientation"] = v_box.OrientationValidator() - self._validators["pointpos"] = v_box.PointposValidator() - self._validators["selected"] = v_box.SelectedValidator() - self._validators["selectedpoints"] = v_box.SelectedpointsValidator() - self._validators["showlegend"] = v_box.ShowlegendValidator() - self._validators["stream"] = v_box.StreamValidator() - self._validators["text"] = v_box.TextValidator() - self._validators["textsrc"] = v_box.TextsrcValidator() - self._validators["uid"] = v_box.UidValidator() - self._validators["uirevision"] = v_box.UirevisionValidator() - self._validators["unselected"] = v_box.UnselectedValidator() - self._validators["visible"] = v_box.VisibleValidator() - self._validators["whiskerwidth"] = v_box.WhiskerwidthValidator() - self._validators["width"] = v_box.WidthValidator() - self._validators["x"] = v_box.XValidator() - self._validators["x0"] = v_box.X0Validator() - self._validators["xaxis"] = v_box.XAxisValidator() - self._validators["xcalendar"] = v_box.XcalendarValidator() - self._validators["xsrc"] = v_box.XsrcValidator() - self._validators["y"] = v_box.YValidator() - self._validators["y0"] = v_box.Y0Validator() - self._validators["yaxis"] = v_box.YAxisValidator() - self._validators["ycalendar"] = v_box.YcalendarValidator() - self._validators["ysrc"] = v_box.YsrcValidator() + self._validators["alignmentgroup"] = v_bar.AlignmentgroupValidator() + self._validators["base"] = v_bar.BaseValidator() + self._validators["basesrc"] = v_bar.BasesrcValidator() + self._validators["cliponaxis"] = v_bar.CliponaxisValidator() + self._validators["constraintext"] = v_bar.ConstraintextValidator() + self._validators["customdata"] = v_bar.CustomdataValidator() + self._validators["customdatasrc"] = v_bar.CustomdatasrcValidator() + self._validators["dx"] = v_bar.DxValidator() + self._validators["dy"] = v_bar.DyValidator() + self._validators["error_x"] = v_bar.ErrorXValidator() + self._validators["error_y"] = v_bar.ErrorYValidator() + self._validators["hoverinfo"] = v_bar.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_bar.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_bar.HoverlabelValidator() + self._validators["hovertemplate"] = v_bar.HovertemplateValidator() + self._validators["hovertemplatesrc"] = v_bar.HovertemplatesrcValidator() + self._validators["hovertext"] = v_bar.HovertextValidator() + self._validators["hovertextsrc"] = v_bar.HovertextsrcValidator() + self._validators["ids"] = v_bar.IdsValidator() + self._validators["idssrc"] = v_bar.IdssrcValidator() + self._validators["insidetextanchor"] = v_bar.InsidetextanchorValidator() + self._validators["insidetextfont"] = v_bar.InsidetextfontValidator() + self._validators["legendgroup"] = v_bar.LegendgroupValidator() + self._validators["marker"] = v_bar.MarkerValidator() + self._validators["meta"] = v_bar.MetaValidator() + self._validators["metasrc"] = v_bar.MetasrcValidator() + self._validators["name"] = v_bar.NameValidator() + self._validators["offset"] = v_bar.OffsetValidator() + self._validators["offsetgroup"] = v_bar.OffsetgroupValidator() + self._validators["offsetsrc"] = v_bar.OffsetsrcValidator() + self._validators["opacity"] = v_bar.OpacityValidator() + self._validators["orientation"] = v_bar.OrientationValidator() + self._validators["outsidetextfont"] = v_bar.OutsidetextfontValidator() + self._validators["r"] = v_bar.RValidator() + self._validators["rsrc"] = v_bar.RsrcValidator() + self._validators["selected"] = v_bar.SelectedValidator() + self._validators["selectedpoints"] = v_bar.SelectedpointsValidator() + self._validators["showlegend"] = v_bar.ShowlegendValidator() + self._validators["stream"] = v_bar.StreamValidator() + self._validators["t"] = v_bar.TValidator() + self._validators["text"] = v_bar.TextValidator() + self._validators["textangle"] = v_bar.TextangleValidator() + self._validators["textfont"] = v_bar.TextfontValidator() + self._validators["textposition"] = v_bar.TextpositionValidator() + self._validators["textpositionsrc"] = v_bar.TextpositionsrcValidator() + self._validators["textsrc"] = v_bar.TextsrcValidator() + self._validators["texttemplate"] = v_bar.TexttemplateValidator() + self._validators["texttemplatesrc"] = v_bar.TexttemplatesrcValidator() + self._validators["tsrc"] = v_bar.TsrcValidator() + self._validators["uid"] = v_bar.UidValidator() + self._validators["uirevision"] = v_bar.UirevisionValidator() + self._validators["unselected"] = v_bar.UnselectedValidator() + self._validators["visible"] = v_bar.VisibleValidator() + self._validators["width"] = v_bar.WidthValidator() + self._validators["widthsrc"] = v_bar.WidthsrcValidator() + self._validators["x"] = v_bar.XValidator() + self._validators["x0"] = v_bar.X0Validator() + self._validators["xaxis"] = v_bar.XAxisValidator() + self._validators["xcalendar"] = v_bar.XcalendarValidator() + self._validators["xsrc"] = v_bar.XsrcValidator() + self._validators["y"] = v_bar.YValidator() + self._validators["y0"] = v_bar.Y0Validator() + self._validators["yaxis"] = v_bar.YAxisValidator() + self._validators["ycalendar"] = v_bar.YcalendarValidator() + self._validators["ysrc"] = v_bar.YsrcValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop("alignmentgroup", None) self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("boxmean", None) - self["boxmean"] = boxmean if boxmean is not None else _v - _v = arg.pop("boxpoints", None) - self["boxpoints"] = boxpoints if boxpoints is not None else _v + _v = arg.pop("base", None) + self["base"] = base if base is not None else _v + _v = arg.pop("basesrc", None) + self["basesrc"] = basesrc if basesrc is not None else _v + _v = arg.pop("cliponaxis", None) + self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v + _v = arg.pop("constraintext", None) + self["constraintext"] = constraintext if constraintext is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("fillcolor", None) - self["fillcolor"] = fillcolor if fillcolor is not None else _v + _v = arg.pop("dx", None) + self["dx"] = dx if dx is not None else _v + _v = arg.pop("dy", None) + self["dy"] = dy if dy is not None else _v + _v = arg.pop("error_x", None) + self["error_x"] = error_x if error_x is not None else _v + _v = arg.pop("error_y", None) + self["error_y"] = error_y if error_y is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hoveron", None) - self["hoveron"] = hoveron if hoveron is not None else _v _v = arg.pop("hovertemplate", None) self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v _v = arg.pop("hovertemplatesrc", None) @@ -86963,12 +89694,14 @@ def __init__( self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("jitter", None) - self["jitter"] = jitter if jitter is not None else _v + _v = arg.pop("insidetextanchor", None) + self["insidetextanchor"] = ( + insidetextanchor if insidetextanchor is not None else _v + ) + _v = arg.pop("insidetextfont", None) + self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v _v = arg.pop("legendgroup", None) self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("line", None) - self["line"] = line if line is not None else _v _v = arg.pop("marker", None) self["marker"] = marker if marker is not None else _v _v = arg.pop("meta", None) @@ -86977,18 +89710,22 @@ def __init__( self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("notched", None) - self["notched"] = notched if notched is not None else _v - _v = arg.pop("notchwidth", None) - self["notchwidth"] = notchwidth if notchwidth is not None else _v + _v = arg.pop("offset", None) + self["offset"] = offset if offset is not None else _v _v = arg.pop("offsetgroup", None) self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v + _v = arg.pop("offsetsrc", None) + self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("orientation", None) self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("pointpos", None) - self["pointpos"] = pointpos if pointpos is not None else _v + _v = arg.pop("outsidetextfont", None) + self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v + _v = arg.pop("r", None) + self["r"] = r if r is not None else _v + _v = arg.pop("rsrc", None) + self["rsrc"] = rsrc if rsrc is not None else _v _v = arg.pop("selected", None) self["selected"] = selected if selected is not None else _v _v = arg.pop("selectedpoints", None) @@ -86997,10 +89734,26 @@ def __init__( self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v + _v = arg.pop("t", None) + self["t"] = t if t is not None else _v _v = arg.pop("text", None) self["text"] = text if text is not None else _v + _v = arg.pop("textangle", None) + self["textangle"] = textangle if textangle is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("textposition", None) + self["textposition"] = textposition if textposition is not None else _v + _v = arg.pop("textpositionsrc", None) + self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v _v = arg.pop("textsrc", None) self["textsrc"] = textsrc if textsrc is not None else _v + _v = arg.pop("texttemplate", None) + self["texttemplate"] = texttemplate if texttemplate is not None else _v + _v = arg.pop("texttemplatesrc", None) + self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v + _v = arg.pop("tsrc", None) + self["tsrc"] = tsrc if tsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) @@ -87009,10 +89762,10 @@ def __init__( self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("whiskerwidth", None) - self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v _v = arg.pop("width", None) self["width"] = width if width is not None else _v + _v = arg.pop("widthsrc", None) + self["widthsrc"] = widthsrc if widthsrc is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v _v = arg.pop("x0", None) @@ -87038,9 +89791,9 @@ def __init__( # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "box" + self._props["type"] = "bar" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="box", val="box" + plotly_name="type", parent_name="bar", val="bar" ) arg.pop("type", None) @@ -87057,48 +89810,7 @@ def __init__( import copy as _copy -class Barpolar(_BaseTraceType): - - # base - # ---- - @property - def base(self): - """ - Sets where the bar base is drawn (in radial axis units). In - "stack" barmode, traces that set "base" will be excluded and - drawn in "overlay" mode instead. - - The 'base' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["base"] - - @base.setter - def base(self, val): - self["base"] = val - - # basesrc - # ------- - @property - def basesrc(self): - """ - Sets the source reference on plot.ly for base . - - The 'basesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["basesrc"] - - @basesrc.setter - def basesrc(self, val): - self["basesrc"] = val +class Area(_BaseTraceType): # customdata # ---------- @@ -87143,48 +89855,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dr - # -- - @property - def dr(self): - """ - Sets the r coordinate step. - - The 'dr' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dr"] - - @dr.setter - def dr(self, val): - self["dr"] = val - - # dtheta - # ------ - @property - def dtheta(self): - """ - Sets the theta coordinate step. By default, the `dtheta` step - equals the subplot's period divided by the length of the `r` - coordinates. - - The 'dtheta' property is a number and may be specified as: - - An int or float - - Returns - ------- - int|float - """ - return self["dtheta"] - - @dtheta.setter - def dtheta(self, val): - self["dtheta"] = val - # hoverinfo # --------- @property @@ -87196,8 +89866,8 @@ def hoverinfo(self): The 'hoverinfo' property is a flaglist and may be specified as a string containing: - - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters - (e.g. 'r+theta') + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - A list or array of the above @@ -87238,7 +89908,7 @@ def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - - An instance of plotly.graph_objs.barpolar.Hoverlabel + - An instance of plotly.graph_objs.area.Hoverlabel - A dict of string/value properties that will be passed to the Hoverlabel constructor @@ -87282,7 +89952,7 @@ def hoverlabel(self): Returns ------- - plotly.graph_objs.barpolar.Hoverlabel + plotly.graph_objs.area.Hoverlabel """ return self["hoverlabel"] @@ -87290,105 +89960,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- - @property - def hovertemplate(self): - """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. - - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertemplate"] - - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val - - # hovertemplatesrc - # ---------------- - @property - def hovertemplatesrc(self): - """ - Sets the source reference on plot.ly for hovertemplate . - - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertemplatesrc"] - - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val - - # hovertext - # --------- - @property - def hovertext(self): - """ - Same as `text`. - - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["hovertext"] - - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val - - # hovertextsrc - # ------------ - @property - def hovertextsrc(self): - """ - Sets the source reference on plot.ly for hovertext . - - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["hovertextsrc"] - - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val - # ids # --- @property @@ -87461,110 +90032,52 @@ def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - - An instance of plotly.graph_objs.barpolar.Marker + - An instance of plotly.graph_objs.area.Marker - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.barpolar.marker.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets themarkercolor. + It accepts either a specific color or an array + of numbers that are mapped to the colorscale + relative to the max and min values of the array + or relative to `marker.cmin` and `marker.cmax` + if set. colorsrc Sets the source reference on plot.ly for color . - line - plotly.graph_objects.barpolar.marker.Line - instance or dict with compatible properties opacity - Sets the opacity of the bars. + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker + opacity. opacitysrc Sets the source reference on plot.ly for opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. + size + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker size + (in px). + sizesrc + Sets the source reference on plot.ly for size + . + symbol + Area traces are deprecated! Please switch to + the "barpolar" trace type. Sets the marker + symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 + is equivalent to appending "-dot" to a symbol + name. Adding 300 is equivalent to appending + "-open-dot" or "dot-open" to a symbol name. + symbolsrc + Sets the source reference on plot.ly for + symbol . Returns ------- - plotly.graph_objs.barpolar.Marker + plotly.graph_objs.area.Marker """ return self["marker"] @@ -87642,48 +90155,6 @@ def name(self): def name(self, val): self["name"] = val - # offset - # ------ - @property - def offset(self): - """ - Shifts the angular position where the bar is drawn (in - "thetatunit" units). - - The 'offset' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["offset"] - - @offset.setter - def offset(self, val): - self["offset"] = val - - # offsetsrc - # --------- - @property - def offsetsrc(self): - """ - Sets the source reference on plot.ly for offset . - - The 'offsetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["offsetsrc"] - - @offsetsrc.setter - def offsetsrc(self, val): - self["offsetsrc"] = val - # opacity # ------- @property @@ -87708,116 +90179,43 @@ def opacity(self, val): # - @property def r(self): - """ - Sets the radial coordinates - - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["r"] - - @r.setter - def r(self, val): - self["r"] = val - - # r0 - # -- - @property - def r0(self): - """ - Alternate to `r`. Builds a linear space of r coordinates. Use - with `dr` where `r0` is the starting coordinate and `dr` the - step. - - The 'r0' property accepts values of any type - - Returns - ------- - Any - """ - return self["r0"] - - @r0.setter - def r0(self, val): - self["r0"] = val - - # rsrc - # ---- - @property - def rsrc(self): - """ - Sets the source reference on plot.ly for r . - - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["rsrc"] - - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val - - # selected - # -------- - @property - def selected(self): - """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.barpolar.Selected - - A dict of string/value properties that will be passed - to the Selected constructor + """ + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the radial coordinates for legacy polar chart + only. - Supported dict properties: - - marker - plotly.graph_objects.barpolar.selected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.barpolar.selected.Textfont - instance or dict with compatible properties + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.barpolar.Selected + numpy.ndarray """ - return self["selected"] + return self["r"] - @selected.setter - def selected(self, val): - self["selected"] = val + @r.setter + def r(self, val): + self["r"] = val - # selectedpoints - # -------------- + # rsrc + # ---- @property - def selectedpoints(self): + def rsrc(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + Sets the source reference on plot.ly for r . - The 'selectedpoints' property accepts values of any type + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["selectedpoints"] + return self["rsrc"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val # showlegend # ---------- @@ -87847,7 +90245,7 @@ def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - - An instance of plotly.graph_objs.barpolar.Stream + - An instance of plotly.graph_objs.area.Stream - A dict of string/value properties that will be passed to the Stream constructor @@ -87865,7 +90263,7 @@ def stream(self): Returns ------- - plotly.graph_objs.barpolar.Stream + plotly.graph_objs.area.Stream """ return self["stream"] @@ -87873,158 +90271,47 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- - @property - def subplot(self): - """ - Sets a reference between this trace's data coordinates and a - polar subplot. If "polar" (the default value), the data refer - to `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - - The 'subplot' property is an identifier of a particular - subplot, of type 'polar', that may be specified as the string 'polar' - optionally followed by an integer >= 1 - (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) - - Returns - ------- - str - """ - return self["subplot"] - - @subplot.setter - def subplot(self, val): - self["subplot"] = val - - # text - # ---- - @property - def text(self): - """ - Sets hover text elements associated with each bar. If a single - string, the same string appears over all bars. If an array of - string, the items are mapped in order to the this trace's - coordinates. - - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["text"] - - @text.setter - def text(self, val): - self["text"] = val - - # textsrc - # ------- - @property - def textsrc(self): - """ - Sets the source reference on plot.ly for text . - - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["textsrc"] - - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val - - # theta - # ----- + # t + # - @property - def theta(self): + def t(self): """ - Sets the angular coordinates + Area traces are deprecated! Please switch to the "barpolar" + trace type. Sets the angular coordinates for legacy polar chart + only. - The 'theta' property is an array that may be specified as a tuple, + The 't' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ - return self["theta"] - - @theta.setter - def theta(self, val): - self["theta"] = val - - # theta0 - # ------ - @property - def theta0(self): - """ - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the starting - coordinate and `dtheta` the step. - - The 'theta0' property accepts values of any type - - Returns - ------- - Any - """ - return self["theta0"] + return self["t"] - @theta0.setter - def theta0(self, val): - self["theta0"] = val + @t.setter + def t(self, val): + self["t"] = val - # thetasrc - # -------- + # tsrc + # ---- @property - def thetasrc(self): + def tsrc(self): """ - Sets the source reference on plot.ly for theta . + Sets the source reference on plot.ly for t . - The 'thetasrc' property must be specified as a string or + The 'tsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ - return self["thetasrc"] - - @thetasrc.setter - def thetasrc(self, val): - self["thetasrc"] = val - - # thetaunit - # --------- - @property - def thetaunit(self): - """ - Sets the unit of input "theta" values. Has an effect only when - on "linear" angular axes. - - The 'thetaunit' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['radians', 'degrees', 'gradians'] - - Returns - ------- - Any - """ - return self["thetaunit"] + return self["tsrc"] - @thetaunit.setter - def thetaunit(self, val): - self["thetaunit"] = val + @tsrc.setter + def tsrc(self, val): + self["tsrc"] = val # uid # --- @@ -88081,36 +90368,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- - @property - def unselected(self): - """ - The 'unselected' property is an instance of Unselected - that may be specified as: - - An instance of plotly.graph_objs.barpolar.Unselected - - A dict of string/value properties that will be passed - to the Unselected constructor - - Supported dict properties: - - marker - plotly.graph_objects.barpolar.unselected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.barpolar.unselected.Textfo - nt instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.barpolar.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - # visible # ------- @property @@ -88134,47 +90391,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- - @property - def width(self): - """ - Sets the bar angular width (in "thetaunit" units). - - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|float|numpy.ndarray - """ - return self["width"] - - @width.setter - def width(self, val): - self["width"] = val - - # widthsrc - # -------- - @property - def widthsrc(self): - """ - Sets the source reference on plot.ly for width . - - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["widthsrc"] - - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val - # type # ---- @property @@ -88192,12 +90408,6 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - base - Sets where the bar base is drawn (in radial axis - units). In "stack" barmode, traces that set "base" will - be excluded and drawn in "overlay" mode instead. - basesrc - Sets the source reference on plot.ly for base . customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -88205,12 +90415,6 @@ def _prop_descriptions(self): the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -88219,33 +90423,8 @@ def _prop_descriptions(self): hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.barpolar.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + plotly.graph_objects.area.Hoverlabel instance or dict + with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an @@ -88257,8 +90436,8 @@ def _prop_descriptions(self): the same legend group hide/show at the same time when toggling legend items. marker - plotly.graph_objects.barpolar.Marker instance or dict - with compatible properties + plotly.graph_objects.area.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -88277,60 +90456,26 @@ def _prop_descriptions(self): name Sets the trace name. The trace name appear as the legend item and on hover. - offset - Shifts the angular position where the bar is drawn (in - "thetatunit" units). - offsetsrc - Sets the source reference on plot.ly for offset . opacity Sets the opacity of the trace. r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the radial coordinates for + legacy polar chart only. rsrc Sets the source reference on plot.ly for r . - selected - plotly.graph_objects.barpolar.Selected instance or dict - with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream - plotly.graph_objects.barpolar.Stream instance or dict - with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. - textsrc - Sets the source reference on plot.ly for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on plot.ly for theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. + plotly.graph_objects.area.Stream instance or dict with + compatible properties + t + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the angular coordinates for + legacy polar chart only. + tsrc + Sets the source reference on plot.ly for t . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -88353,36 +90498,21 @@ def _prop_descriptions(self): the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.barpolar.Unselected instance or - dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the bar angular width (in "thetaunit" units). - widthsrc - Sets the source reference on plot.ly for width . """ def __init__( self, arg=None, - base=None, - basesrc=None, customdata=None, customdatasrc=None, - dr=None, - dtheta=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, ids=None, idssrc=None, legendgroup=None, @@ -88390,48 +90520,26 @@ def __init__( meta=None, metasrc=None, name=None, - offset=None, - offsetsrc=None, opacity=None, r=None, - r0=None, rsrc=None, - selected=None, - selectedpoints=None, showlegend=None, stream=None, - subplot=None, - text=None, - textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, + t=None, + tsrc=None, uid=None, uirevision=None, - unselected=None, visible=None, - width=None, - widthsrc=None, **kwargs ): """ - Construct a new Barpolar object + Construct a new Area object - The data visualized by the radial span of the bars is set in - `r` - Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Barpolar - base - Sets where the bar base is drawn (in radial axis - units). In "stack" barmode, traces that set "base" will - be excluded and drawn in "overlay" mode instead. - basesrc - Sets the source reference on plot.ly for base . + an instance of plotly.graph_objs.Area customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -88439,12 +90547,6 @@ def __init__( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period divided by - the length of the `r` coordinates. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -88453,33 +90555,8 @@ def __init__( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.barpolar.Hoverlabel instance or - dict with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on plot.ly for hovertext . + plotly.graph_objects.area.Hoverlabel instance or dict + with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an @@ -88491,8 +90568,8 @@ def __init__( the same legend group hide/show at the same time when toggling legend items. marker - plotly.graph_objects.barpolar.Marker instance or dict - with compatible properties + plotly.graph_objects.area.Marker instance or dict with + compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -88511,60 +90588,26 @@ def __init__( name Sets the trace name. The trace name appear as the legend item and on hover. - offset - Shifts the angular position where the bar is drawn (in - "thetatunit" units). - offsetsrc - Sets the source reference on plot.ly for offset . opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the starting - coordinate and `dr` the step. - rsrc - Sets the source reference on plot.ly for r . - selected - plotly.graph_objects.barpolar.Selected instance or dict - with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - plotly.graph_objects.barpolar.Stream instance or dict - with compatible properties - subplot - Sets a reference between this trace's data coordinates - and a polar subplot. If "polar" (the default value), - the data refer to `layout.polar`. If "polar2", the data - refer to `layout.polar2`, and so on. - text - Sets hover text elements associated with each bar. If a - single string, the same string appears over all bars. - If an array of string, the items are mapped in order to - the this trace's coordinates. - textsrc - Sets the source reference on plot.ly for text . - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of theta - coordinates. Use with `dtheta` where `theta0` is the - starting coordinate and `dtheta` the step. - thetasrc - Sets the source reference on plot.ly for theta . - thetaunit - Sets the unit of input "theta" values. Has an effect - only when on "linear" angular axes. + Sets the opacity of the trace. + r + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the radial coordinates for + legacy polar chart only. + rsrc + Sets the source reference on plot.ly for r . + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + plotly.graph_objects.area.Stream instance or dict with + compatible properties + t + Area traces are deprecated! Please switch to the + "barpolar" trace type. Sets the angular coordinates for + legacy polar chart only. + tsrc + Sets the source reference on plot.ly for t . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -88587,24 +90630,17 @@ def __init__( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.barpolar.Unselected instance or - dict with compatible properties visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the bar angular width (in "thetaunit" units). - widthsrc - Sets the source reference on plot.ly for width . Returns ------- - Barpolar + Area """ - super(Barpolar, self).__init__("barpolar") + super(Area, self).__init__("area") # Validate arg # ------------ @@ -88617,9 +90653,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Barpolar +The first argument to the plotly.graph_objs.Area constructor must be a dict or -an instance of plotly.graph_objs.Barpolar""" +an instance of plotly.graph_objs.Area""" ) # Handle skip_invalid @@ -88628,84 +90664,45 @@ def __init__( # Import validators # ----------------- - from plotly.validators import barpolar as v_barpolar + from plotly.validators import area as v_area # Initialize validators # --------------------- - self._validators["base"] = v_barpolar.BaseValidator() - self._validators["basesrc"] = v_barpolar.BasesrcValidator() - self._validators["customdata"] = v_barpolar.CustomdataValidator() - self._validators["customdatasrc"] = v_barpolar.CustomdatasrcValidator() - self._validators["dr"] = v_barpolar.DrValidator() - self._validators["dtheta"] = v_barpolar.DthetaValidator() - self._validators["hoverinfo"] = v_barpolar.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_barpolar.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_barpolar.HoverlabelValidator() - self._validators["hovertemplate"] = v_barpolar.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_barpolar.HovertemplatesrcValidator() - self._validators["hovertext"] = v_barpolar.HovertextValidator() - self._validators["hovertextsrc"] = v_barpolar.HovertextsrcValidator() - self._validators["ids"] = v_barpolar.IdsValidator() - self._validators["idssrc"] = v_barpolar.IdssrcValidator() - self._validators["legendgroup"] = v_barpolar.LegendgroupValidator() - self._validators["marker"] = v_barpolar.MarkerValidator() - self._validators["meta"] = v_barpolar.MetaValidator() - self._validators["metasrc"] = v_barpolar.MetasrcValidator() - self._validators["name"] = v_barpolar.NameValidator() - self._validators["offset"] = v_barpolar.OffsetValidator() - self._validators["offsetsrc"] = v_barpolar.OffsetsrcValidator() - self._validators["opacity"] = v_barpolar.OpacityValidator() - self._validators["r"] = v_barpolar.RValidator() - self._validators["r0"] = v_barpolar.R0Validator() - self._validators["rsrc"] = v_barpolar.RsrcValidator() - self._validators["selected"] = v_barpolar.SelectedValidator() - self._validators["selectedpoints"] = v_barpolar.SelectedpointsValidator() - self._validators["showlegend"] = v_barpolar.ShowlegendValidator() - self._validators["stream"] = v_barpolar.StreamValidator() - self._validators["subplot"] = v_barpolar.SubplotValidator() - self._validators["text"] = v_barpolar.TextValidator() - self._validators["textsrc"] = v_barpolar.TextsrcValidator() - self._validators["theta"] = v_barpolar.ThetaValidator() - self._validators["theta0"] = v_barpolar.Theta0Validator() - self._validators["thetasrc"] = v_barpolar.ThetasrcValidator() - self._validators["thetaunit"] = v_barpolar.ThetaunitValidator() - self._validators["uid"] = v_barpolar.UidValidator() - self._validators["uirevision"] = v_barpolar.UirevisionValidator() - self._validators["unselected"] = v_barpolar.UnselectedValidator() - self._validators["visible"] = v_barpolar.VisibleValidator() - self._validators["width"] = v_barpolar.WidthValidator() - self._validators["widthsrc"] = v_barpolar.WidthsrcValidator() + self._validators["customdata"] = v_area.CustomdataValidator() + self._validators["customdatasrc"] = v_area.CustomdatasrcValidator() + self._validators["hoverinfo"] = v_area.HoverinfoValidator() + self._validators["hoverinfosrc"] = v_area.HoverinfosrcValidator() + self._validators["hoverlabel"] = v_area.HoverlabelValidator() + self._validators["ids"] = v_area.IdsValidator() + self._validators["idssrc"] = v_area.IdssrcValidator() + self._validators["legendgroup"] = v_area.LegendgroupValidator() + self._validators["marker"] = v_area.MarkerValidator() + self._validators["meta"] = v_area.MetaValidator() + self._validators["metasrc"] = v_area.MetasrcValidator() + self._validators["name"] = v_area.NameValidator() + self._validators["opacity"] = v_area.OpacityValidator() + self._validators["r"] = v_area.RValidator() + self._validators["rsrc"] = v_area.RsrcValidator() + self._validators["showlegend"] = v_area.ShowlegendValidator() + self._validators["stream"] = v_area.StreamValidator() + self._validators["t"] = v_area.TValidator() + self._validators["tsrc"] = v_area.TsrcValidator() + self._validators["uid"] = v_area.UidValidator() + self._validators["uirevision"] = v_area.UirevisionValidator() + self._validators["visible"] = v_area.VisibleValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("base", None) - self["base"] = base if base is not None else _v - _v = arg.pop("basesrc", None) - self["basesrc"] = basesrc if basesrc is not None else _v _v = arg.pop("customdata", None) self["customdata"] = customdata if customdata is not None else _v _v = arg.pop("customdatasrc", None) self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dr", None) - self["dr"] = dr if dr is not None else _v - _v = arg.pop("dtheta", None) - self["dtheta"] = dtheta if dtheta is not None else _v _v = arg.pop("hoverinfo", None) self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v _v = arg.pop("hoverinfosrc", None) self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v _v = arg.pop("ids", None) self["ids"] = ids if ids is not None else _v _v = arg.pop("idssrc", None) @@ -88720,60 +90717,34 @@ def __init__( self["metasrc"] = metasrc if metasrc is not None else _v _v = arg.pop("name", None) self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetsrc", None) - self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v _v = arg.pop("opacity", None) self["opacity"] = opacity if opacity is not None else _v _v = arg.pop("r", None) self["r"] = r if r is not None else _v - _v = arg.pop("r0", None) - self["r0"] = r0 if r0 is not None else _v _v = arg.pop("rsrc", None) self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v _v = arg.pop("stream", None) self["stream"] = stream if stream is not None else _v - _v = arg.pop("subplot", None) - self["subplot"] = subplot if subplot is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("theta", None) - self["theta"] = theta if theta is not None else _v - _v = arg.pop("theta0", None) - self["theta0"] = theta0 if theta0 is not None else _v - _v = arg.pop("thetasrc", None) - self["thetasrc"] = thetasrc if thetasrc is not None else _v - _v = arg.pop("thetaunit", None) - self["thetaunit"] = thetaunit if thetaunit is not None else _v + _v = arg.pop("t", None) + self["t"] = t if t is not None else _v + _v = arg.pop("tsrc", None) + self["tsrc"] = tsrc if tsrc is not None else _v _v = arg.pop("uid", None) self["uid"] = uid if uid is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v _v = arg.pop("visible", None) self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v # Read-only literals # ------------------ from _plotly_utils.basevalidators import LiteralValidator - self._props["type"] = "barpolar" + self._props["type"] = "area" self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="barpolar", val="barpolar" + plotly_name="type", parent_name="area", val="area" ) arg.pop("type", None) @@ -88786,3248 +90757,4348 @@ def __init__( self._skip_invalid = False -from plotly.basedatatypes import BaseTraceType as _BaseTraceType +from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType import copy as _copy -class Bar(_BaseTraceType): +class Layout(_BaseLayoutType): + + _subplotid_prop_names = [ + "coloraxis", + "geo", + "mapbox", + "polar", + "scene", + "ternary", + "xaxis", + "yaxis", + ] + + import re + + _subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + ")(\d+)$") - # alignmentgroup - # -------------- @property - def alignmentgroup(self): + def _subplotid_validators(self): """ - Set several traces linked to the same position axis or matching - axes to the same alignmentgroup. This controls whether bars - compute their positional range dependently or independently. + dict of validator classes for each subplot type + + Returns + ------- + dict + """ + from plotly.validators.layout import ( + ColoraxisValidator, + GeoValidator, + MapboxValidator, + PolarValidator, + SceneValidator, + TernaryValidator, + XAxisValidator, + YAxisValidator, + ) + + return { + "coloraxis": ColoraxisValidator, + "geo": GeoValidator, + "mapbox": MapboxValidator, + "polar": PolarValidator, + "scene": SceneValidator, + "ternary": TernaryValidator, + "xaxis": XAxisValidator, + "yaxis": YAxisValidator, + } + + def _subplot_re_match(self, prop): + return self._subplotid_prop_re.match(prop) + + # angularaxis + # ----------- + @property + def angularaxis(self): + """ + The 'angularaxis' property is an instance of AngularAxis + that may be specified as: + - An instance of plotly.graph_objs.layout.AngularAxis + - A dict of string/value properties that will be passed + to the AngularAxis constructor - The 'alignmentgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + domain + Polar chart subplots are not supported yet. + This key has currently no effect. + endpadding + Legacy polar charts are deprecated! Please + switch to "polar" subplots. + range + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Defines the start + and end point of this angular axis. + showline + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the line bounding this angular axis will + be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the angular axis ticks will feature tick + labels. + tickcolor + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the color of + the tick lines on this angular axis. + ticklen + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this angular axis. + tickorientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (from the paper perspective) of the + angular axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this angular axis. + visible + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not this axis will be visible. + + Returns + ------- + plotly.graph_objs.layout.AngularAxis + """ + return self["angularaxis"] + + @angularaxis.setter + def angularaxis(self, val): + self["angularaxis"] = val + + # annotations + # ----------- + @property + def annotations(self): + """ + The 'annotations' property is a tuple of instances of + Annotation that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Annotation + - A list or tuple of dicts of string/value properties that + will be passed to the Annotation constructor + + Supported dict properties: + + align + Sets the horizontal alignment of the `text` + within the box. Has an effect only if `text` + spans more two or more lines (i.e. `text` + contains one or more
HTML tags) or if an + explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + arrowwidth + Sets the width (in px) of annotation arrow + line. + ax + Sets the x component of the arrow tail about + the arrow head. If `axref` is `pixel`, a + positive (negative) component corresponds to + an arrow pointing from right to left (left to + right). If `axref` is an axis, this is an + absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the + annotation (ax,ay) is specified. If `pixel`, + `ax` is a relative offset in pixels from `x`. + If set to an x axis id (e.g. "x" or "x2"), `ax` + is specified in the same terms as that axis. + This is useful for trendline annotations which + should continue to indicate the correct trend + when zoomed. + ay + Sets the y component of the arrow tail about + the arrow head. If `ayref` is `pixel`, a + positive (negative) component corresponds to + an arrow pointing from bottom to top (top to + bottom). If `ayref` is an axis, this is an + absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the + annotation (ax,ay) is specified. If `pixel`, + `ay` is a relative offset in pixels from `y`. + If set to a y axis id (e.g. "y" or "y2"), `ay` + is specified in the same terms as that axis. + This is useful for trendline annotations which + should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the + annotation `text`. + borderpad + Sets the padding (in px) between the `text` and + the enclosing border. + borderwidth + Sets the width (in px) of the border enclosing + the annotation `text`. + captureevents + Determines whether the annotation text box + captures mouse move and click events, or allows + those events to pass through to data points in + the plot that may be behind the annotation. By + default `captureevents` is False unless + `hovertext` is provided. If you use the event + `plotly_clickannotation` without `hovertext` + you must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the + plot. If you click a data point that exactly + matches the `x` and `y` values of this + annotation, and it is hidden (visible: false), + it will appear. In "onoff" mode, you must click + the same point again to make it disappear, so + if you click multiple points, you can show + multiple annotations. In "onout" mode, a click + anywhere else in the plot (on another data + point or not) will hide this annotation. If you + need to show/hide this annotation in response + to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for + example to label the side of a bar. To label + markers though, `standoff` is preferred over + `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. + Taller text will be clipped. + hoverlabel + plotly.graph_objects.layout.annotation.Hoverlab + el instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this + annotation. If omitted or blank, no hover label + will appear. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the annotation (text + + arrow). + showarrow + Determines whether or not the annotation is + drawn with an arrow. If True, `text` is placed + near the arrow's tail. If False, `text` lines + up with the `x` and `y` provided. + standoff + Sets a distance, in pixels, to move the end + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow + head, relative to `arrowwidth`. A value of 1 + (default) gives a head about 3x as wide as the + line. + startstandoff + Sets a distance, in pixels, to move the start + arrowhead away from the position it is pointing + at, for example to point at the edge of a + marker independent of zoom. Note that this + shortens the arrow from the `ax` / `ay` vector, + in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. + Plotly uses a subset of HTML tags to do things + like newline (
), bold (), italics + (), hyperlinks (). + Tags , , are also + supported. + textangle + Sets the angle at which the `text` is drawn + with respect to the horizontal. + valign + Sets the vertical alignment of the `text` + within the box. Has an effect only if an + explicit height is set to override the text + height. + visible + Determines whether or not this annotation is + visible. + width + Sets an explicit width for the text box. null + (default) lets the text set the box width. + Wider text will be clipped. There is no + automatic wrapping; use
to start a new + line. + x + Sets the annotation's x position. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + xanchor + Sets the text box's horizontal position anchor + This anchor binds the `x` position to the + "left", "center" or "right" of the annotation. + For example, if `x` is set to 1, `xref` to + "paper" and `xanchor` to "right" then the + right-most portion of the annotation lines up + with the right-most edge of the plotting area. + If "auto", the anchor is equivalent to "center" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + xclick + Toggle this annotation when clicking a data + point whose `x` value is `xclick` rather than + the annotation's `x` value. + xref + Sets the annotation's x coordinate axis. If set + to an x axis id (e.g. "x" or "x2"), the `x` + position refers to an x coordinate If set to + "paper", the `x` position refers to the + distance from the left side of the plotting + area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and + arrow to the right (positive) or left + (negative) by this many pixels. + y + Sets the annotation's y position. If the axis + `type` is "log", then you must take the log of + your desired range. If the axis `type` is + "date", it should be date strings, like date + data, though Date objects and unix milliseconds + will be accepted and converted to strings. If + the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order + it appears. + yanchor + Sets the text box's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the annotation. + For example, if `y` is set to 1, `yref` to + "paper" and `yanchor` to "top" then the top- + most portion of the annotation lines up with + the top-most edge of the plotting area. If + "auto", the anchor is equivalent to "middle" + for data-referenced annotations or if there is + an arrow, whereas for paper-referenced with no + arrow, the anchor picked corresponds to the + closest side. + yclick + Toggle this annotation when clicking a data + point whose `y` value is `yclick` rather than + the annotation's `y` value. + yref + Sets the annotation's y coordinate axis. If set + to an y axis id (e.g. "y" or "y2"), the `y` + position refers to an y coordinate If set to + "paper", the `y` position refers to the + distance from the bottom of the plotting area + in normalized coordinates where 0 (1) + corresponds to the bottom (top). + yshift + Shifts the position of the whole annotation and + arrow up (positive) or down (negative) by this + many pixels. Returns ------- - str + tuple[plotly.graph_objs.layout.Annotation] """ - return self["alignmentgroup"] + return self["annotations"] - @alignmentgroup.setter - def alignmentgroup(self, val): - self["alignmentgroup"] = val + @annotations.setter + def annotations(self, val): + self["annotations"] = val - # base - # ---- + # annotationdefaults + # ------------------ @property - def base(self): + def annotationdefaults(self): """ - Sets where the bar base is drawn (in position axis units). In - "stack" or "relative" barmode, traces that set "base" will be - excluded and drawn in "overlay" mode instead. + When used in a template (as + layout.template.layout.annotationdefaults), sets the default + property values to use for elements of layout.annotations - The 'base' property accepts values of any type - - Returns - ------- - Any|numpy.ndarray - """ - return self["base"] - - @base.setter - def base(self, val): - self["base"] = val - - # basesrc - # ------- - @property - def basesrc(self): - """ - Sets the source reference on plot.ly for base . + The 'annotationdefaults' property is an instance of Annotation + that may be specified as: + - An instance of plotly.graph_objs.layout.Annotation + - A dict of string/value properties that will be passed + to the Annotation constructor - The 'basesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: Returns ------- - str + plotly.graph_objs.layout.Annotation """ - return self["basesrc"] + return self["annotationdefaults"] - @basesrc.setter - def basesrc(self, val): - self["basesrc"] = val + @annotationdefaults.setter + def annotationdefaults(self, val): + self["annotationdefaults"] = val - # cliponaxis - # ---------- + # autosize + # -------- @property - def cliponaxis(self): + def autosize(self): """ - Determines whether the text nodes are clipped about the subplot - axes. To show the text nodes above axis lines and tick labels, - make sure to set `xaxis.layer` and `yaxis.layer` to *below - traces*. + Determines whether or not a layout width or height that has + been left undefined by the user is initialized on each + relayout. Note that, regardless of this attribute, an undefined + layout width or height is always initialized on the first call + to plot. - The 'cliponaxis' property must be specified as a bool + The 'autosize' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["cliponaxis"] - - @cliponaxis.setter - def cliponaxis(self, val): - self["cliponaxis"] = val - - # constraintext - # ------------- - @property - def constraintext(self): - """ - Constrain the size of text inside or outside a bar to be no - larger than the bar itself. - - The 'constraintext' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'both', 'none'] - - Returns - ------- - Any - """ - return self["constraintext"] - - @constraintext.setter - def constraintext(self, val): - self["constraintext"] = val - - # customdata - # ---------- - @property - def customdata(self): - """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements - - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["customdata"] - - @customdata.setter - def customdata(self, val): - self["customdata"] = val - - # customdatasrc - # ------------- - @property - def customdatasrc(self): - """ - Sets the source reference on plot.ly for customdata . - - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["customdatasrc"] + return self["autosize"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @autosize.setter + def autosize(self, val): + self["autosize"] = val - # dx - # -- + # bargap + # ------ @property - def dx(self): + def bargap(self): """ - Sets the x coordinate step. See `x0` for more info. + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. - The 'dx' property is a number and may be specified as: - - An int or float + The 'bargap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- int|float """ - return self["dx"] + return self["bargap"] - @dx.setter - def dx(self, val): - self["dx"] = val + @bargap.setter + def bargap(self, val): + self["bargap"] = val - # dy - # -- + # bargroupgap + # ----------- @property - def dy(self): + def bargroupgap(self): """ - Sets the y coordinate step. See `y0` for more info. + Sets the gap (in plot fraction) between bars of the same + location coordinate. - The 'dy' property is a number and may be specified as: - - An int or float + The 'bargroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- int|float """ - return self["dy"] + return self["bargroupgap"] - @dy.setter - def dy(self, val): - self["dy"] = val + @bargroupgap.setter + def bargroupgap(self, val): + self["bargroupgap"] = val - # error_x + # barmode # ------- @property - def error_x(self): + def barmode(self): """ - The 'error_x' property is an instance of ErrorX - that may be specified as: - - An instance of plotly.graph_objs.bar.ErrorX - - A dict of string/value properties that will be passed - to the ErrorX constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "relative", the bars are stacked on top + of one another, with negative values below the axis, positive + values above With "group", the bars are plotted next to one + another centered around the shared location. With "overlay", + the bars are plotted over one another, you might need to an + "opacity" to see multiple bars. - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. + The 'barmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['stack', 'group', 'overlay', 'relative'] Returns ------- - plotly.graph_objs.bar.ErrorX + Any """ - return self["error_x"] + return self["barmode"] - @error_x.setter - def error_x(self, val): - self["error_x"] = val + @barmode.setter + def barmode(self, val): + self["barmode"] = val - # error_y + # barnorm # ------- @property - def error_y(self): + def barnorm(self): """ - The 'error_y' property is an instance of ErrorY - that may be specified as: - - An instance of plotly.graph_objs.bar.ErrorY - - A dict of string/value properties that will be passed - to the ErrorY constructor - - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on plot.ly for - arrayminus . - arraysrc - Sets the source reference on plot.ly for array - . - color - Sets the stoke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus + Sets the normalization for bar traces on the graph. With + "fraction", the value of each bar is divided by the sum of all + values at that location coordinate. "percent" is the same but + multiplied by 100 to show percentages. - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the sqaure of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. + The 'barnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'fraction', 'percent'] Returns ------- - plotly.graph_objs.bar.ErrorY + Any """ - return self["error_y"] + return self["barnorm"] - @error_y.setter - def error_y(self, val): - self["error_y"] = val + @barnorm.setter + def barnorm(self, val): + self["barnorm"] = val - # hoverinfo - # --------- + # boxgap + # ------ @property - def hoverinfo(self): + def boxgap(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Sets the gap (in plot fraction) between boxes of adjacent + location coordinates. Has no effect on traces that have "width" + set. - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above + The 'boxgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - Any|numpy.ndarray + int|float """ - return self["hoverinfo"] + return self["boxgap"] - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val + @boxgap.setter + def boxgap(self, val): + self["boxgap"] = val - # hoverinfosrc - # ------------ + # boxgroupgap + # ----------- @property - def hoverinfosrc(self): + def boxgroupgap(self): """ - Sets the source reference on plot.ly for hoverinfo . + Sets the gap (in plot fraction) between boxes of the same + location coordinate. Has no effect on traces that have "width" + set. - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'boxgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - str + int|float """ - return self["hoverinfosrc"] + return self["boxgroupgap"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @boxgroupgap.setter + def boxgroupgap(self, val): + self["boxgroupgap"] = val - # hoverlabel - # ---------- + # boxmode + # ------- @property - def hoverlabel(self): + def boxmode(self): """ - The 'hoverlabel' property is an instance of Hoverlabel - that may be specified as: - - An instance of plotly.graph_objs.bar.Hoverlabel - - A dict of string/value properties that will be passed - to the Hoverlabel constructor - - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + Determines how boxes at the same location coordinate are + displayed on the graph. If "group", the boxes are plotted next + to one another centered around the shared location. If + "overlay", the boxes are plotted over one another, you might + need to set "opacity" to see them multiple boxes. Has no effect + on traces that have "width" set. + + The 'boxmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] Returns ------- - plotly.graph_objs.bar.Hoverlabel + Any """ - return self["hoverlabel"] + return self["boxmode"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @boxmode.setter + def boxmode(self, val): + self["boxmode"] = val - # hovertemplate - # ------------- + # calendar + # -------- @property - def hovertemplate(self): + def calendar(self): """ - Template string used for rendering the information that appear - on hover box. Note that this will override `hoverinfo`. - Variables are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: %{y:$.2f}". - https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in - `hovertemplate` are the ones emitted as event data described at - this link https://plot.ly/javascript/plotlyjs-events/#event- - data. Additionally, every attributes that can be specified per- - point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is displayed in the - secondary box, for example "{fullData.name}". To - hide the secondary box completely, use an empty tag - ``. + Sets the default calendar system to use for interpreting and + displaying dates throughout the plot. - The 'hovertemplate' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['gregorian', 'chinese', 'coptic', 'discworld', + 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', + 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', + 'thai', 'ummalqura'] Returns ------- - str|numpy.ndarray + Any """ - return self["hovertemplate"] + return self["calendar"] - @hovertemplate.setter - def hovertemplate(self, val): - self["hovertemplate"] = val + @calendar.setter + def calendar(self, val): + self["calendar"] = val - # hovertemplatesrc - # ---------------- + # clickmode + # --------- @property - def hovertemplatesrc(self): + def clickmode(self): """ - Sets the source reference on plot.ly for hovertemplate . + Determines the mode of single click interactions. "event" is + the default value and emits the `plotly_click` event. In + addition this mode emits the `plotly_selected` event in drag + modes "lasso" and "select", but with no event data attached + (kept for compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also supports + persistent selections, meaning that pressing Shift while + clicking, adds to / subtracts from an existing selection. + "select" with `hovermode`: "x" can be confusing, consider + explicitly setting `hovermode`: "closest" when using this + feature. Selection events are sent accordingly as long as + "event" flag is set as well. When the "event" flag is missing, + `plotly_click` and `plotly_selected` events are not fired. - The 'hovertemplatesrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'clickmode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['event', 'select'] joined with '+' characters + (e.g. 'event+select') + OR exactly one of ['none'] (e.g. 'none') Returns ------- - str + Any """ - return self["hovertemplatesrc"] + return self["clickmode"] - @hovertemplatesrc.setter - def hovertemplatesrc(self, val): - self["hovertemplatesrc"] = val + @clickmode.setter + def clickmode(self, val): + self["clickmode"] = val - # hovertext + # coloraxis # --------- @property - def hovertext(self): + def coloraxis(self): """ - Sets hover text elements associated with each (x,y) pair. If a - single string, the same string appears over all the data - points. If an array of string, the items are mapped in order to - the this trace's (x,y) coordinates. To be seen, trace - `hoverinfo` must contain a "text" flag. + The 'coloraxis' property is an instance of Coloraxis + that may be specified as: + - An instance of plotly.graph_objs.layout.Coloraxis + - A dict of string/value properties that will be passed + to the Coloraxis constructor - The 'hovertext' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + Supported dict properties: + + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `colorscale`. In case + `colorscale` is unspecified or `autocolorscale` + is true, the default palette will be chosen + according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + corresponding trace color array(s)) or the + bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the + user. + cmax + Sets the upper bound of the color domain. Value + should have the same units as corresponding + trace color array(s) and if set, `cmin` must be + set as well. + cmid + Sets the mid-point of the color domain by + scaling `cmin` and/or `cmax` to be equidistant + to this point. Value should have the same units + as corresponding trace color array(s). Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value + should have the same units as corresponding + trace color array(s) and if set, `cmax` must be + set as well. + colorbar + plotly.graph_objects.layout.coloraxis.ColorBar + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an + array containing arrays mapping a normalized + value to an rgb, rgba, hex, hsl, hsv, or named + color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. + For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`cmin` and + `cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Grey + s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues, + Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth + ,Electric,Viridis,Cividis. + reversescale + Reverses the color mapping if true. If true, + `cmin` will correspond to the last color in the + array and `cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Returns ------- - str|numpy.ndarray + plotly.graph_objs.layout.Coloraxis """ - return self["hovertext"] + return self["coloraxis"] - @hovertext.setter - def hovertext(self, val): - self["hovertext"] = val + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val - # hovertextsrc - # ------------ + # colorscale + # ---------- @property - def hovertextsrc(self): + def colorscale(self): """ - Sets the source reference on plot.ly for hovertext . + The 'colorscale' property is an instance of Colorscale + that may be specified as: + - An instance of plotly.graph_objs.layout.Colorscale + - A dict of string/value properties that will be passed + to the Colorscale constructor - The 'hovertextsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + diverging + Sets the default diverging colorscale. Note + that `autocolorscale` must be true for this + attribute to work. + sequential + Sets the default sequential colorscale for + positive values. Note that `autocolorscale` + must be true for this attribute to work. + sequentialminus + Sets the default sequential colorscale for + negative values. Note that `autocolorscale` + must be true for this attribute to work. Returns ------- - str + plotly.graph_objs.layout.Colorscale """ - return self["hovertextsrc"] + return self["colorscale"] - @hovertextsrc.setter - def hovertextsrc(self, val): - self["hovertextsrc"] = val + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val - # ids - # --- + # colorway + # -------- @property - def ids(self): + def colorway(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + Sets the default trace colors. - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'colorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings Returns ------- - numpy.ndarray + list """ - return self["ids"] + return self["colorway"] - @ids.setter - def ids(self, val): - self["ids"] = val + @colorway.setter + def colorway(self, val): + self["colorway"] = val - # idssrc - # ------ + # datarevision + # ------------ @property - def idssrc(self): + def datarevision(self): """ - Sets the source reference on plot.ly for ids . + If provided, a changed value tells `Plotly.react` that one or + more data arrays has changed. This way you can modify arrays + in-place rather than making a complete new copy for an + incremental change. If NOT provided, `Plotly.react` assumes + that data arrays are being treated as immutable, thus any data + array with a different identity from its predecessor contains + new data. - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'datarevision' property accepts values of any type Returns ------- - str + Any """ - return self["idssrc"] + return self["datarevision"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @datarevision.setter + def datarevision(self, val): + self["datarevision"] = val - # insidetextanchor - # ---------------- + # direction + # --------- @property - def insidetextanchor(self): + def direction(self): """ - Determines if texts are kept at center or start/end points in - `textposition` "inside" mode. + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Sets the direction corresponding to positive angles + in legacy polar charts. - The 'insidetextanchor' property is an enumeration that may be specified as: + The 'direction' property is an enumeration that may be specified as: - One of the following enumeration values: - ['end', 'middle', 'start'] + ['clockwise', 'counterclockwise'] Returns ------- Any """ - return self["insidetextanchor"] + return self["direction"] - @insidetextanchor.setter - def insidetextanchor(self, val): - self["insidetextanchor"] = val + @direction.setter + def direction(self, val): + self["direction"] = val - # insidetextfont - # -------------- + # dragmode + # -------- @property - def insidetextfont(self): + def dragmode(self): """ - Sets the font used for `text` lying inside the bar. - - The 'insidetextfont' property is an instance of Insidetextfont - that may be specified as: - - An instance of plotly.graph_objs.bar.Insidetextfont - - A dict of string/value properties that will be passed - to the Insidetextfont constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size + Determines the mode of drag interactions. "select" and "lasso" + apply only to scatter traces with markers or text. "orbit" and + "turntable" apply only to 3D scenes. - sizesrc - Sets the source reference on plot.ly for size - . + The 'dragmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable', + False] Returns ------- - plotly.graph_objs.bar.Insidetextfont + Any """ - return self["insidetextfont"] + return self["dragmode"] - @insidetextfont.setter - def insidetextfont(self, val): - self["insidetextfont"] = val + @dragmode.setter + def dragmode(self, val): + self["dragmode"] = val - # legendgroup - # ----------- + # editrevision + # ------------ @property - def legendgroup(self): + def editrevision(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + Controls persistence of user-driven changes in `editable: true` + configuration, other than trace names and axis titles. Defaults + to `layout.uirevision`. - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'editrevision' property accepts values of any type Returns ------- - str + Any """ - return self["legendgroup"] + return self["editrevision"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @editrevision.setter + def editrevision(self, val): + self["editrevision"] = val - # marker - # ------ + # extendfunnelareacolors + # ---------------------- @property - def marker(self): + def extendfunnelareacolors(self): """ - The 'marker' property is an instance of Marker - that may be specified as: - - An instance of plotly.graph_objs.bar.Marker - - A dict of string/value properties that will be passed - to the Marker constructor + If `true`, the funnelarea slice colors (whether given by + `funnelareacolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color`is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color`is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color`is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color`is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets themarkercolor. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - plotly.graph_objects.bar.marker.ColorBar - instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color`is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use`marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl - ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E - arth,Electric,Viridis,Cividis. - colorsrc - Sets the source reference on plot.ly for color - . - line - plotly.graph_objects.bar.marker.Line instance - or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on plot.ly for - opacity . - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color`is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color`is set to a numerical array. + The 'extendfunnelareacolors' property must be specified as a bool + (either True, or False) Returns ------- - plotly.graph_objs.bar.Marker + bool """ - return self["marker"] + return self["extendfunnelareacolors"] - @marker.setter - def marker(self, val): - self["marker"] = val + @extendfunnelareacolors.setter + def extendfunnelareacolors(self, val): + self["extendfunnelareacolors"] = val - # meta - # ---- + # extendpiecolors + # --------------- @property - def meta(self): + def extendpiecolors(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + If `true`, the pie slice colors (whether given by `piecolorway` + or inherited from `colorway`) will be extended to three times + its original length by first repeating every color 20% lighter + then each color 20% darker. This is intended to reduce the + likelihood of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. - The 'meta' property accepts values of any type + The 'extendpiecolors' property must be specified as a bool + (either True, or False) Returns ------- - Any|numpy.ndarray + bool """ - return self["meta"] + return self["extendpiecolors"] - @meta.setter - def meta(self, val): - self["meta"] = val + @extendpiecolors.setter + def extendpiecolors(self, val): + self["extendpiecolors"] = val - # metasrc - # ------- + # extendsunburstcolors + # -------------------- @property - def metasrc(self): + def extendsunburstcolors(self): """ - Sets the source reference on plot.ly for meta . + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'extendsunburstcolors' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["metasrc"] + return self["extendsunburstcolors"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @extendsunburstcolors.setter + def extendsunburstcolors(self, val): + self["extendsunburstcolors"] = val - # name - # ---- + # extendtreemapcolors + # ------------------- @property - def name(self): + def extendtreemapcolors(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'extendtreemapcolors' property must be specified as a bool + (either True, or False) Returns ------- - str + bool """ - return self["name"] + return self["extendtreemapcolors"] - @name.setter - def name(self, val): - self["name"] = val + @extendtreemapcolors.setter + def extendtreemapcolors(self, val): + self["extendtreemapcolors"] = val - # offset - # ------ + # font + # ---- @property - def offset(self): + def font(self): """ - Shifts the position where the bar is drawn (in position axis - units). In "group" barmode, traces that set "offset" will be - excluded and drawn in "overlay" mode instead. + Sets the global font. Note that fonts used in traces and other + layout components inherit from the global font. - The 'offset' property is a number and may be specified as: - - An int or float - - A tuple, list, or one-dimensional numpy array of the above + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.layout.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size Returns ------- - int|float|numpy.ndarray + plotly.graph_objs.layout.Font """ - return self["offset"] + return self["font"] - @offset.setter - def offset(self, val): - self["offset"] = val + @font.setter + def font(self, val): + self["font"] = val - # offsetgroup - # ----------- + # funnelareacolorway + # ------------------ @property - def offsetgroup(self): + def funnelareacolorway(self): """ - Set several traces linked to the same position axis or matching - axes to the same offsetgroup where bars of the same position - coordinate will line up. + Sets the default funnelarea slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendfunnelareacolors`. - The 'offsetgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'funnelareacolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings Returns ------- - str + list """ - return self["offsetgroup"] + return self["funnelareacolorway"] - @offsetgroup.setter - def offsetgroup(self, val): - self["offsetgroup"] = val + @funnelareacolorway.setter + def funnelareacolorway(self, val): + self["funnelareacolorway"] = val - # offsetsrc + # funnelgap # --------- @property - def offsetsrc(self): + def funnelgap(self): """ - Sets the source reference on plot.ly for offset . + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. - The 'offsetsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'funnelgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - str + int|float """ - return self["offsetsrc"] + return self["funnelgap"] - @offsetsrc.setter - def offsetsrc(self, val): - self["offsetsrc"] = val + @funnelgap.setter + def funnelgap(self, val): + self["funnelgap"] = val - # opacity - # ------- + # funnelgroupgap + # -------------- @property - def opacity(self): + def funnelgroupgap(self): """ - Sets the opacity of the trace. + Sets the gap (in plot fraction) between bars of the same + location coordinate. - The 'opacity' property is a number and may be specified as: + The 'funnelgroupgap' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ - return self["opacity"] + return self["funnelgroupgap"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @funnelgroupgap.setter + def funnelgroupgap(self, val): + self["funnelgroupgap"] = val - # orientation - # ----------- + # funnelmode + # ---------- @property - def orientation(self): + def funnelmode(self): """ - Sets the orientation of the bars. With "v" ("h"), the value of - the each bar spans along the vertical (horizontal). + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "group", the bars are plotted next to + one another centered around the shared location. With + "overlay", the bars are plotted over one another, you might + need to an "opacity" to see multiple bars. - The 'orientation' property is an enumeration that may be specified as: + The 'funnelmode' property is an enumeration that may be specified as: - One of the following enumeration values: - ['v', 'h'] + ['stack', 'group', 'overlay'] Returns ------- Any """ - return self["orientation"] + return self["funnelmode"] - @orientation.setter - def orientation(self, val): - self["orientation"] = val + @funnelmode.setter + def funnelmode(self, val): + self["funnelmode"] = val - # outsidetextfont - # --------------- + # geo + # --- @property - def outsidetextfont(self): + def geo(self): """ - Sets the font used for `text` lying outside the bar. - - The 'outsidetextfont' property is an instance of Outsidetextfont + The 'geo' property is an instance of Geo that may be specified as: - - An instance of plotly.graph_objs.bar.Outsidetextfont + - An instance of plotly.graph_objs.layout.Geo - A dict of string/value properties that will be passed - to the Outsidetextfont constructor + to the Geo constructor Supported dict properties: - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . + bgcolor + Set the background color of the map + center + plotly.graph_objects.layout.geo.Center instance + or dict with compatible properties + coastlinecolor + Sets the coastline color. + coastlinewidth + Sets the coastline stroke width (in px). + countrycolor + Sets line color of the country boundaries. + countrywidth + Sets line width (in px) of the country + boundaries. + domain + plotly.graph_objects.layout.geo.Domain instance + or dict with compatible properties + framecolor + Sets the color the frame. + framewidth + Sets the stroke width (in px) of the frame. + lakecolor + Sets the color of the lakes. + landcolor + Sets the land mass color. + lataxis + plotly.graph_objects.layout.geo.Lataxis + instance or dict with compatible properties + lonaxis + plotly.graph_objects.layout.geo.Lonaxis + instance or dict with compatible properties + oceancolor + Sets the ocean color + projection + plotly.graph_objects.layout.geo.Projection + instance or dict with compatible properties + resolution + Sets the resolution of the base layers. The + values have units of km/mm e.g. 110 corresponds + to a scale ratio of 1:110,000,000. + rivercolor + Sets color of the rivers. + riverwidth + Sets the stroke width (in px) of the rivers. + scope + Set the scope of the map. + showcoastlines + Sets whether or not the coastlines are drawn. + showcountries + Sets whether or not country boundaries are + drawn. + showframe + Sets whether or not a frame is drawn around the + map. + showlakes + Sets whether or not lakes are drawn. + showland + Sets whether or not land masses are filled in + color. + showocean + Sets whether or not oceans are filled in color. + showrivers + Sets whether or not rivers are drawn. + showsubunits + Sets whether or not boundaries of subunits + within countries (e.g. states, provinces) are + drawn. + subunitcolor + Sets the color of the subunits boundaries. + subunitwidth + Sets the stroke width (in px) of the subunits + boundaries. + uirevision + Controls persistence of user-driven changes in + the view (projection and center). Defaults to + `layout.uirevision`. Returns ------- - plotly.graph_objs.bar.Outsidetextfont + plotly.graph_objs.layout.Geo """ - return self["outsidetextfont"] + return self["geo"] - @outsidetextfont.setter - def outsidetextfont(self, val): - self["outsidetextfont"] = val + @geo.setter + def geo(self, val): + self["geo"] = val - # r - # - + # grid + # ---- @property - def r(self): + def grid(self): """ - r coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the radial coordinatesfor - legacy polar chart only. + The 'grid' property is an instance of Grid + that may be specified as: + - An instance of plotly.graph_objs.layout.Grid + - A dict of string/value properties that will be passed + to the Grid constructor - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + columns + The number of columns in the grid. If you + provide a 2D `subplots` array, the length of + its longest row is used as the default. If you + give an `xaxes` array, its length is used as + the default. But it's also possible to have a + different length, if you want to leave a row at + the end for non-cartesian subplots. + domain + plotly.graph_objects.layout.grid.Domain + instance or dict with compatible properties + pattern + If no `subplots`, `xaxes`, or `yaxes` are given + but we do have `rows` and `columns`, we can + generate defaults using consecutive axis IDs, + in two ways: "coupled" gives one x axis per + column and one y axis per row. "independent" + uses a new xy pair for each cell, left-to-right + across each row then iterating rows according + to `roworder`. + roworder + Is the first row the top or the bottom? Note + that columns are always enumerated from left to + right. + rows + The number of rows in the grid. If you provide + a 2D `subplots` array or a `yaxes` array, its + length is used as the default. But it's also + possible to have a different length, if you + want to leave a row at the end for non- + cartesian subplots. + subplots + Used for freeform grids, where some axes may be + shared across subplots but others are not. Each + entry should be a cartesian subplot id, like + "xy" or "x3y2", or "" to leave that cell empty. + You may reuse x axes within the same column, + and y axes within the same row. Non-cartesian + subplots and traces that support `domain` can + place themselves in this grid separately using + the `gridcell` attribute. + xaxes + Used with `yaxes` when the x and y axes are + shared across columns and rows. Each entry + should be an x axis id like "x", "x2", etc., or + "" to not put an x axis in that column. Entries + other than "" must be unique. Ignored if + `subplots` is present. If missing but `yaxes` + is present, will generate consecutive IDs. + xgap + Horizontal space between grid cells, expressed + as a fraction of the total width available to + one cell. Defaults to 0.1 for coupled-axes + grids and 0.2 for independent grids. + xside + Sets where the x axis labels and titles go. + "bottom" means the very bottom of the grid. + "bottom plot" is the lowest plot that each x + axis is used in. "top" and "top plot" are + similar. + yaxes + Used with `yaxes` when the x and y axes are + shared across columns and rows. Each entry + should be an y axis id like "y", "y2", etc., or + "" to not put a y axis in that row. Entries + other than "" must be unique. Ignored if + `subplots` is present. If missing but `xaxes` + is present, will generate consecutive IDs. + ygap + Vertical space between grid cells, expressed as + a fraction of the total height available to one + cell. Defaults to 0.1 for coupled-axes grids + and 0.3 for independent grids. + yside + Sets where the y axis labels and titles go. + "left" means the very left edge of the grid. + *left plot* is the leftmost plot that each y + axis is used in. "right" and *right plot* are + similar. Returns ------- - numpy.ndarray + plotly.graph_objs.layout.Grid """ - return self["r"] + return self["grid"] - @r.setter - def r(self, val): - self["r"] = val + @grid.setter + def grid(self, val): + self["grid"] = val - # rsrc - # ---- + # height + # ------ @property - def rsrc(self): + def height(self): """ - Sets the source reference on plot.ly for r . + Sets the plot's height (in px). - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'height' property is a number and may be specified as: + - An int or float in the interval [10, inf] Returns ------- - str + int|float """ - return self["rsrc"] + return self["height"] - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val + @height.setter + def height(self, val): + self["height"] = val - # selected - # -------- + # hiddenlabels + # ------------ @property - def selected(self): + def hiddenlabels(self): """ - The 'selected' property is an instance of Selected - that may be specified as: - - An instance of plotly.graph_objs.bar.Selected - - A dict of string/value properties that will be passed - to the Selected constructor + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, and can + simultaneously hide slices from several pies/funnelarea charts - Supported dict properties: - - marker - plotly.graph_objects.bar.selected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.bar.selected.Textfont - instance or dict with compatible properties + The 'hiddenlabels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series Returns ------- - plotly.graph_objs.bar.Selected + numpy.ndarray """ - return self["selected"] + return self["hiddenlabels"] - @selected.setter - def selected(self, val): - self["selected"] = val + @hiddenlabels.setter + def hiddenlabels(self, val): + self["hiddenlabels"] = val - # selectedpoints - # -------------- + # hiddenlabelssrc + # --------------- @property - def selectedpoints(self): + def hiddenlabelssrc(self): """ - Array containing integer indices of selected points. Has an - effect only for traces that support selections. Note that an - empty array means an empty selection where the `unselected` are - turned on for all points, whereas, any other non-array values - means no selection all where the `selected` and `unselected` - styles have no effect. + Sets the source reference on plot.ly for hiddenlabels . - The 'selectedpoints' property accepts values of any type + The 'hiddenlabelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- - Any + str """ - return self["selectedpoints"] + return self["hiddenlabelssrc"] - @selectedpoints.setter - def selectedpoints(self, val): - self["selectedpoints"] = val + @hiddenlabelssrc.setter + def hiddenlabelssrc(self, val): + self["hiddenlabelssrc"] = val - # showlegend - # ---------- + # hidesources + # ----------- @property - def showlegend(self): + def hidesources(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + Determines whether or not a text link citing the data source is + placed at the bottom-right cored of the figure. Has only an + effect only on graphs that have been generated via forked + graphs from the plotly service (at https://plot.ly or on- + premise). - The 'showlegend' property must be specified as a bool + The 'hidesources' property must be specified as a bool (either True, or False) Returns ------- bool """ - return self["showlegend"] + return self["hidesources"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @hidesources.setter + def hidesources(self, val): + self["hidesources"] = val - # stream - # ------ + # hoverdistance + # ------------- @property - def stream(self): + def hoverdistance(self): """ - The 'stream' property is an instance of Stream - that may be specified as: - - An instance of plotly.graph_objs.bar.Stream - - A dict of string/value properties that will be passed - to the Stream constructor + Sets the default distance (in pixels) to look for data to add + hover labels (-1 means no cutoff, 0 means no looking for data). + This is only a real distance for hovering on point-like + objects, like scatter points. For area-like objects (bars, + scatter fills, etc) hovering is on inside the area and off + outside, but these objects will not supersede hover on point- + like objects in case of conflict. - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. + The 'hoverdistance' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] Returns ------- - plotly.graph_objs.bar.Stream + int """ - return self["stream"] + return self["hoverdistance"] - @stream.setter - def stream(self, val): - self["stream"] = val + @hoverdistance.setter + def hoverdistance(self, val): + self["hoverdistance"] = val - # t - # - + # hoverlabel + # ---------- @property - def t(self): + def hoverlabel(self): """ - t coordinates in scatter traces are deprecated!Please switch to - the "scatterpolar" trace type.Sets the angular coordinatesfor - legacy polar chart only. + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of plotly.graph_objs.layout.Hoverlabel + - A dict of string/value properties that will be passed + to the Hoverlabel constructor - The 't' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + bgcolor + Sets the background color of all hover labels + on graph + bordercolor + Sets the border color of all hover labels on + graph. + font + Sets the default hover label font used by all + traces on the graph. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. Returns ------- - numpy.ndarray + plotly.graph_objs.layout.Hoverlabel """ - return self["t"] + return self["hoverlabel"] - @t.setter - def t(self, val): - self["t"] = val + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val - # text - # ---- + # hovermode + # --------- @property - def text(self): + def hovermode(self): """ - Sets text elements associated with each (x,y) pair. If a single - string, the same string appears over all the data points. If an - array of string, the items are mapped in order to the this - trace's (x,y) coordinates. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these elements will be - seen in the hover labels. + Determines the mode of hover interactions. If `clickmode` + includes the "select" flag, `hovermode` defaults to "closest". + If `clickmode` lacks the "select" flag, it defaults to "x" or + "y" (depending on the trace's `orientation` value) for plots + based on cartesian coordinates. For anything else the default + value is "closest". - The 'text' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - A tuple, list, or one-dimensional numpy array of the above + The 'hovermode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['x', 'y', 'closest', False] Returns ------- - str|numpy.ndarray + Any """ - return self["text"] + return self["hovermode"] - @text.setter - def text(self, val): - self["text"] = val + @hovermode.setter + def hovermode(self, val): + self["hovermode"] = val - # textangle - # --------- + # images + # ------ @property - def textangle(self): + def images(self): """ - Sets the angle of the tick labels with respect to the bar. For - example, a `tickangle` of -90 draws the tick labels vertically. - With "auto" the texts may automatically be rotated to fit with - the maximum size in bars. + The 'images' property is a tuple of instances of + Image that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Image + - A list or tuple of dicts of string/value properties that + will be passed to the Image constructor - The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value - (e.g. 270 is converted to -90). + Supported dict properties: + + layer + Specifies whether images are drawn below or + above traces. When `xref` and `yref` are both + set to `paper`, image is drawn below the entire + plot area. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The + image will be sized based on the `position` + value. When `xref` is set to `paper`, units are + sized relative to the plot width. + sizey + Sets the image container size vertically. The + image will be sized based on the `position` + value. When `yref` is set to `paper`, units are + sized relative to the plot height. + sizing + Specifies which dimension of the image to + constrain. + source + Specifies the URL of the image to be used. The + URL must be accessible from the domain where + the plot code is run, and can be either + relative or absolute. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + visible + Determines whether or not this image is + visible. + x + Sets the image's x position. When `xref` is set + to `paper`, units are sized relative to the + plot height. See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to + a x axis id (e.g. "x" or "x2"), the `x` + position refers to an x data coordinate If set + to "paper", the `x` position refers to the + distance from the left of plot in normalized + coordinates where 0 (1) corresponds to the left + (right). + y + Sets the image's y position. When `yref` is set + to `paper`, units are sized relative to the + plot height. See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to + a y axis id (e.g. "y" or "y2"), the `y` + position refers to a y data coordinate. If set + to "paper", the `y` position refers to the + distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds + to the bottom (top). Returns ------- - int|float + tuple[plotly.graph_objs.layout.Image] """ - return self["textangle"] + return self["images"] - @textangle.setter - def textangle(self, val): - self["textangle"] = val + @images.setter + def images(self, val): + self["images"] = val - # textfont - # -------- + # imagedefaults + # ------------- @property - def textfont(self): + def imagedefaults(self): """ - Sets the font used for `text`. + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images - The 'textfont' property is an instance of Textfont + The 'imagedefaults' property is an instance of Image that may be specified as: - - An instance of plotly.graph_objs.bar.Textfont + - An instance of plotly.graph_objs.layout.Image - A dict of string/value properties that will be passed - to the Textfont constructor + to the Image constructor Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . Returns ------- - plotly.graph_objs.bar.Textfont + plotly.graph_objs.layout.Image """ - return self["textfont"] + return self["imagedefaults"] - @textfont.setter - def textfont(self, val): - self["textfont"] = val + @imagedefaults.setter + def imagedefaults(self, val): + self["imagedefaults"] = val - # textposition - # ------------ + # legend + # ------ @property - def textposition(self): + def legend(self): """ - Specifies the location of the `text`. "inside" positions `text` - inside, next to the bar end (rotated and scaled if needed). - "outside" positions `text` outside, next to the bar end (scaled - if needed), unless there is another bar stacked on this one, - then the text gets pushed inside. "auto" tries to position - `text` inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. + The 'legend' property is an instance of Legend + that may be specified as: + - An instance of plotly.graph_objs.layout.Legend + - A dict of string/value properties that will be passed + to the Legend constructor - The 'textposition' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['inside', 'outside', 'auto', 'none'] - - A tuple, list, or one-dimensional numpy array of the above + Supported dict properties: + + bgcolor + Sets the legend background color. + bordercolor + Sets the color of the border enclosing the + legend. + borderwidth + Sets the width (in px) of the border enclosing + the legend. + font + Sets the font used to text the legend items. + itemclick + Determines the behavior on legend item click. + "toggle" toggles the visibility of the item + clicked on the graph. "toggleothers" makes the + clicked item the sole visible item on the + graph. False disable legend item click + interactions. + itemdoubleclick + Determines the behavior on legend item double- + click. "toggle" toggles the visibility of the + item clicked on the graph. "toggleothers" makes + the clicked item the sole visible item on the + graph. False disable legend item double-click + interactions. + itemsizing + Determines if the legend items symbols scale + with their corresponding "trace" attributes or + remain "constant" independent of the symbol + size on the graph. + orientation + Sets the orientation of the legend. + tracegroupgap + Sets the amount of vertical space (in px) + between legend groups. + traceorder + Determines the order at which the legend items + are displayed. If "normal", the items are + displayed top-to-bottom in the same order as + the input data. If "reversed", the items are + displayed in the opposite order as "normal". If + "grouped", the items are displayed in groups + (when a trace `legendgroup` is provided). if + "grouped+reversed", the items are displayed in + the opposite order as "grouped". + uirevision + Controls persistence of legend-driven changes + in trace and pie label visibility. Defaults to + `layout.uirevision`. + valign + Sets the vertical alignment of the symbols with + respect to their associated text. + x + Sets the x position (in normalized coordinates) + of the legend. Defaults to 1.02 for vertical + legends and defaults to 0 for horizontal + legends. + xanchor + Sets the legend's horizontal position anchor. + This anchor binds the `x` position to the + "left", "center" or "right" of the legend. + Value "auto" anchors legends to the right for + `x` values greater than or equal to 2/3, + anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with + respect to their center otherwise. + y + Sets the y position (in normalized coordinates) + of the legend. Defaults to 1 for vertical + legends, defaults to "-0.1" for horizontal + legends on graphs w/o range sliders and + defaults to 1.1 for horizontal legends on graph + with one or multiple range sliders. + yanchor + Sets the legend's vertical position anchor This + anchor binds the `y` position to the "top", + "middle" or "bottom" of the legend. Value + "auto" anchors legends at their bottom for `y` + values less than or equal to 1/3, anchors + legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with + respect to their middle otherwise. Returns ------- - Any|numpy.ndarray + plotly.graph_objs.layout.Legend """ - return self["textposition"] + return self["legend"] - @textposition.setter - def textposition(self, val): - self["textposition"] = val + @legend.setter + def legend(self, val): + self["legend"] = val - # textpositionsrc - # --------------- + # mapbox + # ------ @property - def textpositionsrc(self): + def mapbox(self): """ - Sets the source reference on plot.ly for textposition . + The 'mapbox' property is an instance of Mapbox + that may be specified as: + - An instance of plotly.graph_objs.layout.Mapbox + - A dict of string/value properties that will be passed + to the Mapbox constructor - The 'textpositionsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + accesstoken + Sets the mapbox access token to be used for + this mapbox map. Alternatively, the mapbox + access token can be set in the configuration + options under `mapboxAccessToken`. Note that + accessToken are only required when `style` (e.g + with values : basic, streets, outdoors, light, + dark, satellite, satellite-streets ) and/or a + layout layer references the Mapbox server. + bearing + Sets the bearing angle of the map in degrees + counter-clockwise from North (mapbox.bearing). + center + plotly.graph_objects.layout.mapbox.Center + instance or dict with compatible properties + domain + plotly.graph_objects.layout.mapbox.Domain + instance or dict with compatible properties + layers + A tuple of + plotly.graph_objects.layout.mapbox.Layer + instances or dicts with compatible properties + layerdefaults + When used in a template (as + layout.template.layout.mapbox.layerdefaults), + sets the default property values to use for + elements of layout.mapbox.layers + pitch + Sets the pitch angle of the map (in degrees, + where 0 means perpendicular to the surface of + the map) (mapbox.pitch). + style + Defines the map layers that are rendered by + default below the trace layers defined in + `data`, which are themselves by default + rendered below the layers defined in + `layout.mapbox.layers`. These layers can be + defined either explicitly as a Mapbox Style + object which can contain multiple layer + definitions that load data from any public or + private Tile Map Service (TMS or XYZ) or Web + Map Service (WMS) or implicitly by using one of + the built-in style objects which use WMSes + which do not require any access tokens, or by + using a default Mapbox style or custom Mapbox + style URL, both of which require a Mapbox + access token Note that Mapbox access token can + be set in the `accesstoken` attribute or in the + `mapboxAccessToken` config option. Mapbox + Style objects are of the form described in the + Mapbox GL JS documentation available at + https://docs.mapbox.com/mapbox-gl-js/style-spec + The built-in plotly.js styles objects are: + open-street-map, white-bg, carto-positron, + carto-darkmatter, stamen-terrain, stamen-toner, + stamen-watercolor The built-in Mapbox styles + are: basic, streets, outdoors, light, dark, + satellite, satellite-streets Mapbox style URLs + are of the form: + mapbox://mapbox.mapbox-- + uirevision + Controls persistence of user-driven changes in + the view: `center`, `zoom`, `bearing`, `pitch`. + Defaults to `layout.uirevision`. + zoom + Sets the zoom level of the map (mapbox.zoom). Returns ------- - str + plotly.graph_objs.layout.Mapbox """ - return self["textpositionsrc"] + return self["mapbox"] - @textpositionsrc.setter - def textpositionsrc(self, val): - self["textpositionsrc"] = val + @mapbox.setter + def mapbox(self, val): + self["mapbox"] = val - # textsrc - # ------- + # margin + # ------ @property - def textsrc(self): + def margin(self): """ - Sets the source reference on plot.ly for text . + The 'margin' property is an instance of Margin + that may be specified as: + - An instance of plotly.graph_objs.layout.Margin + - A dict of string/value properties that will be passed + to the Margin constructor - The 'textsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + autoexpand + Turns on/off margin expansion computations. + Legends, colorbars, updatemenus, sliders, axis + rangeselector and rangeslider are allowed to + push the margins by defaults. + b + Sets the bottom margin (in px). + l + Sets the left margin (in px). + pad + Sets the amount of padding (in px) between the + plotting area and the axis lines + r + Sets the right margin (in px). + t + Sets the top margin (in px). Returns ------- - str + plotly.graph_objs.layout.Margin """ - return self["textsrc"] + return self["margin"] - @textsrc.setter - def textsrc(self, val): - self["textsrc"] = val + @margin.setter + def margin(self, val): + self["margin"] = val - # tsrc + # meta # ---- @property - def tsrc(self): + def meta(self): """ - Sets the source reference on plot.ly for t . + Assigns extra meta information that can be used in various + `text` attributes. Attributes such as the graph, axis and + colorbar `title.text`, annotation `text` `trace.name` in legend + items, `rangeselector`, `updatemenus` and `sliders` `label` + text all support `meta`. One can access `meta` fields using + template strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object for + example `{key: value}` which can be accessed %{meta[key]}. - The 'tsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'meta' property accepts values of any type Returns ------- - str + Any|numpy.ndarray """ - return self["tsrc"] + return self["meta"] - @tsrc.setter - def tsrc(self, val): - self["tsrc"] = val + @meta.setter + def meta(self, val): + self["meta"] = val - # uid - # --- + # metasrc + # ------- @property - def uid(self): + def metasrc(self): """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. + Sets the source reference on plot.ly for meta . - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object Returns ------- str """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] + return self["metasrc"] - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val - # unselected - # ---------- + # modebar + # ------- @property - def unselected(self): + def modebar(self): """ - The 'unselected' property is an instance of Unselected + The 'modebar' property is an instance of Modebar that may be specified as: - - An instance of plotly.graph_objs.bar.Unselected + - An instance of plotly.graph_objs.layout.Modebar - A dict of string/value properties that will be passed - to the Unselected constructor + to the Modebar constructor Supported dict properties: - marker - plotly.graph_objects.bar.unselected.Marker - instance or dict with compatible properties - textfont - plotly.graph_objects.bar.unselected.Textfont - instance or dict with compatible properties - - Returns - ------- - plotly.graph_objs.bar.Unselected - """ - return self["unselected"] - - @unselected.setter - def unselected(self, val): - self["unselected"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + activecolor + Sets the color of the active or hovered on + icons in the modebar. + bgcolor + Sets the background color of the modebar. + color + Sets the color of the icons in the modebar. + orientation + Sets the orientation of the modebar. + uirevision + Controls persistence of user-driven changes + related to the modebar, including `hovermode`, + `dragmode`, and `showspikes` at both the root + level and inside subplots. Defaults to + `layout.uirevision`. Returns ------- - Any + plotly.graph_objs.layout.Modebar """ - return self["visible"] + return self["modebar"] - @visible.setter - def visible(self, val): - self["visible"] = val + @modebar.setter + def modebar(self, val): + self["modebar"] = val - # width - # ----- + # orientation + # ----------- @property - def width(self): + def orientation(self): """ - Sets the bar width (in position axis units). + Legacy polar charts are deprecated! Please switch to "polar" + subplots. Rotates the entire polar by the given angle in legacy + polar charts. - The 'width' property is a number and may be specified as: - - An int or float in the interval [0, inf] - - A tuple, list, or one-dimensional numpy array of the above + The 'orientation' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). Returns ------- - int|float|numpy.ndarray + int|float """ - return self["width"] + return self["orientation"] - @width.setter - def width(self, val): - self["width"] = val + @orientation.setter + def orientation(self, val): + self["orientation"] = val - # widthsrc - # -------- + # paper_bgcolor + # ------------- @property - def widthsrc(self): + def paper_bgcolor(self): """ - Sets the source reference on plot.ly for width . + Sets the color of paper where the graph is drawn. - The 'widthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'paper_bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen Returns ------- str """ - return self["widthsrc"] + return self["paper_bgcolor"] - @widthsrc.setter - def widthsrc(self, val): - self["widthsrc"] = val + @paper_bgcolor.setter + def paper_bgcolor(self, val): + self["paper_bgcolor"] = val - # x - # - + # piecolorway + # ----------- @property - def x(self): + def piecolorway(self): """ - Sets the x coordinates. + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendpiecolors`. - The 'x' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'piecolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings Returns ------- - numpy.ndarray + list """ - return self["x"] + return self["piecolorway"] - @x.setter - def x(self, val): - self["x"] = val + @piecolorway.setter + def piecolorway(self, val): + self["piecolorway"] = val - # x0 - # -- + # plot_bgcolor + # ------------ @property - def x0(self): + def plot_bgcolor(self): """ - Alternate to `x`. Builds a linear space of x coordinates. Use - with `dx` where `x0` is the starting coordinate and `dx` the - step. + Sets the color of plotting area in-between x and y axes. - The 'x0' property accepts values of any type + The 'plot_bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen Returns ------- - Any + str """ - return self["x0"] + return self["plot_bgcolor"] - @x0.setter - def x0(self, val): - self["x0"] = val + @plot_bgcolor.setter + def plot_bgcolor(self, val): + self["plot_bgcolor"] = val - # xaxis + # polar # ----- @property - def xaxis(self): + def polar(self): """ - Sets a reference between this trace's x coordinates and a 2D - cartesian x axis. If "x" (the default value), the x coordinates - refer to `layout.xaxis`. If "x2", the x coordinates refer to - `layout.xaxis2`, and so on. + The 'polar' property is an instance of Polar + that may be specified as: + - An instance of plotly.graph_objs.layout.Polar + - A dict of string/value properties that will be passed + to the Polar constructor - The 'xaxis' property is an identifier of a particular - subplot, of type 'x', that may be specified as the string 'x' - optionally followed by an integer >= 1 - (e.g. 'x', 'x1', 'x2', 'x3', etc.) + Supported dict properties: + + angularaxis + plotly.graph_objects.layout.polar.AngularAxis + instance or dict with compatible properties + bargap + Sets the gap between bars of adjacent location + coordinates. Values are unitless, they + represent fractions of the minimum difference + in bar positions in the data. + barmode + Determines how bars at the same location + coordinate are displayed on the graph. With + "stack", the bars are stacked on top of one + another With "overlay", the bars are plotted + over one another, you might need to an + "opacity" to see multiple bars. + bgcolor + Set the background color of the subplot + domain + plotly.graph_objects.layout.polar.Domain + instance or dict with compatible properties + gridshape + Determines if the radial axis grid lines and + angular axis line are drawn as "circular" + sectors or as "linear" (polygon) sectors. Has + an effect only when the angular axis has `type` + "category". Note that `radialaxis.angle` is + snapped to the angle of the closest vertex when + `gridshape` is "circular" (so that radial axis + scale is the same as the data scale). + hole + Sets the fraction of the radius to cut out of + the polar subplot. + radialaxis + plotly.graph_objects.layout.polar.RadialAxis + instance or dict with compatible properties + sector + Sets angular span of this polar subplot with + two angles (in degrees). Sector are assumed to + be spanned in the counterclockwise direction + with 0 corresponding to rightmost limit of the + polar subplot. + uirevision + Controls persistence of user-driven changes in + axis attributes, if not overridden in the + individual axes. Defaults to + `layout.uirevision`. Returns ------- - str + plotly.graph_objs.layout.Polar """ - return self["xaxis"] + return self["polar"] - @xaxis.setter - def xaxis(self, val): - self["xaxis"] = val + @polar.setter + def polar(self, val): + self["polar"] = val - # xcalendar - # --------- + # radialaxis + # ---------- @property - def xcalendar(self): + def radialaxis(self): """ - Sets the calendar system to use with `x` date data. + The 'radialaxis' property is an instance of RadialAxis + that may be specified as: + - An instance of plotly.graph_objs.layout.RadialAxis + - A dict of string/value properties that will be passed + to the RadialAxis constructor - The 'xcalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + Supported dict properties: + + domain + Polar chart subplots are not supported yet. + This key has currently no effect. + endpadding + Legacy polar charts are deprecated! Please + switch to "polar" subplots. + orientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (an angle with respect to the + origin) of the radial axis. + range + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Defines the start + and end point of this radial axis. + showline + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the line bounding this radial axis will + be shown on the figure. + showticklabels + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not the radial axis ticks will feature tick + labels. + tickcolor + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the color of + the tick lines on this radial axis. + ticklen + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this radial axis. + tickorientation + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the + orientation (from the paper perspective) of the + radial axis tick labels. + ticksuffix + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Sets the length of + the tick lines on this radial axis. + visible + Legacy polar charts are deprecated! Please + switch to "polar" subplots. Determines whether + or not this axis will be visible. Returns ------- - Any + plotly.graph_objs.layout.RadialAxis """ - return self["xcalendar"] + return self["radialaxis"] - @xcalendar.setter - def xcalendar(self, val): - self["xcalendar"] = val + @radialaxis.setter + def radialaxis(self, val): + self["radialaxis"] = val - # xsrc - # ---- + # scene + # ----- @property - def xsrc(self): + def scene(self): """ - Sets the source reference on plot.ly for x . + The 'scene' property is an instance of Scene + that may be specified as: + - An instance of plotly.graph_objs.layout.Scene + - A dict of string/value properties that will be passed + to the Scene constructor - The 'xsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["xsrc"] - - @xsrc.setter - def xsrc(self, val): - self["xsrc"] = val - - # y - # - - @property - def y(self): - """ - Sets the y coordinates. + Supported dict properties: + + annotations + A tuple of + plotly.graph_objects.layout.scene.Annotation + instances or dicts with compatible properties + annotationdefaults + When used in a template (as layout.template.lay + out.scene.annotationdefaults), sets the default + property values to use for elements of + layout.scene.annotations + aspectmode + If "cube", this scene's axes are drawn as a + cube, regardless of the axes' ranges. If + "data", this scene's axes are drawn in + proportion with the axes' ranges. If "manual", + this scene's axes are drawn in proportion with + the input of "aspectratio" (the default + behavior if "aspectratio" is provided). If + "auto", this scene's axes are drawn using the + results of "data" except when one axis is more + than four times the size of the two others, + where in that case the results of "cube" are + used. + aspectratio + Sets this scene's axis aspectratio. + bgcolor - The 'y' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + camera + plotly.graph_objects.layout.scene.Camera + instance or dict with compatible properties + domain + plotly.graph_objects.layout.scene.Domain + instance or dict with compatible properties + dragmode + Determines the mode of drag interactions for + this scene. + hovermode + Determines the mode of hover interactions for + this scene. + uirevision + Controls persistence of user-driven changes in + camera attributes. Defaults to + `layout.uirevision`. + xaxis + plotly.graph_objects.layout.scene.XAxis + instance or dict with compatible properties + yaxis + plotly.graph_objects.layout.scene.YAxis + instance or dict with compatible properties + zaxis + plotly.graph_objects.layout.scene.ZAxis + instance or dict with compatible properties Returns ------- - numpy.ndarray + plotly.graph_objs.layout.Scene """ - return self["y"] + return self["scene"] - @y.setter - def y(self, val): - self["y"] = val + @scene.setter + def scene(self, val): + self["scene"] = val - # y0 - # -- + # selectdirection + # --------------- @property - def y0(self): + def selectdirection(self): """ - Alternate to `y`. Builds a linear space of y coordinates. Use - with `dy` where `y0` is the starting coordinate and `dy` the - step. + When "dragmode" is set to "select", this limits the selection + of the drag to horizontal, vertical or diagonal. "h" only + allows horizontal selection, "v" only vertical, "d" only + diagonal and "any" sets no limit. - The 'y0' property accepts values of any type + The 'selectdirection' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v', 'd', 'any'] Returns ------- Any """ - return self["y0"] - - @y0.setter - def y0(self, val): - self["y0"] = val - - # yaxis - # ----- - @property - def yaxis(self): - """ - Sets a reference between this trace's y coordinates and a 2D - cartesian y axis. If "y" (the default value), the y coordinates - refer to `layout.yaxis`. If "y2", the y coordinates refer to - `layout.yaxis2`, and so on. - - The 'yaxis' property is an identifier of a particular - subplot, of type 'y', that may be specified as the string 'y' - optionally followed by an integer >= 1 - (e.g. 'y', 'y1', 'y2', 'y3', etc.) - - Returns - ------- - str - """ - return self["yaxis"] + return self["selectdirection"] - @yaxis.setter - def yaxis(self, val): - self["yaxis"] = val + @selectdirection.setter + def selectdirection(self, val): + self["selectdirection"] = val - # ycalendar - # --------- + # selectionrevision + # ----------------- @property - def ycalendar(self): + def selectionrevision(self): """ - Sets the calendar system to use with `y` date data. + Controls persistence of user-driven changes in selected points + from all traces. - The 'ycalendar' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['gregorian', 'chinese', 'coptic', 'discworld', - 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan', - 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan', - 'thai', 'ummalqura'] + The 'selectionrevision' property accepts values of any type Returns ------- Any """ - return self["ycalendar"] + return self["selectionrevision"] - @ycalendar.setter - def ycalendar(self, val): - self["ycalendar"] = val + @selectionrevision.setter + def selectionrevision(self, val): + self["selectionrevision"] = val - # ysrc - # ---- + # separators + # ---------- @property - def ysrc(self): + def separators(self): """ - Sets the source reference on plot.ly for y . + Sets the decimal and thousand separators. For example, *. * + puts a '.' before decimals and a space between thousands. In + English locales, dflt is ".," but other locales may alter this + default. - The 'ysrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'separators' property is a string and must be specified as: + - A string + - A number that will be converted to a string Returns ------- str """ - return self["ysrc"] - - @ysrc.setter - def ysrc(self, val): - self["ysrc"] = val - - # type - # ---- - @property - def type(self): - return self._props["type"] + return self["separators"] - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "" + @separators.setter + def separators(self, val): + self["separators"] = val - # Self properties description - # --------------------------- + # shapes + # ------ @property - def _prop_descriptions(self): - return """\ - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). In "stack" or "relative" barmode, traces that - set "base" will be excluded and drawn in "overlay" mode - instead. - basesrc - Sets the source reference on plot.ly for base . - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - plotly.graph_objects.bar.ErrorX instance or dict with - compatible properties - error_y - plotly.graph_objects.bar.ErrorY instance or dict with - compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.bar.Hoverlabel instance or dict - with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.bar.Marker instance or dict with - compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on plot.ly for offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on plot.ly for r . - selected - plotly.graph_objects.bar.Selected instance or dict with - compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - plotly.graph_objects.bar.Stream instance or dict with - compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . - tsrc - Sets the source reference on plot.ly for t . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.bar.Unselected instance or dict - with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on plot.ly for width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . + def shapes(self): + """ + The 'shapes' property is a tuple of instances of + Shape that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Shape + - A list or tuple of dicts of string/value properties that + will be passed to the Shape constructor + + Supported dict properties: + + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or + above traces. + line + plotly.graph_objects.layout.shape.Line instance + or dict with compatible properties + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the + pixel values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and + taken unmodified as pixels relative to + `xanchor` and `yanchor` in case of "pixel" size + mode. There are a few restrictions / quirks + only absolute instructions, not relative. So + the allowed segments are: M, L, H, V, Q, C, T, + S, and Z arcs (A) are not allowed because + radius rx and ry are relative. In the future we + could consider supporting relative commands, + but we would have to decide on how to handle + date and log axes. Note that even as is, Q and + C Bezier paths that are smooth on linear axes + may not be smooth on log, and vice versa. no + chained "polybezier" commands - specify the + segment type for each one. On category axes, + values are numbers scaled to the serial numbers + of categories because using the categories + themselves there would be no way to describe + fractional positions On data axes: because + space and T are both normal components of path + strings, we can't use either to separate date + from time parts. Therefore we'll use underscore + for this purpose: 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If + "line", a line is drawn from (`x0`,`y0`) to + (`x1`,`y1`) with respect to the axes' sizing + mode. If "circle", a circle is drawn from + ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 + -`y0`)|) with respect to the axes' sizing mode. + If "rect", a rectangle is drawn linking + (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), + (`x0`,`y1`), (`x0`,`y0`) with respect to the + axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' + sizing mode. + visible + Determines whether or not this shape is + visible. + x0 + Sets the shape's starting x position. See + `type` and `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` + set to "pixel". Specifies the anchor point on + the x axis to which `x0`, `x1` and x + coordinates within `path` are relative to. E.g. + useful to attach a pixel sized shape to a + certain data value. No effect when `xsizemode` + not set to "pixel". + xref + Sets the shape's x coordinate axis. If set to + an x axis id (e.g. "x" or "x2"), the `x` + position refers to an x coordinate. If set to + "paper", the `x` position refers to the + distance from the left side of the plotting + area in normalized coordinates where 0 (1) + corresponds to the left (right) side. If the + axis `type` is "log", then you must take the + log of your desired range. If the axis `type` + is "date", then you must convert the date to + unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. + If set to "scaled", `x0`, `x1` and x + coordinates within `path` refer to data values + on the x axis or a fraction of the plot area's + width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in + terms of data or plot fraction but `x0`, `x1` + and x coordinates within `path` are pixels + relative to `xanchor`. This way, the shape can + have a fixed width while maintaining a position + relative to data or plot fraction. + y0 + Sets the shape's starting y position. See + `type` and `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` + set to "pixel". Specifies the anchor point on + the y axis to which `y0`, `y1` and y + coordinates within `path` are relative to. E.g. + useful to attach a pixel sized shape to a + certain data value. No effect when `ysizemode` + not set to "pixel". + yref + Sets the annotation's y coordinate axis. If set + to an y axis id (e.g. "y" or "y2"), the `y` + position refers to an y coordinate If set to + "paper", the `y` position refers to the + distance from the bottom of the plotting area + in normalized coordinates where 0 (1) + corresponds to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. + If set to "scaled", `y0`, `y1` and y + coordinates within `path` refer to data values + on the y axis or a fraction of the plot area's + height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in + terms of data or plot fraction but `y0`, `y1` + and y coordinates within `path` are pixels + relative to `yanchor`. This way, the shape can + have a fixed height while maintaining a + position relative to data or plot fraction. + + Returns + ------- + tuple[plotly.graph_objs.layout.Shape] """ + return self["shapes"] - def __init__( - self, - arg=None, - alignmentgroup=None, - base=None, - basesrc=None, - cliponaxis=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legendgroup=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - r=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - t=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - tsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ysrc=None, - **kwargs - ): + @shapes.setter + def shapes(self, val): + self["shapes"] = val + + # shapedefaults + # ------------- + @property + def shapedefaults(self): """ - Construct a new Bar object - - The data visualized by the span of the bars is set in `y` if - `orientation` is set th "v" (the default) and the labels are - set in `x`. By setting `orientation` to "h", the roles are - interchanged. + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + + The 'shapedefaults' property is an instance of Shape + that may be specified as: + - An instance of plotly.graph_objs.layout.Shape + - A dict of string/value properties that will be passed + to the Shape constructor + + Supported dict properties: - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Bar - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - base - Sets where the bar base is drawn (in position axis - units). In "stack" or "relative" barmode, traces that - set "base" will be excluded and drawn in "overlay" mode - instead. - basesrc - Sets the source reference on plot.ly for base . - cliponaxis - Determines whether the text nodes are clipped about the - subplot axes. To show the text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` and - `yaxis.layer` to *below traces*. - constraintext - Constrain the size of text inside or outside a bar to - be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - dx - Sets the x coordinate step. See `x0` for more info. - dy - Sets the y coordinate step. See `y0` for more info. - error_x - plotly.graph_objects.bar.ErrorX instance or dict with - compatible properties - error_y - plotly.graph_objects.bar.ErrorY instance or dict with - compatible properties - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.bar.Hoverlabel instance or dict - with compatible properties - hovertemplate - Template string used for rendering the information that - appear on hover box. Note that this will override - `hoverinfo`. Variables are inserted using %{variable}, - for example "y: %{y}". Numbers are formatted using - d3-format's syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- - reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables - available in `hovertemplate` are the ones emitted as - event data described at this link - https://plot.ly/javascript/plotlyjs-events/#event-data. - Additionally, every attributes that can be specified - per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the secondary - box completely, use an empty tag ``. - hovertemplatesrc - Sets the source reference on plot.ly for hovertemplate - . - hovertext - Sets hover text elements associated with each (x,y) - pair. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. - hovertextsrc - Sets the source reference on plot.ly for hovertext . - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - insidetextanchor - Determines if texts are kept at center or start/end - points in `textposition` "inside" mode. - insidetextfont - Sets the font used for `text` lying inside the bar. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.bar.Marker instance or dict with - compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - offset - Shifts the position where the bar is drawn (in position - axis units). In "group" barmode, traces that set - "offset" will be excluded and drawn in "overlay" mode - instead. - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. - offsetsrc - Sets the source reference on plot.ly for offset . - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" ("h"), the - value of the each bar spans along the vertical - (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the bar. - r - r coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the radial - coordinatesfor legacy polar chart only. - rsrc - Sets the source reference on plot.ly for r . - selected - plotly.graph_objects.bar.Selected instance or dict with - compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - plotly.graph_objects.bar.Stream instance or dict with - compatible properties - t - t coordinates in scatter traces are deprecated!Please - switch to the "scatterpolar" trace type.Sets the - angular coordinatesfor legacy polar chart only. - text - Sets text elements associated with each (x,y) pair. If - a single string, the same string appears over all the - data points. If an array of string, the items are - mapped in order to the this trace's (x,y) coordinates. - If trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be seen in - the hover labels. - textangle - Sets the angle of the tick labels with respect to the - bar. For example, a `tickangle` of -90 draws the tick - labels vertically. With "auto" the texts may - automatically be rotated to fit with the maximum size - in bars. - textfont - Sets the font used for `text`. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end (rotated - and scaled if needed). "outside" positions `text` - outside, next to the bar end (scaled if needed), unless - there is another bar stacked on this one, then the text - gets pushed inside. "auto" tries to position `text` - inside the bar, but if the bar is too small and no bar - is stacked on this one the text is moved outside. - textpositionsrc - Sets the source reference on plot.ly for textposition - . - textsrc - Sets the source reference on plot.ly for text . - tsrc - Sets the source reference on plot.ly for t . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - unselected - plotly.graph_objects.bar.Unselected instance or dict - with compatible properties - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on plot.ly for width . - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the starting - coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date data. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the starting - coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date data. - ysrc - Sets the source reference on plot.ly for y . + Returns + ------- + plotly.graph_objs.layout.Shape + """ + return self["shapedefaults"] + + @shapedefaults.setter + def shapedefaults(self, val): + self["shapedefaults"] = val + + # showlegend + # ---------- + @property + def showlegend(self): + """ + Determines whether or not a legend is drawn. Default is `true` + if there is a trace to show and any of these: a) Two or more + traces would by default be shown in the legend. b) One pie + trace is shown in the legend. c) One trace is explicitly given + with `showlegend: true`. + + The 'showlegend' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + # sliders + # ------- + @property + def sliders(self): + """ + The 'sliders' property is a tuple of instances of + Slider that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Slider + - A list or tuple of dicts of string/value properties that + will be passed to the Slider constructor + + Supported dict properties: + + active + Determines which button (by index starting from + 0) is considered active. + activebgcolor + Sets the background color of the slider grip + while dragging. + bgcolor + Sets the background color of the slider. + bordercolor + Sets the color of the border enclosing the + slider. + borderwidth + Sets the width (in px) of the border enclosing + the slider. + currentvalue + plotly.graph_objects.layout.slider.Currentvalue + instance or dict with compatible properties + font + Sets the font of the slider step labels. + len + Sets the length of the slider This measure + excludes the padding of both ends. That is, the + slider's length is this length minus the + padding on both ends. + lenmode + Determines whether this slider length is set in + units of plot "fraction" or in *pixels. Use + `len` to set the value. + minorticklen + Sets the length in pixels of minor step tick + marks + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pad + Set the padding of the slider component along + each side. + steps + A tuple of + plotly.graph_objects.layout.slider.Step + instances or dicts with compatible properties + stepdefaults + When used in a template (as + layout.template.layout.slider.stepdefaults), + sets the default property values to use for + elements of layout.slider.steps + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + tickcolor + Sets the color of the border enclosing the + slider. + ticklen + Sets the length in pixels of step tick marks + tickwidth + Sets the tick width (in px). + transition + plotly.graph_objects.layout.slider.Transition + instance or dict with compatible properties + visible + Determines whether or not the slider is + visible. + x + Sets the x position (in normalized coordinates) + of the slider. + xanchor + Sets the slider's horizontal position anchor. + This anchor binds the `x` position to the + "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the slider. + yanchor + Sets the slider's vertical position anchor This + anchor binds the `y` position to the "top", + "middle" or "bottom" of the range selector. Returns ------- - Bar + tuple[plotly.graph_objs.layout.Slider] """ - super(Bar, self).__init__("bar") + return self["sliders"] - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.Bar -constructor must be a dict or -an instance of plotly.graph_objs.Bar""" - ) + @sliders.setter + def sliders(self, val): + self["sliders"] = val - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) + # sliderdefaults + # -------------- + @property + def sliderdefaults(self): + """ + When used in a template (as + layout.template.layout.sliderdefaults), sets the default + property values to use for elements of layout.sliders + + The 'sliderdefaults' property is an instance of Slider + that may be specified as: + - An instance of plotly.graph_objs.layout.Slider + - A dict of string/value properties that will be passed + to the Slider constructor + + Supported dict properties: - # Import validators - # ----------------- - from plotly.validators import bar as v_bar + Returns + ------- + plotly.graph_objs.layout.Slider + """ + return self["sliderdefaults"] - # Initialize validators - # --------------------- - self._validators["alignmentgroup"] = v_bar.AlignmentgroupValidator() - self._validators["base"] = v_bar.BaseValidator() - self._validators["basesrc"] = v_bar.BasesrcValidator() - self._validators["cliponaxis"] = v_bar.CliponaxisValidator() - self._validators["constraintext"] = v_bar.ConstraintextValidator() - self._validators["customdata"] = v_bar.CustomdataValidator() - self._validators["customdatasrc"] = v_bar.CustomdatasrcValidator() - self._validators["dx"] = v_bar.DxValidator() - self._validators["dy"] = v_bar.DyValidator() - self._validators["error_x"] = v_bar.ErrorXValidator() - self._validators["error_y"] = v_bar.ErrorYValidator() - self._validators["hoverinfo"] = v_bar.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_bar.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_bar.HoverlabelValidator() - self._validators["hovertemplate"] = v_bar.HovertemplateValidator() - self._validators["hovertemplatesrc"] = v_bar.HovertemplatesrcValidator() - self._validators["hovertext"] = v_bar.HovertextValidator() - self._validators["hovertextsrc"] = v_bar.HovertextsrcValidator() - self._validators["ids"] = v_bar.IdsValidator() - self._validators["idssrc"] = v_bar.IdssrcValidator() - self._validators["insidetextanchor"] = v_bar.InsidetextanchorValidator() - self._validators["insidetextfont"] = v_bar.InsidetextfontValidator() - self._validators["legendgroup"] = v_bar.LegendgroupValidator() - self._validators["marker"] = v_bar.MarkerValidator() - self._validators["meta"] = v_bar.MetaValidator() - self._validators["metasrc"] = v_bar.MetasrcValidator() - self._validators["name"] = v_bar.NameValidator() - self._validators["offset"] = v_bar.OffsetValidator() - self._validators["offsetgroup"] = v_bar.OffsetgroupValidator() - self._validators["offsetsrc"] = v_bar.OffsetsrcValidator() - self._validators["opacity"] = v_bar.OpacityValidator() - self._validators["orientation"] = v_bar.OrientationValidator() - self._validators["outsidetextfont"] = v_bar.OutsidetextfontValidator() - self._validators["r"] = v_bar.RValidator() - self._validators["rsrc"] = v_bar.RsrcValidator() - self._validators["selected"] = v_bar.SelectedValidator() - self._validators["selectedpoints"] = v_bar.SelectedpointsValidator() - self._validators["showlegend"] = v_bar.ShowlegendValidator() - self._validators["stream"] = v_bar.StreamValidator() - self._validators["t"] = v_bar.TValidator() - self._validators["text"] = v_bar.TextValidator() - self._validators["textangle"] = v_bar.TextangleValidator() - self._validators["textfont"] = v_bar.TextfontValidator() - self._validators["textposition"] = v_bar.TextpositionValidator() - self._validators["textpositionsrc"] = v_bar.TextpositionsrcValidator() - self._validators["textsrc"] = v_bar.TextsrcValidator() - self._validators["tsrc"] = v_bar.TsrcValidator() - self._validators["uid"] = v_bar.UidValidator() - self._validators["uirevision"] = v_bar.UirevisionValidator() - self._validators["unselected"] = v_bar.UnselectedValidator() - self._validators["visible"] = v_bar.VisibleValidator() - self._validators["width"] = v_bar.WidthValidator() - self._validators["widthsrc"] = v_bar.WidthsrcValidator() - self._validators["x"] = v_bar.XValidator() - self._validators["x0"] = v_bar.X0Validator() - self._validators["xaxis"] = v_bar.XAxisValidator() - self._validators["xcalendar"] = v_bar.XcalendarValidator() - self._validators["xsrc"] = v_bar.XsrcValidator() - self._validators["y"] = v_bar.YValidator() - self._validators["y0"] = v_bar.Y0Validator() - self._validators["yaxis"] = v_bar.YAxisValidator() - self._validators["ycalendar"] = v_bar.YcalendarValidator() - self._validators["ysrc"] = v_bar.YsrcValidator() + @sliderdefaults.setter + def sliderdefaults(self, val): + self["sliderdefaults"] = val - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v - _v = arg.pop("base", None) - self["base"] = base if base is not None else _v - _v = arg.pop("basesrc", None) - self["basesrc"] = basesrc if basesrc is not None else _v - _v = arg.pop("cliponaxis", None) - self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v - _v = arg.pop("constraintext", None) - self["constraintext"] = constraintext if constraintext is not None else _v - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("dx", None) - self["dx"] = dx if dx is not None else _v - _v = arg.pop("dy", None) - self["dy"] = dy if dy is not None else _v - _v = arg.pop("error_x", None) - self["error_x"] = error_x if error_x is not None else _v - _v = arg.pop("error_y", None) - self["error_y"] = error_y if error_y is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v - _v = arg.pop("hoverlabel", None) - self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("hovertemplate", None) - self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v - _v = arg.pop("hovertemplatesrc", None) - self["hovertemplatesrc"] = ( - hovertemplatesrc if hovertemplatesrc is not None else _v - ) - _v = arg.pop("hovertext", None) - self["hovertext"] = hovertext if hovertext is not None else _v - _v = arg.pop("hovertextsrc", None) - self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("insidetextanchor", None) - self["insidetextanchor"] = ( - insidetextanchor if insidetextanchor is not None else _v - ) - _v = arg.pop("insidetextfont", None) - self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v - _v = arg.pop("meta", None) - self["meta"] = meta if meta is not None else _v - _v = arg.pop("metasrc", None) - self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("offset", None) - self["offset"] = offset if offset is not None else _v - _v = arg.pop("offsetgroup", None) - self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v - _v = arg.pop("offsetsrc", None) - self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("orientation", None) - self["orientation"] = orientation if orientation is not None else _v - _v = arg.pop("outsidetextfont", None) - self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v - _v = arg.pop("selected", None) - self["selected"] = selected if selected is not None else _v - _v = arg.pop("selectedpoints", None) - self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v - _v = arg.pop("showlegend", None) - self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - _v = arg.pop("text", None) - self["text"] = text if text is not None else _v - _v = arg.pop("textangle", None) - self["textangle"] = textangle if textangle is not None else _v - _v = arg.pop("textfont", None) - self["textfont"] = textfont if textfont is not None else _v - _v = arg.pop("textposition", None) - self["textposition"] = textposition if textposition is not None else _v - _v = arg.pop("textpositionsrc", None) - self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v - _v = arg.pop("textsrc", None) - self["textsrc"] = textsrc if textsrc is not None else _v - _v = arg.pop("tsrc", None) - self["tsrc"] = tsrc if tsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v - _v = arg.pop("uirevision", None) - self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("unselected", None) - self["unselected"] = unselected if unselected is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - _v = arg.pop("width", None) - self["width"] = width if width is not None else _v - _v = arg.pop("widthsrc", None) - self["widthsrc"] = widthsrc if widthsrc is not None else _v - _v = arg.pop("x", None) - self["x"] = x if x is not None else _v - _v = arg.pop("x0", None) - self["x0"] = x0 if x0 is not None else _v - _v = arg.pop("xaxis", None) - self["xaxis"] = xaxis if xaxis is not None else _v - _v = arg.pop("xcalendar", None) - self["xcalendar"] = xcalendar if xcalendar is not None else _v - _v = arg.pop("xsrc", None) - self["xsrc"] = xsrc if xsrc is not None else _v - _v = arg.pop("y", None) - self["y"] = y if y is not None else _v - _v = arg.pop("y0", None) - self["y0"] = y0 if y0 is not None else _v - _v = arg.pop("yaxis", None) - self["yaxis"] = yaxis if yaxis is not None else _v - _v = arg.pop("ycalendar", None) - self["ycalendar"] = ycalendar if ycalendar is not None else _v - _v = arg.pop("ysrc", None) - self["ysrc"] = ysrc if ysrc is not None else _v + # spikedistance + # ------------- + @property + def spikedistance(self): + """ + Sets the default distance (in pixels) to look for data to draw + spikelines to (-1 means no cutoff, 0 means no looking for + data). As with hoverdistance, distance does not apply to area- + like objects. In addition, some objects can be hovered on but + will not generate spikelines, such as scatter fills. + + The 'spikedistance' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator + Returns + ------- + int + """ + return self["spikedistance"] - self._props["type"] = "bar" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="bar", val="bar" - ) - arg.pop("type", None) + @spikedistance.setter + def spikedistance(self, val): + self["spikedistance"] = val - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) + # sunburstcolorway + # ---------------- + @property + def sunburstcolorway(self): + """ + Sets the default sunburst slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendsunburstcolors`. + + The 'sunburstcolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings - # Reset skip_invalid - # ------------------ - self._skip_invalid = False + Returns + ------- + list + """ + return self["sunburstcolorway"] + @sunburstcolorway.setter + def sunburstcolorway(self, val): + self["sunburstcolorway"] = val -from plotly.basedatatypes import BaseTraceType as _BaseTraceType -import copy as _copy + # template + # -------- + @property + def template(self): + """ + Default attributes to be applied to the plot. This should be a + dict with format: `{'layout': layoutTemplate, 'data': + {trace_type: [traceTemplate, ...], ...}}` where + `layoutTemplate` is a dict matching the structure of + `figure.layout` and `traceTemplate` is a dict matching the + structure of the trace with type `trace_type` (e.g. 'scatter'). + Alternatively, this may be specified as an instance of + plotly.graph_objs.layout.Template. Trace templates are applied + cyclically to traces of each type. Container arrays (eg + `annotations`) have special handling: An object ending in + `defaults` (eg `annotationdefaults`) is applied to each array + item. But if an item has a `templateitemname` key we look in + the template array for an item with matching `name` and apply + that instead. If no matching `name` is found we mark the item + invisible. Any named template item not referenced is appended + to the end of the array, so this can be used to add a watermark + annotation or a logo image, for example. To omit one of these + items on the plot, make an item with matching + `templateitemname` and `visible: false`. + + The 'template' property is an instance of Template + that may be specified as: + - An instance of plotly.graph_objs.layout.Template + - A dict of string/value properties that will be passed + to the Template constructor + + Supported dict properties: + + data + plotly.graph_objects.layout.template.Data + instance or dict with compatible properties + layout + plotly.graph_objects.Layout instance or dict + with compatible properties + + - The name of a registered template where current registered templates + are stored in the plotly.io.templates configuration object. The names + of all registered templates can be retrieved with: + >>> import plotly.io as pio + >>> list(pio.templates) + - A string containing multiple registered template names, joined on '+' + characters (e.g. 'template1+template2'). In this case the resulting + template is computed by merging together the collection of registered + templates + Returns + ------- + plotly.graph_objs.layout.Template + """ + return self["template"] -class Area(_BaseTraceType): + @template.setter + def template(self, val): + self["template"] = val - # customdata - # ---------- + # ternary + # ------- @property - def customdata(self): + def ternary(self): """ - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note that, - "scatter" traces also appends customdata items in the markers - DOM elements + The 'ternary' property is an instance of Ternary + that may be specified as: + - An instance of plotly.graph_objs.layout.Ternary + - A dict of string/value properties that will be passed + to the Ternary constructor - The 'customdata' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + Supported dict properties: + + aaxis + plotly.graph_objects.layout.ternary.Aaxis + instance or dict with compatible properties + baxis + plotly.graph_objects.layout.ternary.Baxis + instance or dict with compatible properties + bgcolor + Set the background color of the subplot + caxis + plotly.graph_objects.layout.ternary.Caxis + instance or dict with compatible properties + domain + plotly.graph_objects.layout.ternary.Domain + instance or dict with compatible properties + sum + The number each triplet should sum to, and the + maximum range of each axis + uirevision + Controls persistence of user-driven changes in + axis `min` and `title`, if not overridden in + the individual axes. Defaults to + `layout.uirevision`. Returns ------- - numpy.ndarray + plotly.graph_objs.layout.Ternary """ - return self["customdata"] + return self["ternary"] - @customdata.setter - def customdata(self, val): - self["customdata"] = val + @ternary.setter + def ternary(self, val): + self["ternary"] = val - # customdatasrc - # ------------- + # title + # ----- @property - def customdatasrc(self): + def title(self): """ - Sets the source reference on plot.ly for customdata . + The 'title' property is an instance of Title + that may be specified as: + - An instance of plotly.graph_objs.layout.Title + - A dict of string/value properties that will be passed + to the Title constructor - The 'customdatasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + font + Sets the title font. Note that the title's font + used to be customized by the now deprecated + `titlefont` attribute. + pad + Sets the padding of the title. Each padding + value only applies when the corresponding + `xanchor`/`yanchor` value is set accordingly. + E.g. for left padding to take effect, `xanchor` + must be set to "left". The same rule applies if + `xanchor`/`yanchor` is determined + automatically. Padding is muted if the + respective anchor value is "middle*/*center". + text + Sets the plot's title. Note that before the + existence of `title.text`, the title's contents + used to be defined as the `title` attribute + itself. This behavior has been deprecated. + x + Sets the x position with respect to `xref` in + normalized coordinates from 0 (left) to 1 + (right). + xanchor + Sets the title's horizontal alignment with + respect to its x position. "left" means that + the title starts at x, "right" means that the + title ends at x and "center" means that the + title's center is at x. "auto" divides `xref` + by three and calculates the `xanchor` value + automatically based on the value of `x`. + xref + Sets the container `x` refers to. "container" + spans the entire `width` of the plot. "paper" + refers to the width of the plotting area only. + y + Sets the y position with respect to `yref` in + normalized coordinates from 0 (bottom) to 1 + (top). "auto" places the baseline of the title + onto the vertical center of the top margin. + yanchor + Sets the title's vertical alignment with + respect to its y position. "top" means that the + title's cap line is at y, "bottom" means that + the title's baseline is at y and "middle" means + that the title's midline is at y. "auto" + divides `yref` by three and calculates the + `yanchor` value automatically based on the + value of `y`. + yref + Sets the container `y` refers to. "container" + spans the entire `height` of the plot. "paper" + refers to the height of the plotting area only. Returns ------- - str + plotly.graph_objs.layout.Title """ - return self["customdatasrc"] + return self["title"] - @customdatasrc.setter - def customdatasrc(self, val): - self["customdatasrc"] = val + @title.setter + def title(self, val): + self["title"] = val - # hoverinfo + # titlefont # --------- @property - def hoverinfo(self): + def titlefont(self): """ - Determines which trace information appear on hover. If `none` - or `skip` are set, no information is displayed upon hovering. - But, if `none` is set, click and hover events are still fired. + Deprecated: Please use layout.title.font instead. Sets the + title font. Note that the title's font used to be customized by + the now deprecated `titlefont` attribute. - The 'hoverinfo' property is a flaglist and may be specified - as a string containing: - - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters - (e.g. 'x+y') - OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') - - A list or array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["hoverinfo"] - - @hoverinfo.setter - def hoverinfo(self, val): - self["hoverinfo"] = val - - # hoverinfosrc - # ------------ - @property - def hoverinfosrc(self): - """ - Sets the source reference on plot.ly for hoverinfo . + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.layout.title.Font + - A dict of string/value properties that will be passed + to the Font constructor - The 'hoverinfosrc' property must be specified as a string or - as a plotly.grid_objs.Column object + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size Returns ------- - str + """ - return self["hoverinfosrc"] + return self["titlefont"] - @hoverinfosrc.setter - def hoverinfosrc(self, val): - self["hoverinfosrc"] = val + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val - # hoverlabel + # transition # ---------- @property - def hoverlabel(self): + def transition(self): """ - The 'hoverlabel' property is an instance of Hoverlabel + Sets transition options used during Plotly.react updates. + + The 'transition' property is an instance of Transition that may be specified as: - - An instance of plotly.graph_objs.area.Hoverlabel + - An instance of plotly.graph_objs.layout.Transition - A dict of string/value properties that will be passed - to the Hoverlabel constructor + to the Transition constructor Supported dict properties: - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . + duration + The duration of the transition, in + milliseconds. If equal to zero, updates are + synchronous. + easing + The easing function used for the transition + ordering + Determines whether the figure's layout or + traces smoothly transitions during updates that + make both traces and layout change. Returns ------- - plotly.graph_objs.area.Hoverlabel + plotly.graph_objs.layout.Transition """ - return self["hoverlabel"] + return self["transition"] - @hoverlabel.setter - def hoverlabel(self, val): - self["hoverlabel"] = val + @transition.setter + def transition(self, val): + self["transition"] = val - # ids - # --- + # treemapcolorway + # --------------- @property - def ids(self): + def treemapcolorway(self): """ - Assigns id labels to each datum. These ids for object constancy - of data points during animation. Should be an array of strings, - not numbers or any other type. + Sets the default treemap slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendtreemapcolors`. - The 'ids' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'treemapcolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings Returns ------- - numpy.ndarray + list """ - return self["ids"] + return self["treemapcolorway"] - @ids.setter - def ids(self, val): - self["ids"] = val + @treemapcolorway.setter + def treemapcolorway(self, val): + self["treemapcolorway"] = val - # idssrc - # ------ + # uirevision + # ---------- @property - def idssrc(self): + def uirevision(self): """ - Sets the source reference on plot.ly for ids . + Used to allow user interactions with the plot to persist after + `Plotly.react` calls that are unaware of these interactions. If + `uirevision` is omitted, or if it is given and it changed from + the previous `Plotly.react` call, the exact new figure is used. + If `uirevision` is truthy and did NOT change, any attribute + that has been affected by user interactions and did not receive + a different value in the new figure will keep the interaction + value. `layout.uirevision` attribute serves as the default for + `uirevision` attributes in various sub-containers. For finer + control you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y axes + you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is changed, + you can update `yaxis.uirevision=*quantity*` and the y axis + range will reset but the x axis range will retain any user- + driven zoom. - The 'idssrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'uirevision' property accepts values of any type Returns ------- - str + Any """ - return self["idssrc"] + return self["uirevision"] - @idssrc.setter - def idssrc(self, val): - self["idssrc"] = val + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val - # legendgroup + # updatemenus # ----------- @property - def legendgroup(self): + def updatemenus(self): """ - Sets the legend group for this trace. Traces part of the same - legend group hide/show at the same time when toggling legend - items. + The 'updatemenus' property is a tuple of instances of + Updatemenu that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Updatemenu + - A list or tuple of dicts of string/value properties that + will be passed to the Updatemenu constructor - The 'legendgroup' property is a string and must be specified as: - - A string - - A number that will be converted to a string + Supported dict properties: + + active + Determines which button (by index starting from + 0) is considered active. + bgcolor + Sets the background color of the update menu + buttons. + bordercolor + Sets the color of the border enclosing the + update menu. + borderwidth + Sets the width (in px) of the border enclosing + the update menu. + buttons + A tuple of + plotly.graph_objects.layout.updatemenu.Button + instances or dicts with compatible properties + buttondefaults + When used in a template (as layout.template.lay + out.updatemenu.buttondefaults), sets the + default property values to use for elements of + layout.updatemenu.buttons + direction + Determines the direction in which the buttons + are laid out, whether in a dropdown menu or a + row/column of buttons. For `left` and `up`, the + buttons will still appear in left-to-right or + top-to-bottom order respectively. + font + Sets the font of the update menu button text. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + pad + Sets the padding around the buttons or dropdown + menu. + showactive + Highlights active dropdown item or active + button if true. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + type + Determines whether the buttons are accessible + via a dropdown menu or whether the buttons are + stacked horizontally or vertically + visible + Determines whether or not the update menu is + visible. + x + Sets the x position (in normalized coordinates) + of the update menu. + xanchor + Sets the update menu's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the range + selector. + y + Sets the y position (in normalized coordinates) + of the update menu. + yanchor + Sets the update menu's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the range + selector. Returns ------- - str + tuple[plotly.graph_objs.layout.Updatemenu] """ - return self["legendgroup"] + return self["updatemenus"] - @legendgroup.setter - def legendgroup(self, val): - self["legendgroup"] = val + @updatemenus.setter + def updatemenus(self, val): + self["updatemenus"] = val - # marker - # ------ + # updatemenudefaults + # ------------------ @property - def marker(self): + def updatemenudefaults(self): """ - The 'marker' property is an instance of Marker + When used in a template (as + layout.template.layout.updatemenudefaults), sets the default + property values to use for elements of layout.updatemenus + + The 'updatemenudefaults' property is an instance of Updatemenu that may be specified as: - - An instance of plotly.graph_objs.area.Marker + - An instance of plotly.graph_objs.layout.Updatemenu - A dict of string/value properties that will be passed - to the Marker constructor + to the Updatemenu constructor Supported dict properties: - - color - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets themarkercolor. - It accepts either a specific color or an array - of numbers that are mapped to the colorscale - relative to the max and min values of the array - or relative to `marker.cmin` and `marker.cmax` - if set. - colorsrc - Sets the source reference on plot.ly for color - . - opacity - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker - opacity. - opacitysrc - Sets the source reference on plot.ly for - opacity . - size - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker size - (in px). - sizesrc - Sets the source reference on plot.ly for size - . - symbol - Area traces are deprecated! Please switch to - the "barpolar" trace type. Sets the marker - symbol type. Adding 100 is equivalent to - appending "-open" to a symbol name. Adding 200 - is equivalent to appending "-dot" to a symbol - name. Adding 300 is equivalent to appending - "-open-dot" or "dot-open" to a symbol name. - symbolsrc - Sets the source reference on plot.ly for - symbol . Returns ------- - plotly.graph_objs.area.Marker + plotly.graph_objs.layout.Updatemenu """ - return self["marker"] + return self["updatemenudefaults"] - @marker.setter - def marker(self, val): - self["marker"] = val + @updatemenudefaults.setter + def updatemenudefaults(self, val): + self["updatemenudefaults"] = val - # meta - # ---- + # violingap + # --------- @property - def meta(self): + def violingap(self): """ - Assigns extra meta information associated with this trace that - can be used in various text attributes. Attributes such as - trace `name`, graph, axis and colorbar `title.text`, annotation - `text` `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` values in - an attribute in the same trace, simply use `%{meta[i]}` where - `i` is the index or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or key of the - `meta` and `n` is the trace index. + Sets the gap (in plot fraction) between violins of adjacent + location coordinates. Has no effect on traces that have "width" + set. - The 'meta' property accepts values of any type + The 'violingap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - Any|numpy.ndarray + int|float """ - return self["meta"] + return self["violingap"] - @meta.setter - def meta(self, val): - self["meta"] = val + @violingap.setter + def violingap(self, val): + self["violingap"] = val + + # violingroupgap + # -------------- + @property + def violingroupgap(self): + """ + Sets the gap (in plot fraction) between violins of the same + location coordinate. Has no effect on traces that have "width" + set. + + The 'violingroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["violingroupgap"] + + @violingroupgap.setter + def violingroupgap(self, val): + self["violingroupgap"] = val - # metasrc - # ------- + # violinmode + # ---------- @property - def metasrc(self): + def violinmode(self): """ - Sets the source reference on plot.ly for meta . + Determines how violins at the same location coordinate are + displayed on the graph. If "group", the violins are plotted + next to one another centered around the shared location. If + "overlay", the violins are plotted over one another, you might + need to set "opacity" to see them multiple violins. Has no + effect on traces that have "width" set. - The 'metasrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'violinmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] Returns ------- - str + Any """ - return self["metasrc"] + return self["violinmode"] - @metasrc.setter - def metasrc(self, val): - self["metasrc"] = val + @violinmode.setter + def violinmode(self, val): + self["violinmode"] = val - # name - # ---- + # waterfallgap + # ------------ @property - def name(self): + def waterfallgap(self): """ - Sets the trace name. The trace name appear as the legend item - and on hover. + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. - The 'name' property is a string and must be specified as: - - A string - - A number that will be converted to a string + The 'waterfallgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] Returns ------- - str + int|float """ - return self["name"] + return self["waterfallgap"] - @name.setter - def name(self, val): - self["name"] = val + @waterfallgap.setter + def waterfallgap(self, val): + self["waterfallgap"] = val - # opacity - # ------- + # waterfallgroupgap + # ----------------- @property - def opacity(self): + def waterfallgroupgap(self): """ - Sets the opacity of the trace. + Sets the gap (in plot fraction) between bars of the same + location coordinate. - The 'opacity' property is a number and may be specified as: + The 'waterfallgroupgap' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ - return self["opacity"] + return self["waterfallgroupgap"] - @opacity.setter - def opacity(self, val): - self["opacity"] = val + @waterfallgroupgap.setter + def waterfallgroupgap(self, val): + self["waterfallgroupgap"] = val - # r - # - + # waterfallmode + # ------------- @property - def r(self): + def waterfallmode(self): """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the radial coordinates for legacy polar chart - only. + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are plotted next + to one another centered around the shared location. With + "overlay", the bars are plotted over one another, you might + need to an "opacity" to see multiple bars. - The 'r' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series + The 'waterfallmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] Returns ------- - numpy.ndarray + Any """ - return self["r"] + return self["waterfallmode"] - @r.setter - def r(self, val): - self["r"] = val + @waterfallmode.setter + def waterfallmode(self, val): + self["waterfallmode"] = val - # rsrc - # ---- + # width + # ----- @property - def rsrc(self): + def width(self): """ - Sets the source reference on plot.ly for r . + Sets the plot's width (in px). - The 'rsrc' property must be specified as a string or - as a plotly.grid_objs.Column object + The 'width' property is a number and may be specified as: + - An int or float in the interval [10, inf] Returns ------- - str + int|float """ - return self["rsrc"] + return self["width"] - @rsrc.setter - def rsrc(self, val): - self["rsrc"] = val + @width.setter + def width(self, val): + self["width"] = val - # showlegend - # ---------- + # xaxis + # ----- @property - def showlegend(self): + def xaxis(self): """ - Determines whether or not an item corresponding to this trace - is shown in the legend. + The 'xaxis' property is an instance of XAxis + that may be specified as: + - An instance of plotly.graph_objs.layout.XAxis + - A dict of string/value properties that will be passed + to the XAxis constructor - The 'showlegend' property must be specified as a bool - (either True, or False) + Supported dict properties: + + anchor + If set to an opposite-letter axis id (e.g. + `x2`, `y`), this axis is bound to the + corresponding opposite-letter axis. If set to + "free", this axis' position is determined by + `position`. + automargin + Determines whether long tick labels + automatically grow the figure margins. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on plot.ly for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + constrain + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines how that + happens: by increasing the "range" (default), + or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines which + direction we push the originally specified plot + area. Options are "left", "center" (default), + and "right" for x axes, and "top", "middle" + (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an + effect on "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has + an effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot + fraction). + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the + range of this axis will match the range of the + corresponding axis in data-coordinates space. + Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that + matching axes must have the same `type`. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + overlaying + If set a same-letter axis id, this axis is + overlaid on top of the corresponding same- + letter axis, with traces and axes visible for + both axes. If False, this axis does not overlay + any same-letter axes. In this case, for axes + with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting + space (in normalized coordinates). Only has an + effect if `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + rangeselector + plotly.graph_objects.layout.xaxis.Rangeselector + instance or dict with compatible properties + rangeslider + plotly.graph_objects.layout.xaxis.Rangeslider + instance or dict with compatible properties + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the + range of this axis changes together with the + range of the corresponding axis such that the + scale of pixels per unit is in a constant + ratio. Both axes are still zoomable, but when + you zoom one, the other will zoom the same + amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce + the constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` + but you can only link axes of the same `type`. + The linked axis can have the opposite letter + (to constrain the aspect ratio) or the same + letter (to match scales across subplots). Loops + (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant + and the last constraint encountered will be + ignored to avoid possible inconsistent + constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and + a `matches` constraint is currently forbidden. + scaleratio + If this axis is linked to another by + `scaleanchor`, this determines the pixel to + unit scale ratio. For example, if this value is + 10, then every unit on this axis spans 10 times + the number of pixels as a unit on the linked + axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn + between the category levels of this axis. Only + has an effect on "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Determines whether or not spikes (aka + droplines) are drawn for this axis. Note: This + only takes affect when hovermode = closest + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned + at the "bottom" ("left") or "top" ("right") of + the plotting area. + spikecolor + Sets the spike color. If undefined, will use + the series color + spikedash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line + If "toaxis", the line is drawn from the data + point to the axis the series is plotted on. If + "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If + "marker", then a marker dot is drawn on the + axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the + cursor or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.layout.xaxis.Ti + ckformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.xaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.xaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn + with respect to their corresponding tick + labels. Only has an effect for axes of `type` + "category" or "multicategory". When set to + "boundaries", ticks and grid lines are drawn + half a category to the left/bottom of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.layout.xaxis.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.xaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be customized by the + now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, and `title` if in + `editable: true` configuration. Defaults to + `layout.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. Returns ------- - bool + plotly.graph_objs.layout.XAxis """ - return self["showlegend"] + return self["xaxis"] - @showlegend.setter - def showlegend(self, val): - self["showlegend"] = val + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val - # stream - # ------ + # yaxis + # ----- @property - def stream(self): + def yaxis(self): """ - The 'stream' property is an instance of Stream + The 'yaxis' property is an instance of YAxis that may be specified as: - - An instance of plotly.graph_objs.area.Stream + - An instance of plotly.graph_objs.layout.YAxis - A dict of string/value properties that will be passed - to the Stream constructor + to the YAxis constructor Supported dict properties: - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See - https://plot.ly/settings for more details. - - Returns - ------- - plotly.graph_objs.area.Stream - """ - return self["stream"] - - @stream.setter - def stream(self, val): - self["stream"] = val - - # t - # - - @property - def t(self): - """ - Area traces are deprecated! Please switch to the "barpolar" - trace type. Sets the angular coordinates for legacy polar chart - only. - - The 't' property is an array that may be specified as a tuple, - list, numpy array, or pandas Series - - Returns - ------- - numpy.ndarray - """ - return self["t"] - - @t.setter - def t(self, val): - self["t"] = val - - # tsrc - # ---- - @property - def tsrc(self): - """ - Sets the source reference on plot.ly for t . - - The 'tsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["tsrc"] - - @tsrc.setter - def tsrc(self, val): - self["tsrc"] = val - - # uid - # --- - @property - def uid(self): - """ - Assign an id to this trace, Use this to provide object - constancy between traces during animations and transitions. - - The 'uid' property is a string and must be specified as: - - A string - - A number that will be converted to a string - - Returns - ------- - str - """ - return self["uid"] - - @uid.setter - def uid(self, val): - self["uid"] = val - - # uirevision - # ---------- - @property - def uirevision(self): - """ - Controls persistence of some user-driven changes to the trace: - `constraintrange` in `parcoords` traces, as well as some - `editable: true` modifications such as `name` and - `colorbar.title`. Defaults to `layout.uirevision`. Note that - other user-driven trace attribute changes are controlled by - `layout` attributes: `trace.visible` is controlled by - `layout.legend.uirevision`, `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` (accessible - with `config: {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are tracked by `uid`, - which only falls back on trace index if no `uid` is provided. - So if your app can add/remove traces before the end of the - `data` array, such that the same trace has a different index, - you can still preserve user-driven changes if you give each - trace a `uid` that stays with it as it moves. - - The 'uirevision' property accepts values of any type - - Returns - ------- - Any - """ - return self["uirevision"] - - @uirevision.setter - def uirevision(self, val): - self["uirevision"] = val - - # visible - # ------- - @property - def visible(self): - """ - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as a - legend item (provided that the legend itself is visible). - - The 'visible' property is an enumeration that may be specified as: - - One of the following enumeration values: - [True, False, 'legendonly'] + anchor + If set to an opposite-letter axis id (e.g. + `x2`, `y`), this axis is bound to the + corresponding opposite-letter axis. If set to + "free", this axis' position is determined by + `position`. + automargin + Determines whether long tick labels + automatically grow the figure margins. + autorange + Determines whether or not the range of this + axis is computed in relation to the input data. + See `rangemode` for more info. If `range` is + provided, then `autorange` is set to False. + calendar + Sets the calendar system to use for `range` and + `tick0` if this is a date axis. This does not + set the calendar for interpreting data on this + axis, that's specified in the trace or via the + global `layout.calendar` + categoryarray + Sets the order in which categories on this axis + appear. Only has an effect if `categoryorder` + is set to "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on plot.ly for + categoryarray . + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses + "trace", which specifies the order that is + present in the data supplied. Set + `categoryorder` to *category ascending* or + *category descending* if order should be + determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" + to derive the ordering from the attribute + `categoryarray`. If a category is not found in + the `categoryarray` array, the sorting behavior + for that attribute will be identical to the + "trace" mode. The unspecified categories will + follow the categories in `categoryarray`. Set + `categoryorder` to *total ascending* or *total + descending* if order should be determined by + the numerical order of the values. Similarly, + the order can be determined by the min, max, + sum, mean or median of all the values. + color + Sets default for all colors associated with + this axis all at once: line, font, tick, and + grid colors. Grid color is lightened by + blending this with the plot background + Individual pieces can override this. + constrain + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines how that + happens: by increasing the "range" (default), + or by decreasing the "domain". + constraintoward + If this axis needs to be compressed (either due + to its own `scaleanchor` and `scaleratio` or + those of the other axis), determines which + direction we push the originally specified plot + area. Options are "left", "center" (default), + and "right" for x axes, and "top", "middle" + (default), and "bottom" for y axes. + dividercolor + Sets the color of the dividers Only has an + effect on "multicategory" axes. + dividerwidth + Sets the width (in px) of the dividers Only has + an effect on "multicategory" axes. + domain + Sets the domain of this axis (in plot + fraction). + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom- + able. If true, then zoom is disabled. + gridcolor + Sets the color of the grid lines. + gridwidth + Sets the width (in px) of the grid lines. + hoverformat + Sets the hover text formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + layer + Sets the layer on which this axis is displayed. + If *above traces*, this axis is displayed above + all the subplot's traces If *below traces*, + this axis is displayed below all the subplot's + traces, but above the grid lines. Useful when + used together with scatter-like traces with + `cliponaxis` set to False to show markers + and/or text nodes above this axis. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + matches + If set to another axis id (e.g. `x2`, `y`), the + range of this axis will match the range of the + corresponding axis in data-coordinates space. + Moreover, matching axes share auto-range + values, category lists and histogram auto-bins. + Note that setting axes simultaneously in both a + `scaleanchor` and a `matches` constraint is + currently forbidden. Moreover, note that + matching axes must have the same `type`. + mirror + Determines if the axis lines or/and ticks are + mirrored to the opposite side of the plotting + area. If True, the axis lines are mirrored. If + "ticks", the axis lines and ticks are mirrored. + If False, mirroring is disable. If "all", axis + lines are mirrored on all shared-axes subplots. + If "allticks", axis lines and ticks are + mirrored on all shared-axes subplots. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + overlaying + If set a same-letter axis id, this axis is + overlaid on top of the corresponding same- + letter axis, with traces and axes visible for + both axes. If False, this axis does not overlay + any same-letter axes. In this case, for axes + with overlapping domains only the highest- + numbered axis will be visible. + position + Sets the position of this axis in the plotting + space (in normalized coordinates). Only has an + effect if `anchor` is set to "free". + range + Sets the range of this axis. If the axis `type` + is "log", then you must take the log of your + desired range (e.g. to set the range from 1 to + 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, + like date data, though Date objects and unix + milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it + should be numbers, using the scale where each + category is assigned a serial number from zero + in the order it appears. + rangemode + If "normal", the range is computed in relation + to the extrema of the input data. If *tozero*`, + the range extends to 0, regardless of the input + data If "nonnegative", the range is non- + negative, regardless of the input data. Applies + only to linear axes. + scaleanchor + If set to another axis id (e.g. `x2`, `y`), the + range of this axis changes together with the + range of the corresponding axis such that the + scale of pixels per unit is in a constant + ratio. Both axes are still zoomable, but when + you zoom one, the other will zoom the same + amount, keeping a fixed midpoint. `constrain` + and `constraintoward` determine how we enforce + the constraint. You can chain these, ie `yaxis: + {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` + but you can only link axes of the same `type`. + The linked axis can have the opposite letter + (to constrain the aspect ratio) or the same + letter (to match scales across subplots). Loops + (`yaxis: {scaleanchor: *x*}, xaxis: + {scaleanchor: *y*}` or longer) are redundant + and the last constraint encountered will be + ignored to avoid possible inconsistent + constraints via `scaleratio`. Note that setting + axes simultaneously in both a `scaleanchor` and + a `matches` constraint is currently forbidden. + scaleratio + If this axis is linked to another by + `scaleanchor`, this determines the pixel to + unit scale ratio. For example, if this value is + 10, then every unit on this axis spans 10 times + the number of pixels as a unit on the linked + axis. Use this for example to create an + elevation profile where the vertical scale is + exaggerated a fixed amount with respect to the + horizontal. + separatethousands + If "true", even 4-digit integers are separated + showdividers + Determines whether or not a dividers are drawn + between the category levels of this axis. Only + has an effect on "multicategory" axes. + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showgrid + Determines whether or not grid lines are drawn. + If True, the grid lines are drawn at every tick + mark. + showline + Determines whether or not a line bounding this + axis is drawn. + showspikes + Determines whether or not spikes (aka + droplines) are drawn for this axis. Note: This + only takes affect when hovermode = closest + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + side + Determines whether a x (y) axis is positioned + at the "bottom" ("left") or "top" ("right") of + the plotting area. + spikecolor + Sets the spike color. If undefined, will use + the series color + spikedash + Sets the dash style of lines. Set to a dash + type string ("solid", "dot", "dash", + "longdash", "dashdot", or "longdashdot") or a + dash length list in px (eg "5px,10px,2px,2px"). + spikemode + Determines the drawing mode for the spike line + If "toaxis", the line is drawn from the data + point to the axis the series is plotted on. If + "across", the line is drawn across the entire + plot area, and supercedes "toaxis". If + "marker", then a marker dot is drawn on the + axis the series is plotted on + spikesnap + Determines whether spikelines are stuck to the + cursor or to the closest datapoints. + spikethickness + Sets the width (in px) of the zero line. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.layout.yaxis.Ti + ckformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.lay + out.yaxis.tickformatstopdefaults), sets the + default property values to use for elements of + layout.yaxis.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + tickson + Determines where ticks and grid lines are drawn + with respect to their corresponding tick + labels. Only has an effect for axes of `type` + "category" or "multicategory". When set to + "boundaries", ticks and grid lines are drawn + half a category to the left/bottom of labels. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.layout.yaxis.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use layout.yaxis.title.font + instead. Sets this axis' title font. Note that + the title's font used to be customized by the + now deprecated `titlefont` attribute. + type + Sets the axis type. By default, plotly attempts + to determined the axis type by looking into the + data of the traces that referenced the axis in + question. + uirevision + Controls persistence of user-driven changes in + axis `range`, `autorange`, and `title` if in + `editable: true` configuration. Defaults to + `layout.uirevision`. + visible + A single toggle to hide the axis while + preserving interaction like dragging. Default + is true when a cheater plot is present on the + axis, otherwise false + zeroline + Determines whether or not a line is drawn at + along the 0 value of this axis. If True, the + zero line is drawn on top of the grid lines. + zerolinecolor + Sets the line color of the zero line. + zerolinewidth + Sets the width (in px) of the zero line. Returns ------- - Any + plotly.graph_objs.layout.YAxis """ - return self["visible"] - - @visible.setter - def visible(self, val): - self["visible"] = val + return self["yaxis"] - # type - # ---- - @property - def type(self): - return self._props["type"] + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val # property parent name # -------------------- @@ -92040,239 +95111,934 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . + angularaxis + plotly.graph_objects.layout.AngularAxis instance or + dict with compatible properties + annotations + A tuple of plotly.graph_objects.layout.Annotation + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), sets the + default property values to use for elements of + layout.annotations + autosize + Determines whether or not a layout width or height that + has been left undefined by the user is initialized on + each relayout. Note that, regardless of this attribute, + an undefined layout width or height is always + initialized on the first call to plot. + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "relative", the bars + are stacked on top of one another, with negative values + below the axis, positive values above With "group", the + bars are plotted next to one another centered around + the shared location. With "overlay", the bars are + plotted over one another, you might need to an + "opacity" to see multiple bars. + barnorm + Sets the normalization for bar traces on the graph. + With "fraction", the value of each bar is divided by + the sum of all values at that location coordinate. + "percent" is the same but multiplied by 100 to show + percentages. + boxgap + Sets the gap (in plot fraction) between boxes of + adjacent location coordinates. Has no effect on traces + that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes of the + same location coordinate. Has no effect on traces that + have "width" set. + boxmode + Determines how boxes at the same location coordinate + are displayed on the graph. If "group", the boxes are + plotted next to one another centered around the shared + location. If "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see them + multiple boxes. Has no effect on traces that have + "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout the plot. + clickmode + Determines the mode of single click interactions. + "event" is the default value and emits the + `plotly_click` event. In addition this mode emits the + `plotly_selected` event in drag modes "lasso" and + "select", but with no event data attached (kept for + compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also + supports persistent selections, meaning that pressing + Shift while clicking, adds to / subtracts from an + existing selection. "select" with `hovermode`: "x" can + be confusing, consider explicitly setting `hovermode`: + "closest" when using this feature. Selection events are + sent accordingly as long as "event" flag is set as + well. When the "event" flag is missing, `plotly_click` + and `plotly_selected` events are not fired. + coloraxis + plotly.graph_objects.layout.Coloraxis instance or dict + with compatible properties + colorscale + plotly.graph_objects.layout.Colorscale instance or dict + with compatible properties + colorway + Sets the default trace colors. + datarevision + If provided, a changed value tells `Plotly.react` that + one or more data arrays has changed. This way you can + modify arrays in-place rather than making a complete + new copy for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are being + treated as immutable, thus any data array with a + different identity from its predecessor contains new + data. + direction + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the direction corresponding to + positive angles in legacy polar charts. + dragmode + Determines the mode of drag interactions. "select" and + "lasso" apply only to scatter traces with markers or + text. "orbit" and "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than trace names + and axis titles. Defaults to `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether given + by `funnelareacolorway` or inherited from `colorway`) + will be extended to three times its original length by + first repeating every color 20% lighter then each color + 20% darker. This is intended to reduce the likelihood + of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in + the trace, using `marker.colors`, are never extended. + extendpiecolors + If `true`, the pie slice colors (whether given by + `piecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will + be extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + font + Sets the global font. Note that fonts used in traces + and other layout components inherit from the global + font. + funnelareacolorway + Sets the default funnelarea slice colors. Defaults to + the main `colorway` used for trace colors. If you + specify a new list here it can still be extended with + lighter and darker colors, see + `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + funnelmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "group", the bars + are plotted next to one another centered around the + shared location. With "overlay", the bars are plotted + over one another, you might need to an "opacity" to see + multiple bars. + geo + plotly.graph_objects.layout.Geo instance or dict with + compatible properties + grid + plotly.graph_objects.layout.Grid instance or dict with + compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, + and can simultaneously hide slices from several + pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on plot.ly for hiddenlabels + . + hidesources + Determines whether or not a text link citing the data + source is placed at the bottom-right cored of the + figure. Has only an effect only on graphs that have + been generated via forked graphs from the plotly + service (at https://plot.ly or on-premise). + hoverdistance + Sets the default distance (in pixels) to look for data + to add hover labels (-1 means no cutoff, 0 means no + looking for data). This is only a real distance for + hovering on point-like objects, like scatter points. + For area-like objects (bars, scatter fills, etc) + hovering is on inside the area and off outside, but + these objects will not supersede hover on point-like + objects in case of conflict. hoverlabel - plotly.graph_objects.area.Hoverlabel instance or dict + plotly.graph_objects.layout.Hoverlabel instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.area.Marker instance or dict with + hovermode + Determines the mode of hover interactions. If + `clickmode` includes the "select" flag, `hovermode` + defaults to "closest". If `clickmode` lacks the + "select" flag, it defaults to "x" or "y" (depending on + the trace's `orientation` value) for plots based on + cartesian coordinates. For anything else the default + value is "closest". + images + A tuple of plotly.graph_objects.layout.Image instances + or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + legend + plotly.graph_objects.layout.Legend instance or dict + with compatible properties + mapbox + plotly.graph_objects.layout.Mapbox instance or dict + with compatible properties + margin + plotly.graph_objects.layout.Margin instance or dict + with compatible properties + meta + Assigns extra meta information that can be used in + various `text` attributes. Attributes such as the + graph, axis and colorbar `title.text`, annotation + `text` `trace.name` in legend items, `rangeselector`, + `updatemenus` and `sliders` `label` text all support + `meta`. One can access `meta` fields using template + strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object + for example `{key: value}` which can be accessed + %{meta[key]}. + metasrc + Sets the source reference on plot.ly for meta . + modebar + plotly.graph_objects.layout.Modebar instance or dict + with compatible properties + orientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Rotates the entire polar by the given + angle in legacy polar charts. + paper_bgcolor + Sets the color of paper where the graph is drawn. + piecolorway + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new + list here it can still be extended with lighter and + darker colors, see `extendpiecolors`. + plot_bgcolor + Sets the color of plotting area in-between x and y + axes. + polar + plotly.graph_objects.layout.Polar instance or dict with + compatible properties + radialaxis + plotly.graph_objects.layout.RadialAxis instance or dict + with compatible properties + scene + plotly.graph_objects.layout.Scene instance or dict with + compatible properties + selectdirection + When "dragmode" is set to "select", this limits the + selection of the drag to horizontal, vertical or + diagonal. "h" only allows horizontal selection, "v" + only vertical, "d" only diagonal and "any" sets no + limit. + selectionrevision + Controls persistence of user-driven changes in selected + points from all traces. + separators + Sets the decimal and thousand separators. For example, + *. * puts a '.' before decimals and a space between + thousands. In English locales, dflt is ".," but other + locales may alter this default. + shapes + A tuple of plotly.graph_objects.layout.Shape instances + or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + showlegend + Determines whether or not a legend is drawn. Default is + `true` if there is a trace to show and any of these: a) + Two or more traces would by default be shown in the + legend. b) One pie trace is shown in the legend. c) One + trace is explicitly given with `showlegend: true`. + sliders + A tuple of plotly.graph_objects.layout.Slider instances + or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets the + default property values to use for elements of + layout.sliders + spikedistance + Sets the default distance (in pixels) to look for data + to draw spikelines to (-1 means no cutoff, 0 means no + looking for data). As with hoverdistance, distance does + not apply to area-like objects. In addition, some + objects can be hovered on but will not generate + spikelines, such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. This + should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: [traceTemplate, + ...], ...}}` where `layoutTemplate` is a dict matching + the structure of `figure.layout` and `traceTemplate` is + a dict matching the structure of the trace with type + `trace_type` (e.g. 'scatter'). Alternatively, this may + be specified as an instance of + plotly.graph_objs.layout.Template. Trace templates are + applied cyclically to traces of each type. Container + arrays (eg `annotations`) have special handling: An + object ending in `defaults` (eg `annotationdefaults`) + is applied to each array item. But if an item has a + `templateitemname` key we look in the template array + for an item with matching `name` and apply that + instead. If no matching `name` is found we mark the + item invisible. Any named template item not referenced + is appended to the end of the array, so this can be + used to add a watermark annotation or a logo image, for + example. To omit one of these items on the plot, make + an item with matching `templateitemname` and `visible: + false`. + ternary + plotly.graph_objects.layout.Ternary instance or dict + with compatible properties + title + plotly.graph_objects.layout.Title instance or dict with + compatible properties + titlefont + Deprecated: Please use layout.title.font instead. Sets + the title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + transition + Sets transition options used during Plotly.react + updates. + treemapcolorway + Sets the default treemap slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendtreemapcolors`. + uirevision + Used to allow user interactions with the plot to + persist after `Plotly.react` calls that are unaware of + these interactions. If `uirevision` is omitted, or if + it is given and it changed from the previous + `Plotly.react` call, the exact new figure is used. If + `uirevision` is truthy and did NOT change, any + attribute that has been affected by user interactions + and did not receive a different value in the new figure + will keep the interaction value. `layout.uirevision` + attribute serves as the default for `uirevision` + attributes in various sub-containers. For finer control + you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y + axes you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is + changed, you can update `yaxis.uirevision=*quantity*` + and the y axis range will reset but the x axis range + will retain any user-driven zoom. + updatemenus + A tuple of plotly.graph_objects.layout.Updatemenu + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), sets the + default property values to use for elements of + layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins of + adjacent location coordinates. Has no effect on traces + that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins of the + same location coordinate. Has no effect on traces that + have "width" set. + violinmode + Determines how violins at the same location coordinate + are displayed on the graph. If "group", the violins are + plotted next to one another centered around the shared + location. If "overlay", the violins are plotted over + one another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces that + have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + waterfallmode + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are + plotted next to one another centered around the shared + location. With "overlay", the bars are plotted over one + another, you might need to an "opacity" to see multiple + bars. + width + Sets the plot's width (in px). + xaxis + plotly.graph_objects.layout.XAxis instance or dict with compatible properties - meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. - metasrc - Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the radial coordinates for - legacy polar chart only. - rsrc - Sets the source reference on plot.ly for r . - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - plotly.graph_objects.area.Stream instance or dict with + yaxis + plotly.graph_objects.layout.YAxis instance or dict with compatible properties - t - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the angular coordinates for - legacy polar chart only. - tsrc - Sets the source reference on plot.ly for t . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. - uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). """ + _mapped_properties = {"titlefont": ("title", "font")} + def __init__( self, arg=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, + angularaxis=None, + annotations=None, + annotationdefaults=None, + autosize=None, + bargap=None, + bargroupgap=None, + barmode=None, + barnorm=None, + boxgap=None, + boxgroupgap=None, + boxmode=None, + calendar=None, + clickmode=None, + coloraxis=None, + colorscale=None, + colorway=None, + datarevision=None, + direction=None, + dragmode=None, + editrevision=None, + extendfunnelareacolors=None, + extendpiecolors=None, + extendsunburstcolors=None, + extendtreemapcolors=None, + font=None, + funnelareacolorway=None, + funnelgap=None, + funnelgroupgap=None, + funnelmode=None, + geo=None, + grid=None, + height=None, + hiddenlabels=None, + hiddenlabelssrc=None, + hidesources=None, + hoverdistance=None, hoverlabel=None, - ids=None, - idssrc=None, - legendgroup=None, - marker=None, + hovermode=None, + images=None, + imagedefaults=None, + legend=None, + mapbox=None, + margin=None, meta=None, metasrc=None, - name=None, - opacity=None, - r=None, - rsrc=None, + modebar=None, + orientation=None, + paper_bgcolor=None, + piecolorway=None, + plot_bgcolor=None, + polar=None, + radialaxis=None, + scene=None, + selectdirection=None, + selectionrevision=None, + separators=None, + shapes=None, + shapedefaults=None, showlegend=None, - stream=None, - t=None, - tsrc=None, - uid=None, + sliders=None, + sliderdefaults=None, + spikedistance=None, + sunburstcolorway=None, + template=None, + ternary=None, + title=None, + titlefont=None, + transition=None, + treemapcolorway=None, uirevision=None, - visible=None, + updatemenus=None, + updatemenudefaults=None, + violingap=None, + violingroupgap=None, + violinmode=None, + waterfallgap=None, + waterfallgroupgap=None, + waterfallmode=None, + width=None, + xaxis=None, + yaxis=None, **kwargs ): """ - Construct a new Area object + Construct a new Layout object Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.Area - customdata - Assigns extra data each datum. This may be useful when - listening to hover, click and selection events. Note - that, "scatter" traces also appends customdata items in - the markers DOM elements - customdatasrc - Sets the source reference on plot.ly for customdata . - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.area.Hoverlabel instance or dict + an instance of plotly.graph_objs.Layout + angularaxis + plotly.graph_objects.layout.AngularAxis instance or + dict with compatible properties + annotations + A tuple of plotly.graph_objects.layout.Annotation + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), sets the + default property values to use for elements of + layout.annotations + autosize + Determines whether or not a layout width or height that + has been left undefined by the user is initialized on + each relayout. Note that, regardless of this attribute, + an undefined layout width or height is always + initialized on the first call to plot. + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "relative", the bars + are stacked on top of one another, with negative values + below the axis, positive values above With "group", the + bars are plotted next to one another centered around + the shared location. With "overlay", the bars are + plotted over one another, you might need to an + "opacity" to see multiple bars. + barnorm + Sets the normalization for bar traces on the graph. + With "fraction", the value of each bar is divided by + the sum of all values at that location coordinate. + "percent" is the same but multiplied by 100 to show + percentages. + boxgap + Sets the gap (in plot fraction) between boxes of + adjacent location coordinates. Has no effect on traces + that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes of the + same location coordinate. Has no effect on traces that + have "width" set. + boxmode + Determines how boxes at the same location coordinate + are displayed on the graph. If "group", the boxes are + plotted next to one another centered around the shared + location. If "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see them + multiple boxes. Has no effect on traces that have + "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout the plot. + clickmode + Determines the mode of single click interactions. + "event" is the default value and emits the + `plotly_click` event. In addition this mode emits the + `plotly_selected` event in drag modes "lasso" and + "select", but with no event data attached (kept for + compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also + supports persistent selections, meaning that pressing + Shift while clicking, adds to / subtracts from an + existing selection. "select" with `hovermode`: "x" can + be confusing, consider explicitly setting `hovermode`: + "closest" when using this feature. Selection events are + sent accordingly as long as "event" flag is set as + well. When the "event" flag is missing, `plotly_click` + and `plotly_selected` events are not fired. + coloraxis + plotly.graph_objects.layout.Coloraxis instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for object - constancy of data points during animation. Should be an - array of strings, not numbers or any other type. - idssrc - Sets the source reference on plot.ly for ids . - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - marker - plotly.graph_objects.area.Marker instance or dict with + colorscale + plotly.graph_objects.layout.Colorscale instance or dict + with compatible properties + colorway + Sets the default trace colors. + datarevision + If provided, a changed value tells `Plotly.react` that + one or more data arrays has changed. This way you can + modify arrays in-place rather than making a complete + new copy for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are being + treated as immutable, thus any data array with a + different identity from its predecessor contains new + data. + direction + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Sets the direction corresponding to + positive angles in legacy polar charts. + dragmode + Determines the mode of drag interactions. "select" and + "lasso" apply only to scatter traces with markers or + text. "orbit" and "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than trace names + and axis titles. Defaults to `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether given + by `funnelareacolorway` or inherited from `colorway`) + will be extended to three times its original length by + first repeating every color 20% lighter then each color + 20% darker. This is intended to reduce the likelihood + of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in + the trace, using `marker.colors`, are never extended. + extendpiecolors + If `true`, the pie slice colors (whether given by + `piecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will + be extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + font + Sets the global font. Note that fonts used in traces + and other layout components inherit from the global + font. + funnelareacolorway + Sets the default funnelarea slice colors. Defaults to + the main `colorway` used for trace colors. If you + specify a new list here it can still be extended with + lighter and darker colors, see + `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + funnelmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "group", the bars + are plotted next to one another centered around the + shared location. With "overlay", the bars are plotted + over one another, you might need to an "opacity" to see + multiple bars. + geo + plotly.graph_objects.layout.Geo instance or dict with + compatible properties + grid + plotly.graph_objects.layout.Grid instance or dict with compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, + and can simultaneously hide slices from several + pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on plot.ly for hiddenlabels + . + hidesources + Determines whether or not a text link citing the data + source is placed at the bottom-right cored of the + figure. Has only an effect only on graphs that have + been generated via forked graphs from the plotly + service (at https://plot.ly or on-premise). + hoverdistance + Sets the default distance (in pixels) to look for data + to add hover labels (-1 means no cutoff, 0 means no + looking for data). This is only a real distance for + hovering on point-like objects, like scatter points. + For area-like objects (bars, scatter fills, etc) + hovering is on inside the area and off outside, but + these objects will not supersede hover on point-like + objects in case of conflict. + hoverlabel + plotly.graph_objects.layout.Hoverlabel instance or dict + with compatible properties + hovermode + Determines the mode of hover interactions. If + `clickmode` includes the "select" flag, `hovermode` + defaults to "closest". If `clickmode` lacks the + "select" flag, it defaults to "x" or "y" (depending on + the trace's `orientation` value) for plots based on + cartesian coordinates. For anything else the default + value is "closest". + images + A tuple of plotly.graph_objects.layout.Image instances + or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + legend + plotly.graph_objects.layout.Legend instance or dict + with compatible properties + mapbox + plotly.graph_objects.layout.Mapbox instance or dict + with compatible properties + margin + plotly.graph_objects.layout.Margin instance or dict + with compatible properties meta - Assigns extra meta information associated with this - trace that can be used in various text attributes. - Attributes such as trace `name`, graph, axis and - colorbar `title.text`, annotation `text` - `rangeselector`, `updatemenues` and `sliders` `label` - text all support `meta`. To access the trace `meta` - values in an attribute in the same trace, simply use - `%{meta[i]}` where `i` is the index or key of the - `meta` item in question. To access trace `meta` in - layout attributes, use `%{data[n[.meta[i]}` where `i` - is the index or key of the `meta` and `n` is the trace - index. + Assigns extra meta information that can be used in + various `text` attributes. Attributes such as the + graph, axis and colorbar `title.text`, annotation + `text` `trace.name` in legend items, `rangeselector`, + `updatemenus` and `sliders` `label` text all support + `meta`. One can access `meta` fields using template + strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object + for example `{key: value}` which can be accessed + %{meta[key]}. metasrc Sets the source reference on plot.ly for meta . - name - Sets the trace name. The trace name appear as the - legend item and on hover. - opacity - Sets the opacity of the trace. - r - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the radial coordinates for - legacy polar chart only. - rsrc - Sets the source reference on plot.ly for r . + modebar + plotly.graph_objects.layout.Modebar instance or dict + with compatible properties + orientation + Legacy polar charts are deprecated! Please switch to + "polar" subplots. Rotates the entire polar by the given + angle in legacy polar charts. + paper_bgcolor + Sets the color of paper where the graph is drawn. + piecolorway + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new + list here it can still be extended with lighter and + darker colors, see `extendpiecolors`. + plot_bgcolor + Sets the color of plotting area in-between x and y + axes. + polar + plotly.graph_objects.layout.Polar instance or dict with + compatible properties + radialaxis + plotly.graph_objects.layout.RadialAxis instance or dict + with compatible properties + scene + plotly.graph_objects.layout.Scene instance or dict with + compatible properties + selectdirection + When "dragmode" is set to "select", this limits the + selection of the drag to horizontal, vertical or + diagonal. "h" only allows horizontal selection, "v" + only vertical, "d" only diagonal and "any" sets no + limit. + selectionrevision + Controls persistence of user-driven changes in selected + points from all traces. + separators + Sets the decimal and thousand separators. For example, + *. * puts a '.' before decimals and a space between + thousands. In English locales, dflt is ".," but other + locales may alter this default. + shapes + A tuple of plotly.graph_objects.layout.Shape instances + or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - stream - plotly.graph_objects.area.Stream instance or dict with + Determines whether or not a legend is drawn. Default is + `true` if there is a trace to show and any of these: a) + Two or more traces would by default be shown in the + legend. b) One pie trace is shown in the legend. c) One + trace is explicitly given with `showlegend: true`. + sliders + A tuple of plotly.graph_objects.layout.Slider instances + or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets the + default property values to use for elements of + layout.sliders + spikedistance + Sets the default distance (in pixels) to look for data + to draw spikelines to (-1 means no cutoff, 0 means no + looking for data). As with hoverdistance, distance does + not apply to area-like objects. In addition, some + objects can be hovered on but will not generate + spikelines, such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. This + should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: [traceTemplate, + ...], ...}}` where `layoutTemplate` is a dict matching + the structure of `figure.layout` and `traceTemplate` is + a dict matching the structure of the trace with type + `trace_type` (e.g. 'scatter'). Alternatively, this may + be specified as an instance of + plotly.graph_objs.layout.Template. Trace templates are + applied cyclically to traces of each type. Container + arrays (eg `annotations`) have special handling: An + object ending in `defaults` (eg `annotationdefaults`) + is applied to each array item. But if an item has a + `templateitemname` key we look in the template array + for an item with matching `name` and apply that + instead. If no matching `name` is found we mark the + item invisible. Any named template item not referenced + is appended to the end of the array, so this can be + used to add a watermark annotation or a logo image, for + example. To omit one of these items on the plot, make + an item with matching `templateitemname` and `visible: + false`. + ternary + plotly.graph_objects.layout.Ternary instance or dict + with compatible properties + title + plotly.graph_objects.layout.Title instance or dict with compatible properties - t - Area traces are deprecated! Please switch to the - "barpolar" trace type. Sets the angular coordinates for - legacy polar chart only. - tsrc - Sets the source reference on plot.ly for t . - uid - Assign an id to this trace, Use this to provide object - constancy between traces during animations and - transitions. + titlefont + Deprecated: Please use layout.title.font instead. Sets + the title font. Note that the title's font used to be + customized by the now deprecated `titlefont` attribute. + transition + Sets transition options used during Plotly.react + updates. + treemapcolorway + Sets the default treemap slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendtreemapcolors`. uirevision - Controls persistence of some user-driven changes to the - trace: `constraintrange` in `parcoords` traces, as well - as some `editable: true` modifications such as `name` - and `colorbar.title`. Defaults to `layout.uirevision`. - Note that other user-driven trace attribute changes are - controlled by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and `colorbar.(x|y)` - (accessible with `config: {editable: true}`) is - controlled by `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on trace index - if no `uid` is provided. So if your app can add/remove - traces before the end of the `data` array, such that - the same trace has a different index, you can still - preserve user-driven changes if you give each trace a - `uid` that stays with it as it moves. - visible - Determines whether or not this trace is visible. If - "legendonly", the trace is not drawn, but can appear as - a legend item (provided that the legend itself is - visible). + Used to allow user interactions with the plot to + persist after `Plotly.react` calls that are unaware of + these interactions. If `uirevision` is omitted, or if + it is given and it changed from the previous + `Plotly.react` call, the exact new figure is used. If + `uirevision` is truthy and did NOT change, any + attribute that has been affected by user interactions + and did not receive a different value in the new figure + will keep the interaction value. `layout.uirevision` + attribute serves as the default for `uirevision` + attributes in various sub-containers. For finer control + you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y + axes you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is + changed, you can update `yaxis.uirevision=*quantity*` + and the y axis range will reset but the x axis range + will retain any user-driven zoom. + updatemenus + A tuple of plotly.graph_objects.layout.Updatemenu + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), sets the + default property values to use for elements of + layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins of + adjacent location coordinates. Has no effect on traces + that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins of the + same location coordinate. Has no effect on traces that + have "width" set. + violinmode + Determines how violins at the same location coordinate + are displayed on the graph. If "group", the violins are + plotted next to one another centered around the shared + location. If "overlay", the violins are plotted over + one another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces that + have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + waterfallmode + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are + plotted next to one another centered around the shared + location. With "overlay", the bars are plotted over one + another, you might need to an "opacity" to see multiple + bars. + width + Sets the plot's width (in px). + xaxis + plotly.graph_objects.layout.XAxis instance or dict with + compatible properties + yaxis + plotly.graph_objects.layout.YAxis instance or dict with + compatible properties Returns ------- - Area + Layout """ - super(Area, self).__init__("area") + super(Layout, self).__init__("layout") # Validate arg # ------------ @@ -92285,9 +96051,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.Area +The first argument to the plotly.graph_objs.Layout constructor must be a dict or -an instance of plotly.graph_objs.Area""" +an instance of plotly.graph_objs.Layout""" ) # Handle skip_invalid @@ -92296,89 +96062,283 @@ def __init__( # Import validators # ----------------- - from plotly.validators import area as v_area + from plotly.validators import layout as v_layout # Initialize validators # --------------------- - self._validators["customdata"] = v_area.CustomdataValidator() - self._validators["customdatasrc"] = v_area.CustomdatasrcValidator() - self._validators["hoverinfo"] = v_area.HoverinfoValidator() - self._validators["hoverinfosrc"] = v_area.HoverinfosrcValidator() - self._validators["hoverlabel"] = v_area.HoverlabelValidator() - self._validators["ids"] = v_area.IdsValidator() - self._validators["idssrc"] = v_area.IdssrcValidator() - self._validators["legendgroup"] = v_area.LegendgroupValidator() - self._validators["marker"] = v_area.MarkerValidator() - self._validators["meta"] = v_area.MetaValidator() - self._validators["metasrc"] = v_area.MetasrcValidator() - self._validators["name"] = v_area.NameValidator() - self._validators["opacity"] = v_area.OpacityValidator() - self._validators["r"] = v_area.RValidator() - self._validators["rsrc"] = v_area.RsrcValidator() - self._validators["showlegend"] = v_area.ShowlegendValidator() - self._validators["stream"] = v_area.StreamValidator() - self._validators["t"] = v_area.TValidator() - self._validators["tsrc"] = v_area.TsrcValidator() - self._validators["uid"] = v_area.UidValidator() - self._validators["uirevision"] = v_area.UirevisionValidator() - self._validators["visible"] = v_area.VisibleValidator() + self._validators["angularaxis"] = v_layout.AngularAxisValidator() + self._validators["annotations"] = v_layout.AnnotationsValidator() + self._validators["annotationdefaults"] = v_layout.AnnotationValidator() + self._validators["autosize"] = v_layout.AutosizeValidator() + self._validators["bargap"] = v_layout.BargapValidator() + self._validators["bargroupgap"] = v_layout.BargroupgapValidator() + self._validators["barmode"] = v_layout.BarmodeValidator() + self._validators["barnorm"] = v_layout.BarnormValidator() + self._validators["boxgap"] = v_layout.BoxgapValidator() + self._validators["boxgroupgap"] = v_layout.BoxgroupgapValidator() + self._validators["boxmode"] = v_layout.BoxmodeValidator() + self._validators["calendar"] = v_layout.CalendarValidator() + self._validators["clickmode"] = v_layout.ClickmodeValidator() + self._validators["coloraxis"] = v_layout.ColoraxisValidator() + self._validators["colorscale"] = v_layout.ColorscaleValidator() + self._validators["colorway"] = v_layout.ColorwayValidator() + self._validators["datarevision"] = v_layout.DatarevisionValidator() + self._validators["direction"] = v_layout.DirectionValidator() + self._validators["dragmode"] = v_layout.DragmodeValidator() + self._validators["editrevision"] = v_layout.EditrevisionValidator() + self._validators[ + "extendfunnelareacolors" + ] = v_layout.ExtendfunnelareacolorsValidator() + self._validators["extendpiecolors"] = v_layout.ExtendpiecolorsValidator() + self._validators[ + "extendsunburstcolors" + ] = v_layout.ExtendsunburstcolorsValidator() + self._validators[ + "extendtreemapcolors" + ] = v_layout.ExtendtreemapcolorsValidator() + self._validators["font"] = v_layout.FontValidator() + self._validators["funnelareacolorway"] = v_layout.FunnelareacolorwayValidator() + self._validators["funnelgap"] = v_layout.FunnelgapValidator() + self._validators["funnelgroupgap"] = v_layout.FunnelgroupgapValidator() + self._validators["funnelmode"] = v_layout.FunnelmodeValidator() + self._validators["geo"] = v_layout.GeoValidator() + self._validators["grid"] = v_layout.GridValidator() + self._validators["height"] = v_layout.HeightValidator() + self._validators["hiddenlabels"] = v_layout.HiddenlabelsValidator() + self._validators["hiddenlabelssrc"] = v_layout.HiddenlabelssrcValidator() + self._validators["hidesources"] = v_layout.HidesourcesValidator() + self._validators["hoverdistance"] = v_layout.HoverdistanceValidator() + self._validators["hoverlabel"] = v_layout.HoverlabelValidator() + self._validators["hovermode"] = v_layout.HovermodeValidator() + self._validators["images"] = v_layout.ImagesValidator() + self._validators["imagedefaults"] = v_layout.ImageValidator() + self._validators["legend"] = v_layout.LegendValidator() + self._validators["mapbox"] = v_layout.MapboxValidator() + self._validators["margin"] = v_layout.MarginValidator() + self._validators["meta"] = v_layout.MetaValidator() + self._validators["metasrc"] = v_layout.MetasrcValidator() + self._validators["modebar"] = v_layout.ModebarValidator() + self._validators["orientation"] = v_layout.OrientationValidator() + self._validators["paper_bgcolor"] = v_layout.PaperBgcolorValidator() + self._validators["piecolorway"] = v_layout.PiecolorwayValidator() + self._validators["plot_bgcolor"] = v_layout.PlotBgcolorValidator() + self._validators["polar"] = v_layout.PolarValidator() + self._validators["radialaxis"] = v_layout.RadialAxisValidator() + self._validators["scene"] = v_layout.SceneValidator() + self._validators["selectdirection"] = v_layout.SelectdirectionValidator() + self._validators["selectionrevision"] = v_layout.SelectionrevisionValidator() + self._validators["separators"] = v_layout.SeparatorsValidator() + self._validators["shapes"] = v_layout.ShapesValidator() + self._validators["shapedefaults"] = v_layout.ShapeValidator() + self._validators["showlegend"] = v_layout.ShowlegendValidator() + self._validators["sliders"] = v_layout.SlidersValidator() + self._validators["sliderdefaults"] = v_layout.SliderValidator() + self._validators["spikedistance"] = v_layout.SpikedistanceValidator() + self._validators["sunburstcolorway"] = v_layout.SunburstcolorwayValidator() + self._validators["template"] = v_layout.TemplateValidator() + self._validators["ternary"] = v_layout.TernaryValidator() + self._validators["title"] = v_layout.TitleValidator() + self._validators["transition"] = v_layout.TransitionValidator() + self._validators["treemapcolorway"] = v_layout.TreemapcolorwayValidator() + self._validators["uirevision"] = v_layout.UirevisionValidator() + self._validators["updatemenus"] = v_layout.UpdatemenusValidator() + self._validators["updatemenudefaults"] = v_layout.UpdatemenuValidator() + self._validators["violingap"] = v_layout.ViolingapValidator() + self._validators["violingroupgap"] = v_layout.ViolingroupgapValidator() + self._validators["violinmode"] = v_layout.ViolinmodeValidator() + self._validators["waterfallgap"] = v_layout.WaterfallgapValidator() + self._validators["waterfallgroupgap"] = v_layout.WaterfallgroupgapValidator() + self._validators["waterfallmode"] = v_layout.WaterfallmodeValidator() + self._validators["width"] = v_layout.WidthValidator() + self._validators["xaxis"] = v_layout.XAxisValidator() + self._validators["yaxis"] = v_layout.YAxisValidator() # Populate data dict with properties # ---------------------------------- - _v = arg.pop("customdata", None) - self["customdata"] = customdata if customdata is not None else _v - _v = arg.pop("customdatasrc", None) - self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v - _v = arg.pop("hoverinfo", None) - self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v - _v = arg.pop("hoverinfosrc", None) - self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v + _v = arg.pop("angularaxis", None) + self["angularaxis"] = angularaxis if angularaxis is not None else _v + _v = arg.pop("annotations", None) + self["annotations"] = annotations if annotations is not None else _v + _v = arg.pop("annotationdefaults", None) + self["annotationdefaults"] = ( + annotationdefaults if annotationdefaults is not None else _v + ) + _v = arg.pop("autosize", None) + self["autosize"] = autosize if autosize is not None else _v + _v = arg.pop("bargap", None) + self["bargap"] = bargap if bargap is not None else _v + _v = arg.pop("bargroupgap", None) + self["bargroupgap"] = bargroupgap if bargroupgap is not None else _v + _v = arg.pop("barmode", None) + self["barmode"] = barmode if barmode is not None else _v + _v = arg.pop("barnorm", None) + self["barnorm"] = barnorm if barnorm is not None else _v + _v = arg.pop("boxgap", None) + self["boxgap"] = boxgap if boxgap is not None else _v + _v = arg.pop("boxgroupgap", None) + self["boxgroupgap"] = boxgroupgap if boxgroupgap is not None else _v + _v = arg.pop("boxmode", None) + self["boxmode"] = boxmode if boxmode is not None else _v + _v = arg.pop("calendar", None) + self["calendar"] = calendar if calendar is not None else _v + _v = arg.pop("clickmode", None) + self["clickmode"] = clickmode if clickmode is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("colorway", None) + self["colorway"] = colorway if colorway is not None else _v + _v = arg.pop("datarevision", None) + self["datarevision"] = datarevision if datarevision is not None else _v + _v = arg.pop("direction", None) + self["direction"] = direction if direction is not None else _v + _v = arg.pop("dragmode", None) + self["dragmode"] = dragmode if dragmode is not None else _v + _v = arg.pop("editrevision", None) + self["editrevision"] = editrevision if editrevision is not None else _v + _v = arg.pop("extendfunnelareacolors", None) + self["extendfunnelareacolors"] = ( + extendfunnelareacolors if extendfunnelareacolors is not None else _v + ) + _v = arg.pop("extendpiecolors", None) + self["extendpiecolors"] = extendpiecolors if extendpiecolors is not None else _v + _v = arg.pop("extendsunburstcolors", None) + self["extendsunburstcolors"] = ( + extendsunburstcolors if extendsunburstcolors is not None else _v + ) + _v = arg.pop("extendtreemapcolors", None) + self["extendtreemapcolors"] = ( + extendtreemapcolors if extendtreemapcolors is not None else _v + ) + _v = arg.pop("font", None) + self["font"] = font if font is not None else _v + _v = arg.pop("funnelareacolorway", None) + self["funnelareacolorway"] = ( + funnelareacolorway if funnelareacolorway is not None else _v + ) + _v = arg.pop("funnelgap", None) + self["funnelgap"] = funnelgap if funnelgap is not None else _v + _v = arg.pop("funnelgroupgap", None) + self["funnelgroupgap"] = funnelgroupgap if funnelgroupgap is not None else _v + _v = arg.pop("funnelmode", None) + self["funnelmode"] = funnelmode if funnelmode is not None else _v + _v = arg.pop("geo", None) + self["geo"] = geo if geo is not None else _v + _v = arg.pop("grid", None) + self["grid"] = grid if grid is not None else _v + _v = arg.pop("height", None) + self["height"] = height if height is not None else _v + _v = arg.pop("hiddenlabels", None) + self["hiddenlabels"] = hiddenlabels if hiddenlabels is not None else _v + _v = arg.pop("hiddenlabelssrc", None) + self["hiddenlabelssrc"] = hiddenlabelssrc if hiddenlabelssrc is not None else _v + _v = arg.pop("hidesources", None) + self["hidesources"] = hidesources if hidesources is not None else _v + _v = arg.pop("hoverdistance", None) + self["hoverdistance"] = hoverdistance if hoverdistance is not None else _v _v = arg.pop("hoverlabel", None) self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v - _v = arg.pop("ids", None) - self["ids"] = ids if ids is not None else _v - _v = arg.pop("idssrc", None) - self["idssrc"] = idssrc if idssrc is not None else _v - _v = arg.pop("legendgroup", None) - self["legendgroup"] = legendgroup if legendgroup is not None else _v - _v = arg.pop("marker", None) - self["marker"] = marker if marker is not None else _v + _v = arg.pop("hovermode", None) + self["hovermode"] = hovermode if hovermode is not None else _v + _v = arg.pop("images", None) + self["images"] = images if images is not None else _v + _v = arg.pop("imagedefaults", None) + self["imagedefaults"] = imagedefaults if imagedefaults is not None else _v + _v = arg.pop("legend", None) + self["legend"] = legend if legend is not None else _v + _v = arg.pop("mapbox", None) + self["mapbox"] = mapbox if mapbox is not None else _v + _v = arg.pop("margin", None) + self["margin"] = margin if margin is not None else _v _v = arg.pop("meta", None) self["meta"] = meta if meta is not None else _v _v = arg.pop("metasrc", None) self["metasrc"] = metasrc if metasrc is not None else _v - _v = arg.pop("name", None) - self["name"] = name if name is not None else _v - _v = arg.pop("opacity", None) - self["opacity"] = opacity if opacity is not None else _v - _v = arg.pop("r", None) - self["r"] = r if r is not None else _v - _v = arg.pop("rsrc", None) - self["rsrc"] = rsrc if rsrc is not None else _v + _v = arg.pop("modebar", None) + self["modebar"] = modebar if modebar is not None else _v + _v = arg.pop("orientation", None) + self["orientation"] = orientation if orientation is not None else _v + _v = arg.pop("paper_bgcolor", None) + self["paper_bgcolor"] = paper_bgcolor if paper_bgcolor is not None else _v + _v = arg.pop("piecolorway", None) + self["piecolorway"] = piecolorway if piecolorway is not None else _v + _v = arg.pop("plot_bgcolor", None) + self["plot_bgcolor"] = plot_bgcolor if plot_bgcolor is not None else _v + _v = arg.pop("polar", None) + self["polar"] = polar if polar is not None else _v + _v = arg.pop("radialaxis", None) + self["radialaxis"] = radialaxis if radialaxis is not None else _v + _v = arg.pop("scene", None) + self["scene"] = scene if scene is not None else _v + _v = arg.pop("selectdirection", None) + self["selectdirection"] = selectdirection if selectdirection is not None else _v + _v = arg.pop("selectionrevision", None) + self["selectionrevision"] = ( + selectionrevision if selectionrevision is not None else _v + ) + _v = arg.pop("separators", None) + self["separators"] = separators if separators is not None else _v + _v = arg.pop("shapes", None) + self["shapes"] = shapes if shapes is not None else _v + _v = arg.pop("shapedefaults", None) + self["shapedefaults"] = shapedefaults if shapedefaults is not None else _v _v = arg.pop("showlegend", None) self["showlegend"] = showlegend if showlegend is not None else _v - _v = arg.pop("stream", None) - self["stream"] = stream if stream is not None else _v - _v = arg.pop("t", None) - self["t"] = t if t is not None else _v - _v = arg.pop("tsrc", None) - self["tsrc"] = tsrc if tsrc is not None else _v - _v = arg.pop("uid", None) - self["uid"] = uid if uid is not None else _v + _v = arg.pop("sliders", None) + self["sliders"] = sliders if sliders is not None else _v + _v = arg.pop("sliderdefaults", None) + self["sliderdefaults"] = sliderdefaults if sliderdefaults is not None else _v + _v = arg.pop("spikedistance", None) + self["spikedistance"] = spikedistance if spikedistance is not None else _v + _v = arg.pop("sunburstcolorway", None) + self["sunburstcolorway"] = ( + sunburstcolorway if sunburstcolorway is not None else _v + ) + _v = arg.pop("template", None) + _v = template if template is not None else _v + if _v is not None: + self["template"] = _v + _v = arg.pop("ternary", None) + self["ternary"] = ternary if ternary is not None else _v + _v = arg.pop("title", None) + self["title"] = title if title is not None else _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("transition", None) + self["transition"] = transition if transition is not None else _v + _v = arg.pop("treemapcolorway", None) + self["treemapcolorway"] = treemapcolorway if treemapcolorway is not None else _v _v = arg.pop("uirevision", None) self["uirevision"] = uirevision if uirevision is not None else _v - _v = arg.pop("visible", None) - self["visible"] = visible if visible is not None else _v - - # Read-only literals - # ------------------ - from _plotly_utils.basevalidators import LiteralValidator - - self._props["type"] = "area" - self._validators["type"] = LiteralValidator( - plotly_name="type", parent_name="area", val="area" + _v = arg.pop("updatemenus", None) + self["updatemenus"] = updatemenus if updatemenus is not None else _v + _v = arg.pop("updatemenudefaults", None) + self["updatemenudefaults"] = ( + updatemenudefaults if updatemenudefaults is not None else _v ) - arg.pop("type", None) + _v = arg.pop("violingap", None) + self["violingap"] = violingap if violingap is not None else _v + _v = arg.pop("violingroupgap", None) + self["violingroupgap"] = violingroupgap if violingroupgap is not None else _v + _v = arg.pop("violinmode", None) + self["violinmode"] = violinmode if violinmode is not None else _v + _v = arg.pop("waterfallgap", None) + self["waterfallgap"] = waterfallgap if waterfallgap is not None else _v + _v = arg.pop("waterfallgroupgap", None) + self["waterfallgroupgap"] = ( + waterfallgroupgap if waterfallgroupgap is not None else _v + ) + _v = arg.pop("waterfallmode", None) + self["waterfallmode"] = waterfallmode if waterfallmode is not None else _v + _v = arg.pop("width", None) + self["width"] = width if width is not None else _v + _v = arg.pop("xaxis", None) + self["xaxis"] = xaxis if xaxis is not None else _v + _v = arg.pop("yaxis", None) + self["yaxis"] = yaxis if yaxis is not None else _v # Process unknown kwargs # ---------------------- @@ -92657,6 +96617,7 @@ def __init__( from plotly.graph_objs import waterfall from plotly.graph_objs import volume from plotly.graph_objs import violin +from plotly.graph_objs import treemap from plotly.graph_objs import table from plotly.graph_objs import surface from plotly.graph_objs import sunburst @@ -92701,17 +96662,6 @@ def __init__( from plotly.graph_objs import area from plotly.graph_objs import layout from ._figure import Figure - -try: - import ipywidgets - from distutils.version import LooseVersion - - if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): - from ._figurewidget import FigureWidget - del LooseVersion - del ipywidgets -except ImportError: - pass from ._deprecations import ( Data, Annotations, @@ -92739,3 +96689,138 @@ def __init__( Trace, Histogram2dcontour, ) + +__all__ = [ + "AngularAxis", + "Annotation", + "Annotations", + "Area", + "Bar", + "Barpolar", + "Box", + "Candlestick", + "Carpet", + "Choropleth", + "Choroplethmapbox", + "ColorBar", + "Cone", + "Contour", + "Contourcarpet", + "Contours", + "Data", + "Densitymapbox", + "ErrorX", + "ErrorY", + "ErrorZ", + "Figure", + "Font", + "Frame", + "Frames", + "Funnel", + "Funnelarea", + "Heatmap", + "Heatmapgl", + "Histogram", + "Histogram2d", + "Histogram2dContour", + "Histogram2dcontour", + "Indicator", + "Isosurface", + "Layout", + "Legend", + "Line", + "Margin", + "Marker", + "Mesh3d", + "Ohlc", + "Parcats", + "Parcoords", + "Pie", + "Pointcloud", + "RadialAxis", + "Sankey", + "Scatter", + "Scatter3d", + "Scattercarpet", + "Scattergeo", + "Scattergl", + "Scattermapbox", + "Scatterpolar", + "Scatterpolargl", + "Scatterternary", + "Scene", + "Splom", + "Stream", + "Streamtube", + "Sunburst", + "Surface", + "Table", + "Trace", + "Treemap", + "Violin", + "Volume", + "Waterfall", + "XAxis", + "XBins", + "YAxis", + "YBins", + "ZAxis", + "area", + "bar", + "barpolar", + "box", + "candlestick", + "carpet", + "choropleth", + "choroplethmapbox", + "cone", + "contour", + "contourcarpet", + "densitymapbox", + "funnel", + "funnelarea", + "heatmap", + "heatmapgl", + "histogram", + "histogram2d", + "histogram2dcontour", + "indicator", + "isosurface", + "layout", + "mesh3d", + "ohlc", + "parcats", + "parcoords", + "pie", + "pointcloud", + "sankey", + "scatter", + "scatter3d", + "scattercarpet", + "scattergeo", + "scattergl", + "scattermapbox", + "scatterpolar", + "scatterpolargl", + "scatterternary", + "splom", + "streamtube", + "sunburst", + "surface", + "table", + "treemap", + "violin", + "volume", + "waterfall", +] +try: + import ipywidgets + from distutils.version import LooseVersion + + if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"): + from ._figurewidget import FigureWidget + del LooseVersion + del ipywidgets + __all__.append("FigureWidget") +except ImportError: + pass diff --git a/packages/python/plotly/plotly/graph_objs/_deprecations.py b/packages/python/plotly/plotly/graph_objs/_deprecations.py index a57224c6c81..6c415286931 100644 --- a/packages/python/plotly/plotly/graph_objs/_deprecations.py +++ b/packages/python/plotly/plotly/graph_objs/_deprecations.py @@ -475,7 +475,7 @@ class Scene(dict): """ plotly.graph_objs.Scene is deprecated. Please replace it with one of the following more specific types - - plotly.graph_objs.Scene + - plotly.graph_objs.layout.Scene """ @@ -483,13 +483,13 @@ def __init__(self, *args, **kwargs): """ plotly.graph_objs.Scene is deprecated. Please replace it with one of the following more specific types - - plotly.graph_objs.Scene + - plotly.graph_objs.layout.Scene """ warnings.warn( """plotly.graph_objs.Scene is deprecated. Please replace it with one of the following more specific types - - plotly.graph_objs.Scene + - plotly.graph_objs.layout.Scene """, DeprecationWarning, ) diff --git a/packages/python/plotly/plotly/graph_objs/_figure.py b/packages/python/plotly/plotly/graph_objs/_figure.py index a3890db0188..1b14ed03a99 100644 --- a/packages/python/plotly/plotly/graph_objs/_figure.py +++ b/packages/python/plotly/plotly/graph_objs/_figure.py @@ -42,9 +42,11 @@ Sunburst, Surface, Table, + Treemap, Violin, Volume, Waterfall, + layout as _layout, ) @@ -79,8 +81,8 @@ def __init__( 'scattergeo', 'scattergl', 'scattermapbox', 'scatterpolar', 'scatterpolargl', 'scatterternary', 'splom', 'streamtube', - 'sunburst', 'surface', 'table', 'violin', - 'volume', 'waterfall'] + 'sunburst', 'surface', 'table', 'treemap', + 'violin', 'volume', 'waterfall'] - All remaining properties are passed to the constructor of the specified trace type @@ -245,6 +247,17 @@ def __init__( you can set `false` to disable. Colors provided in the trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether + given by `treemapcolorway` or inherited from + `colorway`) will be extended to three times its + original length by first repeating every color + 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. font Sets the global font. Note that fonts used in traces and other layout components inherit from @@ -337,7 +350,7 @@ def __init__( in various `text` attributes. Attributes such as the graph, axis and colorbar `title.text`, annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenues` and `sliders` + `rangeselector`, `updatemenus` and `sliders` `label` text all support `meta`. One can access `meta` fields using template strings: `%{meta[i]}` where `i` is the index of the @@ -469,6 +482,12 @@ def __init__( transition Sets transition options used during Plotly.react updates. + treemapcolorway + Sets the default treemap slice colors. Defaults + to the main `colorway` used for trace colors. + If you specify a new list here it can still be + extended with lighter and darker colors, see + `extendtreemapcolors`. uirevision Used to allow user interactions with the plot to persist after `Plotly.react` calls that are @@ -803,6 +822,8 @@ def add_bar( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, tsrc=None, uid=None, uirevision=None, @@ -890,7 +911,12 @@ def add_bar( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1023,6 +1049,25 @@ def add_bar( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . tsrc Sets the source reference on plot.ly for t . uid @@ -1159,6 +1204,8 @@ def add_bar( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, tsrc=tsrc, uid=uid, uirevision=uirevision, @@ -1274,7 +1321,12 @@ def add_barpolar( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1594,7 +1646,12 @@ def add_box( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -2137,9 +2194,6 @@ def add_carpet( da=None, db=None, font=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, ids=None, idssrc=None, meta=None, @@ -2198,8 +2252,8 @@ def add_carpet( Sets the source reference on plot.ly for b . carpet An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie + and `contourcarpet` traces can specify a carpet plot on + which they lie cheaterslope The shift applied to each successive row of data in creating a cheater plot. Only used if `x` is been @@ -2223,16 +2277,6 @@ def add_carpet( font The default font used for axis & tick labels on this carpet - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.carpet.Hoverlabel instance or dict - with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an @@ -2350,9 +2394,6 @@ def add_carpet( da=da, db=db, font=font, - hoverinfo=hoverinfo, - hoverinfosrc=hoverinfosrc, - hoverlabel=hoverlabel, ids=ids, idssrc=idssrc, meta=meta, @@ -2488,7 +2529,12 @@ def add_choropleth( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -2796,7 +2842,12 @@ def add_choroplethmapbox( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -3127,7 +3178,12 @@ def add_cone( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -3495,7 +3551,12 @@ def add_contour( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -3773,9 +3834,6 @@ def add_contourcarpet( da=None, db=None, fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, hovertext=None, hovertextsrc=None, ids=None, @@ -3903,16 +3961,6 @@ def add_contourcarpet( Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.contourcarpet.Hoverlabel instance - or dict with compatible properties hovertext Same as `text`. hovertextsrc @@ -4078,9 +4126,6 @@ def add_contourcarpet( da=da, db=db, fillcolor=fillcolor, - hoverinfo=hoverinfo, - hoverinfosrc=hoverinfosrc, - hoverlabel=hoverlabel, hovertext=hovertext, hovertextsrc=hovertextsrc, ids=ids, @@ -4230,7 +4275,12 @@ def add_densitymapbox( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -4468,6 +4518,8 @@ def add_funnel( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, visible=None, @@ -4542,7 +4594,12 @@ def add_funnel( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -4670,6 +4727,27 @@ def add_funnel( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `percentInitial`, `percentPrevious`, `percentTotal`, + `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -4788,6 +4866,8 @@ def add_funnel( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, visible=visible, @@ -4840,6 +4920,8 @@ def add_funnelarea( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, title=None, uid=None, uirevision=None, @@ -4896,18 +4978,22 @@ def add_funnelarea( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. variables `label`, `color`, `value`, `text` + and `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -4995,6 +5081,26 @@ def add_funnelarea( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `text` and `percent`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . title plotly.graph_objects.funnelarea.Title instance or dict with compatible properties @@ -5078,6 +5184,8 @@ def add_funnelarea( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, title=title, uid=uid, uirevision=uirevision, @@ -5232,7 +5340,12 @@ def add_heatmap( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -5932,7 +6045,12 @@ def add_histogram( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -6330,7 +6448,12 @@ def add_histogram2d( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -6757,7 +6880,12 @@ def add_histogram2dcontour( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -7046,7 +7174,12 @@ def add_indicator( """ Add a new Indicator trace - TODO: add description + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. Parameters ---------- @@ -7325,7 +7458,12 @@ def add_isosurface( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -7714,7 +7852,12 @@ def add_mesh3d( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -8319,7 +8462,12 @@ def add_parcats( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -8637,6 +8785,8 @@ def add_pie( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, title=None, titlefont=None, titleposition=None, @@ -8694,7 +8844,12 @@ def add_pie( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -8809,6 +8964,26 @@ def add_pie( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `percent` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . title plotly.graph_objects.pie.Title instance or dict with compatible properties @@ -8906,6 +9081,8 @@ def add_pie( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, title=title, titlefont=titlefont, titleposition=titleposition, @@ -9402,6 +9579,8 @@ def add_scatter( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, tsrc=None, uid=None, uirevision=None, @@ -9522,7 +9701,12 @@ def add_scatter( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -9662,6 +9846,25 @@ def add_scatter( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . tsrc Sets the source reference on plot.ly for t . uid @@ -9792,6 +9995,8 @@ def add_scatter( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, tsrc=tsrc, uid=uid, uirevision=uirevision, @@ -9847,6 +10052,8 @@ def add_scatter3d( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, visible=None, @@ -9912,7 +10119,12 @@ def add_scatter3d( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10017,6 +10229,25 @@ def add_scatter3d( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -10110,6 +10341,8 @@ def add_scatter3d( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, visible=visible, @@ -10165,6 +10398,8 @@ def add_scattercarpet( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -10194,8 +10429,8 @@ def add_scattercarpet( Sets the source reference on plot.ly for b . carpet An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie + and `contourcarpet` traces can specify a carpet plot on + which they lie connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -10245,7 +10480,12 @@ def add_scattercarpet( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10343,6 +10583,26 @@ def add_scattercarpet( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b` and + `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -10444,6 +10704,8 @@ def add_scattercarpet( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -10495,6 +10757,8 @@ def add_scattergeo( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -10556,7 +10820,12 @@ def add_scattergeo( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10673,6 +10942,26 @@ def add_scattergeo( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon`, + `location` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -10756,6 +11045,8 @@ def add_scattergeo( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -10801,6 +11092,8 @@ def add_scattergl( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -10895,7 +11188,12 @@ def add_scattergl( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10989,6 +11287,25 @@ def add_scattergl( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -11108,6 +11425,8 @@ def add_scattergl( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -11164,6 +11483,8 @@ def add_scattermapbox( textfont=None, textposition=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -11224,7 +11545,12 @@ def add_scattermapbox( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -11333,6 +11659,26 @@ def add_scattermapbox( to the (x,y) coordinates. textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -11413,6 +11759,8 @@ def add_scattermapbox( textfont=textfont, textposition=textposition, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -11462,6 +11810,8 @@ def add_scatterpolar( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, @@ -11548,7 +11898,12 @@ def add_scatterpolar( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -11660,6 +12015,26 @@ def add_scatterpolar( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . theta Sets the angular coordinates theta0 @@ -11754,6 +12129,8 @@ def add_scatterpolar( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, theta=theta, theta0=theta0, thetasrc=thetasrc, @@ -11805,6 +12182,8 @@ def add_scatterpolargl( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, @@ -11890,7 +12269,12 @@ def add_scatterpolargl( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -12002,6 +12386,26 @@ def add_scatterpolargl( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . theta Sets the angular coordinates theta0 @@ -12094,6 +12498,8 @@ def add_scatterpolargl( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, theta=theta, theta0=theta0, thetasrc=thetasrc, @@ -12149,6 +12555,8 @@ def add_scatterternary( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -12245,7 +12653,12 @@ def add_scatterternary( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -12356,6 +12769,26 @@ def add_scatterternary( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b`, `c` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -12441,6 +12874,8 @@ def add_scatterternary( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -12538,7 +12973,12 @@ def add_splom( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -12778,7 +13218,9 @@ def add_streamtube( `u`, `v`, and `w`. By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. To specify your own starting position, use attributes - `starts.x`, `starts.y` and `starts.z`. + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). Parameters ---------- @@ -12854,7 +13296,12 @@ def add_streamtube( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -13059,6 +13506,7 @@ def add_streamtube( def add_sunburst( self, branchvalues=None, + count=None, customdata=None, customdatasrc=None, domain=None, @@ -13090,6 +13538,8 @@ def add_sunburst( textfont=None, textinfo=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, values=None, @@ -13115,6 +13565,10 @@ def add_sunburst( in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -13143,14 +13597,21 @@ def add_sunburst( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc @@ -13174,24 +13635,24 @@ def add_sunburst( Sets the font used for `textinfo` lying inside the sector. labels - Sets the labels of each of the sunburst sectors. + Sets the labels of each of the sectors. labelssrc Sets the source reference on plot.ly for labels . leaf plotly.graph_objects.sunburst.Leaf instance or dict with compatible properties level - Sets the level from which this sunburst trace hierarchy - is rendered. Set `level` to `''` to start the sunburst - from the root node in the hierarchy. Must be an "id" if - `ids` is filled in, otherwise plotly attempts to find a - matching item in `labels`. + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. marker plotly.graph_objects.sunburst.Marker instance or dict with compatible properties maxdepth - Sets the number of rendered sunburst rings from any - given `level`. Set `maxdepth` to "-1" to render all the + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. meta Assigns extra meta information associated with this @@ -13217,13 +13678,12 @@ def add_sunburst( Sets the font used for `textinfo` lying outside the sector. parents - Sets the parent sectors for each of the sunburst - sectors. Empty string items '' are understood to - reference the root node in the hierarchy. If `ids` is - filled, `parents` items are understood to be "ids" - themselves. When `ids` is not set, plotly attempts to - find matching items in `labels`, but beware they must - be unique. + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. parentssrc Sets the source reference on plot.ly for parents . stream @@ -13241,6 +13701,27 @@ def add_sunburst( Determines which trace information appear on the graph. textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -13264,9 +13745,9 @@ def add_sunburst( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. values - Sets the values associated with each of the sunburst - sectors. Use with `branchvalues` to determine how the - values are summed. + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. valuessrc Sets the source reference on plot.ly for values . visible @@ -13289,6 +13770,7 @@ def add_sunburst( """ new_trace = Sunburst( branchvalues=branchvalues, + count=count, customdata=customdata, customdatasrc=customdatasrc, domain=domain, @@ -13320,6 +13802,8 @@ def add_sunburst( textfont=textfont, textinfo=textinfo, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, values=values, @@ -13481,7 +13965,12 @@ def add_surface( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -13846,90 +14335,75 @@ def add_table( ) return self.add_trace(new_trace, row=row, col=col) - def add_violin( + def add_treemap( self, - alignmentgroup=None, - bandwidth=None, - box=None, + branchvalues=None, + count=None, customdata=None, customdatasrc=None, - fillcolor=None, + domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - jitter=None, - legendgroup=None, - line=None, + insidetextfont=None, + labels=None, + labelssrc=None, + level=None, marker=None, - meanline=None, + maxdepth=None, meta=None, metasrc=None, name=None, - offsetgroup=None, opacity=None, - orientation=None, - pointpos=None, - points=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, stream=None, text=None, + textfont=None, + textinfo=None, + textposition=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tiling=None, uid=None, uirevision=None, - unselected=None, + values=None, + valuessrc=None, visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, row=None, col=None, - secondary_y=None, **kwargs ): """ - Add a new Violin trace + Add a new Treemap trace - In vertical (horizontal) violin plots, statistics are computed - using `y` (`x`) values. By supplying an `x` (`y`) array, one - violin per distinct x (y) value is drawn If no `x` (`y`) list - is provided, a single violin is drawn. That violin position is - then positioned with with `name` or with `x0` (`y0`) if - provided. + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". Parameters ---------- - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - bandwidth - Sets the bandwidth used to compute the kernel density - estimate. By default, the bandwidth is determined by - Silverman's rule of thumb. - box - plotly.graph_objects.violin.Box instance or dict with - compatible properties + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -13937,10 +14411,9 @@ def add_violin( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. + domain + plotly.graph_objects.treemap.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -13949,12 +14422,8 @@ def add_violin( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.violin.Hoverlabel instance or dict - with compatible properties - hoveron - Do the hover effects highlight individual violins or - sample points or the kernel density estimate or any - combination of them? + plotly.graph_objects.treemap.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -13963,21 +14432,32 @@ def add_violin( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -13986,24 +14466,26 @@ def add_violin( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the violins. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.violin.Line instance or dict with - compatible properties + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for labels . + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. marker - plotly.graph_objects.violin.Marker instance or dict - with compatible properties - meanline - plotly.graph_objects.violin.Meanline instance or dict + plotly.graph_objects.treemap.Marker instance or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -14021,94 +14503,65 @@ def add_violin( Sets the source reference on plot.ly for meta . name Sets the trace name. The trace name appear as the - legend item and on hover. For violin traces, the name - will also be used for the position coordinate, if `x` - and `x0` (`y` and `y0` if horizontal) are missing and - the position axis is categorical. Note that the trace - name is also used as a default value for attribute - `scalegroup` (please see its description for details). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. + legend item and on hover. opacity Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" ("h"), - the distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the violins. If 0, the sample points are places over - the center of the violins. Positive (negative) values - correspond to positions to the right (left) for - vertical violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the violins are shown with no sample - points - scalegroup - If there are multiple violins that should be sized - according to to some metric (see `scalemode`), link - them by providing a non-empty group id here shared by - every trace in the same group. If a violin's `width` is - undefined, `scalegroup` will default to the trace's - name. In this case, violins with the same names will be - linked together - scalemode - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number - of sample points makingup each violin. - selected - plotly.graph_objects.violin.Selected instance or dict + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for parents . + pathbar + plotly.graph_objects.treemap.Pathbar instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - side - Determines on which side of the position value the - density function making up one half of a violin is - plotted. Useful when comparing two violin traces under - "overlay" mode, where one trace has `side` set to - "positive" and the other to "negative". - span - Sets the span in data space for which the density - function will be computed. Has an effect only when - `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space where - the density function will be computed. "soft" means the - span goes from the sample's minimum value minus two - bandwidths to the sample's maximum value plus two - bandwidths. "hard" means the span goes from the - sample's minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the `span` - attribute. stream - plotly.graph_objects.violin.Stream instance or dict + plotly.graph_objects.treemap.Stream instance or dict with compatible properties text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tiling + plotly.graph_objects.treemap.Tiling instance or dict + with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -14131,45 +14584,17 @@ def add_violin( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.violin.Unselected instance or dict - with compatible properties + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the width of the violin in data coordinates. If 0 - (default value) the width is automatically selected - based on the positions of other violin traces in the - same subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate of the box. See overview for more - info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate of the box. See overview for more - info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . row : int or None (default) Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using @@ -14178,107 +14603,496 @@ def add_violin( Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using `plotly.tools.make_subplots` - secondary_y: boolean or None (default None) - If True, associate this trace with the secondary y-axis of the - subplot at the specified row and col. Only valid if all of the - following conditions are satisfied: - * The figure was created using `plotly.subplots.make_subplots`. - * The row and col arguments are not None - * The subplot at the specified row and col has type xy - (which is the default) and secondary_y True. These - properties are specified in the specs argument to - make_subplots. See the make_subplots docstring for more info. Returns ------- Figure """ - new_trace = Violin( - alignmentgroup=alignmentgroup, - bandwidth=bandwidth, - box=box, + new_trace = Treemap( + branchvalues=branchvalues, + count=count, customdata=customdata, customdatasrc=customdatasrc, - fillcolor=fillcolor, + domain=domain, hoverinfo=hoverinfo, hoverinfosrc=hoverinfosrc, hoverlabel=hoverlabel, - hoveron=hoveron, hovertemplate=hovertemplate, hovertemplatesrc=hovertemplatesrc, hovertext=hovertext, hovertextsrc=hovertextsrc, ids=ids, idssrc=idssrc, - jitter=jitter, - legendgroup=legendgroup, - line=line, + insidetextfont=insidetextfont, + labels=labels, + labelssrc=labelssrc, + level=level, marker=marker, - meanline=meanline, + maxdepth=maxdepth, meta=meta, metasrc=metasrc, name=name, - offsetgroup=offsetgroup, opacity=opacity, - orientation=orientation, - pointpos=pointpos, - points=points, - scalegroup=scalegroup, - scalemode=scalemode, - selected=selected, - selectedpoints=selectedpoints, - showlegend=showlegend, - side=side, - span=span, - spanmode=spanmode, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + pathbar=pathbar, stream=stream, text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, + tiling=tiling, uid=uid, uirevision=uirevision, - unselected=unselected, + values=values, + valuessrc=valuessrc, visible=visible, - width=width, - x=x, - x0=x0, - xaxis=xaxis, - xsrc=xsrc, - y=y, - y0=y0, - yaxis=yaxis, - ysrc=ysrc, **kwargs ) - return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + return self.add_trace(new_trace, row=row, col=col) - def add_volume( + def add_violin( self, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, + alignmentgroup=None, + bandwidth=None, + box=None, customdata=None, customdatasrc=None, - flatshading=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - isomax=None, - isomin=None, - lighting=None, - lightposition=None, + jitter=None, + legendgroup=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + """ + Add a new Violin trace + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + plotly.graph_objects.violin.Box instance or dict with + compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.violin.Hoverlabel instance or dict + with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.violin.Line instance or dict with + compatible properties + marker + plotly.graph_objects.violin.Marker instance or dict + with compatible properties + meanline + plotly.graph_objects.violin.Meanline instance or dict + with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number + of sample points makingup each violin. + selected + plotly.graph_objects.violin.Selected instance or dict + with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + plotly.graph_objects.violin.Stream instance or dict + with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + plotly.graph_objects.violin.Unselected instance or dict + with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate of the box. See overview for more + info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate of the box. See overview for more + info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . + row : int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + col : int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + new_trace = Violin( + alignmentgroup=alignmentgroup, + bandwidth=bandwidth, + box=box, + customdata=customdata, + customdatasrc=customdatasrc, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + jitter=jitter, + legendgroup=legendgroup, + line=line, + marker=marker, + meanline=meanline, + meta=meta, + metasrc=metasrc, + name=name, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + pointpos=pointpos, + points=points, + scalegroup=scalegroup, + scalemode=scalemode, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + side=side, + span=span, + spanmode=spanmode, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ysrc=ysrc, + **kwargs + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_volume( + self, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + lighting=None, + lightposition=None, meta=None, metasrc=None, name=None, @@ -14402,7 +15216,12 @@ def add_volume( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -14662,6 +15481,8 @@ def add_waterfall( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, totals=None, uid=None, uirevision=None, @@ -14744,7 +15565,12 @@ def add_waterfall( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -14877,6 +15703,26 @@ def add_waterfall( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `initial`, + `delta`, `final` and `label`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . totals plotly.graph_objects.waterfall.Totals instance or dict with compatible properties @@ -15005,6 +15851,8 @@ def add_waterfall( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, totals=totals, uid=uid, uirevision=uirevision, @@ -15023,88 +15871,394 @@ def add_waterfall( ) return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) - def select_coloraxes(self, selector=None, row=None, col=None): + def select_coloraxes(self, selector=None, row=None, col=None): + """ + Select coloraxis subplot objects from a particular subplot cell + and/or coloraxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + generator + Generator that iterates through all of the coloraxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("coloraxis", selector, row, col) + + def for_each_coloraxis(self, fn, selector=None, row=None, col=None): + """ + Apply a function to all coloraxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single coloraxis object. + selector: dict or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_coloraxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): + """ + Perform a property update operation on all coloraxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + coloraxis objects that satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + **kwargs + Additional property updates to apply to each selected + coloraxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_geos(self, selector=None, row=None, col=None): + """ + Select geo subplot objects from a particular subplot cell + and/or geo subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + generator + Generator that iterates through all of the geo + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("geo", selector, row, col) + + def for_each_geo(self, fn, selector=None, row=None, col=None): + """ + Apply a function to all geo objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single geo object. + selector: dict or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_geos( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): + """ + Perform a property update operation on all geo objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + geo objects that satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + **kwargs + Additional property updates to apply to each selected + geo object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_mapboxes(self, selector=None, row=None, col=None): + """ + Select mapbox subplot objects from a particular subplot cell + and/or mapbox subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + generator + Generator that iterates through all of the mapbox + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) + + def for_each_mapbox(self, fn, selector=None, row=None, col=None): + """ + Apply a function to all mapbox objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single mapbox object. + selector: dict or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_mapboxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Select coloraxis subplot objects from a particular subplot cell - and/or coloraxis subplot objects that satisfy custom selection + Perform a property update operation on all mapbox objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + mapbox objects that satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + **kwargs + Additional property updates to apply to each selected + mapbox object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_polars(self, selector=None, row=None, col=None): + """ + Select polar subplot objects from a particular subplot cell + and/or polar subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - coloraxis objects will be selected if they contain + polar objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all coloraxis objects are selected. + (the default), all polar objects are selected. row, col: int or None (default None) - Subplot row and column index of coloraxis objects to select. - To select coloraxis objects by row and column, the Figure + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all coloraxis objects are selected. + If None (the default), all polar objects are selected. Returns ------- generator - Generator that iterates through all of the coloraxis + Generator that iterates through all of the polar objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("coloraxis", selector, row, col) + return self._select_layout_subplots_by_prefix("polar", selector, row, col) - def for_each_coloraxis(self, fn, selector=None, row=None, col=None): + def for_each_polar(self, fn, selector=None, row=None, col=None): """ - Apply a function to all coloraxis objects that satisfy the + Apply a function to all polar objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single coloraxis object. + Function that inputs a single polar object. selector: dict or None (default None) Dict to use as selection criteria. - coloraxis objects will be selected if they contain + polar objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all coloraxis objects are selected. + (the default), all polar objects are selected. row, col: int or None (default None) - Subplot row and column index of coloraxis objects to select. - To select coloraxis objects by row and column, the Figure + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all coloraxis objects are selected. + If None (the default), all polar objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_coloraxes(selector=selector, row=row, col=col): + for obj in self.select_polars(selector=selector, row=row, col=col): fn(obj) return self - def update_coloraxes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_polars( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all coloraxis objects + Perform a property update operation on all polar objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - coloraxis objects that satisfy the selection criteria. + polar objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - coloraxis objects will be selected if they contain + polar objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all coloraxis objects are selected. + (the default), all polar objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of coloraxis objects to select. - To select coloraxis objects by row and column, the Figure + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all coloraxis objects are selected. + If None (the default), all polar objects are selected. **kwargs Additional property updates to apply to each selected - coloraxis object. If a property is specified in + polar object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15112,93 +16266,99 @@ def update_coloraxes(self, patch=None, selector=None, row=None, col=None, **kwar self Returns the Figure object that the method was called on """ - for obj in self.select_coloraxes(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_polars(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_geos(self, selector=None, row=None, col=None): + def select_scenes(self, selector=None, row=None, col=None): """ - Select geo subplot objects from a particular subplot cell - and/or geo subplot objects that satisfy custom selection + Select scene subplot objects from a particular subplot cell + and/or scene subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - geo objects will be selected if they contain + scene objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all geo objects are selected. + (the default), all scene objects are selected. row, col: int or None (default None) - Subplot row and column index of geo objects to select. - To select geo objects by row and column, the Figure + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all geo objects are selected. + If None (the default), all scene objects are selected. Returns ------- generator - Generator that iterates through all of the geo + Generator that iterates through all of the scene objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("geo", selector, row, col) + return self._select_layout_subplots_by_prefix("scene", selector, row, col) - def for_each_geo(self, fn, selector=None, row=None, col=None): + def for_each_scene(self, fn, selector=None, row=None, col=None): """ - Apply a function to all geo objects that satisfy the + Apply a function to all scene objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single geo object. + Function that inputs a single scene object. selector: dict or None (default None) Dict to use as selection criteria. - geo objects will be selected if they contain + scene objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all geo objects are selected. + (the default), all scene objects are selected. row, col: int or None (default None) - Subplot row and column index of geo objects to select. - To select geo objects by row and column, the Figure + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all geo objects are selected. + If None (the default), all scene objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_geos(selector=selector, row=row, col=col): + for obj in self.select_scenes(selector=selector, row=row, col=col): fn(obj) return self - def update_geos(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_scenes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all geo objects + Perform a property update operation on all scene objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - geo objects that satisfy the selection criteria. + scene objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - geo objects will be selected if they contain + scene objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all geo objects are selected. + (the default), all scene objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of geo objects to select. - To select geo objects by row and column, the Figure + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all geo objects are selected. + If None (the default), all scene objects are selected. **kwargs Additional property updates to apply to each selected - geo object. If a property is specified in + scene object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15206,93 +16366,99 @@ def update_geos(self, patch=None, selector=None, row=None, col=None, **kwargs): self Returns the Figure object that the method was called on """ - for obj in self.select_geos(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_scenes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_mapboxes(self, selector=None, row=None, col=None): + def select_ternaries(self, selector=None, row=None, col=None): """ - Select mapbox subplot objects from a particular subplot cell - and/or mapbox subplot objects that satisfy custom selection + Select ternary subplot objects from a particular subplot cell + and/or ternary subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - mapbox objects will be selected if they contain + ternary objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all mapbox objects are selected. + (the default), all ternary objects are selected. row, col: int or None (default None) - Subplot row and column index of mapbox objects to select. - To select mapbox objects by row and column, the Figure + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all mapbox objects are selected. + If None (the default), all ternary objects are selected. Returns ------- generator - Generator that iterates through all of the mapbox + Generator that iterates through all of the ternary objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) + return self._select_layout_subplots_by_prefix("ternary", selector, row, col) - def for_each_mapbox(self, fn, selector=None, row=None, col=None): + def for_each_ternary(self, fn, selector=None, row=None, col=None): """ - Apply a function to all mapbox objects that satisfy the + Apply a function to all ternary objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single mapbox object. + Function that inputs a single ternary object. selector: dict or None (default None) Dict to use as selection criteria. - mapbox objects will be selected if they contain + ternary objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all mapbox objects are selected. + (the default), all ternary objects are selected. row, col: int or None (default None) - Subplot row and column index of mapbox objects to select. - To select mapbox objects by row and column, the Figure + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all mapbox objects are selected. + If None (the default), all ternary objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_mapboxes(selector=selector, row=row, col=col): + for obj in self.select_ternaries(selector=selector, row=row, col=col): fn(obj) return self - def update_mapboxes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_ternaries( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all mapbox objects + Perform a property update operation on all ternary objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - mapbox objects that satisfy the selection criteria. + ternary objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - mapbox objects will be selected if they contain + ternary objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all mapbox objects are selected. + (the default), all ternary objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of mapbox objects to select. - To select mapbox objects by row and column, the Figure + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all mapbox objects are selected. + If None (the default), all ternary objects are selected. **kwargs Additional property updates to apply to each selected - mapbox object. If a property is specified in + ternary object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15300,93 +16466,99 @@ def update_mapboxes(self, patch=None, selector=None, row=None, col=None, **kwarg self Returns the Figure object that the method was called on """ - for obj in self.select_mapboxes(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_ternaries(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_polars(self, selector=None, row=None, col=None): + def select_xaxes(self, selector=None, row=None, col=None): """ - Select polar subplot objects from a particular subplot cell - and/or polar subplot objects that satisfy custom selection + Select xaxis subplot objects from a particular subplot cell + and/or xaxis subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - polar objects will be selected if they contain + xaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all polar objects are selected. + (the default), all xaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of polar objects to select. - To select polar objects by row and column, the Figure + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all polar objects are selected. + If None (the default), all xaxis objects are selected. Returns ------- generator - Generator that iterates through all of the polar + Generator that iterates through all of the xaxis objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("polar", selector, row, col) + return self._select_layout_subplots_by_prefix("xaxis", selector, row, col) - def for_each_polar(self, fn, selector=None, row=None, col=None): + def for_each_xaxis(self, fn, selector=None, row=None, col=None): """ - Apply a function to all polar objects that satisfy the + Apply a function to all xaxis objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single polar object. + Function that inputs a single xaxis object. selector: dict or None (default None) Dict to use as selection criteria. - polar objects will be selected if they contain + xaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all polar objects are selected. + (the default), all xaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of polar objects to select. - To select polar objects by row and column, the Figure + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all polar objects are selected. + If None (the default), all xaxis objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_polars(selector=selector, row=row, col=col): + for obj in self.select_xaxes(selector=selector, row=row, col=col): fn(obj) return self - def update_polars(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_xaxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all polar objects + Perform a property update operation on all xaxis objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - polar objects that satisfy the selection criteria. + xaxis objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - polar objects will be selected if they contain + xaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all polar objects are selected. + (the default), all xaxis objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of polar objects to select. - To select polar objects by row and column, the Figure + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all polar objects are selected. + If None (the default), all xaxis objects are selected. **kwargs Additional property updates to apply to each selected - polar object. If a property is specified in + xaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15394,93 +16566,146 @@ def update_polars(self, patch=None, selector=None, row=None, col=None, **kwargs) self Returns the Figure object that the method was called on """ - for obj in self.select_polars(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_xaxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_scenes(self, selector=None, row=None, col=None): + def select_yaxes(self, selector=None, row=None, col=None, secondary_y=None): """ - Select scene subplot objects from a particular subplot cell - and/or scene subplot objects that satisfy custom selection + Select yaxis subplot objects from a particular subplot cell + and/or yaxis subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - scene objects will be selected if they contain + yaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all scene objects are selected. + (the default), all yaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of scene objects to select. - To select scene objects by row and column, the Figure + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all scene objects are selected. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the scene + Generator that iterates through all of the yaxis objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("scene", selector, row, col) + return self._select_layout_subplots_by_prefix( + "yaxis", selector, row, col, secondary_y=secondary_y + ) - def for_each_scene(self, fn, selector=None, row=None, col=None): + def for_each_yaxis(self, fn, selector=None, row=None, col=None, secondary_y=None): """ - Apply a function to all scene objects that satisfy the + Apply a function to all yaxis objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single scene object. + Function that inputs a single yaxis object. selector: dict or None (default None) Dict to use as selection criteria. - scene objects will be selected if they contain + yaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all scene objects are selected. + (the default), all yaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of scene objects to select. - To select scene objects by row and column, the Figure + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all scene objects are selected. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_scenes(selector=selector, row=row, col=col): + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): fn(obj) return self - def update_scenes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_yaxes( + self, + patch=None, + selector=None, + overwrite=False, + row=None, + col=None, + secondary_y=None, + **kwargs + ): """ - Perform a property update operation on all scene objects + Perform a property update operation on all yaxis objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - scene objects that satisfy the selection criteria. + yaxis objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - scene objects will be selected if they contain + yaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all scene objects are selected. + (the default), all yaxis objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of scene objects to select. - To select scene objects by row and column, the Figure + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all scene objects are selected. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. **kwargs Additional property updates to apply to each selected - scene object. If a property is specified in + yaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15488,333 +16713,1127 @@ def update_scenes(self, patch=None, selector=None, row=None, col=None, **kwargs) self Returns the Figure object that the method was called on """ - for obj in self.select_scenes(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_ternaries(self, selector=None, row=None, col=None): + def select_annotations(self, selector=None, row=None, col=None, secondary_y=None): """ - Select ternary subplot objects from a particular subplot cell - and/or ternary subplot objects that satisfy custom selection - criteria. + Select annotations from a particular subplot cell and/or annotations + that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - ternary objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all ternary objects are selected. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. row, col: int or None (default None) - Subplot row and column index of ternary objects to select. - To select ternary objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all ternary objects are selected. + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the ternary - objects that satisfy all of the specified selection criteria + Generator that iterates through all of the annotations that satisfy + all of the specified selection criteria """ + return self._select_annotations_like( + "annotations", selector=selector, row=row, col=col, secondary_y=secondary_y + ) - return self._select_layout_subplots_by_prefix("ternary", selector, row, col) - - def for_each_ternary(self, fn, selector=None, row=None, col=None): + def for_each_annotation( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): """ - Apply a function to all ternary objects that satisfy the - specified selection criteria - + Apply a function to all annotations that satisfy the specified selection + criteria + Parameters ---------- fn: - Function that inputs a single ternary object. + Function that inputs a single annotation object. selector: dict or None (default None) Dict to use as selection criteria. - ternary objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all ternary objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. row, col: int or None (default None) - Subplot row and column index of ternary objects to select. - To select ternary objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all ternary objects are selected. + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotations that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_ternaries(selector=selector, row=row, col=col): + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): fn(obj) return self - def update_ternaries(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_annotations( + self, patch, selector=None, row=None, col=None, secondary_y=None, **kwargs + ): """ - Perform a property update operation on all ternary objects - that satisfy the specified selection criteria - + Perform a property update operation on all annotations that satisfy the + specified selection criteria + Parameters ---------- - patch: dict - Dictionary of property updates to be applied to all - ternary objects that satisfy the selection criteria. + patch: dict or None (default None) + Dictionary of property updates to be applied to all annotations that + satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - ternary objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all ternary objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. row, col: int or None (default None) - Subplot row and column index of ternary objects to select. - To select ternary objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all ternary objects are selected. + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. **kwargs - Additional property updates to apply to each selected - ternary object. If a property is specified in - both patch and in **kwargs then the one in **kwargs - takes precedence. + Additional property updates to apply to each selected annotation. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_annotation( + self, + arg=None, + align=None, + arrowcolor=None, + arrowhead=None, + arrowside=None, + arrowsize=None, + arrowwidth=None, + ax=None, + axref=None, + ay=None, + ayref=None, + bgcolor=None, + bordercolor=None, + borderpad=None, + borderwidth=None, + captureevents=None, + clicktoshow=None, + font=None, + height=None, + hoverlabel=None, + hovertext=None, + name=None, + opacity=None, + showarrow=None, + standoff=None, + startarrowhead=None, + startarrowsize=None, + startstandoff=None, + templateitemname=None, + text=None, + textangle=None, + valign=None, + visible=None, + width=None, + x=None, + xanchor=None, + xclick=None, + xref=None, + xshift=None, + y=None, + yanchor=None, + yclick=None, + yref=None, + yshift=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + """ + Create and add a new annotation to the figure's layout + + Parameters + ---------- + arg + instance of Annotation or dict with compatible + properties + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans more two or + more lines (i.e. `text` contains one or more
HTML + tags) or if an explicit width is set to override the + text width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head. If `axref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from right + to left (left to right). If `axref` is an axis, this is + an absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ax` is a relative + offset in pixels from `x`. If set to an x axis id + (e.g. "x" or "x2"), `ax` is specified in the same + terms as that axis. This is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. + ay + Sets the y component of the arrow tail about the arrow + head. If `ayref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from bottom + to top (top to bottom). If `ayref` is an axis, this is + an absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ay` is a relative + offset in pixels from `y`. If set to a y axis id (e.g. + "y" or "y2"), `ay` is specified in the same terms as + that axis. This is useful for trendline annotations + which should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the plot. If + you click a data point that exactly matches the `x` and + `y` values of this annotation, and it is hidden + (visible: false), it will appear. In "onoff" mode, you + must click the same point again to make it disappear, + so if you click multiple points, you can show multiple + annotations. In "onout" mode, a click anywhere else in + the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for example to + label the side of a bar. To label markers though, + `standoff` is preferred over `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + plotly.graph_objects.layout.annotation.Hoverlabel + instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (
), bold (), italics (), hyperlinks + (). Tags , , + are also supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xclick + Toggle this annotation when clicking a data point whose + `x` value is `xclick` rather than the annotation's `x` + value. + xref + Sets the annotation's x coordinate axis. If set to an x + axis id (e.g. "x" or "x2"), the `x` position refers to + an x coordinate If set to "paper", the `x` position + refers to the distance from the left side of the + plotting area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yclick + Toggle this annotation when clicking a data point whose + `y` value is `yclick` rather than the annotation's `y` + value. + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + row + Subplot row for annotation + col + Subplot column for annotation + secondary_y + Whether to add annotation to secondary y-axis + Returns ------- - self - Returns the Figure object that the method was called on + Figure """ - for obj in self.select_ternaries(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) - - return self + new_obj = _layout.Annotation( + arg, + align=align, + arrowcolor=arrowcolor, + arrowhead=arrowhead, + arrowside=arrowside, + arrowsize=arrowsize, + arrowwidth=arrowwidth, + ax=ax, + axref=axref, + ay=ay, + ayref=ayref, + bgcolor=bgcolor, + bordercolor=bordercolor, + borderpad=borderpad, + borderwidth=borderwidth, + captureevents=captureevents, + clicktoshow=clicktoshow, + font=font, + height=height, + hoverlabel=hoverlabel, + hovertext=hovertext, + name=name, + opacity=opacity, + showarrow=showarrow, + standoff=standoff, + startarrowhead=startarrowhead, + startarrowsize=startarrowsize, + startstandoff=startstandoff, + templateitemname=templateitemname, + text=text, + textangle=textangle, + valign=valign, + visible=visible, + width=width, + x=x, + xanchor=xanchor, + xclick=xclick, + xref=xref, + xshift=xshift, + y=y, + yanchor=yanchor, + yclick=yclick, + yref=yref, + yshift=yshift, + **kwargs + ) + return self._add_annotation_like( + "annotation", + "annotations", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + ) - def select_xaxes(self, selector=None, row=None, col=None): + def select_layout_images(self, selector=None, row=None, col=None, secondary_y=None): """ - Select xaxis subplot objects from a particular subplot cell - and/or xaxis subplot objects that satisfy custom selection - criteria. + Select images from a particular subplot cell and/or images + that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - xaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all xaxis objects are selected. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. row, col: int or None (default None) - Subplot row and column index of xaxis objects to select. - To select xaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all xaxis objects are selected. + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the xaxis - objects that satisfy all of the specified selection criteria + Generator that iterates through all of the images that satisfy + all of the specified selection criteria """ + return self._select_annotations_like( + "images", selector=selector, row=row, col=col, secondary_y=secondary_y + ) - return self._select_layout_subplots_by_prefix("xaxis", selector, row, col) - - def for_each_xaxis(self, fn, selector=None, row=None, col=None): + def for_each_layout_image( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): """ - Apply a function to all xaxis objects that satisfy the - specified selection criteria - + Apply a function to all images that satisfy the specified selection + criteria + Parameters ---------- fn: - Function that inputs a single xaxis object. + Function that inputs a single image object. selector: dict or None (default None) Dict to use as selection criteria. - xaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all xaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. row, col: int or None (default None) - Subplot row and column index of xaxis objects to select. - To select xaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all xaxis objects are selected. + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + images that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_xaxes(selector=selector, row=row, col=col): + for obj in self._select_annotations_like( + prop="images", selector=selector, row=row, col=col, secondary_y=secondary_y + ): fn(obj) return self - def update_xaxes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_layout_images( + self, patch, selector=None, row=None, col=None, secondary_y=None, **kwargs + ): """ - Perform a property update operation on all xaxis objects - that satisfy the specified selection criteria - + Perform a property update operation on all images that satisfy the + specified selection criteria + Parameters ---------- - patch: dict - Dictionary of property updates to be applied to all - xaxis objects that satisfy the selection criteria. + patch: dict or None (default None) + Dictionary of property updates to be applied to all images that + satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - xaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all xaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. row, col: int or None (default None) - Subplot row and column index of xaxis objects to select. - To select xaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all xaxis objects are selected. + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. **kwargs - Additional property updates to apply to each selected - xaxis object. If a property is specified in - both patch and in **kwargs then the one in **kwargs - takes precedence. + Additional property updates to apply to each selected image. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_xaxes(selector=selector, row=row, col=col): + for obj in self._select_annotations_like( + prop="images", selector=selector, row=row, col=col, secondary_y=secondary_y + ): obj.update(patch, **kwargs) return self - def select_yaxes(self, selector=None, row=None, col=None, secondary_y=None): + def add_layout_image( + self, + arg=None, + layer=None, + name=None, + opacity=None, + sizex=None, + sizey=None, + sizing=None, + source=None, + templateitemname=None, + visible=None, + x=None, + xanchor=None, + xref=None, + y=None, + yanchor=None, + yref=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): """ - Select yaxis subplot objects from a particular subplot cell - and/or yaxis subplot objects that satisfy custom selection - criteria. + Create and add a new image to the figure's layout + + Parameters + ---------- + arg + instance of Image or dict with compatible properties + layer + Specifies whether images are drawn below or above + traces. When `xref` and `yref` are both set to `paper`, + image is drawn below the entire plot area. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The image + will be sized based on the `position` value. When + `xref` is set to `paper`, units are sized relative to + the plot width. + sizey + Sets the image container size vertically. The image + will be sized based on the `position` value. When + `yref` is set to `paper`, units are sized relative to + the plot height. + sizing + Specifies which dimension of the image to constrain. + source + Specifies the URL of the image to be used. The URL must + be accessible from the domain where the plot code is + run, and can be either relative or absolute. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this image is visible. + x + Sets the image's x position. When `xref` is set to + `paper`, units are sized relative to the plot height. + See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + data coordinate If set to "paper", the `x` position + refers to the distance from the left of plot in + normalized coordinates where 0 (1) corresponds to the + left (right). + y + Sets the image's y position. When `yref` is set to + `paper`, units are sized relative to the plot height. + See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + data coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds to the + bottom (top). + row + Subplot row for image + col + Subplot column for image + secondary_y + Whether to add image to secondary y-axis + + Returns + ------- + Figure + """ + new_obj = _layout.Image( + arg, + layer=layer, + name=name, + opacity=opacity, + sizex=sizex, + sizey=sizey, + sizing=sizing, + source=source, + templateitemname=templateitemname, + visible=visible, + x=x, + xanchor=xanchor, + xref=xref, + y=y, + yanchor=yanchor, + yref=yref, + **kwargs + ) + return self._add_annotation_like( + "image", "images", new_obj, row=row, col=col, secondary_y=secondary_y + ) + + def select_shapes(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select shapes from a particular subplot cell and/or shapes + that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - yaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all yaxis objects are selected. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. row, col: int or None (default None) - Subplot row and column index of yaxis objects to select. - To select yaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all yaxis objects are selected. + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. secondary_y: boolean or None (default None) - * If True, only select yaxis objects associated with the secondary + * If True, only select shapes associated with the secondary y-axis of the subplot. - * If False, only select yaxis objects associated with the primary + * If False, only select shapes associated with the primary y-axis of the subplot. - * If None (the default), do not filter yaxis objects based on - a secondary y-axis condition. - - To select yaxis objects by secondary y-axis, the Figure must - have been created using plotly.subplots.make_subplots. See - the docstring for the specs argument to make_subplots for more - info on creating subplots with secondary y-axes. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the yaxis - objects that satisfy all of the specified selection criteria + Generator that iterates through all of the shapes that satisfy + all of the specified selection criteria """ - - return self._select_layout_subplots_by_prefix( - "yaxis", selector, row, col, secondary_y=secondary_y + return self._select_annotations_like( + "shapes", selector=selector, row=row, col=col, secondary_y=secondary_y ) - def for_each_yaxis(self, fn, selector=None, row=None, col=None, secondary_y=None): + def for_each_shape(self, fn, selector=None, row=None, col=None, secondary_y=None): """ - Apply a function to all yaxis objects that satisfy the - specified selection criteria - + Apply a function to all shapes that satisfy the specified selection + criteria + Parameters ---------- fn: - Function that inputs a single yaxis object. + Function that inputs a single shape object. selector: dict or None (default None) Dict to use as selection criteria. - yaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all yaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. row, col: int or None (default None) - Subplot row and column index of yaxis objects to select. - To select yaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all yaxis objects are selected. + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shapes that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. secondary_y: boolean or None (default None) - * If True, only select yaxis objects associated with the secondary + * If True, only select shapes associated with the secondary y-axis of the subplot. - * If False, only select yaxis objects associated with the primary + * If False, only select shapes associated with the primary y-axis of the subplot. - * If None (the default), do not filter yaxis objects based on - a secondary y-axis condition. - - To select yaxis objects by secondary y-axis, the Figure must - have been created using plotly.subplots.make_subplots. See - the docstring for the specs argument to make_subplots for more - info on creating subplots with secondary y-axes. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_yaxes( - selector=selector, row=row, col=col, secondary_y=secondary_y + for obj in self._select_annotations_like( + prop="shapes", selector=selector, row=row, col=col, secondary_y=secondary_y ): fn(obj) return self - def update_yaxes( - self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + def update_shapes( + self, patch, selector=None, row=None, col=None, secondary_y=None, **kwargs ): """ - Perform a property update operation on all yaxis objects - that satisfy the specified selection criteria - + Perform a property update operation on all shapes that satisfy the + specified selection criteria + Parameters ---------- - patch: dict - Dictionary of property updates to be applied to all - yaxis objects that satisfy the selection criteria. + patch: dict or None (default None) + Dictionary of property updates to be applied to all shapes that + satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - yaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all yaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. row, col: int or None (default None) - Subplot row and column index of yaxis objects to select. - To select yaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all yaxis objects are selected. + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. secondary_y: boolean or None (default None) - * If True, only select yaxis objects associated with the secondary + * If True, only select shapes associated with the secondary y-axis of the subplot. - * If False, only select yaxis objects associated with the primary + * If False, only select shapes associated with the primary y-axis of the subplot. - * If None (the default), do not filter yaxis objects based on - a secondary y-axis condition. - - To select yaxis objects by secondary y-axis, the Figure must - have been created using plotly.subplots.make_subplots. See - the docstring for the specs argument to make_subplots for more - info on creating subplots with secondary y-axes. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. **kwargs - Additional property updates to apply to each selected - yaxis object. If a property is specified in - both patch and in **kwargs then the one in **kwargs - takes precedence. + Additional property updates to apply to each selected shape. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_yaxes( - selector=selector, row=row, col=col, secondary_y=secondary_y + for obj in self._select_annotations_like( + prop="shapes", selector=selector, row=row, col=col, secondary_y=secondary_y ): obj.update(patch, **kwargs) return self + + def add_shape( + self, + arg=None, + fillcolor=None, + layer=None, + line=None, + name=None, + opacity=None, + path=None, + templateitemname=None, + type=None, + visible=None, + x0=None, + x1=None, + xanchor=None, + xref=None, + xsizemode=None, + y0=None, + y1=None, + yanchor=None, + yref=None, + ysizemode=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + """ + Create and add a new shape to the figure's layout + + Parameters + ---------- + arg + instance of Shape or dict with compatible properties + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or above + traces. + line + plotly.graph_objects.layout.shape.Line instance or dict + with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the pixel + values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and taken + unmodified as pixels relative to `xanchor` and + `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not + relative. So the allowed segments are: M, L, H, V, Q, + C, T, S, and Z arcs (A) are not allowed because radius + rx and ry are relative. In the future we could consider + supporting relative commands, but we would have to + decide on how to handle date and log axes. Note that + even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. + no chained "polybezier" commands - specify the segment + type for each one. On category axes, values are numbers + scaled to the serial numbers of categories because + using the categories themselves there would be no way + to describe fractional positions On data axes: because + space and T are both normal components of path strings, + we can't use either to separate date from time parts. + Therefore we'll use underscore for this purpose: + 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If "line", a line + is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect + to the axes' sizing mode. If "circle", a circle is + drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with + respect to the axes' sizing mode. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to + the axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' sizing + mode. + visible + Determines whether or not this shape is visible. + x0 + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` set to + "pixel". Specifies the anchor point on the x axis to + which `x0`, `x1` and x coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `xsizemode` not + set to "pixel". + xref + Sets the shape's x coordinate axis. If set to an x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + coordinate. If set to "paper", the `x` position refers + to the distance from the left side of the plotting area + in normalized coordinates where 0 (1) corresponds to + the left (right) side. If the axis `type` is "log", + then you must take the log of your desired range. If + the axis `type` is "date", then you must convert the + date to unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. If set + to "scaled", `x0`, `x1` and x coordinates within `path` + refer to data values on the x axis or a fraction of the + plot area's width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in terms of + data or plot fraction but `x0`, `x1` and x coordinates + within `path` are pixels relative to `xanchor`. This + way, the shape can have a fixed width while maintaining + a position relative to data or plot fraction. + y0 + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` set to + "pixel". Specifies the anchor point on the y axis to + which `y0`, `y1` and y coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `ysizemode` not + set to "pixel". + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. If set + to "scaled", `y0`, `y1` and y coordinates within `path` + refer to data values on the y axis or a fraction of the + plot area's height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in terms of + data or plot fraction but `y0`, `y1` and y coordinates + within `path` are pixels relative to `yanchor`. This + way, the shape can have a fixed height while + maintaining a position relative to data or plot + fraction. + row + Subplot row for shape + col + Subplot column for shape + secondary_y + Whether to add shape to secondary y-axis + + Returns + ------- + Figure + """ + new_obj = _layout.Shape( + arg, + fillcolor=fillcolor, + layer=layer, + line=line, + name=name, + opacity=opacity, + path=path, + templateitemname=templateitemname, + type=type, + visible=visible, + x0=x0, + x1=x1, + xanchor=xanchor, + xref=xref, + xsizemode=xsizemode, + y0=y0, + y1=y1, + yanchor=yanchor, + yref=yref, + ysizemode=ysizemode, + **kwargs + ) + return self._add_annotation_like( + "shape", "shapes", new_obj, row=row, col=col, secondary_y=secondary_y + ) diff --git a/packages/python/plotly/plotly/graph_objs/_figurewidget.py b/packages/python/plotly/plotly/graph_objs/_figurewidget.py index af6758944b3..a793c3f178a 100644 --- a/packages/python/plotly/plotly/graph_objs/_figurewidget.py +++ b/packages/python/plotly/plotly/graph_objs/_figurewidget.py @@ -42,9 +42,11 @@ Sunburst, Surface, Table, + Treemap, Violin, Volume, Waterfall, + layout as _layout, ) @@ -79,8 +81,8 @@ def __init__( 'scattergeo', 'scattergl', 'scattermapbox', 'scatterpolar', 'scatterpolargl', 'scatterternary', 'splom', 'streamtube', - 'sunburst', 'surface', 'table', 'violin', - 'volume', 'waterfall'] + 'sunburst', 'surface', 'table', 'treemap', + 'violin', 'volume', 'waterfall'] - All remaining properties are passed to the constructor of the specified trace type @@ -245,6 +247,17 @@ def __init__( you can set `false` to disable. Colors provided in the trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether + given by `treemapcolorway` or inherited from + `colorway`) will be extended to three times its + original length by first repeating every color + 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. font Sets the global font. Note that fonts used in traces and other layout components inherit from @@ -337,7 +350,7 @@ def __init__( in various `text` attributes. Attributes such as the graph, axis and colorbar `title.text`, annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenues` and `sliders` + `rangeselector`, `updatemenus` and `sliders` `label` text all support `meta`. One can access `meta` fields using template strings: `%{meta[i]}` where `i` is the index of the @@ -469,6 +482,12 @@ def __init__( transition Sets transition options used during Plotly.react updates. + treemapcolorway + Sets the default treemap slice colors. Defaults + to the main `colorway` used for trace colors. + If you specify a new list here it can still be + extended with lighter and darker colors, see + `extendtreemapcolors`. uirevision Used to allow user interactions with the plot to persist after `Plotly.react` calls that are @@ -803,6 +822,8 @@ def add_bar( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, tsrc=None, uid=None, uirevision=None, @@ -890,7 +911,12 @@ def add_bar( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1023,6 +1049,25 @@ def add_bar( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . tsrc Sets the source reference on plot.ly for t . uid @@ -1159,6 +1204,8 @@ def add_bar( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, tsrc=tsrc, uid=uid, uirevision=uirevision, @@ -1274,7 +1321,12 @@ def add_barpolar( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1594,7 +1646,12 @@ def add_box( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -2137,9 +2194,6 @@ def add_carpet( da=None, db=None, font=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, ids=None, idssrc=None, meta=None, @@ -2198,8 +2252,8 @@ def add_carpet( Sets the source reference on plot.ly for b . carpet An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie + and `contourcarpet` traces can specify a carpet plot on + which they lie cheaterslope The shift applied to each successive row of data in creating a cheater plot. Only used if `x` is been @@ -2223,16 +2277,6 @@ def add_carpet( font The default font used for axis & tick labels on this carpet - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.carpet.Hoverlabel instance or dict - with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an @@ -2350,9 +2394,6 @@ def add_carpet( da=da, db=db, font=font, - hoverinfo=hoverinfo, - hoverinfosrc=hoverinfosrc, - hoverlabel=hoverlabel, ids=ids, idssrc=idssrc, meta=meta, @@ -2488,7 +2529,12 @@ def add_choropleth( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -2796,7 +2842,12 @@ def add_choroplethmapbox( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -3127,7 +3178,12 @@ def add_cone( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -3495,7 +3551,12 @@ def add_contour( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -3773,9 +3834,6 @@ def add_contourcarpet( da=None, db=None, fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, hovertext=None, hovertextsrc=None, ids=None, @@ -3903,16 +3961,6 @@ def add_contourcarpet( Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - hoverinfo - Determines which trace information appear on hover. If - `none` or `skip` are set, no information is displayed - upon hovering. But, if `none` is set, click and hover - events are still fired. - hoverinfosrc - Sets the source reference on plot.ly for hoverinfo . - hoverlabel - plotly.graph_objects.contourcarpet.Hoverlabel instance - or dict with compatible properties hovertext Same as `text`. hovertextsrc @@ -4078,9 +4126,6 @@ def add_contourcarpet( da=da, db=db, fillcolor=fillcolor, - hoverinfo=hoverinfo, - hoverinfosrc=hoverinfosrc, - hoverlabel=hoverlabel, hovertext=hovertext, hovertextsrc=hovertextsrc, ids=ids, @@ -4230,7 +4275,12 @@ def add_densitymapbox( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -4468,6 +4518,8 @@ def add_funnel( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, visible=None, @@ -4542,7 +4594,12 @@ def add_funnel( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -4670,6 +4727,27 @@ def add_funnel( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `percentInitial`, `percentPrevious`, `percentTotal`, + `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -4788,6 +4866,8 @@ def add_funnel( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, visible=visible, @@ -4840,6 +4920,8 @@ def add_funnelarea( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, title=None, uid=None, uirevision=None, @@ -4896,18 +4978,22 @@ def add_funnelarea( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. variables `label`, `color`, `value`, - `percent` and `text`. Anything contained in tag - `` is displayed in the secondary box, for - example "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + available. variables `label`, `color`, `value`, `text` + and `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -4995,6 +5081,26 @@ def add_funnelarea( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `text` and `percent`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . title plotly.graph_objects.funnelarea.Title instance or dict with compatible properties @@ -5078,6 +5184,8 @@ def add_funnelarea( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, title=title, uid=uid, uirevision=uirevision, @@ -5232,7 +5340,12 @@ def add_heatmap( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -5932,7 +6045,12 @@ def add_histogram( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -6330,7 +6448,12 @@ def add_histogram2d( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -6757,7 +6880,12 @@ def add_histogram2dcontour( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -7046,7 +7174,12 @@ def add_indicator( """ Add a new Indicator trace - TODO: add description + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. Parameters ---------- @@ -7325,7 +7458,12 @@ def add_isosurface( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -7714,7 +7852,12 @@ def add_mesh3d( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -8319,7 +8462,12 @@ def add_parcats( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -8637,6 +8785,8 @@ def add_pie( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, title=None, titlefont=None, titleposition=None, @@ -8694,7 +8844,12 @@ def add_pie( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -8809,6 +8964,26 @@ def add_pie( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `label`, + `color`, `value`, `percent` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . title plotly.graph_objects.pie.Title instance or dict with compatible properties @@ -8906,6 +9081,8 @@ def add_pie( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, title=title, titlefont=titlefont, titleposition=titleposition, @@ -9402,6 +9579,8 @@ def add_scatter( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, tsrc=None, uid=None, uirevision=None, @@ -9522,7 +9701,12 @@ def add_scatter( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -9662,6 +9846,25 @@ def add_scatter( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . tsrc Sets the source reference on plot.ly for t . uid @@ -9792,6 +9995,8 @@ def add_scatter( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, tsrc=tsrc, uid=uid, uirevision=uirevision, @@ -9847,6 +10052,8 @@ def add_scatter3d( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, visible=None, @@ -9912,7 +10119,12 @@ def add_scatter3d( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10017,6 +10229,25 @@ def add_scatter3d( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -10110,6 +10341,8 @@ def add_scatter3d( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, visible=visible, @@ -10165,6 +10398,8 @@ def add_scattercarpet( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -10194,8 +10429,8 @@ def add_scattercarpet( Sets the source reference on plot.ly for b . carpet An identifier for this carpet, so that `scattercarpet` - and `scattercontour` traces can specify a carpet plot - on which they lie + and `contourcarpet` traces can specify a carpet plot on + which they lie connectgaps Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected. @@ -10245,7 +10480,12 @@ def add_scattercarpet( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10343,6 +10583,26 @@ def add_scattercarpet( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b` and + `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -10444,6 +10704,8 @@ def add_scattercarpet( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -10495,6 +10757,8 @@ def add_scattergeo( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -10556,7 +10820,12 @@ def add_scattergeo( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10673,6 +10942,26 @@ def add_scattergeo( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon`, + `location` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -10756,6 +11045,8 @@ def add_scattergeo( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -10801,6 +11092,8 @@ def add_scattergl( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -10895,7 +11188,12 @@ def add_scattergl( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -10989,6 +11287,25 @@ def add_scattergl( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -11108,6 +11425,8 @@ def add_scattergl( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -11164,6 +11483,8 @@ def add_scattermapbox( textfont=None, textposition=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -11224,7 +11545,12 @@ def add_scattermapbox( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -11333,6 +11659,26 @@ def add_scattermapbox( to the (x,y) coordinates. textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `lat`, `lon` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -11413,6 +11759,8 @@ def add_scattermapbox( textfont=textfont, textposition=textposition, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -11462,6 +11810,8 @@ def add_scatterpolar( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, @@ -11548,7 +11898,12 @@ def add_scatterpolar( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -11660,6 +12015,26 @@ def add_scatterpolar( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . theta Sets the angular coordinates theta0 @@ -11754,6 +12129,8 @@ def add_scatterpolar( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, theta=theta, theta0=theta0, thetasrc=thetasrc, @@ -11805,6 +12182,8 @@ def add_scatterpolargl( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, @@ -11890,7 +12269,12 @@ def add_scatterpolargl( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -12002,6 +12386,26 @@ def add_scatterpolargl( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `r`, `theta` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . theta Sets the angular coordinates theta0 @@ -12094,6 +12498,8 @@ def add_scatterpolargl( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, theta=theta, theta0=theta0, thetasrc=thetasrc, @@ -12149,6 +12555,8 @@ def add_scatterternary( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, unselected=None, @@ -12245,7 +12653,12 @@ def add_scatterternary( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -12356,6 +12769,26 @@ def add_scatterternary( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `a`, `b`, `c` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -12441,6 +12874,8 @@ def add_scatterternary( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, unselected=unselected, @@ -12538,7 +12973,12 @@ def add_splom( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -12778,7 +13218,9 @@ def add_streamtube( `u`, `v`, and `w`. By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. To specify your own starting position, use attributes - `starts.x`, `starts.y` and `starts.z`. + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). Parameters ---------- @@ -12854,7 +13296,12 @@ def add_streamtube( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -13059,6 +13506,7 @@ def add_streamtube( def add_sunburst( self, branchvalues=None, + count=None, customdata=None, customdatasrc=None, domain=None, @@ -13090,6 +13538,8 @@ def add_sunburst( textfont=None, textinfo=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, uid=None, uirevision=None, values=None, @@ -13115,6 +13565,10 @@ def add_sunburst( in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -13143,14 +13597,21 @@ def add_sunburst( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc @@ -13174,24 +13635,24 @@ def add_sunburst( Sets the font used for `textinfo` lying inside the sector. labels - Sets the labels of each of the sunburst sectors. + Sets the labels of each of the sectors. labelssrc Sets the source reference on plot.ly for labels . leaf plotly.graph_objects.sunburst.Leaf instance or dict with compatible properties level - Sets the level from which this sunburst trace hierarchy - is rendered. Set `level` to `''` to start the sunburst - from the root node in the hierarchy. Must be an "id" if - `ids` is filled in, otherwise plotly attempts to find a - matching item in `labels`. + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. marker plotly.graph_objects.sunburst.Marker instance or dict with compatible properties maxdepth - Sets the number of rendered sunburst rings from any - given `level`. Set `maxdepth` to "-1" to render all the + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. meta Assigns extra meta information associated with this @@ -13217,13 +13678,12 @@ def add_sunburst( Sets the font used for `textinfo` lying outside the sector. parents - Sets the parent sectors for each of the sunburst - sectors. Empty string items '' are understood to - reference the root node in the hierarchy. If `ids` is - filled, `parents` items are understood to be "ids" - themselves. When `ids` is not set, plotly attempts to - find matching items in `labels`, but beware they must - be unique. + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. parentssrc Sets the source reference on plot.ly for parents . stream @@ -13241,6 +13701,27 @@ def add_sunburst( Determines which trace information appear on the graph. textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -13264,9 +13745,9 @@ def add_sunburst( preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. values - Sets the values associated with each of the sunburst - sectors. Use with `branchvalues` to determine how the - values are summed. + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. valuessrc Sets the source reference on plot.ly for values . visible @@ -13289,6 +13770,7 @@ def add_sunburst( """ new_trace = Sunburst( branchvalues=branchvalues, + count=count, customdata=customdata, customdatasrc=customdatasrc, domain=domain, @@ -13320,6 +13802,8 @@ def add_sunburst( textfont=textfont, textinfo=textinfo, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, uid=uid, uirevision=uirevision, values=values, @@ -13481,7 +13965,12 @@ def add_surface( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -13846,90 +14335,75 @@ def add_table( ) return self.add_trace(new_trace, row=row, col=col) - def add_violin( + def add_treemap( self, - alignmentgroup=None, - bandwidth=None, - box=None, + branchvalues=None, + count=None, customdata=None, customdatasrc=None, - fillcolor=None, + domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, - hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - jitter=None, - legendgroup=None, - line=None, + insidetextfont=None, + labels=None, + labelssrc=None, + level=None, marker=None, - meanline=None, + maxdepth=None, meta=None, metasrc=None, name=None, - offsetgroup=None, opacity=None, - orientation=None, - pointpos=None, - points=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, stream=None, text=None, + textfont=None, + textinfo=None, + textposition=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, + tiling=None, uid=None, uirevision=None, - unselected=None, + values=None, + valuessrc=None, visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ysrc=None, row=None, col=None, - secondary_y=None, **kwargs ): """ - Add a new Violin trace + Add a new Treemap trace - In vertical (horizontal) violin plots, statistics are computed - using `y` (`x`) values. By supplying an `x` (`y`) array, one - violin per distinct x (y) value is drawn If no `x` (`y`) list - is provided, a single violin is drawn. That violin position is - then positioned with with `name` or with `x0` (`y0`) if - provided. + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". Parameters ---------- - alignmentgroup - Set several traces linked to the same position axis or - matching axes to the same alignmentgroup. This controls - whether bars compute their positional range dependently - or independently. - bandwidth - Sets the bandwidth used to compute the kernel density - estimate. By default, the bandwidth is determined by - Silverman's rule of thumb. - box - plotly.graph_objects.violin.Box instance or dict with - compatible properties + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note @@ -13937,10 +14411,9 @@ def add_violin( the markers DOM elements customdatasrc Sets the source reference on plot.ly for customdata . - fillcolor - Sets the fill color. Defaults to a half-transparent - variant of the line color, marker color, or marker line - color, whichever is available. + domain + plotly.graph_objects.treemap.Domain instance or dict + with compatible properties hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed @@ -13949,12 +14422,8 @@ def add_violin( hoverinfosrc Sets the source reference on plot.ly for hoverinfo . hoverlabel - plotly.graph_objects.violin.Hoverlabel instance or dict - with compatible properties - hoveron - Do the hover effects highlight individual violins or - sample points or the kernel density estimate or any - combination of them? + plotly.graph_objects.treemap.Hoverlabel instance or + dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override @@ -13963,21 +14432,32 @@ def add_violin( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are - available. Anything contained in tag `` is - displayed in the secondary box, for example + available. variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . hovertext - Same as `text`. + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. hovertextsrc Sets the source reference on plot.ly for hovertext . ids @@ -13986,24 +14466,26 @@ def add_violin( array of strings, not numbers or any other type. idssrc Sets the source reference on plot.ly for ids . - jitter - Sets the amount of jitter in the sample points drawn. - If 0, the sample points align along the distribution - axis. If 1, the sample points are drawn in a random - jitter of width equal to the width of the violins. - legendgroup - Sets the legend group for this trace. Traces part of - the same legend group hide/show at the same time when - toggling legend items. - line - plotly.graph_objects.violin.Line instance or dict with - compatible properties + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for labels . + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. marker - plotly.graph_objects.violin.Marker instance or dict - with compatible properties - meanline - plotly.graph_objects.violin.Meanline instance or dict + plotly.graph_objects.treemap.Marker instance or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. meta Assigns extra meta information associated with this trace that can be used in various text attributes. @@ -14021,94 +14503,65 @@ def add_violin( Sets the source reference on plot.ly for meta . name Sets the trace name. The trace name appear as the - legend item and on hover. For violin traces, the name - will also be used for the position coordinate, if `x` - and `x0` (`y` and `y0` if horizontal) are missing and - the position axis is categorical. Note that the trace - name is also used as a default value for attribute - `scalegroup` (please see its description for details). - offsetgroup - Set several traces linked to the same position axis or - matching axes to the same offsetgroup where bars of the - same position coordinate will line up. + legend item and on hover. opacity Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" ("h"), - the distribution is visualized along the vertical - (horizontal). - pointpos - Sets the position of the sample points in relation to - the violins. If 0, the sample points are places over - the center of the violins. Positive (negative) values - correspond to positions to the right (left) for - vertical violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying outside the - whiskers are shown If "suspectedoutliers", the outlier - points are shown and points either less than 4*Q1-3*Q3 - or greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are shown - If False, only the violins are shown with no sample - points - scalegroup - If there are multiple violins that should be sized - according to to some metric (see `scalemode`), link - them by providing a non-empty group id here shared by - every trace in the same group. If a violin's `width` is - undefined, `scalegroup` will default to the trace's - name. In this case, violins with the same names will be - linked together - scalemode - Sets the metric by which the width of each violin is - determined."width" means each violin has the same (max) - width*count* means the violins are scaled by the number - of sample points makingup each violin. - selected - plotly.graph_objects.violin.Selected instance or dict + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for parents . + pathbar + plotly.graph_objects.treemap.Pathbar instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected points. - Has an effect only for traces that support selections. - Note that an empty array means an empty selection where - the `unselected` are turned on for all points, whereas, - any other non-array values means no selection all where - the `selected` and `unselected` styles have no effect. - showlegend - Determines whether or not an item corresponding to this - trace is shown in the legend. - side - Determines on which side of the position value the - density function making up one half of a violin is - plotted. Useful when comparing two violin traces under - "overlay" mode, where one trace has `side` set to - "positive" and the other to "negative". - span - Sets the span in data space for which the density - function will be computed. Has an effect only when - `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space where - the density function will be computed. "soft" means the - span goes from the sample's minimum value minus two - bandwidths to the sample's maximum value plus two - bandwidths. "hard" means the span goes from the - sample's minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the `span` - attribute. stream - plotly.graph_objects.violin.Stream instance or dict + plotly.graph_objects.treemap.Stream instance or dict with compatible properties text - Sets the text elements associated with each sample - value. If a single string, the same string appears over - all the data points. If an array of string, the items - are mapped in order to the this trace's (x,y) - coordinates. To be seen, trace `hoverinfo` must contain - a "text" flag. + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables + `currentPath`, `root`, `entry`, `percentRoot`, + `percentEntry`, `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . + tiling + plotly.graph_objects.treemap.Tiling instance or dict + with compatible properties uid Assign an id to this trace, Use this to provide object constancy between traces during animations and @@ -14131,45 +14584,17 @@ def add_violin( the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. - unselected - plotly.graph_objects.violin.Unselected instance or dict - with compatible properties + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on plot.ly for values . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). - width - Sets the width of the violin in data coordinates. If 0 - (default value) the width is automatically selected - based on the positions of other violin traces in the - same subplot. - x - Sets the x sample data or coordinates. See overview for - more info. - x0 - Sets the x coordinate of the box. See overview for more - info. - xaxis - Sets a reference between this trace's x coordinates and - a 2D cartesian x axis. If "x" (the default value), the - x coordinates refer to `layout.xaxis`. If "x2", the x - coordinates refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on plot.ly for x . - y - Sets the y sample data or coordinates. See overview for - more info. - y0 - Sets the y coordinate of the box. See overview for more - info. - yaxis - Sets a reference between this trace's y coordinates and - a 2D cartesian y axis. If "y" (the default value), the - y coordinates refer to `layout.yaxis`. If "y2", the y - coordinates refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on plot.ly for y . row : int or None (default) Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using @@ -14178,107 +14603,496 @@ def add_violin( Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using `plotly.tools.make_subplots` - secondary_y: boolean or None (default None) - If True, associate this trace with the secondary y-axis of the - subplot at the specified row and col. Only valid if all of the - following conditions are satisfied: - * The figure was created using `plotly.subplots.make_subplots`. - * The row and col arguments are not None - * The subplot at the specified row and col has type xy - (which is the default) and secondary_y True. These - properties are specified in the specs argument to - make_subplots. See the make_subplots docstring for more info. Returns ------- FigureWidget """ - new_trace = Violin( - alignmentgroup=alignmentgroup, - bandwidth=bandwidth, - box=box, + new_trace = Treemap( + branchvalues=branchvalues, + count=count, customdata=customdata, customdatasrc=customdatasrc, - fillcolor=fillcolor, + domain=domain, hoverinfo=hoverinfo, hoverinfosrc=hoverinfosrc, hoverlabel=hoverlabel, - hoveron=hoveron, hovertemplate=hovertemplate, hovertemplatesrc=hovertemplatesrc, hovertext=hovertext, hovertextsrc=hovertextsrc, ids=ids, idssrc=idssrc, - jitter=jitter, - legendgroup=legendgroup, - line=line, + insidetextfont=insidetextfont, + labels=labels, + labelssrc=labelssrc, + level=level, marker=marker, - meanline=meanline, + maxdepth=maxdepth, meta=meta, metasrc=metasrc, name=name, - offsetgroup=offsetgroup, opacity=opacity, - orientation=orientation, - pointpos=pointpos, - points=points, - scalegroup=scalegroup, - scalemode=scalemode, - selected=selected, - selectedpoints=selectedpoints, - showlegend=showlegend, - side=side, - span=span, - spanmode=spanmode, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + pathbar=pathbar, stream=stream, text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, + tiling=tiling, uid=uid, uirevision=uirevision, - unselected=unselected, + values=values, + valuessrc=valuessrc, visible=visible, - width=width, - x=x, - x0=x0, - xaxis=xaxis, - xsrc=xsrc, - y=y, - y0=y0, - yaxis=yaxis, - ysrc=ysrc, **kwargs ) - return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + return self.add_trace(new_trace, row=row, col=col) - def add_volume( + def add_violin( self, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, + alignmentgroup=None, + bandwidth=None, + box=None, customdata=None, customdatasrc=None, - flatshading=None, + fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, + hoveron=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, - isomax=None, - isomin=None, - lighting=None, - lightposition=None, + jitter=None, + legendgroup=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ysrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + """ + Add a new Violin trace + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + plotly.graph_objects.violin.Box instance or dict with + compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on plot.ly for customdata . + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on plot.ly for hoverinfo . + hoverlabel + plotly.graph_objects.violin.Hoverlabel instance or dict + with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables + available in `hovertemplate` are the ones emitted as + event data described at this link + https://plot.ly/javascript/plotlyjs-events/#event-data. + Additionally, every attributes that can be specified + per-point (the ones that are `arrayOk: true`) are + available. Anything contained in tag `` is + displayed in the secondary box, for example + "{fullData.name}". To hide the secondary + box completely, use an empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for hovertemplate + . + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on plot.ly for hovertext . + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legendgroup + Sets the legend group for this trace. Traces part of + the same legend group hide/show at the same time when + toggling legend items. + line + plotly.graph_objects.violin.Line instance or dict with + compatible properties + marker + plotly.graph_objects.violin.Marker instance or dict + with compatible properties + meanline + plotly.graph_objects.violin.Meanline instance or dict + with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on plot.ly for meta . + name + Sets the trace name. The trace name appear as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined."width" means each violin has the same (max) + width*count* means the violins are scaled by the number + of sample points makingup each violin. + selected + plotly.graph_objects.violin.Selected instance or dict + with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + plotly.graph_objects.violin.Stream instance or dict + with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on plot.ly for text . + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + plotly.graph_objects.violin.Unselected instance or dict + with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate of the box. See overview for more + info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on plot.ly for x . + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate of the box. See overview for more + info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on plot.ly for y . + row : int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + col : int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + new_trace = Violin( + alignmentgroup=alignmentgroup, + bandwidth=bandwidth, + box=box, + customdata=customdata, + customdatasrc=customdatasrc, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + jitter=jitter, + legendgroup=legendgroup, + line=line, + marker=marker, + meanline=meanline, + meta=meta, + metasrc=metasrc, + name=name, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + pointpos=pointpos, + points=points, + scalegroup=scalegroup, + scalemode=scalemode, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + side=side, + span=span, + spanmode=spanmode, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ysrc=ysrc, + **kwargs + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_volume( + self, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + lighting=None, + lightposition=None, meta=None, metasrc=None, name=None, @@ -14402,7 +15216,12 @@ def add_volume( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -14662,6 +15481,8 @@ def add_waterfall( textposition=None, textpositionsrc=None, textsrc=None, + texttemplate=None, + texttemplatesrc=None, totals=None, uid=None, uirevision=None, @@ -14744,7 +15565,12 @@ def add_waterfall( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -14877,6 +15703,26 @@ def add_waterfall( . textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the information text + that appear on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format for + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. Every attributes + that can be specified per-point (the ones that are + `arrayOk: true`) are available. variables `initial`, + `delta`, `final` and `label`. + texttemplatesrc + Sets the source reference on plot.ly for texttemplate + . totals plotly.graph_objects.waterfall.Totals instance or dict with compatible properties @@ -15005,6 +15851,8 @@ def add_waterfall( textposition=textposition, textpositionsrc=textpositionsrc, textsrc=textsrc, + texttemplate=texttemplate, + texttemplatesrc=texttemplatesrc, totals=totals, uid=uid, uirevision=uirevision, @@ -15023,88 +15871,394 @@ def add_waterfall( ) return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) - def select_coloraxes(self, selector=None, row=None, col=None): + def select_coloraxes(self, selector=None, row=None, col=None): + """ + Select coloraxis subplot objects from a particular subplot cell + and/or coloraxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + generator + Generator that iterates through all of the coloraxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("coloraxis", selector, row, col) + + def for_each_coloraxis(self, fn, selector=None, row=None, col=None): + """ + Apply a function to all coloraxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single coloraxis object. + selector: dict or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_coloraxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): + """ + Perform a property update operation on all coloraxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + coloraxis objects that satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + **kwargs + Additional property updates to apply to each selected + coloraxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_geos(self, selector=None, row=None, col=None): + """ + Select geo subplot objects from a particular subplot cell + and/or geo subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + generator + Generator that iterates through all of the geo + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("geo", selector, row, col) + + def for_each_geo(self, fn, selector=None, row=None, col=None): + """ + Apply a function to all geo objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single geo object. + selector: dict or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_geos( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): + """ + Perform a property update operation on all geo objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + geo objects that satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + **kwargs + Additional property updates to apply to each selected + geo object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_mapboxes(self, selector=None, row=None, col=None): + """ + Select mapbox subplot objects from a particular subplot cell + and/or mapbox subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + generator + Generator that iterates through all of the mapbox + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) + + def for_each_mapbox(self, fn, selector=None, row=None, col=None): + """ + Apply a function to all mapbox objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single mapbox object. + selector: dict or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_mapboxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Select coloraxis subplot objects from a particular subplot cell - and/or coloraxis subplot objects that satisfy custom selection + Perform a property update operation on all mapbox objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + mapbox objects that satisfy the selection criteria. + selector: dict or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + **kwargs + Additional property updates to apply to each selected + mapbox object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_polars(self, selector=None, row=None, col=None): + """ + Select polar subplot objects from a particular subplot cell + and/or polar subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - coloraxis objects will be selected if they contain + polar objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all coloraxis objects are selected. + (the default), all polar objects are selected. row, col: int or None (default None) - Subplot row and column index of coloraxis objects to select. - To select coloraxis objects by row and column, the Figure + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all coloraxis objects are selected. + If None (the default), all polar objects are selected. Returns ------- generator - Generator that iterates through all of the coloraxis + Generator that iterates through all of the polar objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("coloraxis", selector, row, col) + return self._select_layout_subplots_by_prefix("polar", selector, row, col) - def for_each_coloraxis(self, fn, selector=None, row=None, col=None): + def for_each_polar(self, fn, selector=None, row=None, col=None): """ - Apply a function to all coloraxis objects that satisfy the + Apply a function to all polar objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single coloraxis object. + Function that inputs a single polar object. selector: dict or None (default None) Dict to use as selection criteria. - coloraxis objects will be selected if they contain + polar objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all coloraxis objects are selected. + (the default), all polar objects are selected. row, col: int or None (default None) - Subplot row and column index of coloraxis objects to select. - To select coloraxis objects by row and column, the Figure + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all coloraxis objects are selected. + If None (the default), all polar objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_coloraxes(selector=selector, row=row, col=col): + for obj in self.select_polars(selector=selector, row=row, col=col): fn(obj) return self - def update_coloraxes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_polars( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all coloraxis objects + Perform a property update operation on all polar objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - coloraxis objects that satisfy the selection criteria. + polar objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - coloraxis objects will be selected if they contain + polar objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all coloraxis objects are selected. + (the default), all polar objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of coloraxis objects to select. - To select coloraxis objects by row and column, the Figure + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all coloraxis objects are selected. + If None (the default), all polar objects are selected. **kwargs Additional property updates to apply to each selected - coloraxis object. If a property is specified in + polar object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15112,93 +16266,99 @@ def update_coloraxes(self, patch=None, selector=None, row=None, col=None, **kwar self Returns the Figure object that the method was called on """ - for obj in self.select_coloraxes(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_polars(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_geos(self, selector=None, row=None, col=None): + def select_scenes(self, selector=None, row=None, col=None): """ - Select geo subplot objects from a particular subplot cell - and/or geo subplot objects that satisfy custom selection + Select scene subplot objects from a particular subplot cell + and/or scene subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - geo objects will be selected if they contain + scene objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all geo objects are selected. + (the default), all scene objects are selected. row, col: int or None (default None) - Subplot row and column index of geo objects to select. - To select geo objects by row and column, the Figure + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all geo objects are selected. + If None (the default), all scene objects are selected. Returns ------- generator - Generator that iterates through all of the geo + Generator that iterates through all of the scene objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("geo", selector, row, col) + return self._select_layout_subplots_by_prefix("scene", selector, row, col) - def for_each_geo(self, fn, selector=None, row=None, col=None): + def for_each_scene(self, fn, selector=None, row=None, col=None): """ - Apply a function to all geo objects that satisfy the + Apply a function to all scene objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single geo object. + Function that inputs a single scene object. selector: dict or None (default None) Dict to use as selection criteria. - geo objects will be selected if they contain + scene objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all geo objects are selected. + (the default), all scene objects are selected. row, col: int or None (default None) - Subplot row and column index of geo objects to select. - To select geo objects by row and column, the Figure + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all geo objects are selected. + If None (the default), all scene objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_geos(selector=selector, row=row, col=col): + for obj in self.select_scenes(selector=selector, row=row, col=col): fn(obj) return self - def update_geos(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_scenes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all geo objects + Perform a property update operation on all scene objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - geo objects that satisfy the selection criteria. + scene objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - geo objects will be selected if they contain + scene objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all geo objects are selected. + (the default), all scene objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of geo objects to select. - To select geo objects by row and column, the Figure + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all geo objects are selected. + If None (the default), all scene objects are selected. **kwargs Additional property updates to apply to each selected - geo object. If a property is specified in + scene object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15206,93 +16366,99 @@ def update_geos(self, patch=None, selector=None, row=None, col=None, **kwargs): self Returns the Figure object that the method was called on """ - for obj in self.select_geos(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_scenes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_mapboxes(self, selector=None, row=None, col=None): + def select_ternaries(self, selector=None, row=None, col=None): """ - Select mapbox subplot objects from a particular subplot cell - and/or mapbox subplot objects that satisfy custom selection + Select ternary subplot objects from a particular subplot cell + and/or ternary subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - mapbox objects will be selected if they contain + ternary objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all mapbox objects are selected. + (the default), all ternary objects are selected. row, col: int or None (default None) - Subplot row and column index of mapbox objects to select. - To select mapbox objects by row and column, the Figure + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all mapbox objects are selected. + If None (the default), all ternary objects are selected. Returns ------- generator - Generator that iterates through all of the mapbox + Generator that iterates through all of the ternary objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) + return self._select_layout_subplots_by_prefix("ternary", selector, row, col) - def for_each_mapbox(self, fn, selector=None, row=None, col=None): + def for_each_ternary(self, fn, selector=None, row=None, col=None): """ - Apply a function to all mapbox objects that satisfy the + Apply a function to all ternary objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single mapbox object. + Function that inputs a single ternary object. selector: dict or None (default None) Dict to use as selection criteria. - mapbox objects will be selected if they contain + ternary objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all mapbox objects are selected. + (the default), all ternary objects are selected. row, col: int or None (default None) - Subplot row and column index of mapbox objects to select. - To select mapbox objects by row and column, the Figure + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all mapbox objects are selected. + If None (the default), all ternary objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_mapboxes(selector=selector, row=row, col=col): + for obj in self.select_ternaries(selector=selector, row=row, col=col): fn(obj) return self - def update_mapboxes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_ternaries( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all mapbox objects + Perform a property update operation on all ternary objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - mapbox objects that satisfy the selection criteria. + ternary objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - mapbox objects will be selected if they contain + ternary objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all mapbox objects are selected. + (the default), all ternary objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of mapbox objects to select. - To select mapbox objects by row and column, the Figure + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all mapbox objects are selected. + If None (the default), all ternary objects are selected. **kwargs Additional property updates to apply to each selected - mapbox object. If a property is specified in + ternary object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15300,93 +16466,99 @@ def update_mapboxes(self, patch=None, selector=None, row=None, col=None, **kwarg self Returns the Figure object that the method was called on """ - for obj in self.select_mapboxes(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_ternaries(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_polars(self, selector=None, row=None, col=None): + def select_xaxes(self, selector=None, row=None, col=None): """ - Select polar subplot objects from a particular subplot cell - and/or polar subplot objects that satisfy custom selection + Select xaxis subplot objects from a particular subplot cell + and/or xaxis subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - polar objects will be selected if they contain + xaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all polar objects are selected. + (the default), all xaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of polar objects to select. - To select polar objects by row and column, the Figure + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all polar objects are selected. + If None (the default), all xaxis objects are selected. Returns ------- generator - Generator that iterates through all of the polar + Generator that iterates through all of the xaxis objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("polar", selector, row, col) + return self._select_layout_subplots_by_prefix("xaxis", selector, row, col) - def for_each_polar(self, fn, selector=None, row=None, col=None): + def for_each_xaxis(self, fn, selector=None, row=None, col=None): """ - Apply a function to all polar objects that satisfy the + Apply a function to all xaxis objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single polar object. + Function that inputs a single xaxis object. selector: dict or None (default None) Dict to use as selection criteria. - polar objects will be selected if they contain + xaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all polar objects are selected. + (the default), all xaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of polar objects to select. - To select polar objects by row and column, the Figure + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all polar objects are selected. + If None (the default), all xaxis objects are selected. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_polars(selector=selector, row=row, col=col): + for obj in self.select_xaxes(selector=selector, row=row, col=col): fn(obj) return self - def update_polars(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_xaxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ): """ - Perform a property update operation on all polar objects + Perform a property update operation on all xaxis objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - polar objects that satisfy the selection criteria. + xaxis objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - polar objects will be selected if they contain + xaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all polar objects are selected. + (the default), all xaxis objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of polar objects to select. - To select polar objects by row and column, the Figure + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all polar objects are selected. + If None (the default), all xaxis objects are selected. **kwargs Additional property updates to apply to each selected - polar object. If a property is specified in + xaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15394,93 +16566,146 @@ def update_polars(self, patch=None, selector=None, row=None, col=None, **kwargs) self Returns the Figure object that the method was called on """ - for obj in self.select_polars(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_xaxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_scenes(self, selector=None, row=None, col=None): + def select_yaxes(self, selector=None, row=None, col=None, secondary_y=None): """ - Select scene subplot objects from a particular subplot cell - and/or scene subplot objects that satisfy custom selection + Select yaxis subplot objects from a particular subplot cell + and/or yaxis subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - scene objects will be selected if they contain + yaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all scene objects are selected. + (the default), all yaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of scene objects to select. - To select scene objects by row and column, the Figure + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all scene objects are selected. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the scene + Generator that iterates through all of the yaxis objects that satisfy all of the specified selection criteria """ - return self._select_layout_subplots_by_prefix("scene", selector, row, col) + return self._select_layout_subplots_by_prefix( + "yaxis", selector, row, col, secondary_y=secondary_y + ) - def for_each_scene(self, fn, selector=None, row=None, col=None): + def for_each_yaxis(self, fn, selector=None, row=None, col=None, secondary_y=None): """ - Apply a function to all scene objects that satisfy the + Apply a function to all yaxis objects that satisfy the specified selection criteria Parameters ---------- fn: - Function that inputs a single scene object. + Function that inputs a single yaxis object. selector: dict or None (default None) Dict to use as selection criteria. - scene objects will be selected if they contain + yaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all scene objects are selected. + (the default), all yaxis objects are selected. row, col: int or None (default None) - Subplot row and column index of scene objects to select. - To select scene objects by row and column, the Figure + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all scene objects are selected. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_scenes(selector=selector, row=row, col=col): + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): fn(obj) return self - def update_scenes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_yaxes( + self, + patch=None, + selector=None, + overwrite=False, + row=None, + col=None, + secondary_y=None, + **kwargs + ): """ - Perform a property update operation on all scene objects + Perform a property update operation on all yaxis objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all - scene objects that satisfy the selection criteria. + yaxis objects that satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - scene objects will be selected if they contain + yaxis objects will be selected if they contain properties corresponding to all of the dictionary's keys, with values that exactly match the supplied values. If None - (the default), all scene objects are selected. + (the default), all yaxis objects are selected. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. row, col: int or None (default None) - Subplot row and column index of scene objects to select. - To select scene objects by row and column, the Figure + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. - If None (the default), all scene objects are selected. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. **kwargs Additional property updates to apply to each selected - scene object. If a property is specified in + yaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns @@ -15488,333 +16713,1127 @@ def update_scenes(self, patch=None, selector=None, row=None, col=None, **kwargs) self Returns the Figure object that the method was called on """ - for obj in self.select_scenes(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + obj.update(patch, overwrite=overwrite, **kwargs) return self - def select_ternaries(self, selector=None, row=None, col=None): + def select_annotations(self, selector=None, row=None, col=None, secondary_y=None): """ - Select ternary subplot objects from a particular subplot cell - and/or ternary subplot objects that satisfy custom selection - criteria. + Select annotations from a particular subplot cell and/or annotations + that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - ternary objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all ternary objects are selected. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. row, col: int or None (default None) - Subplot row and column index of ternary objects to select. - To select ternary objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all ternary objects are selected. + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the ternary - objects that satisfy all of the specified selection criteria + Generator that iterates through all of the annotations that satisfy + all of the specified selection criteria """ + return self._select_annotations_like( + "annotations", selector=selector, row=row, col=col, secondary_y=secondary_y + ) - return self._select_layout_subplots_by_prefix("ternary", selector, row, col) - - def for_each_ternary(self, fn, selector=None, row=None, col=None): + def for_each_annotation( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): """ - Apply a function to all ternary objects that satisfy the - specified selection criteria - + Apply a function to all annotations that satisfy the specified selection + criteria + Parameters ---------- fn: - Function that inputs a single ternary object. + Function that inputs a single annotation object. selector: dict or None (default None) Dict to use as selection criteria. - ternary objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all ternary objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. row, col: int or None (default None) - Subplot row and column index of ternary objects to select. - To select ternary objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all ternary objects are selected. + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotations that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_ternaries(selector=selector, row=row, col=col): + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): fn(obj) return self - def update_ternaries(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_annotations( + self, patch, selector=None, row=None, col=None, secondary_y=None, **kwargs + ): """ - Perform a property update operation on all ternary objects - that satisfy the specified selection criteria - + Perform a property update operation on all annotations that satisfy the + specified selection criteria + Parameters ---------- - patch: dict - Dictionary of property updates to be applied to all - ternary objects that satisfy the selection criteria. + patch: dict or None (default None) + Dictionary of property updates to be applied to all annotations that + satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - ternary objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all ternary objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. row, col: int or None (default None) - Subplot row and column index of ternary objects to select. - To select ternary objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all ternary objects are selected. + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. **kwargs - Additional property updates to apply to each selected - ternary object. If a property is specified in - both patch and in **kwargs then the one in **kwargs - takes precedence. + Additional property updates to apply to each selected annotation. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_annotation( + self, + arg=None, + align=None, + arrowcolor=None, + arrowhead=None, + arrowside=None, + arrowsize=None, + arrowwidth=None, + ax=None, + axref=None, + ay=None, + ayref=None, + bgcolor=None, + bordercolor=None, + borderpad=None, + borderwidth=None, + captureevents=None, + clicktoshow=None, + font=None, + height=None, + hoverlabel=None, + hovertext=None, + name=None, + opacity=None, + showarrow=None, + standoff=None, + startarrowhead=None, + startarrowsize=None, + startstandoff=None, + templateitemname=None, + text=None, + textangle=None, + valign=None, + visible=None, + width=None, + x=None, + xanchor=None, + xclick=None, + xref=None, + xshift=None, + y=None, + yanchor=None, + yclick=None, + yref=None, + yshift=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + """ + Create and add a new annotation to the figure's layout + + Parameters + ---------- + arg + instance of Annotation or dict with compatible + properties + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans more two or + more lines (i.e. `text` contains one or more
HTML + tags) or if an explicit width is set to override the + text width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head. If `axref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from right + to left (left to right). If `axref` is an axis, this is + an absolute value on that axis, like `x`, NOT a + relative value. + axref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ax` is a relative + offset in pixels from `x`. If set to an x axis id + (e.g. "x" or "x2"), `ax` is specified in the same + terms as that axis. This is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. + ay + Sets the y component of the arrow tail about the arrow + head. If `ayref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from bottom + to top (top to bottom). If `ayref` is an axis, this is + an absolute value on that axis, like `y`, NOT a + relative value. + ayref + Indicates in what terms the tail of the annotation + (ax,ay) is specified. If `pixel`, `ay` is a relative + offset in pixels from `y`. If set to a y axis id (e.g. + "y" or "y2"), `ay` is specified in the same terms as + that axis. This is useful for trendline annotations + which should continue to indicate the correct trend + when zoomed. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the plot. If + you click a data point that exactly matches the `x` and + `y` values of this annotation, and it is hidden + (visible: false), it will appear. In "onoff" mode, you + must click the same point again to make it disappear, + so if you click multiple points, you can show multiple + annotations. In "onout" mode, a click anywhere else in + the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for example to + label the side of a bar. To label markers though, + `standoff` is preferred over `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + plotly.graph_objects.layout.annotation.Hoverlabel + instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (
), bold (), italics (), hyperlinks + (). Tags , , + are also supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xclick + Toggle this annotation when clicking a data point whose + `x` value is `xclick` rather than the annotation's `x` + value. + xref + Sets the annotation's x coordinate axis. If set to an x + axis id (e.g. "x" or "x2"), the `x` position refers to + an x coordinate If set to "paper", the `x` position + refers to the distance from the left side of the + plotting area in normalized coordinates where 0 (1) + corresponds to the left (right) side. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yclick + Toggle this annotation when clicking a data point whose + `y` value is `yclick` rather than the annotation's `y` + value. + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + row + Subplot row for annotation + col + Subplot column for annotation + secondary_y + Whether to add annotation to secondary y-axis + Returns ------- - self - Returns the Figure object that the method was called on + FigureWidget """ - for obj in self.select_ternaries(selector=selector, row=row, col=col): - obj.update(patch, **kwargs) - - return self + new_obj = _layout.Annotation( + arg, + align=align, + arrowcolor=arrowcolor, + arrowhead=arrowhead, + arrowside=arrowside, + arrowsize=arrowsize, + arrowwidth=arrowwidth, + ax=ax, + axref=axref, + ay=ay, + ayref=ayref, + bgcolor=bgcolor, + bordercolor=bordercolor, + borderpad=borderpad, + borderwidth=borderwidth, + captureevents=captureevents, + clicktoshow=clicktoshow, + font=font, + height=height, + hoverlabel=hoverlabel, + hovertext=hovertext, + name=name, + opacity=opacity, + showarrow=showarrow, + standoff=standoff, + startarrowhead=startarrowhead, + startarrowsize=startarrowsize, + startstandoff=startstandoff, + templateitemname=templateitemname, + text=text, + textangle=textangle, + valign=valign, + visible=visible, + width=width, + x=x, + xanchor=xanchor, + xclick=xclick, + xref=xref, + xshift=xshift, + y=y, + yanchor=yanchor, + yclick=yclick, + yref=yref, + yshift=yshift, + **kwargs + ) + return self._add_annotation_like( + "annotation", + "annotations", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + ) - def select_xaxes(self, selector=None, row=None, col=None): + def select_layout_images(self, selector=None, row=None, col=None, secondary_y=None): """ - Select xaxis subplot objects from a particular subplot cell - and/or xaxis subplot objects that satisfy custom selection - criteria. + Select images from a particular subplot cell and/or images + that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - xaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all xaxis objects are selected. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. row, col: int or None (default None) - Subplot row and column index of xaxis objects to select. - To select xaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all xaxis objects are selected. + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the xaxis - objects that satisfy all of the specified selection criteria + Generator that iterates through all of the images that satisfy + all of the specified selection criteria """ + return self._select_annotations_like( + "images", selector=selector, row=row, col=col, secondary_y=secondary_y + ) - return self._select_layout_subplots_by_prefix("xaxis", selector, row, col) - - def for_each_xaxis(self, fn, selector=None, row=None, col=None): + def for_each_layout_image( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): """ - Apply a function to all xaxis objects that satisfy the - specified selection criteria - + Apply a function to all images that satisfy the specified selection + criteria + Parameters ---------- fn: - Function that inputs a single xaxis object. + Function that inputs a single image object. selector: dict or None (default None) Dict to use as selection criteria. - xaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all xaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. row, col: int or None (default None) - Subplot row and column index of xaxis objects to select. - To select xaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all xaxis objects are selected. + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + images that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_xaxes(selector=selector, row=row, col=col): + for obj in self._select_annotations_like( + prop="images", selector=selector, row=row, col=col, secondary_y=secondary_y + ): fn(obj) return self - def update_xaxes(self, patch=None, selector=None, row=None, col=None, **kwargs): + def update_layout_images( + self, patch, selector=None, row=None, col=None, secondary_y=None, **kwargs + ): """ - Perform a property update operation on all xaxis objects - that satisfy the specified selection criteria - + Perform a property update operation on all images that satisfy the + specified selection criteria + Parameters ---------- - patch: dict - Dictionary of property updates to be applied to all - xaxis objects that satisfy the selection criteria. + patch: dict or None (default None) + Dictionary of property updates to be applied to all images that + satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - xaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all xaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. row, col: int or None (default None) - Subplot row and column index of xaxis objects to select. - To select xaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all xaxis objects are selected. + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. **kwargs - Additional property updates to apply to each selected - xaxis object. If a property is specified in - both patch and in **kwargs then the one in **kwargs - takes precedence. + Additional property updates to apply to each selected image. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_xaxes(selector=selector, row=row, col=col): + for obj in self._select_annotations_like( + prop="images", selector=selector, row=row, col=col, secondary_y=secondary_y + ): obj.update(patch, **kwargs) return self - def select_yaxes(self, selector=None, row=None, col=None, secondary_y=None): + def add_layout_image( + self, + arg=None, + layer=None, + name=None, + opacity=None, + sizex=None, + sizey=None, + sizing=None, + source=None, + templateitemname=None, + visible=None, + x=None, + xanchor=None, + xref=None, + y=None, + yanchor=None, + yref=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): """ - Select yaxis subplot objects from a particular subplot cell - and/or yaxis subplot objects that satisfy custom selection - criteria. + Create and add a new image to the figure's layout + + Parameters + ---------- + arg + instance of Image or dict with compatible properties + layer + Specifies whether images are drawn below or above + traces. When `xref` and `yref` are both set to `paper`, + image is drawn below the entire plot area. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The image + will be sized based on the `position` value. When + `xref` is set to `paper`, units are sized relative to + the plot width. + sizey + Sets the image container size vertically. The image + will be sized based on the `position` value. When + `yref` is set to `paper`, units are sized relative to + the plot height. + sizing + Specifies which dimension of the image to constrain. + source + Specifies the URL of the image to be used. The URL must + be accessible from the domain where the plot code is + run, and can be either relative or absolute. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this image is visible. + x + Sets the image's x position. When `xref` is set to + `paper`, units are sized relative to the plot height. + See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + data coordinate If set to "paper", the `x` position + refers to the distance from the left of plot in + normalized coordinates where 0 (1) corresponds to the + left (right). + y + Sets the image's y position. When `yref` is set to + `paper`, units are sized relative to the plot height. + See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + data coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plot in + normalized coordinates where 0 (1) corresponds to the + bottom (top). + row + Subplot row for image + col + Subplot column for image + secondary_y + Whether to add image to secondary y-axis + + Returns + ------- + FigureWidget + """ + new_obj = _layout.Image( + arg, + layer=layer, + name=name, + opacity=opacity, + sizex=sizex, + sizey=sizey, + sizing=sizing, + source=source, + templateitemname=templateitemname, + visible=visible, + x=x, + xanchor=xanchor, + xref=xref, + y=y, + yanchor=yanchor, + yref=yref, + **kwargs + ) + return self._add_annotation_like( + "image", "images", new_obj, row=row, col=col, secondary_y=secondary_y + ) + + def select_shapes(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select shapes from a particular subplot cell and/or shapes + that satisfy custom selection criteria. Parameters ---------- selector: dict or None (default None) Dict to use as selection criteria. - yaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all yaxis objects are selected. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. row, col: int or None (default None) - Subplot row and column index of yaxis objects to select. - To select yaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all yaxis objects are selected. + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. secondary_y: boolean or None (default None) - * If True, only select yaxis objects associated with the secondary + * If True, only select shapes associated with the secondary y-axis of the subplot. - * If False, only select yaxis objects associated with the primary + * If False, only select shapes associated with the primary y-axis of the subplot. - * If None (the default), do not filter yaxis objects based on - a secondary y-axis condition. - - To select yaxis objects by secondary y-axis, the Figure must - have been created using plotly.subplots.make_subplots. See - the docstring for the specs argument to make_subplots for more - info on creating subplots with secondary y-axes. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- generator - Generator that iterates through all of the yaxis - objects that satisfy all of the specified selection criteria + Generator that iterates through all of the shapes that satisfy + all of the specified selection criteria """ - - return self._select_layout_subplots_by_prefix( - "yaxis", selector, row, col, secondary_y=secondary_y + return self._select_annotations_like( + "shapes", selector=selector, row=row, col=col, secondary_y=secondary_y ) - def for_each_yaxis(self, fn, selector=None, row=None, col=None, secondary_y=None): + def for_each_shape(self, fn, selector=None, row=None, col=None, secondary_y=None): """ - Apply a function to all yaxis objects that satisfy the - specified selection criteria - + Apply a function to all shapes that satisfy the specified selection + criteria + Parameters ---------- fn: - Function that inputs a single yaxis object. + Function that inputs a single shape object. selector: dict or None (default None) Dict to use as selection criteria. - yaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all yaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. row, col: int or None (default None) - Subplot row and column index of yaxis objects to select. - To select yaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all yaxis objects are selected. + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shapes that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. secondary_y: boolean or None (default None) - * If True, only select yaxis objects associated with the secondary + * If True, only select shapes associated with the secondary y-axis of the subplot. - * If False, only select yaxis objects associated with the primary + * If False, only select shapes associated with the primary y-axis of the subplot. - * If None (the default), do not filter yaxis objects based on - a secondary y-axis condition. - - To select yaxis objects by secondary y-axis, the Figure must - have been created using plotly.subplots.make_subplots. See - the docstring for the specs argument to make_subplots for more - info on creating subplots with secondary y-axes. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_yaxes( - selector=selector, row=row, col=col, secondary_y=secondary_y + for obj in self._select_annotations_like( + prop="shapes", selector=selector, row=row, col=col, secondary_y=secondary_y ): fn(obj) return self - def update_yaxes( - self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + def update_shapes( + self, patch, selector=None, row=None, col=None, secondary_y=None, **kwargs ): """ - Perform a property update operation on all yaxis objects - that satisfy the specified selection criteria - + Perform a property update operation on all shapes that satisfy the + specified selection criteria + Parameters ---------- - patch: dict - Dictionary of property updates to be applied to all - yaxis objects that satisfy the selection criteria. + patch: dict or None (default None) + Dictionary of property updates to be applied to all shapes that + satisfy the selection criteria. selector: dict or None (default None) Dict to use as selection criteria. - yaxis objects will be selected if they contain - properties corresponding to all of the dictionary's keys, with - values that exactly match the supplied values. If None - (the default), all yaxis objects are selected. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. row, col: int or None (default None) - Subplot row and column index of yaxis objects to select. - To select yaxis objects by row and column, the Figure - must have been created using plotly.subplots.make_subplots. - If None (the default), all yaxis objects are selected. + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. secondary_y: boolean or None (default None) - * If True, only select yaxis objects associated with the secondary + * If True, only select shapes associated with the secondary y-axis of the subplot. - * If False, only select yaxis objects associated with the primary + * If False, only select shapes associated with the primary y-axis of the subplot. - * If None (the default), do not filter yaxis objects based on - a secondary y-axis condition. - - To select yaxis objects by secondary y-axis, the Figure must - have been created using plotly.subplots.make_subplots. See - the docstring for the specs argument to make_subplots for more - info on creating subplots with secondary y-axes. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. **kwargs - Additional property updates to apply to each selected - yaxis object. If a property is specified in - both patch and in **kwargs then the one in **kwargs - takes precedence. + Additional property updates to apply to each selected shape. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + Returns ------- self Returns the Figure object that the method was called on """ - for obj in self.select_yaxes( - selector=selector, row=row, col=col, secondary_y=secondary_y + for obj in self._select_annotations_like( + prop="shapes", selector=selector, row=row, col=col, secondary_y=secondary_y ): obj.update(patch, **kwargs) return self + + def add_shape( + self, + arg=None, + fillcolor=None, + layer=None, + line=None, + name=None, + opacity=None, + path=None, + templateitemname=None, + type=None, + visible=None, + x0=None, + x1=None, + xanchor=None, + xref=None, + xsizemode=None, + y0=None, + y1=None, + yanchor=None, + yref=None, + ysizemode=None, + row=None, + col=None, + secondary_y=None, + **kwargs + ): + """ + Create and add a new shape to the figure's layout + + Parameters + ---------- + arg + instance of Shape or dict with compatible properties + fillcolor + Sets the color filling the shape's interior. + layer + Specifies whether shapes are drawn below or above + traces. + line + plotly.graph_objects.layout.shape.Line instance or dict + with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the pixel + values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and taken + unmodified as pixels relative to `xanchor` and + `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not + relative. So the allowed segments are: M, L, H, V, Q, + C, T, S, and Z arcs (A) are not allowed because radius + rx and ry are relative. In the future we could consider + supporting relative commands, but we would have to + decide on how to handle date and log axes. Note that + even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. + no chained "polybezier" commands - specify the segment + type for each one. On category axes, values are numbers + scaled to the serial numbers of categories because + using the categories themselves there would be no way + to describe fractional positions On data axes: because + space and T are both normal components of path strings, + we can't use either to separate date from time parts. + Therefore we'll use underscore for this purpose: + 2015-02-21_13:45:56.789 + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If "line", a line + is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect + to the axes' sizing mode. If "circle", a circle is + drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with + respect to the axes' sizing mode. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to + the axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' sizing + mode. + visible + Determines whether or not this shape is visible. + x0 + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + xanchor + Only relevant in conjunction with `xsizemode` set to + "pixel". Specifies the anchor point on the x axis to + which `x0`, `x1` and x coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `xsizemode` not + set to "pixel". + xref + Sets the shape's x coordinate axis. If set to an x axis + id (e.g. "x" or "x2"), the `x` position refers to an x + coordinate. If set to "paper", the `x` position refers + to the distance from the left side of the plotting area + in normalized coordinates where 0 (1) corresponds to + the left (right) side. If the axis `type` is "log", + then you must take the log of your desired range. If + the axis `type` is "date", then you must convert the + date to unix time in milliseconds. + xsizemode + Sets the shapes's sizing mode along the x axis. If set + to "scaled", `x0`, `x1` and x coordinates within `path` + refer to data values on the x axis or a fraction of the + plot area's width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in terms of + data or plot fraction but `x0`, `x1` and x coordinates + within `path` are pixels relative to `xanchor`. This + way, the shape can have a fixed width while maintaining + a position relative to data or plot fraction. + y0 + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + yanchor + Only relevant in conjunction with `ysizemode` set to + "pixel". Specifies the anchor point on the y axis to + which `y0`, `y1` and y coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `ysizemode` not + set to "pixel". + yref + Sets the annotation's y coordinate axis. If set to an y + axis id (e.g. "y" or "y2"), the `y` position refers to + an y coordinate If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). + ysizemode + Sets the shapes's sizing mode along the y axis. If set + to "scaled", `y0`, `y1` and y coordinates within `path` + refer to data values on the y axis or a fraction of the + plot area's height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in terms of + data or plot fraction but `y0`, `y1` and y coordinates + within `path` are pixels relative to `yanchor`. This + way, the shape can have a fixed height while + maintaining a position relative to data or plot + fraction. + row + Subplot row for shape + col + Subplot column for shape + secondary_y + Whether to add shape to secondary y-axis + + Returns + ------- + FigureWidget + """ + new_obj = _layout.Shape( + arg, + fillcolor=fillcolor, + layer=layer, + line=line, + name=name, + opacity=opacity, + path=path, + templateitemname=templateitemname, + type=type, + visible=visible, + x0=x0, + x1=x1, + xanchor=xanchor, + xref=xref, + xsizemode=xsizemode, + y0=y0, + y1=y1, + yanchor=yanchor, + yref=yref, + ysizemode=ysizemode, + **kwargs + ) + return self._add_annotation_like( + "shape", "shapes", new_obj, row=row, col=col, secondary_y=secondary_y + ) diff --git a/packages/python/plotly/plotly/graph_objs/area/__init__.py b/packages/python/plotly/plotly/graph_objs/area/__init__.py index 77f5b968fee..3b1f3beb6fe 100644 --- a/packages/python/plotly/plotly/graph_objs/area/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/area/__init__.py @@ -1056,4 +1056,6 @@ def __init__( self._skip_invalid = False +__all__ = ["Hoverlabel", "Marker", "Stream", "hoverlabel"] + from plotly.graph_objs.area import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py index 5ef5ac3166b..61847588bc0 100644 --- a/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/area/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/bar/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/__init__.py index 93e86c7a93d..14c3b05aaee 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/__init__.py @@ -4060,6 +4060,23 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ErrorX", + "ErrorY", + "Hoverlabel", + "Insidetextfont", + "Marker", + "Outsidetextfont", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.bar import unselected from plotly.graph_objs.bar import selected from plotly.graph_objs.bar import marker diff --git a/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py index 9aae5c261e1..a826bc2a272 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py index 1243cf2f642..af48451870b 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py @@ -2488,4 +2488,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.bar.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py index d3a65e6f633..c2b37ed943e 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.bar.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py index dff71d2983a..a52e2873681 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py index 30303d92338..1e26ec305eb 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/selected/__init__.py @@ -303,3 +303,6 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py index f544edb4e66..d1621a6442b 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/unselected/__init__.py @@ -313,3 +313,6 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py index eb425397431..d6943eb2da3 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py @@ -1931,6 +1931,18 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Marker", + "Selected", + "Stream", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.barpolar import unselected from plotly.graph_objs.barpolar import selected from plotly.graph_objs.barpolar import marker diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py index 252364427c7..6d96546f65b 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py index a6fd29ee943..4973fc6fa30 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py @@ -2491,4 +2491,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.barpolar.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py index d9bbbac8846..bfd8a5640be 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.barpolar.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py index f4dd55cc2fa..9483d27eeda 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py index 4002f0f07d8..f0c573c07d0 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/selected/__init__.py @@ -305,3 +305,6 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py index 736a70141ac..d6bc14d7f2b 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/unselected/__init__.py @@ -314,3 +314,6 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/box/__init__.py b/packages/python/plotly/plotly/graph_objs/box/__init__.py index c1be971e9bd..cf908545b0d 100644 --- a/packages/python/plotly/plotly/graph_objs/box/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/__init__.py @@ -1440,6 +1440,19 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.box import unselected from plotly.graph_objs.box import selected from plotly.graph_objs.box import marker diff --git a/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py index 8fe3a9d9707..a42b9bb4b92 100644 --- a/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py index 401727e5d56..79b6f6b71d7 100644 --- a/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/marker/__init__.py @@ -283,3 +283,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py index 6600ba81da8..a70465d7215 100644 --- a/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/selected/__init__.py @@ -190,3 +190,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py index 9aa8f2bc66b..e463415a7a1 100644 --- a/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/box/unselected/__init__.py @@ -199,3 +199,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py index 89c6d915f60..30435897c6b 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/__init__.py @@ -1123,6 +1123,17 @@ def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Decreasing", + "Hoverlabel", + "Increasing", + "Line", + "Stream", + "decreasing", + "hoverlabel", + "increasing", +] + from plotly.graph_objs.candlestick import increasing from plotly.graph_objs.candlestick import hoverlabel from plotly.graph_objs.candlestick import decreasing diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py index d992b15c601..dc90e68fee9 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/decreasing/__init__.py @@ -164,3 +164,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py index 061f053f0b4..cbb2341a0e3 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py b/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py index c7f9bbf2bdd..ad2f0e688e3 100644 --- a/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/candlestick/increasing/__init__.py @@ -164,3 +164,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/carpet/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/__init__.py index 22105b7dcf9..015c3cda9ce 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/__init__.py @@ -143,482 +143,6 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): import copy as _copy -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on plot.ly for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on plot.ly for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on plot.ly for bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of plotly.graph_objs.carpet.hoverlabel.Font - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.carpet.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on plot.ly for namelength . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "carpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on plot.ly for align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on plot.ly for bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on plot.ly for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on plot.ly for namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of plotly.graph_objs.carpet.Hoverlabel - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on plot.ly for align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on plot.ly for bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on plot.ly for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on plot.ly for namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.carpet.Hoverlabel -constructor must be a dict or -an instance of plotly.graph_objs.carpet.Hoverlabel""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.carpet import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - class Font(_BaseTraceHierarchyType): # color @@ -5308,6 +4832,7 @@ def __init__( self._skip_invalid = False -from plotly.graph_objs.carpet import hoverlabel +__all__ = ["Aaxis", "Baxis", "Font", "Stream", "aaxis", "baxis"] + from plotly.graph_objs.carpet import baxis from plotly.graph_objs.carpet import aaxis diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py index 1c09d47a035..a3dc5316a5c 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/__init__.py @@ -713,4 +713,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.carpet.aaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py index 0eaf528c6c3..e7b71be0dde 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/aaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py index 4b35db7d2fc..a13a4819227 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/__init__.py @@ -713,4 +713,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.carpet.baxis import title diff --git a/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py index 888ec7d3b9c..85e44744821 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py index 005a2239ed3..353e568054b 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/__init__.py @@ -2870,6 +2870,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Hoverlabel", + "Marker", + "Selected", + "Stream", + "Unselected", + "colorbar", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.choropleth import unselected from plotly.graph_objs.choropleth import selected from plotly.graph_objs.choropleth import marker diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py index 1c1da3cebd5..43447436820 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.choropleth.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py index 1dccc8f2028..67597ff6fb0 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py index 4a0d4d01051..8a53bf170b7 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py index 11e6fd49db4..d5d039cd429 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/marker/__init__.py @@ -234,3 +234,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py index 2de1b3fd6ed..2de704681de 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/selected/__init__.py @@ -98,3 +98,6 @@ def __init__(self, arg=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py index 03c70617472..da2dfff1638 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/unselected/__init__.py @@ -101,3 +101,6 @@ def __init__(self, arg=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py index 990135e9908..77ce7ed26ed 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/__init__.py @@ -2880,6 +2880,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Hoverlabel", + "Marker", + "Selected", + "Stream", + "Unselected", + "colorbar", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.choroplethmapbox import unselected from plotly.graph_objs.choroplethmapbox import selected from plotly.graph_objs.choroplethmapbox import marker diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py index c663c282de1..95c4dfbe3f4 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.choroplethmapbox.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py index 09ba403b486..f828699b73e 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py index bb9dfb2b151..465570c60b1 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py index b28a1a69771..327b25b5c73 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/marker/__init__.py @@ -235,3 +235,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py index 7664943bd51..0ab54352f71 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/selected/__init__.py @@ -98,3 +98,6 @@ def __init__(self, arg=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py index 1b860362f54..2230b6e0eb5 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/unselected/__init__.py @@ -101,3 +101,6 @@ def __init__(self, arg=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/cone/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/__init__.py index 1bcd29d8ff1..a151d9937f6 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/__init__.py @@ -2943,5 +2943,15 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Hoverlabel", + "Lighting", + "Lightposition", + "Stream", + "colorbar", + "hoverlabel", +] + from plotly.graph_objs.cone import hoverlabel from plotly.graph_objs.cone import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py index 69b25f057a1..dddf6e448cc 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/__init__.py @@ -714,4 +714,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.cone.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py index fb65ea400bf..e3c7ca50592 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py index cbd4318001e..6848854f747 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/cone/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/contour/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/__init__.py index 082b8b3736b..660ad4afd70 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/__init__.py @@ -257,7 +257,9 @@ def smoothing(self, val): @property def width(self): """ - Sets the line width (in px). + Sets the contour line width in (in px) Defaults to 0.5 when + `contours.type` is "levels". Defaults to 2 when `contour.type` + is "constraint". The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] @@ -295,7 +297,9 @@ def _prop_descriptions(self): Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". """ def __init__( @@ -321,7 +325,9 @@ def __init__( Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". Returns ------- @@ -3225,6 +3231,17 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Contours", + "Hoverlabel", + "Line", + "Stream", + "colorbar", + "contours", + "hoverlabel", +] + from plotly.graph_objs.contour import hoverlabel from plotly.graph_objs.contour import contours from plotly.graph_objs.contour import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py index fc2dc6254fa..0c6209571a4 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/__init__.py @@ -717,4 +717,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.contour.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py index 214d90fd36e..8f90e3a5dcb 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py index a8c5d139818..467a82842cf 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/contours/__init__.py @@ -226,3 +226,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Labelfont"] diff --git a/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py index 65b8730c72b..55bb306ee7f 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contour/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py index 26d32d0a55e..c3322a923ec 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/__init__.py @@ -150,7 +150,7 @@ class Line(_BaseTraceHierarchyType): @property def color(self): """ - Sets the color of the contour level. Has no if + Sets the color of the contour level. Has no effect if `contours.coloring` is set to "lines". The 'color' property is a color and may be specified as: @@ -257,7 +257,9 @@ def smoothing(self, val): @property def width(self): """ - Sets the line width (in px). + Sets the contour line width in (in px) Defaults to 0.5 when + `contours.type` is "levels". Defaults to 2 when `contour.type` + is "constraint". The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] @@ -284,7 +286,7 @@ def _parent_path_str(self): def _prop_descriptions(self): return """\ color - Sets the color of the contour level. Has no if + Sets the color of the contour level. Has no effect if `contours.coloring` is set to "lines". dash Sets the dash style of lines. Set to a dash type string @@ -295,7 +297,9 @@ def _prop_descriptions(self): Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". """ def __init__( @@ -310,7 +314,7 @@ def __init__( dict of properties compatible with this constructor or an instance of plotly.graph_objs.contourcarpet.Line color - Sets the color of the contour level. Has no if + Sets the color of the contour level. Has no effect if `contours.coloring` is set to "lines". dash Sets the dash style of lines. Set to a dash type string @@ -321,7 +325,9 @@ def __init__( Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". Returns ------- @@ -384,483 +390,6 @@ def __init__( import copy as _copy -class Hoverlabel(_BaseTraceHierarchyType): - - # align - # ----- - @property - def align(self): - """ - Sets the horizontal alignment of the text content within hover - label box. Has an effect only if the hover label text spans - more two or more lines - - The 'align' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['left', 'right', 'auto'] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - Any|numpy.ndarray - """ - return self["align"] - - @align.setter - def align(self, val): - self["align"] = val - - # alignsrc - # -------- - @property - def alignsrc(self): - """ - Sets the source reference on plot.ly for align . - - The 'alignsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["alignsrc"] - - @alignsrc.setter - def alignsrc(self, val): - self["alignsrc"] = val - - # bgcolor - # ------- - @property - def bgcolor(self): - """ - Sets the background color of the hover labels for this trace - - The 'bgcolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bgcolor"] - - @bgcolor.setter - def bgcolor(self, val): - self["bgcolor"] = val - - # bgcolorsrc - # ---------- - @property - def bgcolorsrc(self): - """ - Sets the source reference on plot.ly for bgcolor . - - The 'bgcolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bgcolorsrc"] - - @bgcolorsrc.setter - def bgcolorsrc(self, val): - self["bgcolorsrc"] = val - - # bordercolor - # ----------- - @property - def bordercolor(self): - """ - Sets the border color of the hover labels for this trace. - - The 'bordercolor' property is a color and may be specified as: - - A hex string (e.g. '#ff0000') - - An rgb/rgba string (e.g. 'rgb(255,0,0)') - - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen - - A list or array of any of the above - - Returns - ------- - str|numpy.ndarray - """ - return self["bordercolor"] - - @bordercolor.setter - def bordercolor(self, val): - self["bordercolor"] = val - - # bordercolorsrc - # -------------- - @property - def bordercolorsrc(self): - """ - Sets the source reference on plot.ly for bordercolor . - - The 'bordercolorsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["bordercolorsrc"] - - @bordercolorsrc.setter - def bordercolorsrc(self, val): - self["bordercolorsrc"] = val - - # font - # ---- - @property - def font(self): - """ - Sets the font used in hover labels. - - The 'font' property is an instance of Font - that may be specified as: - - An instance of plotly.graph_objs.contourcarpet.hoverlabel.Font - - A dict of string/value properties that will be passed - to the Font constructor - - Supported dict properties: - - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . - - Returns - ------- - plotly.graph_objs.contourcarpet.hoverlabel.Font - """ - return self["font"] - - @font.setter - def font(self, val): - self["font"] = val - - # namelength - # ---------- - @property - def namelength(self): - """ - Sets the default length (in number of characters) of the trace - name in the hover labels for all traces. -1 shows the whole - name regardless of length. 0-3 shows the first 0-3 characters, - and an integer >3 will show the whole name if it is less than - that many characters, but if it is longer, will truncate to - `namelength - 3` characters and add an ellipsis. - - The 'namelength' property is a integer and may be specified as: - - An int (or float that will be cast to an int) - in the interval [-1, 9223372036854775807] - - A tuple, list, or one-dimensional numpy array of the above - - Returns - ------- - int|numpy.ndarray - """ - return self["namelength"] - - @namelength.setter - def namelength(self, val): - self["namelength"] = val - - # namelengthsrc - # ------------- - @property - def namelengthsrc(self): - """ - Sets the source reference on plot.ly for namelength . - - The 'namelengthsrc' property must be specified as a string or - as a plotly.grid_objs.Column object - - Returns - ------- - str - """ - return self["namelengthsrc"] - - @namelengthsrc.setter - def namelengthsrc(self, val): - self["namelengthsrc"] = val - - # property parent name - # -------------------- - @property - def _parent_path_str(self): - return "contourcarpet" - - # Self properties description - # --------------------------- - @property - def _prop_descriptions(self): - return """\ - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on plot.ly for align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on plot.ly for bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on plot.ly for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on plot.ly for namelength . - """ - - def __init__( - self, - arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - **kwargs - ): - """ - Construct a new Hoverlabel object - - Parameters - ---------- - arg - dict of properties compatible with this constructor or - an instance of - plotly.graph_objs.contourcarpet.Hoverlabel - align - Sets the horizontal alignment of the text content - within hover label box. Has an effect only if the hover - label text spans more two or more lines - alignsrc - Sets the source reference on plot.ly for align . - bgcolor - Sets the background color of the hover labels for this - trace - bgcolorsrc - Sets the source reference on plot.ly for bgcolor . - bordercolor - Sets the border color of the hover labels for this - trace. - bordercolorsrc - Sets the source reference on plot.ly for bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of characters) of - the trace name in the hover labels for all traces. -1 - shows the whole name regardless of length. 0-3 shows - the first 0-3 characters, and an integer >3 will show - the whole name if it is less than that many characters, - but if it is longer, will truncate to `namelength - 3` - characters and add an ellipsis. - namelengthsrc - Sets the source reference on plot.ly for namelength . - - Returns - ------- - Hoverlabel - """ - super(Hoverlabel, self).__init__("hoverlabel") - - # Validate arg - # ------------ - if arg is None: - arg = {} - elif isinstance(arg, self.__class__): - arg = arg.to_plotly_json() - elif isinstance(arg, dict): - arg = _copy.copy(arg) - else: - raise ValueError( - """\ -The first argument to the plotly.graph_objs.contourcarpet.Hoverlabel -constructor must be a dict or -an instance of plotly.graph_objs.contourcarpet.Hoverlabel""" - ) - - # Handle skip_invalid - # ------------------- - self._skip_invalid = kwargs.pop("skip_invalid", False) - - # Import validators - # ----------------- - from plotly.validators.contourcarpet import hoverlabel as v_hoverlabel - - # Initialize validators - # --------------------- - self._validators["align"] = v_hoverlabel.AlignValidator() - self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() - self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() - self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() - self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() - self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() - self._validators["font"] = v_hoverlabel.FontValidator() - self._validators["namelength"] = v_hoverlabel.NamelengthValidator() - self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() - - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - self["align"] = align if align is not None else _v - _v = arg.pop("alignsrc", None) - self["alignsrc"] = alignsrc if alignsrc is not None else _v - _v = arg.pop("bgcolor", None) - self["bgcolor"] = bgcolor if bgcolor is not None else _v - _v = arg.pop("bgcolorsrc", None) - self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v - _v = arg.pop("bordercolor", None) - self["bordercolor"] = bordercolor if bordercolor is not None else _v - _v = arg.pop("bordercolorsrc", None) - self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v - _v = arg.pop("font", None) - self["font"] = font if font is not None else _v - _v = arg.pop("namelength", None) - self["namelength"] = namelength if namelength is not None else _v - _v = arg.pop("namelengthsrc", None) - self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v - - # Process unknown kwargs - # ---------------------- - self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ - self._skip_invalid = False - - -from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType -import copy as _copy - - class Contours(_BaseTraceHierarchyType): # coloring @@ -3224,6 +2753,7 @@ def __init__( self._skip_invalid = False -from plotly.graph_objs.contourcarpet import hoverlabel +__all__ = ["ColorBar", "Contours", "Line", "Stream", "colorbar", "contours"] + from plotly.graph_objs.contourcarpet import contours from plotly.graph_objs.contourcarpet import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py index 756780eabef..139e9327603 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.contourcarpet.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py index 80d48d88938..94a7d9b36d4 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py index 3afdcb22582..329e914ab97 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/contours/__init__.py @@ -226,3 +226,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Labelfont"] diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py index 26114431e9e..dcc52c959aa 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/__init__.py @@ -2476,5 +2476,7 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Hoverlabel", "Stream", "colorbar", "hoverlabel"] + from plotly.graph_objs.densitymapbox import hoverlabel from plotly.graph_objs.densitymapbox import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py index 2e5f9d8441f..1c267f72cf4 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.densitymapbox.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py index 9d234a38f98..bdb50d263c6 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py index 47489664189..51a830ab96e 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/funnel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/__init__.py index daa434d5217..5356b635deb 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/__init__.py @@ -2807,6 +2807,19 @@ def __init__(self, arg=None, fillcolor=None, line=None, visible=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Connector", + "Hoverlabel", + "Insidetextfont", + "Marker", + "Outsidetextfont", + "Stream", + "Textfont", + "connector", + "hoverlabel", + "marker", +] + from plotly.graph_objs.funnel import marker from plotly.graph_objs.funnel import hoverlabel from plotly.graph_objs.funnel import connector diff --git a/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py index e91d87bb4c1..dfce3d3242e 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/connector/__init__.py @@ -202,3 +202,6 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py index 1adfe660680..4f3f9dfca83 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py index a3588905d2e..93329200204 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py @@ -2490,4 +2490,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.funnel.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py index 6c8e607958c..a50c0b96e7a 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.funnel.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py index 880a4a28844..e7f9177983a 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py index d9e7d95a29f..049f2a912e2 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/__init__.py @@ -1856,6 +1856,19 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Domain", + "Hoverlabel", + "Insidetextfont", + "Marker", + "Stream", + "Textfont", + "Title", + "hoverlabel", + "marker", + "title", +] + from plotly.graph_objs.funnelarea import title from plotly.graph_objs.funnelarea import marker from plotly.graph_objs.funnelarea import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py index e8f4b6b3c39..9fc09f70136 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py index b7f7f2eadcf..26b07bdad49 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/marker/__init__.py @@ -226,3 +226,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py b/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py index 51a09d0dcde..6fc05eac95f 100644 --- a/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnelarea/title/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py index c65e8f02116..9247ce05184 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/__init__.py @@ -2474,5 +2474,7 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Hoverlabel", "Stream", "colorbar", "hoverlabel"] + from plotly.graph_objs.heatmap import hoverlabel from plotly.graph_objs.heatmap import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py index 9625434291e..b881b8c8f36 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/__init__.py @@ -717,4 +717,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.heatmap.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py index 4971ea072aa..f5bd44e15d8 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py index b2cccaf57c9..58a5e8b9973 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py index 56cba5a3286..5be9858011d 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/__init__.py @@ -2473,5 +2473,7 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Hoverlabel", "Stream", "colorbar", "hoverlabel"] + from plotly.graph_objs.heatmapgl import hoverlabel from plotly.graph_objs.heatmapgl import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py index 9146ec2c38c..6d722689bbe 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.heatmapgl.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py index 9d0c009621f..12359bbb928 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py index b0fbf101594..8380a4deaf1 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/__init__.py index acc046454a8..4c27cc1071f 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/__init__.py @@ -3788,6 +3788,23 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Cumulative", + "ErrorX", + "ErrorY", + "Hoverlabel", + "Marker", + "Selected", + "Stream", + "Unselected", + "XBins", + "YBins", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.histogram import unselected from plotly.graph_objs.histogram import selected from plotly.graph_objs.histogram import marker diff --git a/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py index e43e5490a34..b61b1175512 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py index b1188a9da4d..8b3c97b2ce0 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py @@ -2493,4 +2493,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.histogram.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py index 88ca02dc54e..6e437ac9044 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.histogram.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py index 93d37627113..f9305a21ec9 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py index 83c8e52c255..e10cf403fad 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/selected/__init__.py @@ -305,3 +305,6 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py index b1952e259db..68235459e28 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/unselected/__init__.py @@ -314,3 +314,6 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py index 3a3705a1c24..59290d3f2fb 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/__init__.py @@ -3040,5 +3040,16 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Hoverlabel", + "Marker", + "Stream", + "XBins", + "YBins", + "colorbar", + "hoverlabel", +] + from plotly.graph_objs.histogram2d import hoverlabel from plotly.graph_objs.histogram2d import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py index 1a6b1be0f9b..680a2256a4c 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.histogram2d.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py index 0e3eb8ba780..d17cb951dab 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py index edacd848bbd..51ec23c6ad5 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py index 2bd1032e27b..e6243ea8363 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/__init__.py @@ -827,7 +827,7 @@ def smoothing(self, val): @property def width(self): """ - Sets the line width (in px). + Sets the contour line width in (in px) The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] @@ -865,7 +865,7 @@ def _prop_descriptions(self): Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) """ def __init__( @@ -892,7 +892,7 @@ def __init__( Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Returns ------- @@ -3804,6 +3804,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Contours", + "Hoverlabel", + "Line", + "Marker", + "Stream", + "XBins", + "YBins", + "colorbar", + "contours", + "hoverlabel", +] + from plotly.graph_objs.histogram2dcontour import hoverlabel from plotly.graph_objs.histogram2dcontour import contours from plotly.graph_objs.histogram2dcontour import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py index 37f0203f1b4..0ee57be0345 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.histogram2dcontour.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py index 12b6725b681..206e641a8c2 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py index a43951712ba..0fdb7773163 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/contours/__init__.py @@ -228,3 +228,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Labelfont"] diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py index 69106e0acee..f3d9da986ae 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/__init__.py index eeca7af778a..27e2247df23 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/__init__.py @@ -921,23 +921,23 @@ def shape(self): def shape(self, val): self["shape"] = val - # stepss - # ------ + # steps + # ----- @property - def stepss(self): + def steps(self): """ - The 'stepss' property is a tuple of instances of - Steps that may be specified as: - - A list or tuple of instances of plotly.graph_objs.indicator.gauge.Steps + The 'steps' property is a tuple of instances of + Step that may be specified as: + - A list or tuple of instances of plotly.graph_objs.indicator.gauge.Step - A list or tuple of dicts of string/value properties that - will be passed to the Steps constructor + will be passed to the Step constructor Supported dict properties: color Sets the background color of the arc. line - plotly.graph_objects.indicator.gauge.steps.Line + plotly.graph_objects.indicator.gauge.step.Line instance or dict with compatible properties name When used in a template, named items are @@ -968,41 +968,41 @@ def stepss(self): Returns ------- - tuple[plotly.graph_objs.indicator.gauge.Steps] + tuple[plotly.graph_objs.indicator.gauge.Step] """ - return self["stepss"] + return self["steps"] - @stepss.setter - def stepss(self, val): - self["stepss"] = val + @steps.setter + def steps(self, val): + self["steps"] = val - # stepsdefaults - # ------------- + # stepdefaults + # ------------ @property - def stepsdefaults(self): + def stepdefaults(self): """ When used in a template (as - layout.template.data.indicator.gauge.stepsdefaults), sets the + layout.template.data.indicator.gauge.stepdefaults), sets the default property values to use for elements of indicator.gauge.steps - The 'stepsdefaults' property is an instance of Steps + The 'stepdefaults' property is an instance of Step that may be specified as: - - An instance of plotly.graph_objs.indicator.gauge.Steps + - An instance of plotly.graph_objs.indicator.gauge.Step - A dict of string/value properties that will be passed - to the Steps constructor + to the Step constructor Supported dict properties: Returns ------- - plotly.graph_objs.indicator.gauge.Steps + plotly.graph_objs.indicator.gauge.Step """ - return self["stepsdefaults"] + return self["stepdefaults"] - @stepsdefaults.setter - def stepsdefaults(self, val): - self["stepsdefaults"] = val + @stepdefaults.setter + def stepdefaults(self, val): + self["stepdefaults"] = val # threshold # --------- @@ -1062,12 +1062,12 @@ def _prop_descriptions(self): gauge. shape Set the shape of the gauge - stepss - A tuple of plotly.graph_objects.indicator.gauge.Steps + steps + A tuple of plotly.graph_objects.indicator.gauge.Step instances or dicts with compatible properties - stepsdefaults + stepdefaults When used in a template (as - layout.template.data.indicator.gauge.stepsdefaults), + layout.template.data.indicator.gauge.stepdefaults), sets the default property values to use for elements of indicator.gauge.steps threshold @@ -1084,8 +1084,8 @@ def __init__( bordercolor=None, borderwidth=None, shape=None, - stepss=None, - stepsdefaults=None, + steps=None, + stepdefaults=None, threshold=None, **kwargs ): @@ -1113,12 +1113,12 @@ def __init__( gauge. shape Set the shape of the gauge - stepss - A tuple of plotly.graph_objects.indicator.gauge.Steps + steps + A tuple of plotly.graph_objects.indicator.gauge.Step instances or dicts with compatible properties - stepsdefaults + stepdefaults When used in a template (as - layout.template.data.indicator.gauge.stepsdefaults), + layout.template.data.indicator.gauge.stepdefaults), sets the default property values to use for elements of indicator.gauge.steps threshold @@ -1163,8 +1163,8 @@ def __init__( self._validators["bordercolor"] = v_gauge.BordercolorValidator() self._validators["borderwidth"] = v_gauge.BorderwidthValidator() self._validators["shape"] = v_gauge.ShapeValidator() - self._validators["stepss"] = v_gauge.StepssValidator() - self._validators["stepsdefaults"] = v_gauge.StepsValidator() + self._validators["steps"] = v_gauge.StepsValidator() + self._validators["stepdefaults"] = v_gauge.StepValidator() self._validators["threshold"] = v_gauge.ThresholdValidator() # Populate data dict with properties @@ -1181,10 +1181,10 @@ def __init__( self["borderwidth"] = borderwidth if borderwidth is not None else _v _v = arg.pop("shape", None) self["shape"] = shape if shape is not None else _v - _v = arg.pop("stepss", None) - self["stepss"] = stepss if stepss is not None else _v - _v = arg.pop("stepsdefaults", None) - self["stepsdefaults"] = stepsdefaults if stepsdefaults is not None else _v + _v = arg.pop("steps", None) + self["steps"] = steps if steps is not None else _v + _v = arg.pop("stepdefaults", None) + self["stepdefaults"] = stepdefaults if stepdefaults is not None else _v _v = arg.pop("threshold", None) self["threshold"] = threshold if threshold is not None else _v @@ -1736,6 +1736,19 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Delta", + "Domain", + "Gauge", + "Number", + "Stream", + "Title", + "delta", + "gauge", + "number", + "title", +] + from plotly.graph_objs.indicator import title from plotly.graph_objs.indicator import number from plotly.graph_objs.indicator import gauge diff --git a/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py index 14e57fb3563..a15a8cb2efd 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/delta/__init__.py @@ -561,3 +561,6 @@ def __init__(self, arg=None, color=None, symbol=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Decreasing", "Font", "Increasing"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py index 70dc6859e26..b89c9bc661b 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/__init__.py @@ -171,7 +171,7 @@ def __init__(self, arg=None, line=None, thickness=None, value=None, **kwargs): import copy as _copy -class Steps(_BaseTraceHierarchyType): +class Step(_BaseTraceHierarchyType): # color # ----- @@ -239,7 +239,7 @@ def line(self): """ The 'line' property is an instance of Line that may be specified as: - - An instance of plotly.graph_objs.indicator.gauge.steps.Line + - An instance of plotly.graph_objs.indicator.gauge.step.Line - A dict of string/value properties that will be passed to the Line constructor @@ -254,7 +254,7 @@ def line(self): Returns ------- - plotly.graph_objs.indicator.gauge.steps.Line + plotly.graph_objs.indicator.gauge.step.Line """ return self["line"] @@ -377,8 +377,8 @@ def _prop_descriptions(self): color Sets the background color of the arc. line - plotly.graph_objects.indicator.gauge.steps.Line - instance or dict with compatible properties + plotly.graph_objects.indicator.gauge.step.Line instance + or dict with compatible properties name When used in a template, named items are created in the output figure in addition to any items the figure @@ -417,18 +417,18 @@ def __init__( **kwargs ): """ - Construct a new Steps object + Construct a new Step object Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.indicator.gauge.Steps + an instance of plotly.graph_objs.indicator.gauge.Step color Sets the background color of the arc. line - plotly.graph_objects.indicator.gauge.steps.Line - instance or dict with compatible properties + plotly.graph_objects.indicator.gauge.step.Line instance + or dict with compatible properties name When used in a template, named items are created in the output figure in addition to any items the figure @@ -456,9 +456,9 @@ def __init__( Returns ------- - Steps + Step """ - super(Steps, self).__init__("stepss") + super(Step, self).__init__("steps") # Validate arg # ------------ @@ -471,9 +471,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.indicator.gauge.Steps +The first argument to the plotly.graph_objs.indicator.gauge.Step constructor must be a dict or -an instance of plotly.graph_objs.indicator.gauge.Steps""" +an instance of plotly.graph_objs.indicator.gauge.Step""" ) # Handle skip_invalid @@ -482,16 +482,16 @@ def __init__( # Import validators # ----------------- - from plotly.validators.indicator.gauge import steps as v_steps + from plotly.validators.indicator.gauge import step as v_step # Initialize validators # --------------------- - self._validators["color"] = v_steps.ColorValidator() - self._validators["line"] = v_steps.LineValidator() - self._validators["name"] = v_steps.NameValidator() - self._validators["range"] = v_steps.RangeValidator() - self._validators["templateitemname"] = v_steps.TemplateitemnameValidator() - self._validators["thickness"] = v_steps.ThicknessValidator() + self._validators["color"] = v_step.ColorValidator() + self._validators["line"] = v_step.LineValidator() + self._validators["name"] = v_step.NameValidator() + self._validators["range"] = v_step.RangeValidator() + self._validators["templateitemname"] = v_step.TemplateitemnameValidator() + self._validators["thickness"] = v_step.ThicknessValidator() # Populate data dict with properties # ---------------------------------- @@ -1909,7 +1909,19 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Axis", + "Bar", + "Step", + "Step", + "Threshold", + "axis", + "bar", + "step", + "threshold", +] + from plotly.graph_objs.indicator.gauge import threshold -from plotly.graph_objs.indicator.gauge import steps +from plotly.graph_objs.indicator.gauge import step from plotly.graph_objs.indicator.gauge import bar from plotly.graph_objs.indicator.gauge import axis diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py index 20ecc9bbfab..7723fd3f54d 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/axis/__init__.py @@ -512,3 +512,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py index 7c09e91478f..4dee3b2a06f 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/bar/__init__.py @@ -166,3 +166,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/steps/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py similarity index 95% rename from packages/python/plotly/plotly/graph_objs/indicator/gauge/steps/__init__.py rename to packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py index 5321af355ac..ee3c9dcaaf8 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/steps/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/step/__init__.py @@ -87,7 +87,7 @@ def width(self, val): # -------------------- @property def _parent_path_str(self): - return "indicator.gauge.steps" + return "indicator.gauge.step" # Self properties description # --------------------------- @@ -110,7 +110,7 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): arg dict of properties compatible with this constructor or an instance of - plotly.graph_objs.indicator.gauge.steps.Line + plotly.graph_objs.indicator.gauge.step.Line color Sets the color of the line enclosing each sector. width @@ -134,9 +134,9 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): else: raise ValueError( """\ -The first argument to the plotly.graph_objs.indicator.gauge.steps.Line +The first argument to the plotly.graph_objs.indicator.gauge.step.Line constructor must be a dict or -an instance of plotly.graph_objs.indicator.gauge.steps.Line""" +an instance of plotly.graph_objs.indicator.gauge.step.Line""" ) # Handle skip_invalid @@ -145,7 +145,7 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Import validators # ----------------- - from plotly.validators.indicator.gauge.steps import line as v_line + from plotly.validators.indicator.gauge.step import line as v_line # Initialize validators # --------------------- @@ -166,3 +166,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py index f5b5ef11c60..2a0511548cf 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/threshold/__init__.py @@ -164,3 +164,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py index 6307beb68bd..f7943fb4ad0 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/number/__init__.py @@ -223,3 +223,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py b/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py index 2cd38351710..b4b4bdbc9cc 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/title/__init__.py @@ -223,3 +223,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py index a826db096ac..32470a0b482 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/__init__.py @@ -3955,6 +3955,23 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Caps", + "ColorBar", + "Contour", + "Hoverlabel", + "Lighting", + "Lightposition", + "Slices", + "Spaceframe", + "Stream", + "Surface", + "caps", + "colorbar", + "hoverlabel", + "slices", +] + from plotly.graph_objs.isosurface import slices from plotly.graph_objs.isosurface import hoverlabel from plotly.graph_objs.isosurface import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py index 6ad4cab33dc..71b0cf9b587 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/caps/__init__.py @@ -446,3 +446,6 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["X", "Y", "Z"] diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py index 47962d4eeb5..c55639f8a3a 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.isosurface.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py index 01708d27864..4a84f9de127 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py index a3f56629060..402217fb94c 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py b/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py index 2dca7297384..8d3855f124c 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/slices/__init__.py @@ -626,3 +626,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["X", "Y", "Z"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/__init__.py index dbe294988e5..0324c22775a 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/__init__.py @@ -9123,6 +9123,9 @@ def data(self): table A tuple of plotly.graph_objects.Table instances or dicts with compatible properties + treemap + A tuple of plotly.graph_objects.Treemap + instances or dicts with compatible properties violin A tuple of plotly.graph_objects.Violin instances or dicts with compatible properties @@ -14859,6 +14862,10 @@ class Margin(_BaseLayoutHierarchyType): @property def autoexpand(self): """ + Turns on/off margin expansion computations. Legends, colorbars, + updatemenus, sliders, axis rangeselector and rangeslider are + allowed to push the margins by defaults. + The 'autoexpand' property must be specified as a bool (either True, or False) @@ -14985,7 +14992,10 @@ def _parent_path_str(self): def _prop_descriptions(self): return """\ autoexpand - + Turns on/off margin expansion computations. Legends, + colorbars, updatemenus, sliders, axis rangeselector and + rangeslider are allowed to push the margins by + defaults. b Sets the bottom margin (in px). l @@ -15019,7 +15029,10 @@ def __init__( dict of properties compatible with this constructor or an instance of plotly.graph_objs.layout.Margin autoexpand - + Turns on/off margin expansion computations. Legends, + colorbars, updatemenus, sliders, axis rangeselector and + rangeslider are allowed to push the margins by + defaults. b Sets the bottom margin (in px). l @@ -16083,6 +16096,8 @@ def valign(self, val): def x(self): """ Sets the x position (in normalized coordinates) of the legend. + Defaults to 1.02 for vertical legends and defaults to 0 for + horizontal legends. The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] @@ -16104,7 +16119,10 @@ def xanchor(self): """ Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the - legend. + legend. Value "auto" anchors legends to the right for `x` + values greater than or equal to 2/3, anchors legends to the + left for `x` values less than or equal to 1/3 and anchors + legends with respect to their center otherwise. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -16126,6 +16144,10 @@ def xanchor(self, val): def y(self): """ Sets the y position (in normalized coordinates) of the legend. + Defaults to 1 for vertical legends, defaults to "-0.1" for + horizontal legends on graphs w/o range sliders and defaults to + 1.1 for horizontal legends on graph with one or multiple range + sliders. The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] @@ -16147,7 +16169,10 @@ def yanchor(self): """ Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the - legend. + legend. Value "auto" anchors legends at their bottom for `y` + values less than or equal to 1/3, anchors legends to at their + top for `y` values greater than or equal to 2/3 and anchors + legends with respect to their middle otherwise. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -16222,18 +16247,30 @@ def _prop_descriptions(self): to their associated text. x Sets the x position (in normalized coordinates) of the - legend. + legend. Defaults to 1.02 for vertical legends and + defaults to 0 for horizontal legends. xanchor Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" - or "right" of the legend. + or "right" of the legend. Value "auto" anchors legends + to the right for `x` values greater than or equal to + 2/3, anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with respect + to their center otherwise. y Sets the y position (in normalized coordinates) of the - legend. + legend. Defaults to 1 for vertical legends, defaults to + "-0.1" for horizontal legends on graphs w/o range + sliders and defaults to 1.1 for horizontal legends on + graph with one or multiple range sliders. yanchor Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or - "bottom" of the legend. + "bottom" of the legend. Value "auto" anchors legends at + their bottom for `y` values less than or equal to 1/3, + anchors legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with respect + to their middle otherwise. """ def __init__( @@ -16313,18 +16350,30 @@ def __init__( to their associated text. x Sets the x position (in normalized coordinates) of the - legend. + legend. Defaults to 1.02 for vertical legends and + defaults to 0 for horizontal legends. xanchor Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" - or "right" of the legend. + or "right" of the legend. Value "auto" anchors legends + to the right for `x` values greater than or equal to + 2/3, anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with respect + to their center otherwise. y Sets the y position (in normalized coordinates) of the - legend. + legend. Defaults to 1 for vertical legends, defaults to + "-0.1" for horizontal legends on graphs w/o range + sliders and defaults to 1.1 for horizontal legends on + graph with one or multiple range sliders. yanchor Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or - "bottom" of the legend. + "bottom" of the legend. Value "auto" anchors legends at + their bottom for `y` values less than or equal to 1/3, + anchors legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with respect + to their middle otherwise. Returns ------- @@ -22823,6 +22872,56 @@ def __init__( self._skip_invalid = False +__all__ = [ + "AngularAxis", + "Annotation", + "Annotation", + "Coloraxis", + "Colorscale", + "Font", + "Geo", + "Grid", + "Hoverlabel", + "Image", + "Image", + "Legend", + "Mapbox", + "Margin", + "Modebar", + "Polar", + "RadialAxis", + "Scene", + "Shape", + "Shape", + "Slider", + "Slider", + "Template", + "Ternary", + "Title", + "Transition", + "Updatemenu", + "Updatemenu", + "XAxis", + "YAxis", + "annotation", + "coloraxis", + "geo", + "grid", + "hoverlabel", + "legend", + "mapbox", + "polar", + "scene", + "shape", + "slider", + "template", + "ternary", + "title", + "updatemenu", + "xaxis", + "yaxis", +] + from plotly.graph_objs.layout import yaxis from plotly.graph_objs.layout import xaxis from plotly.graph_objs.layout import updatemenu diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py index 01f017833aa..e63f4020e63 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/__init__.py @@ -501,4 +501,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Font", "Hoverlabel", "hoverlabel"] + from plotly.graph_objs.layout.annotation import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py index 2cd944d32e7..e571c58805f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py index 1ca849c4f9a..820a17d36f9 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/__init__.py @@ -1861,4 +1861,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "colorbar"] + from plotly.graph_objs.layout.coloraxis import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py index 79eaaedd344..3dac18c1335 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.coloraxis.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py index 10e0121ac16..3b1724c05c4 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py index e747c0940dd..eaa0771030e 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/__init__.py @@ -1187,4 +1187,6 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): self._skip_invalid = False +__all__ = ["Center", "Domain", "Lataxis", "Lonaxis", "Projection", "projection"] + from plotly.graph_objs.layout.geo import projection diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py index e6f7bcf7020..a903ad4a960 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/projection/__init__.py @@ -158,3 +158,6 @@ def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Rotation"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py index 9b2ba9e9316..6a50ee5da27 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/grid/__init__.py @@ -146,3 +146,6 @@ def __init__(self, arg=None, x=None, y=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Domain"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py index d0d26754c6b..db9888620a5 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py @@ -224,3 +224,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py index 6c3d4115baa..2f5bd5e1cb9 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py @@ -223,3 +223,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py index a276ef470b7..2347b6e6e4f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/__init__.py @@ -1202,4 +1202,6 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): self._skip_invalid = False +__all__ = ["Center", "Domain", "Layer", "Layer", "layer"] + from plotly.graph_objs.layout.mapbox import layer diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py index b8aa1ac6c55..c4a6a4e3e59 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/__init__.py @@ -727,4 +727,6 @@ def __init__(self, arg=None, radius=None, **kwargs): self._skip_invalid = False +__all__ = ["Circle", "Fill", "Line", "Symbol", "symbol"] + from plotly.graph_objs.layout.mapbox.layer import symbol diff --git a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py index 90a9950a881..2d8873dfbbc 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py @@ -226,3 +226,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py index 2f550fbd148..f4ef6a9765f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/__init__.py @@ -4287,5 +4287,7 @@ def __init__( self._skip_invalid = False +__all__ = ["AngularAxis", "Domain", "RadialAxis", "angularaxis", "radialaxis"] + from plotly.graph_objs.layout.polar import radialaxis from plotly.graph_objs.layout.polar import angularaxis diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py index 361ae4aeb4b..67c347506d6 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/angularaxis/__init__.py @@ -512,3 +512,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py index ce44f0f9198..2b5d9da9bee 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.polar.radialaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py index 9fb6f65625d..f6ce01a46b4 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py index 109942eb74d..327edfc76c3 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/__init__.py @@ -9477,6 +9477,22 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Annotation", + "Annotation", + "Aspectratio", + "Camera", + "Domain", + "XAxis", + "YAxis", + "ZAxis", + "annotation", + "camera", + "xaxis", + "yaxis", + "zaxis", +] + from plotly.graph_objs.layout.scene import zaxis from plotly.graph_objs.layout.scene import yaxis from plotly.graph_objs.layout.scene import xaxis diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py index 4f44925c3c5..bedee123b62 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/__init__.py @@ -502,4 +502,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Font", "Hoverlabel", "hoverlabel"] + from plotly.graph_objs.layout.scene.annotation import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py index d545ab85929..1a712f293bf 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py index 7580ff976bf..f6e8faa03c9 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/camera/__init__.py @@ -566,3 +566,6 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Center", "Eye", "Projection", "Up"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py index 4c7e75ec487..1d2b943f0ca 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.scene.xaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py index eff2d6cee72..8a669b33524 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/xaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py index 60c76d74773..34c252e3340 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.scene.yaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py index 82771a167b9..03bbb41d19d 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/yaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py index 12c97428cf1..452b68202c3 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.scene.zaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py index 94ce15d5193..6abf5c7b495 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/zaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py index 27d1a27d715..cb7b0393c0a 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/shape/__init__.py @@ -202,3 +202,6 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py index 16b478259c6..4cc96f34d4d 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/__init__.py @@ -1244,4 +1244,6 @@ def __init__( self._skip_invalid = False +__all__ = ["Currentvalue", "Font", "Pad", "Step", "Step", "Transition", "currentvalue"] + from plotly.graph_objs.layout.slider import currentvalue diff --git a/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py index cabe173810b..dd7b230006a 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/__init__.py @@ -224,3 +224,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py index b8aa0d822cf..9666001f81c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/template/__init__.py @@ -972,6 +972,29 @@ def table(self): def table(self, val): self["table"] = val + # treemap + # ------- + @property + def treemap(self): + """ + The 'treemap' property is a tuple of instances of + Treemap that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.template.data.Treemap + - A list or tuple of dicts of string/value properties that + will be passed to the Treemap constructor + + Supported dict properties: + + Returns + ------- + tuple[plotly.graph_objs.layout.template.data.Treemap] + """ + return self["treemap"] + + @treemap.setter + def treemap(self, val): + self["treemap"] = val + # violin # ------ @property @@ -1178,6 +1201,9 @@ def _prop_descriptions(self): table A tuple of plotly.graph_objects.Table instances or dicts with compatible properties + treemap + A tuple of plotly.graph_objects.Treemap instances or + dicts with compatible properties violin A tuple of plotly.graph_objects.Violin instances or dicts with compatible properties @@ -1234,6 +1260,7 @@ def __init__( sunburst=None, surface=None, table=None, + treemap=None, violin=None, volume=None, waterfall=None, @@ -1373,6 +1400,9 @@ def __init__( table A tuple of plotly.graph_objects.Table instances or dicts with compatible properties + treemap + A tuple of plotly.graph_objects.Treemap instances or + dicts with compatible properties violin A tuple of plotly.graph_objects.Violin instances or dicts with compatible properties @@ -1457,6 +1487,7 @@ def __init__( self._validators["sunburst"] = v_data.SunburstsValidator() self._validators["surface"] = v_data.SurfacesValidator() self._validators["table"] = v_data.TablesValidator() + self._validators["treemap"] = v_data.TreemapsValidator() self._validators["violin"] = v_data.ViolinsValidator() self._validators["volume"] = v_data.VolumesValidator() self._validators["waterfall"] = v_data.WaterfallsValidator() @@ -1551,6 +1582,8 @@ def __init__( self["surface"] = surface if surface is not None else _v _v = arg.pop("table", None) self["table"] = table if table is not None else _v + _v = arg.pop("treemap", None) + self["treemap"] = treemap if treemap is not None else _v _v = arg.pop("violin", None) self["violin"] = violin if violin is not None else _v _v = arg.pop("volume", None) @@ -1567,4 +1600,6 @@ def __init__( self._skip_invalid = False +__all__ = ["Data", "Layout", "data"] + from plotly.graph_objs.layout.template import data diff --git a/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py index 1b226d24db3..29531ed9546 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py @@ -4,6 +4,8 @@ from plotly.graph_objs import Violin +from plotly.graph_objs import Treemap + from plotly.graph_objs import Table from plotly.graph_objs import Surface @@ -87,3 +89,52 @@ from plotly.graph_objs import Barpolar from plotly.graph_objs import Area + +__all__ = [ + "Area", + "Bar", + "Barpolar", + "Box", + "Candlestick", + "Carpet", + "Choropleth", + "Choroplethmapbox", + "Cone", + "Contour", + "Contourcarpet", + "Densitymapbox", + "Funnel", + "Funnelarea", + "Heatmap", + "Heatmapgl", + "Histogram", + "Histogram2d", + "Histogram2dContour", + "Indicator", + "Isosurface", + "Mesh3d", + "Ohlc", + "Parcats", + "Parcoords", + "Pie", + "Pointcloud", + "Sankey", + "Scatter", + "Scatter3d", + "Scattercarpet", + "Scattergeo", + "Scattergl", + "Scattermapbox", + "Scatterpolar", + "Scatterpolargl", + "Scatterternary", + "Splom", + "Streamtube", + "Sunburst", + "Surface", + "Table", + "Treemap", + "Violin", + "Volume", + "Waterfall", +] diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py index a5ac620cff2..664042e6ab0 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/__init__.py @@ -5361,6 +5361,8 @@ def __init__( self._skip_invalid = False +__all__ = ["Aaxis", "Baxis", "Caxis", "Domain", "aaxis", "baxis", "caxis"] + from plotly.graph_objs.layout.ternary import caxis from plotly.graph_objs.layout.ternary import baxis from plotly.graph_objs.layout.ternary import aaxis diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py index dafc6416061..620658e2785 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.ternary.aaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py index 9de6155ede3..48d394b4f4c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py index 6f52f964608..8a98c1946d1 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.ternary.baxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py index 21cd3ee3eff..2c4c69d08b7 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/baxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py index 3a2922107d1..365d1cee14b 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/__init__.py @@ -682,4 +682,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.ternary.caxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py index fa0891e10a9..b85939c3d14 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/caxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py index d90ca9d0366..668d3e1b3c1 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/title/__init__.py @@ -424,3 +424,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font", "Pad"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py index 4b7976874e0..d91023912cb 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/updatemenu/__init__.py @@ -783,3 +783,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Button", "Button", "Font", "Pad"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py index 89c9c70a901..916217e1e9c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/__init__.py @@ -1777,6 +1777,18 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Rangeselector", + "Rangeslider", + "Tickfont", + "Tickformatstop", + "Tickformatstop", + "Title", + "rangeselector", + "rangeslider", + "title", +] + from plotly.graph_objs.layout.xaxis import title from plotly.graph_objs.layout.xaxis import rangeslider from plotly.graph_objs.layout.xaxis import rangeselector diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py index 0f4a8c88d5a..123377aafc4 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py @@ -585,3 +585,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Button", "Button", "Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py index 7055d53b7f5..9a5c5bdea03 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py @@ -143,3 +143,6 @@ def __init__(self, arg=None, range=None, rangemode=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["YAxis"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py index d6e9df6bbc5..c2a86c3ea03 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py index 65f49039f2d..b86096651ea 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/__init__.py @@ -678,4 +678,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.layout.yaxis import title diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py index b455a2283a8..4d0c64d0ff8 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py index 1fcf5b549cc..708930b8ab9 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/__init__.py @@ -3137,5 +3137,16 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Contour", + "Hoverlabel", + "Lighting", + "Lightposition", + "Stream", + "colorbar", + "hoverlabel", +] + from plotly.graph_objs.mesh3d import hoverlabel from plotly.graph_objs.mesh3d import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py index 817a72d354c..86130792810 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/__init__.py @@ -715,4 +715,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.mesh3d.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py index b07136ac05b..c73a1281d5d 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py index 69f1c1dfb5d..7b1d38f1cd8 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py index 7037e177742..6045b7202af 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/__init__.py @@ -1030,6 +1030,17 @@ def __init__(self, arg=None, line=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Decreasing", + "Hoverlabel", + "Increasing", + "Line", + "Stream", + "decreasing", + "hoverlabel", + "increasing", +] + from plotly.graph_objs.ohlc import increasing from plotly.graph_objs.ohlc import hoverlabel from plotly.graph_objs.ohlc import decreasing diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py index d70538e99c4..f4fdb6bf518 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/decreasing/__init__.py @@ -202,3 +202,6 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py index 41794650fda..8d5ec3a3318 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py b/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py index 142b52b2743..6b70ca6da6e 100644 --- a/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/ohlc/increasing/__init__.py @@ -202,3 +202,6 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/parcats/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/__init__.py index 60710c578c0..b91e5796510 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/__init__.py @@ -903,7 +903,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -1079,7 +1083,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1206,7 +1215,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -2181,4 +2195,15 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Dimension", + "Dimension", + "Domain", + "Labelfont", + "Line", + "Stream", + "Tickfont", + "line", +] + from plotly.graph_objs.parcats import line diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py index 9d06475adac..9cec530e890 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/__init__.py @@ -1858,4 +1858,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "colorbar"] + from plotly.graph_objs.parcats.line import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py index 95cf29a4382..11f0db3207f 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.parcats.line.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py index 0216a83e37f..0c3a2c7aec8 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py index 1cb3e99078d..bceeb77e852 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py @@ -2472,4 +2472,16 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Dimension", + "Dimension", + "Domain", + "Labelfont", + "Line", + "Rangefont", + "Stream", + "Tickfont", + "line", +] + from plotly.graph_objs.parcoords import line diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py index 325dbe55069..649f6ba8267 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/__init__.py @@ -1859,4 +1859,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "colorbar"] + from plotly.graph_objs.parcoords.line import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py index 71db9262a8a..ed83968fdd0 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.parcoords.line.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py index 0924aec8452..3bbbffec592 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/pie/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/__init__.py index 17de1ad0388..5ab5125c463 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/__init__.py @@ -2176,6 +2176,20 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Domain", + "Hoverlabel", + "Insidetextfont", + "Marker", + "Outsidetextfont", + "Stream", + "Textfont", + "Title", + "hoverlabel", + "marker", + "title", +] + from plotly.graph_objs.pie import title from plotly.graph_objs.pie import marker from plotly.graph_objs.pie import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py index 4bffd899c54..4eaab91fe19 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py index 6dd4b36d2f3..169579ff181 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/marker/__init__.py @@ -223,3 +223,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py b/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py index b7bd879d38e..14865484abf 100644 --- a/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pie/title/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py b/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py index ba62e1408f3..bcd2cd197fb 100644 --- a/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/__init__.py @@ -955,5 +955,7 @@ def __init__( self._skip_invalid = False +__all__ = ["Hoverlabel", "Marker", "Stream", "hoverlabel", "marker"] + from plotly.graph_objs.pointcloud import marker from plotly.graph_objs.pointcloud import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py index ce3eea93365..61f71428186 100644 --- a/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py index 6edd35164ce..23474464303 100644 --- a/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/pointcloud/marker/__init__.py @@ -175,3 +175,6 @@ def __init__(self, arg=None, arearatio=None, color=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Border"] diff --git a/packages/python/plotly/plotly/graph_objs/sankey/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/__init__.py index add3d73ca75..06ccec80b74 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/__init__.py @@ -576,7 +576,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -857,7 +861,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -952,7 +961,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1358,7 +1372,11 @@ def hovertemplate(self): %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on - the formatting syntax. The variables available in + the formatting syntax. Dates are formatted using d3-time- + format's syntax %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for details on + the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per- @@ -1643,7 +1661,12 @@ def _prop_descriptions(self): d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -1743,7 +1766,12 @@ def __init__( d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for - details on the formatting syntax. The variables + details on the formatting syntax. Dates are formatted + using d3-time-format's syntax %{variable|d3-time- + format}, for example "Day: %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format for + details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs-events/#event-data. @@ -2561,6 +2589,18 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Domain", + "Hoverlabel", + "Link", + "Node", + "Stream", + "Textfont", + "hoverlabel", + "link", + "node", +] + from plotly.graph_objs.sankey import node from plotly.graph_objs.sankey import link from plotly.graph_objs.sankey import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py index 3347e1e313c..f8d4e6709d5 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py index 88727d641c3..4316113220c 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py @@ -1049,4 +1049,6 @@ def __init__( self._skip_invalid = False +__all__ = ["Colorscale", "Colorscale", "Hoverlabel", "Line", "hoverlabel"] + from plotly.graph_objs.sankey.link import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py index 280ec585aa6..a552099620a 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py index 707d87e8a46..bdf5767e8cc 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/__init__.py @@ -701,4 +701,6 @@ def __init__( self._skip_invalid = False +__all__ = ["Hoverlabel", "Line", "hoverlabel"] + from plotly.graph_objs.sankey.node import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py index b665d6549ae..4e3ffd672c0 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/node/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/__init__.py index a24479564f0..5fb35974656 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/__init__.py @@ -4112,6 +4112,22 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ErrorX", + "ErrorY", + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scatter import unselected from plotly.graph_objs.scatter import selected from plotly.graph_objs.scatter import marker diff --git a/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py index ae9a1d7986d..f95e46c275a 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py index f49225ce084..2f8f8d3ff83 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py @@ -2723,4 +2723,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] + from plotly.graph_objs.scatter.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py index 137d79641d4..380b98717ab 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scatter.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py index 256bb6b6773..423237dc9b3 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py index a7e6b71ecd2..a5c3571784e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py index 0f4584feba6..c3715d099b4 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py index 4f4b2b222ba..58166e0095f 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py @@ -4987,6 +4987,22 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ErrorX", + "ErrorY", + "ErrorZ", + "Hoverlabel", + "Line", + "Marker", + "Projection", + "Stream", + "Textfont", + "hoverlabel", + "line", + "marker", + "projection", +] + from plotly.graph_objs.scatter3d import projection from plotly.graph_objs.scatter3d import marker from plotly.graph_objs.scatter3d import line diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py index 5bbeb1663be..37af5e9f335 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py index 8f0a3860363..d35f51ad5c1 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/__init__.py @@ -1859,4 +1859,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "colorbar"] + from plotly.graph_objs.scatter3d.line import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py index 10793e179e8..4f3aa0d497c 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scatter3d.line.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py index 54440a17174..31825d6cc99 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py index e3739a17311..e451f81b69c 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py @@ -2464,4 +2464,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.scatter3d.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py index a79a25050c0..db0a9d3aae2 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scatter3d.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py index 231aa954721..bfd27f807f4 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py index 6994e93a1df..b5bdb4afc57 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/projection/__init__.py @@ -476,3 +476,6 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["X", "Y", "Z"] diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py index 0d5280ebe21..16c1edcf217 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py @@ -2910,6 +2910,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scattercarpet import unselected from plotly.graph_objs.scattercarpet import selected from plotly.graph_objs.scattercarpet import marker diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py index 2cacc1af50d..bd4773a0492 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py index 09c5b8ce686..b868f0d108b 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py @@ -2728,4 +2728,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] + from plotly.graph_objs.scattercarpet.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py index 5b9388afda9..89718ff03e0 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py @@ -720,4 +720,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scattercarpet.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py index d739b067746..109402b7aa8 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py index e19ec6d4388..e0afe6c8c3d 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py index a7f3f9d395f..270d6e4fdb3 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py index 25649e2141c..144459fa035 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py @@ -2801,6 +2801,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scattergeo import unselected from plotly.graph_objs.scattergeo import selected from plotly.graph_objs.scattergeo import marker diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py index a433a76b8cf..91f10c9cdc8 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py index 8d49b44c636..85ef1037693 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py @@ -2727,4 +2727,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] + from plotly.graph_objs.scattergeo.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py index 340891706fe..671827a013c 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scattergeo.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py index 6dd535a153f..0d22b1cad73 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py index 008a685a577..5603a834afb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py index ab3e47f42e1..fe888453361 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py index 3a20d75093e..f5630a8f973 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py @@ -3945,6 +3945,22 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ErrorX", + "ErrorY", + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scattergl import unselected from plotly.graph_objs.scattergl import selected from plotly.graph_objs.scattergl import marker diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py index 85585bb3a2b..12f38520d9e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py index b560445f1c3..3ed8801f149 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py @@ -2493,4 +2493,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.scattergl.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py index 8afdea39a2c..9dd2af3cc88 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scattergl.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py index 24fb94c1796..13edd99e744 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py index 83c5eed4bfe..37c24b98816 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py index ee6f3ab0be4..2d996bad0cd 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py index 9f6224623c1..8a13436ff93 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py @@ -2369,6 +2369,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scattermapbox import unselected from plotly.graph_objs.scattermapbox import selected from plotly.graph_objs.scattermapbox import marker diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py index 7f28ecb4589..8081b5b5c07 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py index d7f99e2ae39..808f647cf67 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/__init__.py @@ -1863,4 +1863,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "colorbar"] + from plotly.graph_objs.scattermapbox.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py index 77a9f0bb0dc..51051c21e83 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py @@ -720,4 +720,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scattermapbox.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py index 33ecbe0d3fe..c2fe404004e 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py index 1b34af2b5f6..212af46ea92 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/selected/__init__.py @@ -191,3 +191,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py index f3bb9b9fa12..33fef1bb849 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/unselected/__init__.py @@ -200,3 +200,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py index 2d60ff0d9e8..23071945fb0 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py @@ -2910,6 +2910,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scatterpolar import unselected from plotly.graph_objs.scatterpolar import selected from plotly.graph_objs.scatterpolar import marker diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py index f62d6d836de..6918652859d 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py index eeaec8db762..84fd736cfb8 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py @@ -2728,4 +2728,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] + from plotly.graph_objs.scatterpolar.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py index f1a4e7ea1fc..dfb019c3293 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py @@ -720,4 +720,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scatterpolar.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py index cb28f03f0e8..0d8d6da32a0 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py index 891c7670eb3..a3572767a2b 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py index a77ff50ba5b..579f1a5be12 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py index 75479cb220b..cc0b9b150ab 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py @@ -2781,6 +2781,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scatterpolargl import unselected from plotly.graph_objs.scatterpolargl import selected from plotly.graph_objs.scatterpolargl import marker diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py index c33199fb42a..75d918e0fb7 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py index 936287e3465..2c43cefef6b 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py @@ -2497,4 +2497,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.scatterpolargl.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py index b7820412c2a..f4f778f5e03 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py @@ -720,4 +720,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scatterpolargl.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py index cd5bbf83a80..00be4f4c361 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py @@ -227,3 +227,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py index 354ee4e14c5..c70d25702c5 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py index bea8a348ace..9f045e643dc 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py index 20c37d28c30..0eb9c57e889 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py @@ -2912,6 +2912,20 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Hoverlabel", + "Line", + "Marker", + "Selected", + "Stream", + "Textfont", + "Unselected", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.scatterternary import unselected from plotly.graph_objs.scatterternary import selected from plotly.graph_objs.scatterternary import marker diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py index 3192042bc73..fb6bba59074 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py index 08708e9d851..fc5e8f7a0b8 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py @@ -2729,4 +2729,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Gradient", "Line", "colorbar"] + from plotly.graph_objs.scatterternary.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py index 6082d9554bb..0ac3e027af1 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py @@ -720,4 +720,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.scatterternary.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py index 0097a7fb86b..b9437a37fd6 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py @@ -227,3 +227,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py index 78685af74f8..ce8b549087c 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/selected/__init__.py @@ -332,3 +332,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py index 19e3b5e7ddd..bfad50c965a 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/unselected/__init__.py @@ -344,3 +344,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker", "Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/splom/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/__init__.py index 92fbf083efe..38e7122d082 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/__init__.py @@ -2605,6 +2605,22 @@ def __init__(self, arg=None, visible=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Diagonal", + "Dimension", + "Dimension", + "Hoverlabel", + "Marker", + "Selected", + "Stream", + "Unselected", + "dimension", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.splom import unselected from plotly.graph_objs.splom import selected from plotly.graph_objs.splom import marker diff --git a/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py index 10203559d15..9e11894a3f3 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/dimension/__init__.py @@ -139,3 +139,6 @@ def __init__(self, arg=None, matches=None, type=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Axis"] diff --git a/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py index 9e1dd1903d3..da827130790 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py index 339c7bbe7d3..00a4c2aebdb 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py @@ -2490,4 +2490,6 @@ def __init__( self._skip_invalid = False +__all__ = ["ColorBar", "Line", "colorbar"] + from plotly.graph_objs.splom.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py index 40eb9dccfe5..75b069d730b 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.splom.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py index b539a10ccf6..cf1ef031f25 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py index 9eb7e0e0b33..d7360e00a32 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/selected/__init__.py @@ -190,3 +190,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py index dc5e1d3b4eb..3ea1f1a8379 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/unselected/__init__.py @@ -200,3 +200,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py index a36c4dbb5f4..41bd83d35c4 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/__init__.py @@ -3198,5 +3198,16 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Hoverlabel", + "Lighting", + "Lightposition", + "Starts", + "Stream", + "colorbar", + "hoverlabel", +] + from plotly.graph_objs.streamtube import hoverlabel from plotly.graph_objs.streamtube import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py index 0d143e7d02b..ca36426ea6e 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/__init__.py @@ -718,4 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.streamtube.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py index ed8055dd1ee..14bc9576bfa 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py index 8f2ee60d080..c649fc2865b 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py index 2d404228d0d..48cd93e4679 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py @@ -788,14 +788,394 @@ def __init__( class Marker(_BaseTraceHierarchyType): + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set to a + numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here colors) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` when + `marker.cmin` and `marker.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if colorsis set to a numerical array. Value should + have the same units as colors. Has no effect when + `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.sunburst.marker.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.sunburst.marker + .colorbar.Tickformatstop instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.sunburst.marker.colorbar.tickformatstopdefaul + ts), sets the default property values to use + for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.sunburst.marker.colorbar.T + itle instance or dict with compatible + properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.sunburst.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + # colors # ------ @property def colors(self): """ - Sets the color of each sector of this sunburst chart. If not - specified, the default trace color set is used to pick the - sector colors. + Sets the color of each sector of this trace. If not specified, + the default trace color set is used to pick the sector colors. The 'colors' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -810,6 +1190,58 @@ def colors(self): def colors(self, val): self["colors"] = val + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if colorsis set to a + numerical array. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu,Greens,YlOrRd,B + luered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbod + y,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + # colorssrc # --------- @property @@ -866,6 +1298,50 @@ def line(self): def line(self, val): self["line"] = val + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if + colorsis set to a numerical array. If true, `marker.cmin` will + correspond to the last color in the array and `marker.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if colorsis set to a numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + # property parent name # -------------------- @property @@ -877,18 +1353,101 @@ def _parent_path_str(self): @property def _prop_descriptions(self): return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.sunburst.marker.ColorBar instance + or dict with compatible properties colors - Sets the color of each sector of this sunburst chart. - If not specified, the default trace color set is used - to pick the sector colors. + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. colorssrc Sets the source reference on plot.ly for colors . line plotly.graph_objects.sunburst.marker.Line instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. """ - def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colors=None, + colorscale=None, + colorssrc=None, + line=None, + reversescale=None, + showscale=None, + **kwargs + ): """ Construct a new Marker object @@ -897,15 +1456,81 @@ def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): arg dict of properties compatible with this constructor or an instance of plotly.graph_objs.sunburst.Marker + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.sunburst.marker.ColorBar instance + or dict with compatible properties colors - Sets the color of each sector of this sunburst chart. - If not specified, the default trace color set is used - to pick the sector colors. + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. colorssrc Sets the source reference on plot.ly for colors . line plotly.graph_objects.sunburst.marker.Line instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. Returns ------- @@ -939,18 +1564,48 @@ def __init__(self, arg=None, colors=None, colorssrc=None, line=None, **kwargs): # Initialize validators # --------------------- + self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() + self._validators["cauto"] = v_marker.CautoValidator() + self._validators["cmax"] = v_marker.CmaxValidator() + self._validators["cmid"] = v_marker.CmidValidator() + self._validators["cmin"] = v_marker.CminValidator() + self._validators["coloraxis"] = v_marker.ColoraxisValidator() + self._validators["colorbar"] = v_marker.ColorBarValidator() self._validators["colors"] = v_marker.ColorsValidator() + self._validators["colorscale"] = v_marker.ColorscaleValidator() self._validators["colorssrc"] = v_marker.ColorssrcValidator() self._validators["line"] = v_marker.LineValidator() + self._validators["reversescale"] = v_marker.ReversescaleValidator() + self._validators["showscale"] = v_marker.ShowscaleValidator() # Populate data dict with properties # ---------------------------------- + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v _v = arg.pop("colors", None) self["colors"] = colors if colors is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v _v = arg.pop("colorssrc", None) self["colorssrc"] = colorssrc if colorssrc is not None else _v _v = arg.pop("line", None) self["line"] = line if line is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v # Process unknown kwargs # ---------------------- @@ -972,7 +1627,8 @@ class Leaf(_BaseTraceHierarchyType): @property def opacity(self): """ - Sets the opacity of the leaves. + Sets the opacity of the leaves. With colorscale it is defaulted + to 1; otherwise it is defaulted to 0.7 The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] @@ -999,7 +1655,8 @@ def _parent_path_str(self): def _prop_descriptions(self): return """\ opacity - Sets the opacity of the leaves. + Sets the opacity of the leaves. With colorscale it is + defaulted to 1; otherwise it is defaulted to 0.7 """ def __init__(self, arg=None, opacity=None, **kwargs): @@ -1012,7 +1669,8 @@ def __init__(self, arg=None, opacity=None, **kwargs): dict of properties compatible with this constructor or an instance of plotly.graph_objs.sunburst.Leaf opacity - Sets the opacity of the leaves. + Sets the opacity of the leaves. With colorscale it is + defaulted to 1; otherwise it is defaulted to 0.7 Returns ------- @@ -2066,5 +2724,18 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Domain", + "Hoverlabel", + "Insidetextfont", + "Leaf", + "Marker", + "Outsidetextfont", + "Stream", + "Textfont", + "hoverlabel", + "marker", +] + from plotly.graph_objs.sunburst import marker from plotly.graph_objs.sunburst import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py index 31f15ceb55b..ddc8eb20fcb 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py index 34bf355361f..43d935ed292 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/__init__.py @@ -226,3 +226,1869 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of plotly.graph_objs.sunburst.marker.colorbar.Tickfont + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.sunburst.marke + r.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + sunburst.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on plot.ly for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on plot.ly for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of plotly.graph_objs.sunburst.marker.colorbar.Title + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use sunburst.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.sunburst.marker.colorbar.title.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use sunburst.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "sunburst.marker" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.sunburst.marker.colorba + r.Tickformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.sunbur + st.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.sunburst.marker.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.sunburst.marker.ColorBar + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.sunburst.marker.colorba + r.Tickformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.sunbur + st.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.sunburst.marker.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.sunburst.marker.ColorBar +constructor must be a dict or +an instance of plotly.graph_objs.sunburst.marker.ColorBar""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.sunburst.marker import colorbar as v_colorbar + + # Initialize validators + # --------------------- + self._validators["bgcolor"] = v_colorbar.BgcolorValidator() + self._validators["bordercolor"] = v_colorbar.BordercolorValidator() + self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() + self._validators["dtick"] = v_colorbar.DtickValidator() + self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() + self._validators["len"] = v_colorbar.LenValidator() + self._validators["lenmode"] = v_colorbar.LenmodeValidator() + self._validators["nticks"] = v_colorbar.NticksValidator() + self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() + self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() + self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() + self._validators["showexponent"] = v_colorbar.ShowexponentValidator() + self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() + self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() + self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() + self._validators["thickness"] = v_colorbar.ThicknessValidator() + self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() + self._validators["tick0"] = v_colorbar.Tick0Validator() + self._validators["tickangle"] = v_colorbar.TickangleValidator() + self._validators["tickcolor"] = v_colorbar.TickcolorValidator() + self._validators["tickfont"] = v_colorbar.TickfontValidator() + self._validators["tickformat"] = v_colorbar.TickformatValidator() + self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() + self._validators[ + "tickformatstopdefaults" + ] = v_colorbar.TickformatstopValidator() + self._validators["ticklen"] = v_colorbar.TicklenValidator() + self._validators["tickmode"] = v_colorbar.TickmodeValidator() + self._validators["tickprefix"] = v_colorbar.TickprefixValidator() + self._validators["ticks"] = v_colorbar.TicksValidator() + self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() + self._validators["ticktext"] = v_colorbar.TicktextValidator() + self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() + self._validators["tickvals"] = v_colorbar.TickvalsValidator() + self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() + self._validators["tickwidth"] = v_colorbar.TickwidthValidator() + self._validators["title"] = v_colorbar.TitleValidator() + self._validators["x"] = v_colorbar.XValidator() + self._validators["xanchor"] = v_colorbar.XanchorValidator() + self._validators["xpad"] = v_colorbar.XpadValidator() + self._validators["y"] = v_colorbar.YValidator() + self._validators["yanchor"] = v_colorbar.YanchorValidator() + self._validators["ypad"] = v_colorbar.YpadValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + self["bgcolor"] = bgcolor if bgcolor is not None else _v + _v = arg.pop("bordercolor", None) + self["bordercolor"] = bordercolor if bordercolor is not None else _v + _v = arg.pop("borderwidth", None) + self["borderwidth"] = borderwidth if borderwidth is not None else _v + _v = arg.pop("dtick", None) + self["dtick"] = dtick if dtick is not None else _v + _v = arg.pop("exponentformat", None) + self["exponentformat"] = exponentformat if exponentformat is not None else _v + _v = arg.pop("len", None) + self["len"] = len if len is not None else _v + _v = arg.pop("lenmode", None) + self["lenmode"] = lenmode if lenmode is not None else _v + _v = arg.pop("nticks", None) + self["nticks"] = nticks if nticks is not None else _v + _v = arg.pop("outlinecolor", None) + self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v + _v = arg.pop("outlinewidth", None) + self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v + _v = arg.pop("separatethousands", None) + self["separatethousands"] = ( + separatethousands if separatethousands is not None else _v + ) + _v = arg.pop("showexponent", None) + self["showexponent"] = showexponent if showexponent is not None else _v + _v = arg.pop("showticklabels", None) + self["showticklabels"] = showticklabels if showticklabels is not None else _v + _v = arg.pop("showtickprefix", None) + self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v + _v = arg.pop("showticksuffix", None) + self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v + _v = arg.pop("thickness", None) + self["thickness"] = thickness if thickness is not None else _v + _v = arg.pop("thicknessmode", None) + self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v + _v = arg.pop("tick0", None) + self["tick0"] = tick0 if tick0 is not None else _v + _v = arg.pop("tickangle", None) + self["tickangle"] = tickangle if tickangle is not None else _v + _v = arg.pop("tickcolor", None) + self["tickcolor"] = tickcolor if tickcolor is not None else _v + _v = arg.pop("tickfont", None) + self["tickfont"] = tickfont if tickfont is not None else _v + _v = arg.pop("tickformat", None) + self["tickformat"] = tickformat if tickformat is not None else _v + _v = arg.pop("tickformatstops", None) + self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v + _v = arg.pop("tickformatstopdefaults", None) + self["tickformatstopdefaults"] = ( + tickformatstopdefaults if tickformatstopdefaults is not None else _v + ) + _v = arg.pop("ticklen", None) + self["ticklen"] = ticklen if ticklen is not None else _v + _v = arg.pop("tickmode", None) + self["tickmode"] = tickmode if tickmode is not None else _v + _v = arg.pop("tickprefix", None) + self["tickprefix"] = tickprefix if tickprefix is not None else _v + _v = arg.pop("ticks", None) + self["ticks"] = ticks if ticks is not None else _v + _v = arg.pop("ticksuffix", None) + self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v + _v = arg.pop("ticktext", None) + self["ticktext"] = ticktext if ticktext is not None else _v + _v = arg.pop("ticktextsrc", None) + self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v + _v = arg.pop("tickvals", None) + self["tickvals"] = tickvals if tickvals is not None else _v + _v = arg.pop("tickvalssrc", None) + self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v + _v = arg.pop("tickwidth", None) + self["tickwidth"] = tickwidth if tickwidth is not None else _v + _v = arg.pop("title", None) + self["title"] = title if title is not None else _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xanchor", None) + self["xanchor"] = xanchor if xanchor is not None else _v + _v = arg.pop("xpad", None) + self["xpad"] = xpad if xpad is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("yanchor", None) + self["yanchor"] = yanchor if yanchor is not None else _v + _v = arg.pop("ypad", None) + self["ypad"] = ypad if ypad is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = ["ColorBar", "Line", "colorbar"] + +from plotly.graph_objs.sunburst.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py new file mode 100644 index 00000000000..d5276677c69 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/__init__.py @@ -0,0 +1,723 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.sunburst.marker.colorbar.title.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.sunburst.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "sunburst.marker.colorbar" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.sunburst.marker.colorbar.Title + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.sunburst.marker.colorbar.Title +constructor must be a dict or +an instance of plotly.graph_objs.sunburst.marker.colorbar.Title""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.sunburst.marker.colorbar import title as v_title + + # Initialize validators + # --------------------- + self._validators["font"] = v_title.FontValidator() + self._validators["side"] = v_title.SideValidator() + self._validators["text"] = v_title.TextValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + self["font"] = font if font is not None else _v + _v = arg.pop("side", None) + self["side"] = side if side is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "sunburst.marker.colorbar" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.sunburst.marker.colorb + ar.Tickformatstop + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.sunburst.marker.colorbar import ( + tickformatstop as v_tickformatstop, + ) + + # Initialize validators + # --------------------- + self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() + self._validators["enabled"] = v_tickformatstop.EnabledValidator() + self._validators["name"] = v_tickformatstop.NameValidator() + self._validators[ + "templateitemname" + ] = v_tickformatstop.TemplateitemnameValidator() + self._validators["value"] = v_tickformatstop.ValueValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + self["dtickrange"] = dtickrange if dtickrange is not None else _v + _v = arg.pop("enabled", None) + self["enabled"] = enabled if enabled is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("templateitemname", None) + self["templateitemname"] = ( + templateitemname if templateitemname is not None else _v + ) + _v = arg.pop("value", None) + self["value"] = value if value is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "sunburst.marker.colorbar" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.sunburst.marker.colorbar.Tickfont + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.sunburst.marker.colorbar.Tickfont +constructor must be a dict or +an instance of plotly.graph_objs.sunburst.marker.colorbar.Tickfont""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.sunburst.marker.colorbar import tickfont as v_tickfont + + # Initialize validators + # --------------------- + self._validators["color"] = v_tickfont.ColorValidator() + self._validators["family"] = v_tickfont.FamilyValidator() + self._validators["size"] = v_tickfont.SizeValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + +from plotly.graph_objs.sunburst.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py new file mode 100644 index 00000000000..3a569ad5706 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py @@ -0,0 +1,230 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "sunburst.marker.colorbar.title" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.sunburst.marker.colorbar.title.Font + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.sunburst.marker.colorbar.title.Font +constructor must be a dict or +an instance of plotly.graph_objs.sunburst.marker.colorbar.title.Font""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.sunburst.marker.colorbar.title import font as v_font + + # Initialize validators + # --------------------- + self._validators["color"] = v_font.ColorValidator() + self._validators["family"] = v_font.FamilyValidator() + self._validators["size"] = v_font.SizeValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/surface/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/__init__.py index 1d797d3b356..7c94451bb29 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/__init__.py @@ -3142,6 +3142,18 @@ def __init__( self._skip_invalid = False +__all__ = [ + "ColorBar", + "Contours", + "Hoverlabel", + "Lighting", + "Lightposition", + "Stream", + "colorbar", + "contours", + "hoverlabel", +] + from plotly.graph_objs.surface import hoverlabel from plotly.graph_objs.surface import contours from plotly.graph_objs.surface import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py index 3e6fe3a27b2..afdfa2b45da 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/__init__.py @@ -717,4 +717,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.surface.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py index 6c963d68fa9..ca598da9e19 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py index b4c3bdfabb6..23cc7247a76 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/__init__.py @@ -1513,6 +1513,8 @@ def __init__( self._skip_invalid = False +__all__ = ["X", "Y", "Z", "x", "y", "z"] + from plotly.graph_objs.surface.contours import z from plotly.graph_objs.surface.contours import y from plotly.graph_objs.surface.contours import x diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py index df81193d981..4d1ad1abd6d 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/x/__init__.py @@ -185,3 +185,6 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Project"] diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py index 43bbaa947fd..09429764535 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/y/__init__.py @@ -185,3 +185,6 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Project"] diff --git a/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py index befc4d2e7ba..92bf751fac5 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/contours/z/__init__.py @@ -185,3 +185,6 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Project"] diff --git a/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py index 6e447abd9bf..461726715e6 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/surface/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/table/__init__.py b/packages/python/plotly/plotly/graph_objs/table/__init__.py index 70a4b7813c2..7a0d84bb1bf 100644 --- a/packages/python/plotly/plotly/graph_objs/table/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/__init__.py @@ -1963,6 +1963,17 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Cells", + "Domain", + "Header", + "Hoverlabel", + "Stream", + "cells", + "header", + "hoverlabel", +] + from plotly.graph_objs.table import hoverlabel from plotly.graph_objs.table import header from plotly.graph_objs.table import cells diff --git a/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py b/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py index 07ed5f905cd..90a79a7ed83 100644 --- a/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/cells/__init__.py @@ -707,3 +707,6 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Fill", "Font", "Line"] diff --git a/packages/python/plotly/plotly/graph_objs/table/header/__init__.py b/packages/python/plotly/plotly/graph_objs/table/header/__init__.py index 81c51c30539..a498a223e35 100644 --- a/packages/python/plotly/plotly/graph_objs/table/header/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/header/__init__.py @@ -707,3 +707,6 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Fill", "Font", "Line"] diff --git a/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py index eea88bef78e..c43c783ba04 100644 --- a/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/table/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/treemap/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/__init__.py new file mode 100644 index 00000000000..f705371ad45 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/__init__.py @@ -0,0 +1,3232 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tiling(_BaseTraceHierarchyType): + + # flip + # ---- + @property + def flip(self): + """ + Determines if the positions obtained from solver are flipped on + each axis. + + The 'flip' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y'] joined with '+' characters + (e.g. 'x+y') + + Returns + ------- + Any + """ + return self["flip"] + + @flip.setter + def flip(self, val): + self["flip"] = val + + # packing + # ------- + @property + def packing(self): + """ + Determines d3 treemap solver. For more info please refer to + https://github.com/d3/d3-hierarchy#treemap-tiling + + The 'packing' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['squarify', 'binary', 'dice', 'slice', 'slice-dice', + 'dice-slice'] + + Returns + ------- + Any + """ + return self["packing"] + + @packing.setter + def packing(self, val): + self["packing"] = val + + # pad + # --- + @property + def pad(self): + """ + Sets the inner padding (in px). + + The 'pad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # squarifyratio + # ------------- + @property + def squarifyratio(self): + """ + When using "squarify" `packing` algorithm, according to https:/ + /github.com/d3/d3-hierarchy/blob/master/README.md#squarify_rati + o this option specifies the desired aspect ratio of the + generated rectangles. The ratio must be specified as a number + greater than or equal to one. Note that the orientation of the + generated rectangles (tall or wide) is not implied by the + ratio; for example, a ratio of two will attempt to produce a + mixture of rectangles whose width:height ratio is either 2:1 or + 1:2. When using "squarify", unlike d3 which uses the Golden + Ratio i.e. 1.618034, Plotly applies 1 to increase squares in + treemap layouts. + + The 'squarifyratio' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["squarifyratio"] + + @squarifyratio.setter + def squarifyratio(self, val): + self["squarifyratio"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + flip + Determines if the positions obtained from solver are + flipped on each axis. + packing + Determines d3 treemap solver. For more info please + refer to https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, according to + https://github.com/d3/d3-hierarchy/blob/master/README.m + d#squarify_ratio this option specifies the desired + aspect ratio of the generated rectangles. The ratio + must be specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the ratio; + for example, a ratio of two will attempt to produce a + mixture of rectangles whose width:height ratio is + either 2:1 or 1:2. When using "squarify", unlike d3 + which uses the Golden Ratio i.e. 1.618034, Plotly + applies 1 to increase squares in treemap layouts. + """ + + def __init__( + self, arg=None, flip=None, packing=None, pad=None, squarifyratio=None, **kwargs + ): + """ + Construct a new Tiling object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Tiling + flip + Determines if the positions obtained from solver are + flipped on each axis. + packing + Determines d3 treemap solver. For more info please + refer to https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, according to + https://github.com/d3/d3-hierarchy/blob/master/README.m + d#squarify_ratio this option specifies the desired + aspect ratio of the generated rectangles. The ratio + must be specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the ratio; + for example, a ratio of two will attempt to produce a + mixture of rectangles whose width:height ratio is + either 2:1 or 1:2. When using "squarify", unlike d3 + which uses the Golden Ratio i.e. 1.618034, Plotly + applies 1 to increase squares in treemap layouts. + + Returns + ------- + Tiling + """ + super(Tiling, self).__init__("tiling") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Tiling +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Tiling""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import tiling as v_tiling + + # Initialize validators + # --------------------- + self._validators["flip"] = v_tiling.FlipValidator() + self._validators["packing"] = v_tiling.PackingValidator() + self._validators["pad"] = v_tiling.PadValidator() + self._validators["squarifyratio"] = v_tiling.SquarifyratioValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("flip", None) + self["flip"] = flip if flip is not None else _v + _v = arg.pop("packing", None) + self["packing"] = packing if packing is not None else _v + _v = arg.pop("pad", None) + self["pad"] = pad if pad is not None else _v + _v = arg.pop("squarifyratio", None) + self["squarifyratio"] = squarifyratio if squarifyratio is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on plot.ly for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on plot.ly for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on plot.ly for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on plot.ly for color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for family . + size + + sizesrc + Sets the source reference on plot.ly for size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Textfont object + + Sets the font used for `textinfo`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Textfont + color + + colorsrc + Sets the source reference on plot.ly for color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for family . + size + + sizesrc + Sets the source reference on plot.ly for size . + + Returns + ------- + Textfont + """ + super(Textfont, self).__init__("textfont") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Textfont +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Textfont""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import textfont as v_textfont + + # Initialize validators + # --------------------- + self._validators["color"] = v_textfont.ColorValidator() + self._validators["colorsrc"] = v_textfont.ColorsrcValidator() + self._validators["family"] = v_textfont.FamilyValidator() + self._validators["familysrc"] = v_textfont.FamilysrcValidator() + self._validators["size"] = v_textfont.SizeValidator() + self._validators["sizesrc"] = v_textfont.SizesrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("colorsrc", None) + self["colorsrc"] = colorsrc if colorsrc is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("familysrc", None) + self["familysrc"] = familysrc if familysrc is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + _v = arg.pop("sizesrc", None) + self["sizesrc"] = sizesrc if sizesrc is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + + # maxpoints + # --------- + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + # token + # ----- + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://plot.ly/settings for more details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://plot.ly/settings for more + details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Stream + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://plot.ly/settings for more + details. + + Returns + ------- + Stream + """ + super(Stream, self).__init__("stream") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Stream +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Stream""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import stream as v_stream + + # Initialize validators + # --------------------- + self._validators["maxpoints"] = v_stream.MaxpointsValidator() + self._validators["token"] = v_stream.TokenValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("maxpoints", None) + self["maxpoints"] = maxpoints if maxpoints is not None else _v + _v = arg.pop("token", None) + self["token"] = token if token is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Pathbar(_BaseTraceHierarchyType): + + # edgeshape + # --------- + @property + def edgeshape(self): + """ + Determines which shape is used for edges between `barpath` + labels. + + The 'edgeshape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['>', '<', '|', '\\'] + - A string that matches one of the following regular expressions: + [''] + + Returns + ------- + Any + """ + return self["edgeshape"] + + @edgeshape.setter + def edgeshape(self, val): + self["edgeshape"] = val + + # side + # ---- + @property + def side(self): + """ + Determines on which side of the the treemap the `pathbar` + should be presented. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # textfont + # -------- + @property + def textfont(self): + """ + Sets the font used inside `pathbar`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of plotly.graph_objs.treemap.pathbar.Textfont + - A dict of string/value properties that will be passed + to the Textfont constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.treemap.pathbar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of `pathbar` (in px). If not specified the + `pathbar.textfont.size` is used with 3 pixles extra padding on + each side. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [12, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # visible + # ------- + @property + def visible(self): + """ + Determines if the path bar is drawn i.e. outside the trace + `domain` and with one pixel gap. + + The 'visible' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + edgeshape + Determines which shape is used for edges between + `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used with 3 + pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. outside the + trace `domain` and with one pixel gap. + """ + + def __init__( + self, + arg=None, + edgeshape=None, + side=None, + textfont=None, + thickness=None, + visible=None, + **kwargs + ): + """ + Construct a new Pathbar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Pathbar + edgeshape + Determines which shape is used for edges between + `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used with 3 + pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. outside the + trace `domain` and with one pixel gap. + + Returns + ------- + Pathbar + """ + super(Pathbar, self).__init__("pathbar") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Pathbar +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Pathbar""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import pathbar as v_pathbar + + # Initialize validators + # --------------------- + self._validators["edgeshape"] = v_pathbar.EdgeshapeValidator() + self._validators["side"] = v_pathbar.SideValidator() + self._validators["textfont"] = v_pathbar.TextfontValidator() + self._validators["thickness"] = v_pathbar.ThicknessValidator() + self._validators["visible"] = v_pathbar.VisibleValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("edgeshape", None) + self["edgeshape"] = edgeshape if edgeshape is not None else _v + _v = arg.pop("side", None) + self["side"] = side if side is not None else _v + _v = arg.pop("textfont", None) + self["textfont"] = textfont if textfont is not None else _v + _v = arg.pop("thickness", None) + self["thickness"] = thickness if thickness is not None else _v + _v = arg.pop("visible", None) + self["visible"] = visible if visible is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on plot.ly for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on plot.ly for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on plot.ly for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on plot.ly for color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for family . + size + + sizesrc + Sets the source reference on plot.ly for size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `textinfo` lying outside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.treemap.Outsidetextfont + color + + colorsrc + Sets the source reference on plot.ly for color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for family . + size + + sizesrc + Sets the source reference on plot.ly for size . + + Returns + ------- + Outsidetextfont + """ + super(Outsidetextfont, self).__init__("outsidetextfont") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Outsidetextfont +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Outsidetextfont""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import outsidetextfont as v_outsidetextfont + + # Initialize validators + # --------------------- + self._validators["color"] = v_outsidetextfont.ColorValidator() + self._validators["colorsrc"] = v_outsidetextfont.ColorsrcValidator() + self._validators["family"] = v_outsidetextfont.FamilyValidator() + self._validators["familysrc"] = v_outsidetextfont.FamilysrcValidator() + self._validators["size"] = v_outsidetextfont.SizeValidator() + self._validators["sizesrc"] = v_outsidetextfont.SizesrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("colorsrc", None) + self["colorsrc"] = colorsrc if colorsrc is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("familysrc", None) + self["familysrc"] = familysrc if familysrc is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + _v = arg.pop("sizesrc", None) + self["sizesrc"] = sizesrc if sizesrc is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + + # autocolorscale + # -------------- + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set to a + numerical array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + # cauto + # ----- + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here colors) or the bounds set in + `marker.cmin` and `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` when + `marker.cmin` and `marker.cmax` are set by the user. + + The 'cauto' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + # cmax + # ---- + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + # cmid + # ---- + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if colorsis set to a numerical array. Value should + have the same units as colors. Has no effect when + `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + # cmin + # ---- + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + colorsis set to a numerical array. Value should have the same + units as colors and if set, `marker.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + # coloraxis + # --------- + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as the string 'coloraxis' + optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + # colorbar + # -------- + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.ColorBar + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Supported dict properties: + + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.treemap.marker. + colorbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.treemap.marker.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.treemap.marker.colorbar.Ti + tle instance or dict with compatible properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + plotly.graph_objs.treemap.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + # colors + # ------ + @property + def colors(self): + """ + Sets the color of each sector of this trace. If not specified, + the default trace color set is used to pick the sector colors. + + The 'colors' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["colors"] + + @colors.setter + def colors(self, val): + self["colors"] = val + + # colorscale + # ---------- + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if colorsis set to a + numerical array. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a palette + name string of the following list: Greys,YlGnBu,Greens,YlOrRd,B + luered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbod + y,Earth,Electric,Viridis,Cividis. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'peach', 'phase', 'picnic', 'pinkyl', 'piyg', + 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', 'puor', + 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', 'rdgy', + 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', + 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', + 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + # colorssrc + # --------- + @property + def colorssrc(self): + """ + Sets the source reference on plot.ly for colors . + + The 'colorssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorssrc"] + + @colorssrc.setter + def colorssrc(self, val): + self["colorssrc"] = val + + # depthfade + # --------- + @property + def depthfade(self): + """ + Determines if the sector colors are faded towards the + background from the leaves up to the headers. This option is + unavailable when a `colorscale` is present, defaults to false + when `marker.colors` is set, but otherwise defaults to true. + When set to "reversed", the fading direction is inverted, that + is the top elements within hierarchy are drawn with fully + saturated colors while the leaves are faded towards the + background color. + + The 'depthfade' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["depthfade"] + + @depthfade.setter + def depthfade(self, val): + self["depthfade"] = val + + # line + # ---- + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.Line + - A dict of string/value properties that will be passed + to the Line constructor + + Supported dict properties: + + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on plot.ly for color + . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on plot.ly for width + . + + Returns + ------- + plotly.graph_objs.treemap.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + # pad + # --- + @property + def pad(self): + """ + The 'pad' property is an instance of Pad + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.Pad + - A dict of string/value properties that will be passed + to the Pad constructor + + Supported dict properties: + + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). + + Returns + ------- + plotly.graph_objs.treemap.marker.Pad + """ + return self["pad"] + + @pad.setter + def pad(self, val): + self["pad"] = val + + # reversescale + # ------------ + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if + colorsis set to a numerical array. If true, `marker.cmin` will + correspond to the last color in the array and `marker.cmax` + will correspond to the first color. + + The 'reversescale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + # showscale + # --------- + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if colorsis set to a numerical array. + + The 'showscale' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.treemap.marker.ColorBar instance + or dict with compatible properties + colors + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorssrc + Sets the source reference on plot.ly for colors . + depthfade + Determines if the sector colors are faded towards the + background from the leaves up to the headers. This + option is unavailable when a `colorscale` is present, + defaults to false when `marker.colors` is set, but + otherwise defaults to true. When set to "reversed", the + fading direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated colors + while the leaves are faded towards the background + color. + line + plotly.graph_objects.treemap.marker.Line instance or + dict with compatible properties + pad + plotly.graph_objects.treemap.marker.Pad instance or + dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colors=None, + colorscale=None, + colorssrc=None, + depthfade=None, + line=None, + pad=None, + reversescale=None, + showscale=None, + **kwargs + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Marker + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if colorsis set + to a numerical array. In case `colorscale` is + unspecified or `autocolorscale` is true, the default + palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or + mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here colors) or the + bounds set in `marker.cmin` and `marker.cmax` Has an + effect only if colorsis set to a numerical array. + Defaults to `false` when `marker.cmin` and + `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if colorsis set to a + numerical array. Value should have the same units as + colors. Has no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if colorsis set to a numerical array. Value should + have the same units as colors and if set, `marker.cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + plotly.graph_objects.treemap.marker.ColorBar instance + or dict with compatible properties + colors + Sets the color of each sector of this trace. If not + specified, the default trace color set is used to pick + the sector colors. + colorscale + Sets the colorscale. Has an effect only if colorsis set + to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may be a + palette name string of the following list: Greys,YlGnBu + ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,P + ortland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividi + s. + colorssrc + Sets the source reference on plot.ly for colors . + depthfade + Determines if the sector colors are faded towards the + background from the leaves up to the headers. This + option is unavailable when a `colorscale` is present, + defaults to false when `marker.colors` is set, but + otherwise defaults to true. When set to "reversed", the + fading direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated colors + while the leaves are faded towards the background + color. + line + plotly.graph_objects.treemap.marker.Line instance or + dict with compatible properties + pad + plotly.graph_objects.treemap.marker.Pad instance or + dict with compatible properties + reversescale + Reverses the color mapping if true. Has an effect only + if colorsis set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the + array and `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if colorsis set to a + numerical array. + + Returns + ------- + Marker + """ + super(Marker, self).__init__("marker") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Marker +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Marker""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import marker as v_marker + + # Initialize validators + # --------------------- + self._validators["autocolorscale"] = v_marker.AutocolorscaleValidator() + self._validators["cauto"] = v_marker.CautoValidator() + self._validators["cmax"] = v_marker.CmaxValidator() + self._validators["cmid"] = v_marker.CmidValidator() + self._validators["cmin"] = v_marker.CminValidator() + self._validators["coloraxis"] = v_marker.ColoraxisValidator() + self._validators["colorbar"] = v_marker.ColorBarValidator() + self._validators["colors"] = v_marker.ColorsValidator() + self._validators["colorscale"] = v_marker.ColorscaleValidator() + self._validators["colorssrc"] = v_marker.ColorssrcValidator() + self._validators["depthfade"] = v_marker.DepthfadeValidator() + self._validators["line"] = v_marker.LineValidator() + self._validators["pad"] = v_marker.PadValidator() + self._validators["reversescale"] = v_marker.ReversescaleValidator() + self._validators["showscale"] = v_marker.ShowscaleValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("autocolorscale", None) + self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v + _v = arg.pop("cauto", None) + self["cauto"] = cauto if cauto is not None else _v + _v = arg.pop("cmax", None) + self["cmax"] = cmax if cmax is not None else _v + _v = arg.pop("cmid", None) + self["cmid"] = cmid if cmid is not None else _v + _v = arg.pop("cmin", None) + self["cmin"] = cmin if cmin is not None else _v + _v = arg.pop("coloraxis", None) + self["coloraxis"] = coloraxis if coloraxis is not None else _v + _v = arg.pop("colorbar", None) + self["colorbar"] = colorbar if colorbar is not None else _v + _v = arg.pop("colors", None) + self["colors"] = colors if colors is not None else _v + _v = arg.pop("colorscale", None) + self["colorscale"] = colorscale if colorscale is not None else _v + _v = arg.pop("colorssrc", None) + self["colorssrc"] = colorssrc if colorssrc is not None else _v + _v = arg.pop("depthfade", None) + self["depthfade"] = depthfade if depthfade is not None else _v + _v = arg.pop("line", None) + self["line"] = line if line is not None else _v + _v = arg.pop("pad", None) + self["pad"] = pad if pad is not None else _v + _v = arg.pop("reversescale", None) + self["reversescale"] = reversescale if reversescale is not None else _v + _v = arg.pop("showscale", None) + self["showscale"] = showscale if showscale is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on plot.ly for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # familysrc + # --------- + @property + def familysrc(self): + """ + Sets the source reference on plot.ly for family . + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # sizesrc + # ------- + @property + def sizesrc(self): + """ + Sets the source reference on plot.ly for size . + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on plot.ly for color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for family . + size + + sizesrc + Sets the source reference on plot.ly for size . + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + size=None, + sizesrc=None, + **kwargs + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `textinfo` lying inside the sector. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Insidetextfont + color + + colorsrc + Sets the source reference on plot.ly for color . + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for family . + size + + sizesrc + Sets the source reference on plot.ly for size . + + Returns + ------- + Insidetextfont + """ + super(Insidetextfont, self).__init__("insidetextfont") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Insidetextfont +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Insidetextfont""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import insidetextfont as v_insidetextfont + + # Initialize validators + # --------------------- + self._validators["color"] = v_insidetextfont.ColorValidator() + self._validators["colorsrc"] = v_insidetextfont.ColorsrcValidator() + self._validators["family"] = v_insidetextfont.FamilyValidator() + self._validators["familysrc"] = v_insidetextfont.FamilysrcValidator() + self._validators["size"] = v_insidetextfont.SizeValidator() + self._validators["sizesrc"] = v_insidetextfont.SizesrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("colorsrc", None) + self["colorsrc"] = colorsrc if colorsrc is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("familysrc", None) + self["familysrc"] = familysrc if familysrc is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + _v = arg.pop("sizesrc", None) + self["sizesrc"] = sizesrc if sizesrc is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + + # align + # ----- + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + # alignsrc + # -------- + @property + def alignsrc(self): + """ + Sets the source reference on plot.ly for align . + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bgcolorsrc + # ---------- + @property + def bgcolorsrc(self): + """ + Sets the source reference on plot.ly for bgcolor . + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # bordercolorsrc + # -------------- + @property + def bordercolorsrc(self): + """ + Sets the source reference on plot.ly for bordercolor . + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + # font + # ---- + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.treemap.hoverlabel.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . + + Returns + ------- + plotly.graph_objs.treemap.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # namelength + # ---------- + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + # namelengthsrc + # ------------- + @property + def namelengthsrc(self): + """ + Sets the source reference on plot.ly for namelength . + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on plot.ly for align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on plot.ly for bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on plot.ly for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on plot.ly for namelength . + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + **kwargs + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Hoverlabel + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on plot.ly for align . + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on plot.ly for bgcolor . + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on plot.ly for bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on plot.ly for namelength . + + Returns + ------- + Hoverlabel + """ + super(Hoverlabel, self).__init__("hoverlabel") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Hoverlabel +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Hoverlabel""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import hoverlabel as v_hoverlabel + + # Initialize validators + # --------------------- + self._validators["align"] = v_hoverlabel.AlignValidator() + self._validators["alignsrc"] = v_hoverlabel.AlignsrcValidator() + self._validators["bgcolor"] = v_hoverlabel.BgcolorValidator() + self._validators["bgcolorsrc"] = v_hoverlabel.BgcolorsrcValidator() + self._validators["bordercolor"] = v_hoverlabel.BordercolorValidator() + self._validators["bordercolorsrc"] = v_hoverlabel.BordercolorsrcValidator() + self._validators["font"] = v_hoverlabel.FontValidator() + self._validators["namelength"] = v_hoverlabel.NamelengthValidator() + self._validators["namelengthsrc"] = v_hoverlabel.NamelengthsrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("align", None) + self["align"] = align if align is not None else _v + _v = arg.pop("alignsrc", None) + self["alignsrc"] = alignsrc if alignsrc is not None else _v + _v = arg.pop("bgcolor", None) + self["bgcolor"] = bgcolor if bgcolor is not None else _v + _v = arg.pop("bgcolorsrc", None) + self["bgcolorsrc"] = bgcolorsrc if bgcolorsrc is not None else _v + _v = arg.pop("bordercolor", None) + self["bordercolor"] = bordercolor if bordercolor is not None else _v + _v = arg.pop("bordercolorsrc", None) + self["bordercolorsrc"] = bordercolorsrc if bordercolorsrc is not None else _v + _v = arg.pop("font", None) + self["font"] = font if font is not None else _v + _v = arg.pop("namelength", None) + self["namelength"] = namelength if namelength is not None else _v + _v = arg.pop("namelengthsrc", None) + self["namelengthsrc"] = namelengthsrc if namelengthsrc is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Domain(_BaseTraceHierarchyType): + + # column + # ------ + @property + def column(self): + """ + If there is a layout grid, use the domain for this column in + the grid for this treemap trace . + + The 'column' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["column"] + + @column.setter + def column(self, val): + self["column"] = val + + # row + # --- + @property + def row(self): + """ + If there is a layout grid, use the domain for this row in the + grid for this treemap trace . + + The 'row' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["row"] + + @row.setter + def row(self, val): + self["row"] = val + + # x + # - + @property + def x(self): + """ + Sets the horizontal domain of this treemap trace (in plot + fraction). + + The 'x' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'x[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'x[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # y + # - + @property + def y(self): + """ + Sets the vertical domain of this treemap trace (in plot + fraction). + + The 'y' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'y[0]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + (1) The 'y[1]' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + list + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + column + If there is a layout grid, use the domain for this + column in the grid for this treemap trace . + row + If there is a layout grid, use the domain for this row + in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap trace (in + plot fraction). + y + Sets the vertical domain of this treemap trace (in plot + fraction). + """ + + def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + """ + Construct a new Domain object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.Domain + column + If there is a layout grid, use the domain for this + column in the grid for this treemap trace . + row + If there is a layout grid, use the domain for this row + in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap trace (in + plot fraction). + y + Sets the vertical domain of this treemap trace (in plot + fraction). + + Returns + ------- + Domain + """ + super(Domain, self).__init__("domain") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.Domain +constructor must be a dict or +an instance of plotly.graph_objs.treemap.Domain""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap import domain as v_domain + + # Initialize validators + # --------------------- + self._validators["column"] = v_domain.ColumnValidator() + self._validators["row"] = v_domain.RowValidator() + self._validators["x"] = v_domain.XValidator() + self._validators["y"] = v_domain.YValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("column", None) + self["column"] = column if column is not None else _v + _v = arg.pop("row", None) + self["row"] = row if row is not None else _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = [ + "Domain", + "Hoverlabel", + "Insidetextfont", + "Marker", + "Outsidetextfont", + "Pathbar", + "Stream", + "Textfont", + "Tiling", + "hoverlabel", + "marker", + "pathbar", +] + +from plotly.graph_objs.treemap import pathbar +from plotly.graph_objs.treemap import marker +from plotly.graph_objs.treemap import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py similarity index 97% rename from packages/python/plotly/plotly/graph_objs/contourcarpet/hoverlabel/__init__.py rename to packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py index fe094234e64..60f4fd92422 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/__init__.py @@ -177,7 +177,7 @@ def sizesrc(self, val): # -------------------- @property def _parent_path_str(self): - return "contourcarpet.hoverlabel" + return "treemap.hoverlabel" # Self properties description # --------------------------- @@ -231,7 +231,7 @@ def __init__( arg dict of properties compatible with this constructor or an instance of - plotly.graph_objs.contourcarpet.hoverlabel.Font + plotly.graph_objs.treemap.hoverlabel.Font color colorsrc @@ -274,9 +274,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.contourcarpet.hoverlabel.Font +The first argument to the plotly.graph_objs.treemap.hoverlabel.Font constructor must be a dict or -an instance of plotly.graph_objs.contourcarpet.hoverlabel.Font""" +an instance of plotly.graph_objs.treemap.hoverlabel.Font""" ) # Handle skip_invalid @@ -285,7 +285,7 @@ def __init__( # Import validators # ----------------- - from plotly.validators.contourcarpet.hoverlabel import font as v_font + from plotly.validators.treemap.hoverlabel import font as v_font # Initialize validators # --------------------- @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py new file mode 100644 index 00000000000..309f76474e6 --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/__init__.py @@ -0,0 +1,2276 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Pad(_BaseTraceHierarchyType): + + # b + # - + @property + def b(self): + """ + Sets the padding form the bottom (in px). + + The 'b' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + # l + # - + @property + def l(self): + """ + Sets the padding form the left (in px). + + The 'l' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["l"] + + @l.setter + def l(self, val): + self["l"] = val + + # r + # - + @property + def r(self): + """ + Sets the padding form the right (in px). + + The 'r' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + # t + # - + @property + def t(self): + """ + Sets the padding form the top (in px). + + The 't' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["t"] + + @t.setter + def t(self, val): + self["t"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). + """ + + def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + """ + Construct a new Pad object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.marker.Pad + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). + + Returns + ------- + Pad + """ + super(Pad, self).__init__("pad") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.Pad +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.Pad""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker import pad as v_pad + + # Initialize validators + # --------------------- + self._validators["b"] = v_pad.BValidator() + self._validators["l"] = v_pad.LValidator() + self._validators["r"] = v_pad.RValidator() + self._validators["t"] = v_pad.TValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("b", None) + self["b"] = b if b is not None else _v + _v = arg.pop("l", None) + self["l"] = l if l is not None else _v + _v = arg.pop("r", None) + self["r"] = r if r is not None else _v + _v = arg.pop("t", None) + self["t"] = t if t is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + Sets the color of the line enclosing each sector. Defaults to + the `paper_bgcolor` value. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # colorsrc + # -------- + @property + def colorsrc(self): + """ + Sets the source reference on plot.ly for color . + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + # width + # ----- + @property + def width(self): + """ + Sets the width (in px) of the line enclosing each sector. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + # widthsrc + # -------- + @property + def widthsrc(self): + """ + Sets the source reference on plot.ly for width . + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on plot.ly for color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on plot.ly for width . + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.marker.Line + color + Sets the color of the line enclosing each sector. + Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on plot.ly for color . + width + Sets the width (in px) of the line enclosing each + sector. + widthsrc + Sets the source reference on plot.ly for width . + + Returns + ------- + Line + """ + super(Line, self).__init__("line") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.Line +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.Line""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker import line as v_line + + # Initialize validators + # --------------------- + self._validators["color"] = v_line.ColorValidator() + self._validators["colorsrc"] = v_line.ColorsrcValidator() + self._validators["width"] = v_line.WidthValidator() + self._validators["widthsrc"] = v_line.WidthsrcValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("colorsrc", None) + self["colorsrc"] = colorsrc if colorsrc is not None else _v + _v = arg.pop("width", None) + self["width"] = width if width is not None else _v + _v = arg.pop("widthsrc", None) + self["widthsrc"] = widthsrc if widthsrc is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + + # bgcolor + # ------- + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + # bordercolor + # ----------- + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + # borderwidth + # ----------- + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + # dtick + # ----- + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + # exponentformat + # -------------- + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + # len + # --- + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + # lenmode + # ------- + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + # nticks + # ------ + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + # outlinecolor + # ------------ + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + # outlinewidth + # ------------ + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + # separatethousands + # ----------------- + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + # showexponent + # ------------ + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + # showticklabels + # -------------- + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + # showtickprefix + # -------------- + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + # showticksuffix + # -------------- + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + # thickness + # --------- + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + # thicknessmode + # ------------- + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + # tick0 + # ----- + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + # tickangle + # --------- + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. Numeric values outside this + range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + # tickcolor + # --------- + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + # tickfont + # -------- + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.colorbar.Tickfont + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + # tickformat + # ---------- + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for dates + see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add one item + to d3's date formatter: "%{n}f" for fractional seconds with n + digits. For example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + # tickformatstops + # --------------- + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.treemap.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Supported dict properties: + + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" + + Returns + ------- + tuple[plotly.graph_objs.treemap.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + # tickformatstopdefaults + # ---------------------- + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.treemap.marker + .colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + treemap.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.colorbar.Tickformatstop + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Supported dict properties: + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + # ticklen + # ------- + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + # tickmode + # -------- + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + # tickprefix + # ---------- + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + # ticks + # ----- + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + # ticksuffix + # ---------- + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + # ticktext + # -------- + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + # ticktextsrc + # ----------- + @property + def ticktextsrc(self): + """ + Sets the source reference on plot.ly for ticktext . + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + # tickvals + # -------- + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + # tickvalssrc + # ----------- + @property + def tickvalssrc(self): + """ + Sets the source reference on plot.ly for tickvals . + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + # tickwidth + # --------- + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + # title + # ----- + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.colorbar.Title + - A dict of string/value properties that will be passed + to the Title constructor + + Supported dict properties: + + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + # titlefont + # --------- + @property + def titlefont(self): + """ + Deprecated: Please use treemap.marker.colorbar.title.font + instead. Sets this color bar's title font. Note that the + title's font used to be set by the now deprecated `titlefont` + attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.colorbar.title.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + + """ + return self["titlefont"] + + @titlefont.setter + def titlefont(self, val): + self["titlefont"] = val + + # titleside + # --------- + @property + def titleside(self): + """ + Deprecated: Please use treemap.marker.colorbar.title.side + instead. Determines the location of color bar's title with + respect to the color bar. Note that the title's location used + to be set by the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + + """ + return self["titleside"] + + @titleside.setter + def titleside(self, val): + self["titleside"] = val + + # x + # - + @property + def x(self): + """ + Sets the x position of the color bar (in plot fraction). + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + # xanchor + # ------- + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + # xpad + # ---- + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + # y + # - + @property + def y(self): + """ + Sets the y position of the color bar (in plot fraction). + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-2, 3] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + # yanchor + # ------- + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + # ypad + # ---- + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.treemap.marker.colorbar + .Tickformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.treema + p.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.treemap.marker.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + """ + + _mapped_properties = { + "titlefont": ("title", "font"), + "titleside": ("title", "side"), + } + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + len=None, + lenmode=None, + nticks=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + titlefont=None, + titleside=None, + x=None, + xanchor=None, + xpad=None, + y=None, + yanchor=None, + ypad=None, + **kwargs + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.treemap.marker.ColorBar + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format And for + dates see: https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format We add + one item to d3's date formatter: "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.treemap.marker.colorbar + .Tickformatstop instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.treema + p.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for ticktext . + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.treemap.marker.colorbar.Title + instance or dict with compatible properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. Sets this + color bar's title font. Note that the title's font used + to be set by the now deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. Determines + the location of color bar's title with respect to the + color bar. Note that the title's location used to be + set by the now deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. + + Returns + ------- + ColorBar + """ + super(ColorBar, self).__init__("colorbar") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.ColorBar +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.ColorBar""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker import colorbar as v_colorbar + + # Initialize validators + # --------------------- + self._validators["bgcolor"] = v_colorbar.BgcolorValidator() + self._validators["bordercolor"] = v_colorbar.BordercolorValidator() + self._validators["borderwidth"] = v_colorbar.BorderwidthValidator() + self._validators["dtick"] = v_colorbar.DtickValidator() + self._validators["exponentformat"] = v_colorbar.ExponentformatValidator() + self._validators["len"] = v_colorbar.LenValidator() + self._validators["lenmode"] = v_colorbar.LenmodeValidator() + self._validators["nticks"] = v_colorbar.NticksValidator() + self._validators["outlinecolor"] = v_colorbar.OutlinecolorValidator() + self._validators["outlinewidth"] = v_colorbar.OutlinewidthValidator() + self._validators["separatethousands"] = v_colorbar.SeparatethousandsValidator() + self._validators["showexponent"] = v_colorbar.ShowexponentValidator() + self._validators["showticklabels"] = v_colorbar.ShowticklabelsValidator() + self._validators["showtickprefix"] = v_colorbar.ShowtickprefixValidator() + self._validators["showticksuffix"] = v_colorbar.ShowticksuffixValidator() + self._validators["thickness"] = v_colorbar.ThicknessValidator() + self._validators["thicknessmode"] = v_colorbar.ThicknessmodeValidator() + self._validators["tick0"] = v_colorbar.Tick0Validator() + self._validators["tickangle"] = v_colorbar.TickangleValidator() + self._validators["tickcolor"] = v_colorbar.TickcolorValidator() + self._validators["tickfont"] = v_colorbar.TickfontValidator() + self._validators["tickformat"] = v_colorbar.TickformatValidator() + self._validators["tickformatstops"] = v_colorbar.TickformatstopsValidator() + self._validators[ + "tickformatstopdefaults" + ] = v_colorbar.TickformatstopValidator() + self._validators["ticklen"] = v_colorbar.TicklenValidator() + self._validators["tickmode"] = v_colorbar.TickmodeValidator() + self._validators["tickprefix"] = v_colorbar.TickprefixValidator() + self._validators["ticks"] = v_colorbar.TicksValidator() + self._validators["ticksuffix"] = v_colorbar.TicksuffixValidator() + self._validators["ticktext"] = v_colorbar.TicktextValidator() + self._validators["ticktextsrc"] = v_colorbar.TicktextsrcValidator() + self._validators["tickvals"] = v_colorbar.TickvalsValidator() + self._validators["tickvalssrc"] = v_colorbar.TickvalssrcValidator() + self._validators["tickwidth"] = v_colorbar.TickwidthValidator() + self._validators["title"] = v_colorbar.TitleValidator() + self._validators["x"] = v_colorbar.XValidator() + self._validators["xanchor"] = v_colorbar.XanchorValidator() + self._validators["xpad"] = v_colorbar.XpadValidator() + self._validators["y"] = v_colorbar.YValidator() + self._validators["yanchor"] = v_colorbar.YanchorValidator() + self._validators["ypad"] = v_colorbar.YpadValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("bgcolor", None) + self["bgcolor"] = bgcolor if bgcolor is not None else _v + _v = arg.pop("bordercolor", None) + self["bordercolor"] = bordercolor if bordercolor is not None else _v + _v = arg.pop("borderwidth", None) + self["borderwidth"] = borderwidth if borderwidth is not None else _v + _v = arg.pop("dtick", None) + self["dtick"] = dtick if dtick is not None else _v + _v = arg.pop("exponentformat", None) + self["exponentformat"] = exponentformat if exponentformat is not None else _v + _v = arg.pop("len", None) + self["len"] = len if len is not None else _v + _v = arg.pop("lenmode", None) + self["lenmode"] = lenmode if lenmode is not None else _v + _v = arg.pop("nticks", None) + self["nticks"] = nticks if nticks is not None else _v + _v = arg.pop("outlinecolor", None) + self["outlinecolor"] = outlinecolor if outlinecolor is not None else _v + _v = arg.pop("outlinewidth", None) + self["outlinewidth"] = outlinewidth if outlinewidth is not None else _v + _v = arg.pop("separatethousands", None) + self["separatethousands"] = ( + separatethousands if separatethousands is not None else _v + ) + _v = arg.pop("showexponent", None) + self["showexponent"] = showexponent if showexponent is not None else _v + _v = arg.pop("showticklabels", None) + self["showticklabels"] = showticklabels if showticklabels is not None else _v + _v = arg.pop("showtickprefix", None) + self["showtickprefix"] = showtickprefix if showtickprefix is not None else _v + _v = arg.pop("showticksuffix", None) + self["showticksuffix"] = showticksuffix if showticksuffix is not None else _v + _v = arg.pop("thickness", None) + self["thickness"] = thickness if thickness is not None else _v + _v = arg.pop("thicknessmode", None) + self["thicknessmode"] = thicknessmode if thicknessmode is not None else _v + _v = arg.pop("tick0", None) + self["tick0"] = tick0 if tick0 is not None else _v + _v = arg.pop("tickangle", None) + self["tickangle"] = tickangle if tickangle is not None else _v + _v = arg.pop("tickcolor", None) + self["tickcolor"] = tickcolor if tickcolor is not None else _v + _v = arg.pop("tickfont", None) + self["tickfont"] = tickfont if tickfont is not None else _v + _v = arg.pop("tickformat", None) + self["tickformat"] = tickformat if tickformat is not None else _v + _v = arg.pop("tickformatstops", None) + self["tickformatstops"] = tickformatstops if tickformatstops is not None else _v + _v = arg.pop("tickformatstopdefaults", None) + self["tickformatstopdefaults"] = ( + tickformatstopdefaults if tickformatstopdefaults is not None else _v + ) + _v = arg.pop("ticklen", None) + self["ticklen"] = ticklen if ticklen is not None else _v + _v = arg.pop("tickmode", None) + self["tickmode"] = tickmode if tickmode is not None else _v + _v = arg.pop("tickprefix", None) + self["tickprefix"] = tickprefix if tickprefix is not None else _v + _v = arg.pop("ticks", None) + self["ticks"] = ticks if ticks is not None else _v + _v = arg.pop("ticksuffix", None) + self["ticksuffix"] = ticksuffix if ticksuffix is not None else _v + _v = arg.pop("ticktext", None) + self["ticktext"] = ticktext if ticktext is not None else _v + _v = arg.pop("ticktextsrc", None) + self["ticktextsrc"] = ticktextsrc if ticktextsrc is not None else _v + _v = arg.pop("tickvals", None) + self["tickvals"] = tickvals if tickvals is not None else _v + _v = arg.pop("tickvalssrc", None) + self["tickvalssrc"] = tickvalssrc if tickvalssrc is not None else _v + _v = arg.pop("tickwidth", None) + self["tickwidth"] = tickwidth if tickwidth is not None else _v + _v = arg.pop("title", None) + self["title"] = title if title is not None else _v + _v = arg.pop("titlefont", None) + _v = titlefont if titlefont is not None else _v + if _v is not None: + self["titlefont"] = _v + _v = arg.pop("titleside", None) + _v = titleside if titleside is not None else _v + if _v is not None: + self["titleside"] = _v + _v = arg.pop("x", None) + self["x"] = x if x is not None else _v + _v = arg.pop("xanchor", None) + self["xanchor"] = xanchor if xanchor is not None else _v + _v = arg.pop("xpad", None) + self["xpad"] = xpad if xpad is not None else _v + _v = arg.pop("y", None) + self["y"] = y if y is not None else _v + _v = arg.pop("yanchor", None) + self["yanchor"] = yanchor if yanchor is not None else _v + _v = arg.pop("ypad", None) + self["ypad"] = ypad if ypad is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = ["ColorBar", "Line", "Pad", "colorbar"] + +from plotly.graph_objs.treemap.marker import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py new file mode 100644 index 00000000000..39d7dfcfd0b --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/__init__.py @@ -0,0 +1,723 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + + # font + # ---- + @property + def font(self): + """ + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of plotly.graph_objs.treemap.marker.colorbar.title.Font + - A dict of string/value properties that will be passed + to the Font constructor + + Supported dict properties: + + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + Returns + ------- + plotly.graph_objs.treemap.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + # side + # ---- + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Note that the title's location used to be set by + the now deprecated `titleside` attribute. + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + # text + # ---- + @property + def text(self): + """ + Sets the title of the color bar. Note that before the existence + of `title.text`, the title's contents used to be defined as the + `title` attribute itself. This behavior has been deprecated. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker.colorbar" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.treemap.marker.colorbar.Title + font + Sets this color bar's title font. Note that the title's + font used to be set by the now deprecated `titlefont` + attribute. + side + Determines the location of color bar's title with + respect to the color bar. Note that the title's + location used to be set by the now deprecated + `titleside` attribute. + text + Sets the title of the color bar. Note that before the + existence of `title.text`, the title's contents used to + be defined as the `title` attribute itself. This + behavior has been deprecated. + + Returns + ------- + Title + """ + super(Title, self).__init__("title") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.colorbar.Title +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.colorbar.Title""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker.colorbar import title as v_title + + # Initialize validators + # --------------------- + self._validators["font"] = v_title.FontValidator() + self._validators["side"] = v_title.SideValidator() + self._validators["text"] = v_title.TextValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("font", None) + self["font"] = font if font is not None else _v + _v = arg.pop("side", None) + self["side"] = side if side is not None else _v + _v = arg.pop("text", None) + self["text"] = text if text is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + + # dtickrange + # ---------- + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + # enabled + # ------- + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property must be specified as a bool + (either True, or False) + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + # name + # ---- + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + # templateitemname + # ---------------- + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + # value + # ----- + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker.colorbar" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of plotly.graph_objs.treemap.marker.colorba + r.Tickformatstop + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super(Tickformatstop, self).__init__("tickformatstops") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.colorbar.Tickformatstop""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker.colorbar import ( + tickformatstop as v_tickformatstop, + ) + + # Initialize validators + # --------------------- + self._validators["dtickrange"] = v_tickformatstop.DtickrangeValidator() + self._validators["enabled"] = v_tickformatstop.EnabledValidator() + self._validators["name"] = v_tickformatstop.NameValidator() + self._validators[ + "templateitemname" + ] = v_tickformatstop.TemplateitemnameValidator() + self._validators["value"] = v_tickformatstop.ValueValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("dtickrange", None) + self["dtickrange"] = dtickrange if dtickrange is not None else _v + _v = arg.pop("enabled", None) + self["enabled"] = enabled if enabled is not None else _v + _v = arg.pop("name", None) + self["name"] = name if name is not None else _v + _v = arg.pop("templateitemname", None) + self["templateitemname"] = ( + templateitemname if templateitemname is not None else _v + ) + _v = arg.pop("value", None) + self["value"] = value if value is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker.colorbar" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.treemap.marker.colorbar.Tickfont + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Tickfont + """ + super(Tickfont, self).__init__("tickfont") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.colorbar.Tickfont +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.colorbar.Tickfont""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker.colorbar import tickfont as v_tickfont + + # Initialize validators + # --------------------- + self._validators["color"] = v_tickfont.ColorValidator() + self._validators["family"] = v_tickfont.FamilyValidator() + self._validators["size"] = v_tickfont.SizeValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + +from plotly.graph_objs.treemap.marker.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py new file mode 100644 index 00000000000..9f0052292bb --- /dev/null +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py @@ -0,0 +1,230 @@ +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + + # color + # ----- + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: + aliceblue, antiquewhite, aqua, aquamarine, azure, + beige, bisque, black, blanchedalmond, blue, + blueviolet, brown, burlywood, cadetblue, + chartreuse, chocolate, coral, cornflowerblue, + cornsilk, crimson, cyan, darkblue, darkcyan, + darkgoldenrod, darkgray, darkgrey, darkgreen, + darkkhaki, darkmagenta, darkolivegreen, darkorange, + darkorchid, darkred, darksalmon, darkseagreen, + darkslateblue, darkslategray, darkslategrey, + darkturquoise, darkviolet, deeppink, deepskyblue, + dimgray, dimgrey, dodgerblue, firebrick, + floralwhite, forestgreen, fuchsia, gainsboro, + ghostwhite, gold, goldenrod, gray, grey, green, + greenyellow, honeydew, hotpink, indianred, indigo, + ivory, khaki, lavender, lavenderblush, lawngreen, + lemonchiffon, lightblue, lightcoral, lightcyan, + lightgoldenrodyellow, lightgray, lightgrey, + lightgreen, lightpink, lightsalmon, lightseagreen, + lightskyblue, lightslategray, lightslategrey, + lightsteelblue, lightyellow, lime, limegreen, + linen, magenta, maroon, mediumaquamarine, + mediumblue, mediumorchid, mediumpurple, + mediumseagreen, mediumslateblue, mediumspringgreen, + mediumturquoise, mediumvioletred, midnightblue, + mintcream, mistyrose, moccasin, navajowhite, navy, + oldlace, olive, olivedrab, orange, orangered, + orchid, palegoldenrod, palegreen, paleturquoise, + palevioletred, papayawhip, peachpuff, peru, pink, + plum, powderblue, purple, red, rosybrown, + royalblue, rebeccapurple, saddlebrown, salmon, + sandybrown, seagreen, seashell, sienna, silver, + skyblue, slateblue, slategray, slategrey, snow, + springgreen, steelblue, tan, teal, thistle, tomato, + turquoise, violet, wheat, white, whitesmoke, + yellow, yellowgreen + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + # family + # ------ + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser will only be able to apply a font if + it is available on the system which it operates. Provide + multiple font families, separated by commas, to indicate the + preference in which to apply fonts if they aren't available on + the system. The plotly service (at https://plot.ly or on- + premise) generates images on a server, where only a select + number of fonts are installed and supported. These include + "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", + "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open + Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New + Roman". + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + # size + # ---- + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + # property parent name + # -------------------- + @property + def _parent_path_str(self): + return "treemap.marker.colorbar.title" + + # Self properties description + # --------------------------- + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + """ + + def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): + """ + Construct a new Font object + + Sets this color bar's title font. Note that the title's font + used to be set by the now deprecated `titlefont` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + plotly.graph_objs.treemap.marker.colorbar.title.Font + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser will only be able to + apply a font if it is available on the system which it + operates. Provide multiple font families, separated by + commas, to indicate the preference in which to apply + fonts if they aren't available on the system. The + plotly service (at https://plot.ly or on-premise) + generates images on a server, where only a select + number of fonts are installed and supported. These + include "Arial", "Balto", "Courier New", "Droid Sans",, + "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + + + Returns + ------- + Font + """ + super(Font, self).__init__("font") + + # Validate arg + # ------------ + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError( + """\ +The first argument to the plotly.graph_objs.treemap.marker.colorbar.title.Font +constructor must be a dict or +an instance of plotly.graph_objs.treemap.marker.colorbar.title.Font""" + ) + + # Handle skip_invalid + # ------------------- + self._skip_invalid = kwargs.pop("skip_invalid", False) + + # Import validators + # ----------------- + from plotly.validators.treemap.marker.colorbar.title import font as v_font + + # Initialize validators + # --------------------- + self._validators["color"] = v_font.ColorValidator() + self._validators["family"] = v_font.FamilyValidator() + self._validators["size"] = v_font.SizeValidator() + + # Populate data dict with properties + # ---------------------------------- + _v = arg.pop("color", None) + self["color"] = color if color is not None else _v + _v = arg.pop("family", None) + self["family"] = family if family is not None else _v + _v = arg.pop("size", None) + self["size"] = size if size is not None else _v + + # Process unknown kwargs + # ---------------------- + self._process_kwargs(**dict(arg, **kwargs)) + + # Reset skip_invalid + # ------------------ + self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/carpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py similarity index 91% rename from packages/python/plotly/plotly/graph_objs/carpet/hoverlabel/__init__.py rename to packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py index 74dceb2a0bf..0b7a246cf81 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/pathbar/__init__.py @@ -2,7 +2,7 @@ import copy as _copy -class Font(_BaseTraceHierarchyType): +class Textfont(_BaseTraceHierarchyType): # color # ----- @@ -177,7 +177,7 @@ def sizesrc(self, val): # -------------------- @property def _parent_path_str(self): - return "carpet.hoverlabel" + return "treemap.pathbar" # Self properties description # --------------------------- @@ -222,15 +222,16 @@ def __init__( **kwargs ): """ - Construct a new Font object + Construct a new Textfont object - Sets the font used in hover labels. + Sets the font used inside `pathbar`. Parameters ---------- arg dict of properties compatible with this constructor or - an instance of plotly.graph_objs.carpet.hoverlabel.Font + an instance of + plotly.graph_objs.treemap.pathbar.Textfont color colorsrc @@ -258,9 +259,9 @@ def __init__( Returns ------- - Font + Textfont """ - super(Font, self).__init__("font") + super(Textfont, self).__init__("textfont") # Validate arg # ------------ @@ -273,9 +274,9 @@ def __init__( else: raise ValueError( """\ -The first argument to the plotly.graph_objs.carpet.hoverlabel.Font +The first argument to the plotly.graph_objs.treemap.pathbar.Textfont constructor must be a dict or -an instance of plotly.graph_objs.carpet.hoverlabel.Font""" +an instance of plotly.graph_objs.treemap.pathbar.Textfont""" ) # Handle skip_invalid @@ -284,16 +285,16 @@ def __init__( # Import validators # ----------------- - from plotly.validators.carpet.hoverlabel import font as v_font + from plotly.validators.treemap.pathbar import textfont as v_textfont # Initialize validators # --------------------- - self._validators["color"] = v_font.ColorValidator() - self._validators["colorsrc"] = v_font.ColorsrcValidator() - self._validators["family"] = v_font.FamilyValidator() - self._validators["familysrc"] = v_font.FamilysrcValidator() - self._validators["size"] = v_font.SizeValidator() - self._validators["sizesrc"] = v_font.SizesrcValidator() + self._validators["color"] = v_textfont.ColorValidator() + self._validators["colorsrc"] = v_textfont.ColorsrcValidator() + self._validators["family"] = v_textfont.FamilyValidator() + self._validators["familysrc"] = v_textfont.FamilysrcValidator() + self._validators["size"] = v_textfont.SizeValidator() + self._validators["sizesrc"] = v_textfont.SizesrcValidator() # Populate data dict with properties # ---------------------------------- @@ -317,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Textfont"] diff --git a/packages/python/plotly/plotly/graph_objs/violin/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/__init__.py index 084f12f6385..872520cb197 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/__init__.py @@ -1887,6 +1887,22 @@ def __init__( self._skip_invalid = False +__all__ = [ + "Box", + "Hoverlabel", + "Line", + "Marker", + "Meanline", + "Selected", + "Stream", + "Unselected", + "box", + "hoverlabel", + "marker", + "selected", + "unselected", +] + from plotly.graph_objs.violin import unselected from plotly.graph_objs.violin import selected from plotly.graph_objs.violin import marker diff --git a/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py index c60e4374849..e2af1194f8d 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/box/__init__.py @@ -163,3 +163,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py index 8949d3a4fe5..6057dd495de 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py index 9eae5467113..65c6657c30d 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/marker/__init__.py @@ -283,3 +283,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py index 69076e57aa0..5d194fd85c2 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/selected/__init__.py @@ -190,3 +190,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py b/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py index 7fe65459f4b..bfdf7a8f46e 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/violin/unselected/__init__.py @@ -200,3 +200,6 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Marker"] diff --git a/packages/python/plotly/plotly/graph_objs/volume/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/__init__.py index 25d5d249c75..e776febe864 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/__init__.py @@ -3950,6 +3950,23 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Caps", + "ColorBar", + "Contour", + "Hoverlabel", + "Lighting", + "Lightposition", + "Slices", + "Spaceframe", + "Stream", + "Surface", + "caps", + "colorbar", + "hoverlabel", + "slices", +] + from plotly.graph_objs.volume import slices from plotly.graph_objs.volume import hoverlabel from plotly.graph_objs.volume import colorbar diff --git a/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py index 7f4e052e192..56c888999e8 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/caps/__init__.py @@ -446,3 +446,6 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["X", "Y", "Z"] diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py index 1c084ef4aee..4e70f7ee81f 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/__init__.py @@ -715,4 +715,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): self._skip_invalid = False +__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"] + from plotly.graph_objs.volume.colorbar import title diff --git a/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py index 308916c4ed3..8f1629ebc08 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/colorbar/title/__init__.py @@ -225,3 +225,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py index 1255e410e49..1aa3e0d115d 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/hoverlabel/__init__.py @@ -317,3 +317,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py b/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py index 967c3a3d1a7..766aae399e9 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/volume/slices/__init__.py @@ -626,3 +626,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["X", "Y", "Z"] diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py index 34827aea64b..7a2ea51166a 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/__init__.py @@ -2090,6 +2090,23 @@ def __init__(self, arg=None, line=None, mode=None, visible=None, **kwargs): self._skip_invalid = False +__all__ = [ + "Connector", + "Decreasing", + "Hoverlabel", + "Increasing", + "Insidetextfont", + "Outsidetextfont", + "Stream", + "Textfont", + "Totals", + "connector", + "decreasing", + "hoverlabel", + "increasing", + "totals", +] + from plotly.graph_objs.waterfall import totals from plotly.graph_objs.waterfall import increasing from plotly.graph_objs.waterfall import hoverlabel diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py index 65cfcf6972c..14cfdba89db 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/connector/__init__.py @@ -203,3 +203,6 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py index e1ef2a161c7..948f05357d3 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/__init__.py @@ -176,4 +176,6 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): self._skip_invalid = False +__all__ = ["Marker", "marker"] + from plotly.graph_objs.waterfall.decreasing import marker diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py index 7ef88114c4f..b7d22fba812 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/decreasing/marker/__init__.py @@ -164,3 +164,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py index 1edefd9a613..4e40b934aa0 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/hoverlabel/__init__.py @@ -318,3 +318,6 @@ def __init__( # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Font"] diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py index 5fbb73fe6bf..71355a5c066 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/__init__.py @@ -176,4 +176,6 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): self._skip_invalid = False +__all__ = ["Marker", "marker"] + from plotly.graph_objs.waterfall.increasing import marker diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py index 541e036f507..af0431ceb41 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/__init__.py @@ -164,3 +164,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py index 4b2171ce308..27eeffd6b14 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/totals/__init__.py @@ -181,4 +181,6 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): self._skip_invalid = False +__all__ = ["Marker", "marker"] + from plotly.graph_objs.waterfall.totals import marker diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py index f990eadf585..c77940c5d72 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/totals/marker/__init__.py @@ -168,3 +168,6 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): # Reset skip_invalid # ------------------ self._skip_invalid = False + + +__all__ = ["Line"] diff --git a/packages/python/plotly/plotly/io/__init__.py b/packages/python/plotly/plotly/io/__init__.py index 63a30e8456e..6b96585c334 100644 --- a/packages/python/plotly/plotly/io/__init__.py +++ b/packages/python/plotly/plotly/io/__init__.py @@ -10,3 +10,19 @@ from ._renderers import renderers, show from . import base_renderers + +__all__ = [ + "to_image", + "write_image", + "to_json", + "from_json", + "read_json", + "write_json", + "templates", + "to_templated", + "to_html", + "write_html", + "renderers", + "show", + "base_renderers", +] diff --git a/packages/python/plotly/plotly/io/_base_renderers.py b/packages/python/plotly/plotly/io/_base_renderers.py index bbb5fabeb1b..f0642c7a3f5 100644 --- a/packages/python/plotly/plotly/io/_base_renderers.py +++ b/packages/python/plotly/plotly/io/_base_renderers.py @@ -4,6 +4,7 @@ import webbrowser import inspect import os +from os.path import isdir import six from plotly.io import to_json, to_image, write_image, write_html @@ -564,7 +565,11 @@ def to_mimebundle(self, fig_dict): filename = self.build_filename() # Make directory for - os.makedirs(self.html_directory, exist_ok=True) + try: + os.makedirs(self.html_directory) + except OSError as error: + if not isdir(self.html_directory): + raise write_html( fig_dict, @@ -598,8 +603,8 @@ def to_mimebundle(self, fig_dict): return {"text/html": iframe_html} def build_filename(self): - ip = IPython.get_ipython() - cell_number = list(ip.history_manager.get_tail(1))[0][1] + 1 + ip = IPython.get_ipython() if IPython else None + cell_number = list(ip.history_manager.get_tail(1))[0][1] + 1 if ip else 0 filename = "{dirname}/figure_{cell_number}.html".format( dirname=self.html_directory, cell_number=cell_number ) diff --git a/packages/python/plotly/plotly/io/_templates.py b/packages/python/plotly/plotly/io/_templates.py index f067f7ef331..6a71f8764ba 100644 --- a/packages/python/plotly/plotly/io/_templates.py +++ b/packages/python/plotly/plotly/io/_templates.py @@ -8,6 +8,8 @@ import json from functools import reduce +from six import string_types + try: from math import gcd except ImportError: @@ -61,24 +63,34 @@ def __iter__(self): return iter(self._templates) def __getitem__(self, item): - template = self._templates[item] - if template is Lazy: - from plotly.graph_objs.layout import Template - - if item == "none": - # "none" is a special built-in named template that applied no defaults - template = Template() - self._templates[item] = template - else: - # Load template from package data - path = os.path.join("package_data", "templates", item + ".json") - template_str = pkgutil.get_data("plotly", path).decode("utf-8") - template_dict = json.loads(template_str) - template = Template(template_dict) - - self._templates[item] = template - - return template + if isinstance(item, string_types): + template_names = item.split("+") + else: + template_names = [item] + + templates = [] + for template_name in template_names: + template = self._templates[template_name] + if template is Lazy: + from plotly.graph_objs.layout import Template + + if template_name == "none": + # "none" is a special built-in named template that applied no defaults + template = Template() + self._templates[template_name] = template + else: + # Load template from package data + path = os.path.join( + "package_data", "templates", template_name + ".json" + ) + template_str = pkgutil.get_data("plotly", path).decode("utf-8") + template_dict = json.loads(template_str) + template = Template(template_dict) + + self._templates[template_name] = template + templates.append(self._templates[template_name]) + + return self.merge_templates(*templates) def __setitem__(self, key, value): self._templates[key] = self._validate(value) diff --git a/packages/python/plotly/plotly/offline/_plotlyjs_version.py b/packages/python/plotly/plotly/offline/_plotlyjs_version.py index f764c4befbb..99699e82311 100644 --- a/packages/python/plotly/plotly/offline/_plotlyjs_version.py +++ b/packages/python/plotly/plotly/offline/_plotlyjs_version.py @@ -1,3 +1,3 @@ # DO NOT EDIT # This file is generated by the updatebundle setup.py command -__plotlyjs_version__ = "1.49.1" +__plotlyjs_version__ = "1.50.1" diff --git a/packages/python/plotly/plotly/package_data/plotly.min.js b/packages/python/plotly/plotly/package_data/plotly.min.js index 68b1ba55769..4f4721553e8 100644 --- a/packages/python/plotly/plotly/package_data/plotly.min.js +++ b/packages/python/plotly/plotly/package_data/plotly.min.js @@ -1,7 +1,7 @@ /** -* plotly.js v1.49.1 +* plotly.js v1.50.1 * Copyright 2012-2019, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return i(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},{"../src/lib":719}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1265}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":864}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":876}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":886}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":591}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":895}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":914}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":928}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":935}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":941}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":956}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":967}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":697}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":977}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1266}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":987}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":996}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1267}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1009}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1018}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1030}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1036}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1040}],25:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./pie"),t("./sunburst"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./indicator":26,"./isosurface":27,"./mesh3d":28,"./ohlc":29,"./parcats":30,"./parcoords":31,"./pie":32,"./pointcloud":33,"./sankey":34,"./scatter3d":35,"./scattercarpet":36,"./scattergeo":37,"./scattergl":38,"./scattermapbox":39,"./scatterpolar":40,"./scatterpolargl":41,"./scatterternary":42,"./sort":43,"./splom":44,"./streamtube":45,"./sunburst":46,"./surface":47,"./table":48,"./violin":49,"./volume":50,"./waterfall":51}],26:[function(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1046}],27:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1052}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1057}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1062}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1071}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1081}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1092}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1101}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1107}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1143}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1149}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1156}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1167}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1176}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1183}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1189}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1196}],43:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1269}],44:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1205}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1213}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1219}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1228}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1236}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1244}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1252}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1260}],52:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),h=i(),f=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),new o({turntable:u,orbit:h,matrix:f},c)};var n=t("turntable-camera-controller"),i=t("orbit-camera-controller"),a=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n1||i>1)}function E(t,e,r){return t.sort(L),t.forEach(function(n,i){var a,o,s=0;if(Y(n,r)&&S(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}}),t}function C(t,r,i,a){var o=e.min(t.links,function(t){return t.source.y0});t.links.forEach(function(t){t.circular&&(t.circularPathData={})}),E(t.links.filter(function(t){return"top"==t.circularLinkType}),r,a),E(t.links.filter(function(t){return"bottom"==t.circularLinkType}),r,a),t.links.forEach(function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+w,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,Y(e,a)&&S(e))e.circularPathData.leftSmallArcRadius=w+e.width/2,e.circularPathData.leftLargeArcRadius=w+e.width/2,e.circularPathData.rightSmallArcRadius=w+e.width/2,e.circularPathData.rightLargeArcRadius=w+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter(function(t){return t.source.column==s&&t.circularLinkType==l});"bottom"==e.circularLinkType?c.sort(O):c.sort(P);var u=0;c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=w+e.width/2+u,e.circularPathData.leftLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),s=e.target.column,c=t.links.filter(function(t){return t.target.column==s&&t.circularLinkType==l}),"bottom"==e.circularLinkType?c.sort(I):c.sort(z),u=0,c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=w+e.width/2+u,e.circularPathData.rightLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(i,e.source.y1,e.target.y1)+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){var e="";e="top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY;return e}(e);else{var h=n.linkHorizontal().source(function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]}).target(function(t){return[t.target.x0,t.y1]});e.path=h(e)}})}function L(t,e){return D(t)==D(e)?"bottom"==t.circularLinkType?O(t,e):P(t,e):D(e)-D(t)}function P(t,e){return t.y0-e.y0}function O(t,e){return e.y0-t.y0}function z(t,e){return t.y1-e.y1}function I(t,e){return e.y1-t.y1}function D(t){return t.target.column-t.source.column}function R(t){return t.target.x0-t.source.x1}function F(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1+n:t.y1-n}function B(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1-n:t.y1+n}function N(t,e,r,n){t.links.forEach(function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach(function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=h*i.y0+f*i.y0+p*i.y1+d*i.y1,v=g-i.width/2,m=g+i.width/2;v>o.y0&&vo.y0&&mo.y1&&U(t,c,e,r)})):vo.y1&&(c=m-o.y0+10,o=U(o,c,e,r),t.nodes.forEach(function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&U(t,c,e,r)}))}})}})}function j(t,e){return t.y0>e.y0&&t.y0e.y0&&t.y1e.y1)}function U(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach(function(t){t.y1=t.y1+e}),t.sourceLinks.forEach(function(t){t.y0=t.y0+e})),t}function V(t,e,r,n){t.nodes.forEach(function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter(function(t){return b(t.source,r)==b(i,r)}),o=a.length;o>1&&a.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!H(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=B(e,t);return t.y1-r}if(e.target.column>t.target.column)return B(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0});var s=i.y0;a.forEach(function(t){t.y0=s+t.width/2,s+=t.width}),a.forEach(function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!H(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function Y(t,e){return b(t.source,e)==b(t.target,e)}t.sankeyCircular=function(){var t,n,a=0,b=0,A=1,S=1,E=24,L=v,P=o,O=m,z=y,I=32,D=2,R=null;function F(){var o={nodes:O.apply(null,arguments),links:z.apply(null,arguments)};!function(t){t.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var e=r.map(t.nodes,L);t.links.forEach(function(t,r){t.index=r;var n=t.source,i=t.target;"object"!==("undefined"==typeof n?"undefined":l(n))&&(n=t.source=x(e,n)),"object"!==("undefined"==typeof i?"undefined":l(i))&&(i=t.target=x(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)})}(o),function(t,e,r){var n=0;if(null===r){for(var a=[],o=0;o0?r+_+w:r,bottom:n=n>0?n+_+w:n,left:a=a>0?a+_+w:a,right:i=i>0?i+_+w:i}}(i),u=function(t,r){var n=e.max(t.nodes,function(t){return t.column}),i=A-a,o=S-b,s=i+r.right+r.left,l=o+r.top+r.bottom,c=i/s,u=o/l;return a=a*c+r.left,A=0==r.right?A:A*c,b=b*u+r.top,S*=u,t.nodes.forEach(function(t){t.x0=a+t.column*((A-a-E)/n),t.x1=t.x0+E}),u}(i,c);s*=u,i.links.forEach(function(t){t.width=t.value*s}),l.forEach(function(t){var e=t.length;t.forEach(function(t,n){t.depth==l.length-1&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):0==t.depth&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):t.partOfCycle?0==M(t,r)?(t.y0=S/2+n,t.y1=t.y0+t.value*s):"top"==t.circularLinkType?(t.y0=b+n,t.y1=t.y0+t.value*s):(t.y0=S-t.value*s-n,t.y1=t.y0+t.value*s):0==c.top||0==c.bottom?(t.y0=(S-b)/e*n,t.y1=t.y0+t.value*s):(t.y0=(S-b)/2-e/2+n,t.y1=t.y0+t.value*s)})})})(s),m();for(var c=1,u=o;u>0;--u)v(c*=.99,s),m();function v(t,r){var n=l.length;l.forEach(function(i){var a=i.length,o=i[0].depth;i.forEach(function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&M(i,r)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=S/2-s/2,i.y1=S/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=S/2-s/2,i.y1=S/2+s/2;else{var l=e.mean(i.sourceLinks,g),c=e.mean(i.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(i))*t;i.y0+=u,i.y1+=u}})})}function m(){l.forEach(function(e){var r,n,i,a=b,o=e.length;for(e.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+t;if((n=a-t-S)>0)for(a=r.y0-=n,r.y1-=n,i=o-2;i>=0;--i)r=e[i],(n=r.y1+t-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0})}}(o,I,L),B(o);for(var s=0;s<4;s++)V(o,S,L),q(o,0,L),N(o,b,S,L),V(o,S,L),q(o,0,L);return function(t,r,n){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach(function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)}),0==o||0==s){var l=e.min(i,function(t){return t.y0}),c=e.max(i,function(t){return t.y1}),u=c-l,h=n-r,f=h/u;i.forEach(function(t){var e=(t.y1-t.y0)*f;t.y0=(t.y0-l)*f,t.y1=t.y0+e}),a.forEach(function(t){t.y0=(t.y0-l)*f,t.y1=(t.y1-l)*f,t.width=t.width*f})}}(o,b,S),C(o,D,S,L),o}function B(t){t.nodes.forEach(function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)}),t.nodes.forEach(function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach(function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}return F.nodeId=function(t){return arguments.length?(L="function"==typeof t?t:s(t),F):L},F.nodeAlign=function(t){return arguments.length?(P="function"==typeof t?t:s(t),F):P},F.nodeWidth=function(t){return arguments.length?(E=+t,F):E},F.nodePadding=function(e){return arguments.length?(t=+e,F):t},F.nodes=function(t){return arguments.length?(O="function"==typeof t?t:s(t),F):O},F.links=function(t){return arguments.length?(z="function"==typeof t?t:s(t),F):z},F.size=function(t){return arguments.length?(a=b=0,A=+t[0],S=+t[1],F):[A-a,S-b]},F.extent=function(t){return arguments.length?(a=+t[0][0],A=+t[1][0],b=+t[0][1],S=+t[1][1],F):[[a,b],[A,S]]},F.iterations=function(t){return arguments.length?(I=+t,F):I},F.circularLinkGap=function(t){return arguments.length?(D=+t,F):D},F.nodePaddingRatio=function(t){return arguments.length?(n=+t,F):n},F.sortNodes=function(t){return arguments.length?(R=t,F):R},F.update=function(t){return T(t,L),B(t),t.links.forEach(function(t){t.circular&&(t.circularLinkType=t.y0+t.y1a&&(b=a);var o=e.min(i,function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)});i.forEach(function(t){t.forEach(function(t,e){t.y1=(t.y0=e)+t.value*o})}),t.links.forEach(function(t){t.width=t.value*o})})(),d();for(var a=1,o=A;o>0;--o)l(a*=.99),d(),s(a),d();function s(t){i.forEach(function(r){r.forEach(function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,f)/e.sum(r.targetLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function l(t){i.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function d(){i.forEach(function(t){var e,r,i,a=n,o=t.length;for(t.sort(c),i=0;i0&&(e.y0+=r,e.y1+=r),a=e.y1+b;if((r=a-b-y)>0)for(a=e.y0-=r,e.y1-=r,i=o-2;i>=0;--i)e=t[i],(r=e.y1+b-a)>0&&(e.y0-=r,e.y1-=r),a=e.y0})}}(a),E(a),a}function E(t){t.nodes.forEach(function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)}),t.nodes.forEach(function(t){var e=t.y0,r=e;t.sourceLinks.forEach(function(t){t.y0=e+t.width/2,e+=t.width}),t.targetLinks.forEach(function(t){t.y1=r+t.width/2,r+=t.width})})}return S.update=function(t){return E(t),t},S.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),S):_},S.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),S):w},S.nodeWidth=function(t){return arguments.length?(x=+t,S):x},S.nodePadding=function(t){return arguments.length?(b=+t,S):b},S.nodes=function(t){return arguments.length?(k="function"==typeof t?t:o(t),S):k},S.links=function(t){return arguments.length?(T="function"==typeof t?t:o(t),S):T},S.size=function(e){return arguments.length?(t=n=0,i=+e[0],y=+e[1],S):[i-t,y-n]},S.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],y=+e[1][1],S):[[t,n],[i,y]]},S.iterations=function(t){return arguments.length?(A=+t,S):A},S},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,i)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=a,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?i(r,t("d3-array"),t("d3-collection"),t("d3-shape")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{"d3-array":152,"d3-collection":153,"d3-shape":161}],55:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/meta"),i=6378137;function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=h,r.lengthToRadians=f,r.lengthToDegrees=function(t,e){return p(f(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return h(f(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var a=r.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!d(t))throw new Error("bbox must only contain numbers")})},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],58:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,c,u,h,f=0,p=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;yc||p>u||d>h)return l=i,c=r,u=p,h=d,void(o=0);var g=n.lineString([l,i],t.properties);if(!1===e(g,r,a,d,o))return!1;o++,l=i})&&void 0}}})}function u(t,e){if(!t)throw new Error("geojson is required");l(t,function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=t[o]),t[o]=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!x(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&m(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&_(i,r)||s)&&m(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}f.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(v((e=this).actual),128)+" "+e.operator+" "+g(v(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=d(r),o=i.indexOf("\n"+a);if(o>=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(t,e,r){t!=e&&m(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){x(t,e,!1)||m(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){x(t,e,!0)||m(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){x(t,e,!1)&&m(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){w(!0,t,e,r)},f.doesNotThrow=function(t,e,r){w(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n(function t(e,r){e||m(e,!0,r,"==",t)},f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":454,"util/":71}],69:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],70:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],71:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!m(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(e);if(0===o.length){if(k(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return h(e)}var c,b="",T=!1,A=["{","}"];(p(e)&&(T=!0,A=["[","]"]),k(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return x(e)&&(b=" "+RegExp.prototype.toString.call(e)),_(e)&&(b=" "+Date.prototype.toUTCString.call(e)),w(e)&&(b=" "+h(e)),0!==o.length||T&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=T?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,A)):A[0]+b+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function _(t){return b(t)&&"[object Date]"===T(t)}function w(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function k(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=v,r.isString=m,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t},r.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":70,_process:482,inherits:69}],72:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],73:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o0?n-4:n,h=0;h>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===o&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,s[l++]=255&e);1===o&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;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},{}],75:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{"./lib/rationalize":85}],76:[function(t,e,r){"use strict";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],77:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{"./lib/rationalize":85}],78:[function(t,e,r){"use strict";var n=t("./is-rat"),i=t("./lib/is-bn"),a=t("./lib/num-to-bn"),o=t("./lib/str-to-bn"),s=t("./lib/rationalize"),l=t("./div");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,h;if(i(e))u=e.clone();else if("string"==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=a(e)}}if(n(r))u.mul(r[1]),h=r[0].clone();else if(i(r))h=r.clone();else if("string"==typeof r)h=o(r);else if(r)if(r===Math.floor(r))h=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;h=a(r)}else h=a(1);c>0?u=u.ushln(c):c<0&&(h=h.ushln(-c));return s(u,h)}},{"./div":77,"./is-rat":79,"./lib/is-bn":83,"./lib/num-to-bn":84,"./lib/rationalize":85,"./lib/str-to-bn":86}],79:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":83}],80:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":94}],81:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20)return 52;return r+32}},{"bit-twiddle":92,"double-bits":167}],83:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":94}],84:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("double-bits");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":94,"double-bits":167}],85:[function(t,e,r){"use strict";var n=t("./num-to-bn"),i=t("./bn-sign");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{"./bn-sign":80,"./num-to-bn":84}],86:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":94}],87:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":85}],88:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":80}],89:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":85}],90:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),i=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,h=n(l.ushln(u).divRound(r));return c*(s+h*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{"./lib/bn-to-num":81,"./lib/ctz":82}],91:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],92:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],93:[function(t,e,r){"use strict";var n=t("clamp");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,h,f,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(h=(f=t).getContext("2d"),r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t.canvas,h=t,r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=u[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n("undefined"!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,T=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],O=8191&P,z=P>>>13,I=0|o[8],D=8191&I,R=I>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ht=8191&ut,ft=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(f,U)|0))<<13)|0;c=((a=Math.imul(f,V))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(g,U)|0,a=Math.imul(g,V);var mt=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,H)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(f,W)|0))<<13)|0;c=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,V))+Math.imul(T,U)|0,a=Math.imul(T,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,K)|0;var bt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,H)|0,a=a+Math.imul(T,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(h,at)|0)|0)+((8191&(i=(i=i+Math.imul(h,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(z,U)|0,a=Math.imul(z,V),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,K)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(h,lt)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,W)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(m,at)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Tt=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(z,W)|0,a=a+Math.imul(z,X)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,a=a+Math.imul(g,ft)|0;var At=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0;var Mt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,W),i=(i=Math.imul(B,X))+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((a=a+Math.imul(y,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,K))+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(z,rt)|0,a=a+Math.imul(z,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ft)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0;var Ct=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ft)|0;var Lt=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(z,ht)|0,a=a+Math.imul(z,ft)|0;var Pt=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((a=a+Math.imul(L,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ht)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ht)|0,a=a+Math.imul(R,ft)|0;var Ot=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(z,dt)|0))<<13)|0;c=((a=a+Math.imul(z,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ht),i=(i=Math.imul(B,ft))+Math.imul(N,ht)|0,a=Math.imul(N,ft);var zt=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((a=a+Math.imul(R,gt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863;var It=(c+(n=Math.imul(B,dt))|0)+((8191&(i=(i=Math.imul(B,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((a=Math.imul(N,gt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Tt,l[9]=At,l[10]=Mt,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=Pt,l[16]=Ot,l[17]=zt,l[18]=It,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-a|h>>>a,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(y,m),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return v[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof e||e,this)},{buffer:103}],95:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(u<=0)){var h,f=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,f,p))>0){if(1===u&&n)a.init(s),h=a.sweepComplete(u,r,0,s,f,p,0,s,f,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))>0&&(a.init(s+c),h=1===u?a.sweepBipartite(u,r,0,s,f,p,0,c,d,g):o(u,r,n,s,f,p,c,d,g),i.free(d),i.free(g))}i.free(f),i.free(p)}return h}}}function u(t,e){n.push([t,e])}},{"./lib/intersect":98,"./lib/sweep":102,"typedarray-pool":545}],97:[function(t,e,r){"use strict";var n="d",i="ax",a="vv",o="fp",s="es",l="rs",c="re",u="rb",h="ri",f="rp",p="bs",d="be",g="bb",v="bi",m="bp",y="rv",x="Q",b=[n,i,a,l,c,u,h,p,d,g,v];function _(t){var e="bruteForce"+(t?"Full":"Partial"),r=[],_=b.slice();t||_.splice(3,0,o);var w=["function "+e+"("+_.join()+"){"];function k(e,o){var _=function(t,e,r){var o="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),_=["function ",o,"(",b.join(),"){","var ",s,"=2*",n,";"],w="for(var i="+l+","+f+"="+s+"*"+l+";i<"+c+";++i,"+f+"+="+s+"){var x0="+u+"["+i+"+"+f+"],x1="+u+"["+i+"+"+f+"+"+n+"],xi="+h+"[i];",k="for(var j="+p+","+m+"="+s+"*"+p+";j<"+d+";++j,"+m+"+="+s+"){var y0="+g+"["+i+"+"+m+"],"+(r?"y1="+g+"["+i+"+"+m+"+"+n+"],":"")+"yi="+v+"[j];";return t?_.push(w,x,":",k):_.push(k,x,":",w),r?_.push("if(y1"+d+"-"+p+"){"),t?(k(!0,!1),w.push("}else{"),k(!1,!1)):(w.push("if("+o+"){"),k(!0,!0),w.push("}else{"),k(!0,!1),w.push("}}else{if("+o+"){"),k(!1,!0),w.push("}else{"),k(!1,!1),w.push("}")),w.push("}}return "+e);var T=r.join("")+w.join("");return new Function(T)()}r.partial=_(!1),r.full=_(!0)},{}],98:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,u,S,E,C,L){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length0;){var I=(O-=1)*b,D=w[I],R=w[I+1],F=w[I+2],B=w[I+3],N=w[I+4],j=w[I+5],U=O*_,V=k[U],q=k[U+1],H=1&j,G=!!(16&j),Y=u,W=S,X=C,Z=L;if(H&&(Y=C,W=L,X=u,Z=S),!(2&j&&(F=v(t,D,R,F,Y,W,q),R>=F)||4&j&&(R=m(t,D,R,F,Y,W,V))>=F)){var J=F-R,K=N-B;if(G){if(t*J*(J+K)=p0)&&!(p1>=hi)",["p0","p1"]),g=u("lo===p0",["p0"]),v=u("lo>>1,f=2*t,p=h,d=s[f*h+e];for(;c=x?(p=y,d=x):m>=_?(p=v,d=m):(p=b,d=_):x>=_?(p=y,d=x):_>=m?(p=v,d=m):(p=b,d=_);for(var w=f*(u-1),k=f*p,T=0;Tr&&i[h+e]>c;--u,h-=o){for(var f=h,p=h+o,d=0;d=0&&i.push("lo=e[k+n]");t.indexOf("hi")>=0&&i.push("hi=e[k+o]");return r.push(n.replace("_",i.join()).replace("$",t)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],101:[function(t,e,r){"use strict";e.exports=function(t,e){e<=4*n?i(0,e-1,t):function t(e,r,h){var f=(r-e+1)/6|0,p=e+f,d=r-f,g=e+r>>1,v=g-f,m=g+f,y=p,x=v,b=g,_=m,w=d,k=e+1,T=r-1,A=0;c(y,x,h)&&(A=y,y=x,x=A);c(_,w,h)&&(A=_,_=w,w=A);c(y,b,h)&&(A=y,y=b,b=A);c(x,b,h)&&(A=x,x=b,b=A);c(y,_,h)&&(A=y,y=_,_=A);c(b,_,h)&&(A=b,b=_,_=A);c(x,w,h)&&(A=x,x=w,w=A);c(x,b,h)&&(A=x,x=b,b=A);c(_,w,h)&&(A=_,_=w,w=A);var M=h[2*x];var S=h[2*x+1];var E=h[2*_];var C=h[2*_+1];var L=2*y;var P=2*b;var O=2*w;var z=2*p;var I=2*g;var D=2*d;for(var R=0;R<2;++R){var F=h[L+R],B=h[P+R],N=h[O+R];h[z+R]=F,h[I+R]=B,h[D+R]=N}o(v,e,h);o(m,r,h);for(var j=k;j<=T;++j)if(u(j,M,S,h))j!==k&&a(j,k,h),++k;else if(!u(j,E,C,h))for(;;){if(u(T,E,C,h)){u(T,M,S,h)?(s(j,k,T,h),++k,--T):(a(j,T,h),--T);break}if(--Tt;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function u(t,e,r,n){var i=n[t*=2];return i>>1;a(p,S);for(var E=0,C=0,k=0;k=o)d(c,u,C--,L=L-o|0);else if(L>=0)d(s,l,E--,L);else if(L<=-o){L=-L-o|0;for(var P=0;P>>1;a(p,E);for(var C=0,L=0,P=0,T=0;T>1==p[2*T+3]>>1&&(z=2,T+=1),O<0){for(var I=-(O>>1)-1,D=0;D>1)-1;0===z?d(s,l,C--,I):1===z?d(c,u,L--,I):2===z&&d(h,f,P--,I)}}},scanBipartite:function(t,e,r,n,i,c,u,h,f,v,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,T=1;n?T=o:k=o;for(var A=i;A>>1;a(p,C);for(var L=0,A=0;A=o?(O=!n,M-=o):(O=!!n,M-=1),O)g(s,l,L++,M);else{var z=y[M],I=b*M,D=m[I+e+1],R=m[I+e+1+t];t:for(var F=0;F>>1;a(p,k);for(var T=0,x=0;x=o)s[T++]=b-o;else{var M=d[b-=1],S=v*b,E=f[S+e+1],C=f[S+e+1+t];t:for(var L=0;L=0;--L)if(s[L]===b){for(var I=L+1;I0&&s.length>a){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled "error" event. ('+e+")");throw l.context=e,l}if(!(r=o[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=v(t,n),a=0;a=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],105:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(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 c(t)}return s(t,e,r)}function s(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|f(t,r),i=o(n),a=i.write(t,r);a!==n&&(i=i.slice(0,a));return i}(t,r);if(ArrayBuffer.isView(t))return u(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(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function f(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(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 n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var a=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(a)return i?-1:R(t).length;r=(""+r).toLowerCase(),a=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,r,n,i,a){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),j(n=+n)&&(n=a?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(a)return-1;n=t.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:g(t,r,n,i,a);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):g(t,[r],n,i,a);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 h=!0,f=0;fi&&(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,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(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+h<=r)switch(h){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,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.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 S(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},e.prototype.compare=function(t,r,n,i,a){if(N(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(this===t)return 0;for(var o=(a>>>=0)-(i>>>=0),s=(n>>>=0)-(r>>>=0),l=Math.min(o,s),c=this.slice(i,a),u=t.slice(r,n),h=0;h>>=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 v(this,t,e,r);case"utf8":case"utf-8":return m(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}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function A(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,r,n,i,a,o){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>a||rt.length)throw new RangeError("Index out of range")}function P(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 O(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(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},e.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return a},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var a=t.charCodeAt(0);("utf8"===i&&a<128||"latin1"===i)&&(t=a)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=r;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 F(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":74,buffer:105,ieee754:412}],106:[function(t,e,r){"use strict";var n=t("./lib/monotone"),i=t("./lib/triangulation"),a=t("./lib/delaunay"),o=t("./lib/filter");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,"delaunay",!0),h=!!c(r,"interior",!0),f=!!c(r,"exterior",!0),p=!!c(r,"infinity",!1);if(!h&&!f||0===t.length)return[];var d=n(t,e);if(u||h!==f||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v0;){for(var u=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],d=1;d=0||(e.flip(s,u),i(t,e,r,h,s,f),i(t,e,r,s,f,h),i(t,e,r,f,u,h),i(t,e,r,u,h,f)))}}},{"binary-search-bounds":111,"robust-in-sphere":508}],108:[function(t,e,r){"use strict";var n,i=t("binary-search-bounds");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d<3;++d){var g=f[3*p+d];g>=0&&0===c[g]&&(h[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var v=l;l=s,s=v,l.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i1&&i(r[f[p-2]],r[f[p-1]],a)>0;)t.push([f[p-1],f[p-2],o]),p-=1;f.length=p,f.push(o);var d=u.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]m[0]&&i.push(new c(m,v,s,h),new c(v,m,o,h))}i.sort(u);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],h=0,_=i.length;h<_;++h){var w=i[h],k=w.type;k===a?f(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{"binary-search-bounds":111,"robust-orientation":510}],110:[function(t,e,r){"use strict";var n=t("binary-search-bounds");function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],112:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1,r=1;rr?r:t:te?e:t}},{}],116:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;ae[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var T=b;b=_,_=T}x[0]=b;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?e.push([M,E,A]):e.push([M,E]),M=E}i?e.push([M,_,A]):e.push([M,_])}return f}(t,e,f,v,r));return m(e,y,r),!!y||(f.length>0||v.length>0)}},{"./lib/rat-seg-intersect":117,"big-rat":78,"big-rat/cmp":76,"big-rat/to-float":90,"box-intersect":96,nextafter:451,"rat-vec":486,"robust-segment-intersect":513,"union-find":546}],117:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=s(e,t),h=s(n,r),f=u(a,h);if(0===o(f))return null;var p=s(t,r),d=u(h,p),g=i(d,f),v=c(a,g);return l(t,v)};var n=t("big-rat/mul"),i=t("big-rat/div"),a=t("big-rat/sub"),o=t("big-rat/sign"),s=t("rat-vec/sub"),l=t("rat-vec/add"),c=t("rat-vec/muls");function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":77,"big-rat/mul":87,"big-rat/sign":88,"big-rat/sub":89,"rat-vec/add":485,"rat-vec/muls":487,"rat-vec/sub":488}],118:[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:115}],119:[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]}},{}],120:[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:115,"color-rgba":122,dtype:169}],121:[function(t,e,r){(function(r){"use strict";var n=t("color-name"),i=t("is-plain-obj"),a=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),h=u.length,f=h<=4;c=1,f?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var p=e[1],d="rgb"===p,u=p.replace(/a$/,"");s=u;var h="cmyk"===u?4:"gray"===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:"rgb"===u?255*parseFloat(t)/100:parseFloat(t);if("h"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&&l.push(1),c=d?1:void 0===l[h]?1:l[h],l=l.slice(0,h)}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 g=a(t.r,t.red,t.R,null);null!==g?(s="rgb",l=[g,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s="hsl",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":119,defined:164,"is-plain-obj":422}],122:[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:115,"color-parse":121,"color-space/hsl":123}],123:[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":124}],124:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],125:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],126:[function(t,e,r){"use strict";var n=t("./colorScale"),i=t("lerp");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,l,c,u,h,f,p,d,g;t||(t={});p=(t.nshades||72)-1,f=t.format||"hex",(h=t.colormap)||(h="jet");if("string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>p+1)throw new Error(h+" map requires nshades to be at least size "+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),m=[];for(g=0;g0?-1:l(t,e,a)?-1:1:0===s?c>0?1:l(t,e,r)?1:-1:i(c-s)}var f=n(t,e,r);if(f>0)return o>0&&n(t,e,a)>0?1:-1;if(f<0)return o>0||n(t,e,a)>0?1:-1;var p=n(t,e,a);return p>0?1:l(t,e,r)?1:-1};var n=t("robust-orientation"),i=t("signum"),a=t("two-sum"),o=t("robust-product"),s=t("robust-sum");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},{"robust-orientation":510,"robust-product":511,"robust-sum":515,signum:516,"two-sum":544}],128:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],h=t[1],f=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return u+h+f+p-(d+g+v+m)||n(u,h,f,p)-n(d,g,v,m,d)||n(u+h,u+f,u+p,h+f,h+p,f+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(u+h+f,u+h+p,u+f+p,h+f+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],132:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(o,r)}};var n=t("incremental-convex-hull"),i=t("affine-hull")},{"affine-hull":62,"incremental-convex-hull":413}],134:[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"}},{}],135:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],136:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],137:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],138:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],139:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":141,"./stringify":142}],140:[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":135}],141:[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=f;var h=f.cache={};function f(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(h[t])return h[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return h[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=c(t,/\s+/);e=f.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach(function(t){r[t]=e}),h[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]):"/"===f[0]&&(f.shift(),r.lineHeight=p(f.shift())),!f.length)throw new Error("Missing required font-family.");return r.family=c(f.join(" "),/\s*,\s*/).map(n),h[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":140,"css-font-stretch-keywords":136,"css-font-style-keywords":137,"css-font-weight-keywords":138,"css-global-keywords":143,"css-system-font-keywords":144,"string-split-by":529,unquote:548}],142:[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},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},f="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function g(t){for(var e={},r=0;r=0;--p)a[p]=c*t[p]+u*e[p]+h*r[p]+f*n[p];return a}return c*t+u*e+h*r+f*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],146:[function(t,e,r){"use strict";var n=t("./lib/thunk.js");function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a0)throw new Error("cwise: pre() block may not reference array args");if(a0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(a),e.shimArgs.push("scalar"+a);else if("index"===o){if(e.indexArgs.push(a),a0)throw new Error("cwise: pre() block may not reference array index");if(a0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(a),ar.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,n(e)}},{"./lib/thunk.js":148}],147:[function(t,e,r){"use strict";var n=t("uniq");function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,h=0;for(n=0;n0&&l.push("var "+c.join(",")),n=a-1;n>=0;--n)u=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l0&&m.push("var "+y.join(",")),l=0;l3&&m.push(a(t.pre,t,s));var k=a(t.body,t,s),T=function(t){for(var e=0,r=t[0].length;e0,c=[],u=0;u0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",e[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",e[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",e[u],"]=j",u].join(""));for(u=0;u3&&m.push(a(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+m.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",T,function(t){for(var e=new Array(t.length),r=!0,n=0;n0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}(s)].join("");return new Function(["function ",A,"(",v.join(","),"){",m.join("\n"),"} return ",A].join(""))()}},{uniq:547}],148:[function(t,e,r){"use strict";var n=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;ue?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>=m?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=m?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=m?i*=10:a>=y?i*=5:a>=x&&(i*=2),e=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 T(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=T(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;ah;)f.pop(),--p;var d,g=new Array(p+1);for(a=0;a<=p;++a)(d=g[a]=[]).x0=a>0?f[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=T,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,h,f=-1,p=n.length,d=l[i++],g=r(),v=a();++fl.length)return r;var i,a=c[n-1];return null!=e&&n>=l.length?i=r.entries():(i=[],r.each(function(e,r){i.push({key:r,values:t(e,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],154:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),u=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),h=new RegExp("^rgba\\("+[i,i,i,a]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,a]+"\\)$"),p=new RegExp("^hsl\\("+[a,o,o]+"\\)$"),d=new RegExp("^hsla\\("+[a,o,o,a]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var e;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?y(e[1],e[2],e[3],e[4]):(e=f.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?m(g[t]):"transparent"===t?new _(NaN,NaN,NaN,0):null}function m(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=v(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function k(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function T(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r0&&c<1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==i?1:i)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function M(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),e(A,T,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new _(M(t>=240?t-240:t+120,i,n),M(t,i,n),M(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,E=180/Math.PI,C=.96422,L=1,P=.82521,O=4/29,z=6/29,I=3*z*z,D=z*z*z;function R(t){if(t instanceof B)return new B(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new B(t.l,0,0,t.opacity);var e=t.h*S;return new B(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,i=V(t.r),a=V(t.g),o=V(t.b),s=N((.2225045*i+.7168786*a+.0606169*o)/L);return i===a&&a===o?r=n=s:(r=N((.4360747*i+.3850649*a+.1430804*o)/C),n=N((.0139322*i+.0971045*a+.7141733*o)/P)),new B(116*s-16,500*(r-s),200*(s-n),t.opacity)}function F(t,e,r,n){return 1===arguments.length?R(t):new B(t,e,r,null==n?1:n)}function B(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t>D?Math.pow(t,1/3):t/I+O}function j(t){return t>z?t*t*t:I*(t-O)}function U(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function V(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof B||(t=R(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E;return new G(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(B,F,r(n,{brighter:function(t){return new B(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new B(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(U(3.1338561*(e=C*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=P*j(r))),U(-.9787684*e+1.9161415*t+.033454*r),U(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var Y=-.14861,W=1.78277,X=-.29227,Z=-.90649,J=1.97294,K=J*Z,$=J*W,Q=W*X-Z*Y;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(Q*n+K*e-$*r)/(Q+K-$),a=n-i,o=(J*(r-i)-X*a)/Z,s=Math.sqrt(o*o+a*a)/(J*i*(1-i)),l=s?Math.atan2(o,a)*E-120:NaN;return new et(l<0?l+360:l,s,i,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(Y*n+W*i)),255*(e+r*(X*n+Z*i)),255*(e+r*(J*n)),this.opacity)}})),t.color=v,t.rgb=b,t.hsl=T,t.lab=F,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new B(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],155:[function(t,e,r){var n;n=this,function(t){"use strict";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var r,n,i=new Array(r),a=0;af+c||np+c||au.index){var h=f-s.x-s.vx,v=p-s.y-s.vy,m=h*h+v*v;mt.r&&(t.r=t[e].r)}function f(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(t,r),e):f.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a=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),h=+t.value&&(u.value=t.value),f=[u];for(null==e&&(e=o);r=f.pop();)if(h&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)f.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;for(t=r.pop(),e=n.pop();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 h(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 k(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,f;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;sf&&(f=s),v=u*u*g,(p=Math.max(f/v,v/h))>d){u-=s;break}d=p}m.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,h=-1,f=o.length,p=t.value;++h1?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),h=c.x-t(c,u)/2,f=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-h)/(f-h)*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=A;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(E(t)).eachAfter(C(n,.5)).eachBefore(L(1)):i.eachBefore(E(S)).eachAfter(C(A,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(L(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=null==(r=e)?null:T(r),i):t;var r},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:M(+t),i):n},i},t.packSiblings=function(t){return k(t),t},t.packEnclose=h,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=T(e),r):t},r.parentId=function(t){return arguments.length?(e=T(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 q(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 q(n[i],i)),r.parent=e;return(o.parent=new q(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,h=i;i.eachBefore(function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)});var f=c===u?1:t(c,u)/2,p=f-c.x,d=e/(u.x+f+p),g=r/(h.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,h=s.m,f=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+h-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=h-u),a&&!N(l)&&(l.t=a,l.m+=c-f,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=A,o=A,s=A,l=A,c=A;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(h),i=[0],e&&t.eachBefore(P),t}function h(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,h=e.x1-r,f=e.y1-r;h=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}for(var h=c[e],f=n/2+h,p=e+1,d=r-1;p>>1;c[g]l-a){var y=(i*m+o*v)/n;t(e,p,v,i,a,y,l),t(p,r,m,y,a,o,l)}else{var x=(a*m+l*v)/n;t(e,p,v,i,a,o,x),t(p,r,m,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapSlice=H,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?H:O)(t,e,r,n,i)},t.treemapSquarify=W,t.treemapResquarify=X,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],158:[function(t,e,r){var n,i;n=this,i=function(t,e){"use strict";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=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 h(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:v(r,n)})),a=x.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:v(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:v(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:v(t,r)},{i:s-2,x:v(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r1e-6)if(Math.abs(h*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,v=p*p+d*d,m=Math.sqrt(g),y=Math.sqrt(f),x=a*Math.tan((e-Math.acos((g+f-v)/(2*m*y)))/2),b=x/y,_=x/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(r+b*h)),this._+="A"+a+","+a+",0,0,"+ +(h*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;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),h=t+c,f=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"+h+","+f:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+h+","+f),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=h)+","+(this._y1=f):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})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],160:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,h,f,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o,i=p,!(p=p[h=u<<1|c]))return i[h]=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[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=p,i[h]=d,t}var r=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));for(ht||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),t>(i=r+l)||e>a);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),(r=i-l)>t||e>a);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),t>(i=r+l)||n>e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),(r=i-l)>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var i,a,o,s,l,c,u,h=this._x0,f=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,h,f,p,d)),null==n?n=1/0:(h=t-n,f=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(v=c.node)||(a=c.x0)>p||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=m)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_=(s=(d+v)/2))?d=s:v=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(r=e,f=h)}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[h]=i:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[f]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function v(t){return t.outerRadius}function m(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,s){var l=t-r,u=e-n,h=(s?a:-a)/c(l*l+u*u),f=h*u,p=-h*l,d=t+f,g=e+p,v=r+f,m=n+p,y=(d+v)/2,x=(g+m)/2,b=v-d,_=m-g,w=b*b+_*_,k=i-a,T=d*m-v*g,A=(_<0?-1:1)*c(o(0,k*k*w-T*T)),M=(T*_-b*A)/w,S=(-T*b-_*A)/w,E=(T*_+b*A)/w,C=(-T*b+_*A)/w,L=M-y,P=S-x,O=E-y,z=C-x;return L*L+P*P>O*O+z*z&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-p,x11:M*(i/k-1),y11:S*(i/k-1)}}function _(t){this._context=t}function w(t){return new _(t)}function k(t){return t[0]}function T(t){return t[1]}function A(){var t=k,n=T,i=r(!0),a=null,o=w,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=h;++l)!(l=h;--f)c.point(m[f],y[f]);c.lineEnd(),c.areaEnd()}v&&(m[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):m[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+""||null}function h(){return A().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 h().x(t).y(i)},u.lineY1=function(){return h().x(t).y(a)},u.lineX1=function(){return h().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 S(t,e){return et?1:e>=t?0:NaN}function E(t){return t}_.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=P(w);function L(t){this._curve=t}function P(t){function e(e){return new L(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(P(t)):e()._curve},t}function z(){return O(A().curve(C))}function I(){var t=M().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(P(t)):e()._curve},t}function D(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}L.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 R=Array.prototype.slice;function F(t){return t.source}function B(t){return t.target}function N(t){var n=F,i=B,a=k,o=T,s=null;function l(){var r,l=R.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 j(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function V(t,e,r,n,i){var a=D(e,r),o=D(e,r=(r+i)/2),s=D(n,r),l=D(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/h);t.moveTo(r,0),t.arc(0,0,r,0,p)}},H={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()}},G=Math.sqrt(1/3),Y=2*G,W={draw:function(t,e){var r=Math.sqrt(e/Y),n=r*G;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},X=Math.sin(h/10)/Math.sin(7*h/10),Z=Math.sin(p/10)*X,J=-Math.cos(p/10)*X,K={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=Z*r,i=J*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=p*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)}},Q=Math.sqrt(3),tt={draw:function(t,e){var r=-Math.sqrt(e/(3*Q));t.moveTo(0,2*r),t.lineTo(-Q*r,-r),t.lineTo(Q*r,-r),t.closePath()}},et=-.5,rt=Math.sqrt(3)/2,nt=1/Math.sqrt(12),it=3*(nt/2+1),at={draw:function(t,e){var r=Math.sqrt(e/it),n=r/2,i=r*nt,a=n,o=r*nt+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(et*n-rt*i,rt*n+et*i),t.lineTo(et*a-rt*o,rt*a+et*o),t.lineTo(et*s-rt*l,rt*s+et*l),t.lineTo(et*n+rt*i,et*i-rt*n),t.lineTo(et*a+rt*o,et*o-rt*a),t.lineTo(et*s+rt*l,et*l-rt*s),t.closePath()}},ot=[q,H,W,$,K,tt,at];function st(){}function lt(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 ct(t){this._context=t}function ut(t){this._context=t}function ht(t){this._context=t}function ft(t,e){this._basis=new ct(t),this._beta=e}ct.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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ut.prototype={areaStart:st,areaEnd:st,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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.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 pt=function t(e){function r(t){return 1===e?new ct(t):new ft(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function dt(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 gt(t,e){this._context=t,this._k=(1-e)/6}gt.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:dt(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:dt(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 gt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:st,areaEnd:st,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:dt(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 yt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function xt(t,e){this._context=t,this._k=(1-e)/6}xt.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:dt(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 bt=function t(e){function r(t){return new xt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _t(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>u){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>u){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function wt(t,e){this._context=t,this._alpha=e}wt.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:_t(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 wt(t,e):new gt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:st,areaEnd:st,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:_t(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 At=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 Mt(t,e){this._context=t,this._alpha=e}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._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:_t(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 St=function t(e){function r(t){return e?new Mt(t,e):new xt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Et(t){this._context=t}function Ct(t){return t<0?-1:1}function Lt(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 Pt(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 It(t){this._context=new Dt(t)}function Dt(t){this._context=t}function Rt(t){this._context=t}function Ft(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 Ut(t,e){return t[e]}function Vt(t){var e=t.map(qt);return jt(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 Ht(t){var e=t.map(Gt);return jt(t).sort(function(t,r){return e[t]-e[r]})}function Gt(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=v,_=r(0),w=null,k=m,T=y,A=x,M=null;function S(){var r,g,v,m=+t.apply(this,arguments),y=+o.apply(this,arguments),x=k.apply(this,arguments)-f,S=T.apply(this,arguments)-f,E=n(S-x),C=S>x;if(M||(M=r=e.path()),yu)if(E>p-u)M.moveTo(y*a(x),y*l(x)),M.arc(0,0,y,x,S,!C),m>u&&(M.moveTo(m*a(S),m*l(S)),M.arc(0,0,m,S,x,C));else{var L,P,O=x,z=S,I=x,D=S,R=E,F=E,B=A.apply(this,arguments)/2,N=B>u&&(w?+w.apply(this,arguments):c(m*m+y*y)),j=s(n(y-m)/2,+_.apply(this,arguments)),U=j,V=j;if(N>u){var q=d(N/m*l(B)),H=d(N/y*l(B));(R-=2*q)>u?(I+=q*=C?1:-1,D-=q):(R=0,I=D=(x+S)/2),(F-=2*H)>u?(O+=H*=C?1:-1,z-=H):(F=0,O=z=(x+S)/2)}var G=y*a(O),Y=y*l(O),W=m*a(D),X=m*l(D);if(j>u){var Z,J=y*a(z),K=y*l(z),$=m*a(I),Q=m*l(I);if(E1?0:v<-1?h:Math.acos(v))/2),at=c(Z[0]*Z[0]+Z[1]*Z[1]);U=s(j,(m-at)/(it-1)),V=s(j,(y-at)/(it+1))}}F>u?V>u?(L=b($,Q,G,Y,y,V,C),P=b(J,K,W,X,y,V,C),M.moveTo(L.cx+L.x01,L.cy+L.y01),Vu&&R>u?U>u?(L=b(W,X,J,K,m,-U,C),P=b(G,Y,$,Q,m,-U,C),M.lineTo(L.cx+L.x01,L.cy+L.y01),U0&&(d+=h);for(null!=e?g.sort(function(t,r){return e(v[t],v[r])}):null!=n&&g.sort(function(t,e){return n(r[t],r[e])}),s=0,c=d?(y-f*b)/d:0;s0?h*c:0)+b,v[l]={data:r[l],index:s,value:h,startAngle:m,endAngle:u,padAngle:x};return v}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.areaRadial=I,t.radialArea=I,t.lineRadial=z,t.radialLine=z,t.pointRadial=D,t.linkHorizontal=function(){return N(j)},t.linkVertical=function(){return N(U)},t.linkRadial=function(){var t=N(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){var t=r(q),n=r(64),i=null;function a(){var r;if(i||(i=r=e.path()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),r)return i=null,r+""||null}return a.type=function(e){return arguments.length?(t="function"==typeof e?e:r(e),a):t},a.size=function(t){return arguments.length?(n="function"==typeof t?t:r(+t),a):n},a.context=function(t){return arguments.length?(i=null==t?null:t,a):i},a},t.symbols=ot,t.symbolCircle=q,t.symbolCross=H,t.symbolDiamond=W,t.symbolSquare=$,t.symbolStar=K,t.symbolTriangle=tt,t.symbolWye=at,t.curveBasisClosed=function(t){return new ut(t)},t.curveBasisOpen=function(t){return new ht(t)},t.curveBasis=function(t){return new ct(t)},t.curveBundle=pt,t.curveCardinalClosed=yt,t.curveCardinalOpen=bt,t.curveCardinal=vt,t.curveCatmullRomClosed=At,t.curveCatmullRomOpen=St,t.curveCatmullRom=kt,t.curveLinearClosed=function(t){return new Et(t)},t.curveLinear=w,t.curveMonotoneX=function(t){return new zt(t)},t.curveMonotoneY=function(t){return new It(t)},t.curveNatural=function(t){return new Rt(t)},t.curveStep=function(t){return new Bt(t,.5)},t.curveStepAfter=function(t){return new Bt(t,1)},t.curveStepBefore=function(t){return new Bt(t,0)},t.stack=function(){var t=r([]),e=jt,n=Nt,i=Ut;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=0,o=t[0].length;a1)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l=0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):n[0]=a},t.stackOffsetNone=Nt,t.stackOffsetSilhouette=function(t,e){if((r=t.length)>0){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=0&&r._call.call(null,t),r=r._next;--n}function m(){l=(s=u.now())+c,n=i=0;try{v()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,x(a)}(),l=0}}function y(){var t=u.now(),e=t-s;e>o&&(c-=e,s=t)}function x(t){n||(i&&(i=clearTimeout(i)),t-l>24?(t<1/0&&(i=setTimeout(m,t-u.now()-c)),a&&(a=clearInterval(a))):(a||(s=u.now(),a=setInterval(y,o)),n=1,h(m)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=f,t.timer=g,t.timerFlush=v,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart(function a(o){o+=i,n.restart(a,i+=e,r),t(o)},e,r),n)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],163:[function(t,e,r){!function(){var t={version:"3.5.17"},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+"")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+"")},u.setProperty=function(t,e,r){h.call(this,t,e+"",r)}}function f(t,e){return te?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=f,t.descending=function(t,e){return et?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(f);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return f(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,h,f=-1,p=a.length,d=i[s++],g=new b;++f=i.length)return e;var n=[],o=a[r++];return e.forEach(function(e,i){n.push({key:e,values:t(i,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return V(t,W),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var r=t.matches||t[z(t,"matchesSelector")];return(Y=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,Y=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var W=t.selection.prototype=[];function X(t){return"function"==typeof t?t:function(){return H(t,this)}}function Z(t){return"function"==typeof t?t:function(){return G(t,this)}}W.select=function(t){var e,r,n,i,a=[];t=X(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),K.hasOwnProperty(r)?{space:K[r],local:t}:t}},W.attr=function(e,r){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each($(r,e[r]));return this}return this.each($(e,r))},W.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=et(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},W.sort=function(t){t=function(t){arguments.length||(t=f);return function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?D:function(){var r,n=new RegExp("^__on([^.]+)"+t.requote(e)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ht,t.selection.enter.prototype=ft,ft.append=W.append,ft.empty=W.empty,ft.node=W.node,ft.call=W.call,ft.size=W.size,ft.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s=n&&(n=e+1);!(o=s[n])&&++n0?1:t<0?-1:0}function Ot(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function zt(t){return t>1?0:t<-1?At:Math.acos(t)}function It(t){return t>1?Et:t<-1?-Et:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Ft=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,h=l-a,f=u*u+h*h;if(f0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map(function(t){return(t-f.x)/f.k}).map(l.invert)),h&&h.domain(u.range().map(function(t){return(t-f.y)/f.k}).map(u.invert))}function E(t){v++||t({type:"zoomstart"})}function C(t){S(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(t){--v||(t({type:"zoomend"}),r=null)}function P(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),a),C(r)}).on(x,function(){i.on(y,null).on(x,null),s(n),L(r)}),a=k(t.mouse(e)),s=xt(e);hs.call(e),E(r)}function O(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=".zoom-"+t.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=f.k,n.forEach(function(t){t.identifier in i&&(i[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,h=n.length;o1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];a=b*b+_*_}}function v(){var o,l,c,u,h=t.touches(r);hs.call(r);for(var f=0,p=h.length;f360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=fe((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Yt=Gt.prototype=new Ut;function Wt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Wt(t.h,t.c,t.l):fe((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Yt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Yt.rgb=function(){return Wt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,Jt=.95047,Kt=1,$t=1.08883,Qt=Xt.prototype=new Ut;function te(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*Jt)-1.5371385*(n=re(n)*Kt)-.4985314*(a=re(a)*$t)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function ee(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ae?new ae(t.r,t.g,t.b):ue(""+t,ae,Ht):new ae(t,e,r)}function oe(t){return new ae(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+""}Qt.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Qt.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Qt.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ae;var le=ae.prototype=new Ut;function ce(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(de(i[0]),de(i[1]),de(i[2]))}return(a=ge.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function he(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new Vt(n,i,l)}function fe(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/Jt),i=ne((.2126729*t+.7151522*e+.072175*r)/Kt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/$t)))}function pe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+"",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(t,e,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,"on"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=ve,t.xhr=me(P),t.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,r){return e(i(t),r)}:i})},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function h(){if(c>=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Me(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ee(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ce[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Pe=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ee(e,r))).toFixed(Math.max(0,Math.min(20,Ee(e*(1+1e-15),r))))}});function Oe(t){return t+""}var ze=t.time={},Ie=Date;function De(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Fe(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o68?1900:2e3),r+i[0].length):-1}function Je(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function $e(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=y(e)/60|0,i=y(e)%60;return r+Ve(n,"0",2)+Ve(i,"0",2)}function ar(t,e,r){Ue.lastIndex=0;var n=Ue.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:P;return function(e){var n=Le.exec(e),i=n[1]||" ",s=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],h=+n[6],f=n[7],p=n[8],d=n[9],g=1,v="",m="",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||"0"===i&&"="===s)&&(u=i="0",s="="),d){case"n":f=!0,d="g";break;case"%":g=100,m="%",d="f";break;case"p":g=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+d.toLowerCase());case"c":x=!1;case"d":y=!0,p=0;break;case"s":g=-1,d="r"}"$"===c&&(v=a[0],m=a[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Pe.get(d)||Oe;var b=u&&f;return function(e){var n=m;if(y&&e%1)return"";var a=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+m}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(".");if(k<0){var T=x?e.lastIndexOf("e"):-1;T<0?(_=e,w=""):(_=e.substring(0,T),w=e.substring(T))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&&f&&(_=o(_,1/0));var A=v.length+_.length+w.length+(b?0:a.length),M=A"===s?M+a+e:"^"===s?M.substring(0,A>>=1)+a+e+M.substring(A):a+(b?e:M+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,i,a,o=[],s=-1,l=0;++s=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(Ie=De);return r._=t,e(r)}finally{Ie=Date}}return r.parse=function(t){try{Ie=De;var r=e.parse(t);return r&&r._}finally{Ie=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var f=t.map(),p=qe(o),d=He(o),g=qe(s),v=He(s),m=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach(function(t,e){f.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ve(t.getDate(),e,2)},e:function(t,e){return Ve(t.getDate(),e,2)},H:function(t,e){return Ve(t.getHours(),e,2)},I:function(t,e){return Ve(t.getHours()%12||12,e,2)},j:function(t,e){return Ve(1+ze.dayOfYear(t),e,3)},L:function(t,e){return Ve(t.getMilliseconds(),e,3)},m:function(t,e){return Ve(t.getMonth()+1,e,2)},M:function(t,e){return Ve(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Ve(t.getSeconds(),e,2)},U:function(t,e){return Ve(ze.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ve(ze.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ve(t.getFullYear()%100,e,2)},Y:function(t,e){return Ve(t.getFullYear()%1e4,e,4)},Z:ir,"%":function(){return"%"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=v.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){m.lastIndex=0;var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return h(t,_.c.toString(),e,r)},d:$e,e:$e,H:tr,I:tr,j:Qe,L:nr,m:Ke,M:er,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:Ye,w:Ge,W:We,x:function(t,e,r){return h(t,_.x.toString(),e,r)},X:function(t,e,r){return h(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:Je,"%":ar};return u}(e)}};var sr=t.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function hr(t,e){t&&pr.hasOwnProperty(t.type)&&pr[t.type](t,e)}t.geo.stream=function(t,e){t&&fr.hasOwnProperty(t.type)?fr[t.type](t,e):hr(t,e)};var fr={Feature:function(t,e){hr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,h=n*l+u*Math.cos(s),f=u*o*Math.sin(s);Er.add(Math.atan2(f,h)),r=t,n=l,i=c}Cr.point=function(o,s){Cr.point=a,r=(t=o)*Ct,n=Math.cos(s=(e=s)*Ct/2+At/4),i=Math.sin(s)},Cr.lineEnd=function(){a(t,e)}}function Pr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zr(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 Ir(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Fr(t){return[Math.atan2(t[1],t[0]),It(t[2])]}function Br(t,e){return y(t[0]-e[0])kt?i=90:c<-kt&&(r=-90),h[0]=e,h[1]=n}};function p(t,a){u.push(h=[e=t,n=t]),ai&&(i=a)}function d(t,o){var s=Pr([t*Ct,o*Ct]);if(l){var c=zr(l,s),u=zr([c[1],-c[0],0],c);Rr(u),u=Fr(u);var h=t-a,f=h>0?1:-1,d=u[0]*Lt*f,g=y(h)>180;if(g^(f*ai&&(i=v);else if(g^(f*a<(d=(d+360)%360-180)&&di&&(i=o);g?t_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(tn&&(n=t)):t>a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,a=t}function g(){f.point=d}function v(){h[0]=e,h[1]=n,f.point=p,l=null}function m(t,e){if(l){var r=t-a;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){m(o,s),Cr.lineEnd(),y(c)>kt&&(e=-(n=180)),h[0]=e,h[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=h=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){mr=yr=xr=br=_r=wr=kr=Tr=Ar=Mr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Mr,i=Sr,a=r*r+n*n+i*i;return a=0;--s)i.point((h=u[s])[0],h[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,k=w*_,T=k>At,A=d*x;if(Er.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),a+=T?_+w*Mt:_,T^f>=r^m>=r){var M=zr(Pr(h),Pr(t));Rr(M);var S=zr(i,M);Rr(S);var E=(T^_>=0?-1:1)*It(S[2]);(n>E||n===E&&(M[0]||M[1]))&&(o+=T^_>=0?1:-1)}if(!v++)break;f=m,d=x,g=b,h=t}}return(a<-kt||a0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Kr))}return u}}function Kr(t){return t.length>1}function $r(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Qr(t,e){return((t=t.x)[0]<0?t[1]-Et-kt:Et-t[1])-((e=e.x)[0]<0?e[1]-Et-kt:Et-e[1])}var tn=Jr(Yr,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?At:-At,l=y(a-r);y(l-At)0?Et:-Et),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=At&&(y(r-i)kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Et,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])>kt){var a=t[0]0)){if(a/=f,f<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=r-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a0)){if(a/=p,p<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>h)return;a>u&&(u=a)}else if(p>0){if(a0&&(i.a={x:l+u*f,y:c+u*p}),h<1&&(i.b={x:l+h*f,y:c+h*p}),i}}}}}}var rn=1e9;function nn(e,r,n,i){return function(l){var c,u,h,f,p,d,g,v,m,y,x,b=l,_=$r(),w=en(e,r,n,i),k={point:M,lineStart:function(){k.point=S,u&&u.push(h=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){c&&(S(f,p),d&&m&&_.rejoin(),c.push(_.buffer()));k.point=M,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;in&&Ot(c,a,t)>0&&++e:a[1]<=n&&Ot(c,a,t)<0&&--e,c=a;return 0!==e}([e,i]),n=x&&r,a=c.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),T(null,null,1,l),l.lineEnd()),a&&Wr(c,o,r,T,l),l.polygonEnd()),c=u=h=null}};function T(t,o,l,c){var u=0,h=0;if(null==t||(u=a(t,l))!==(h=a(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?i:r)}while((u=(u+l+4)%4)!==h);else c.point(o[0],o[1])}function A(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function M(t,e){A(t,e)&&l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&&h.push([t,e]),y)f=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&m)l.point(t,e);else{var n={a:{x:g,y:v},b:{x:t,y:e}};w(n)?(m||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,v=e,m=r}return k};function a(t,i){return y(t[0]-e)0?0:3:y(t[0]-n)0?2:1:y(t[1]-r)0?1:0:i>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Cn(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,It((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],h=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,h-.238*e],[u+.455*e,h+.238*e]]).stream(l).point,n=o.translate([u-.307*e,h+.201*e]).clipExtent([[u-.425*e+kt,h+.12*e+kt],[u-.214*e-kt,h+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,h+.212*e]).clipExtent([[u-.214*e+kt,h+.166*e+kt],[u-.115*e-kt,h+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,hn,fn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){thn&&(hn=t);efn&&(fn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function vn(){var t=mn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=mn(e),r},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function n(r,n){e.push("M",r,",",n,t)}function i(t,n){e.push("M",t,",",n),r.point=a}function a(t,r){e.push("L",t,",",r)}function o(){r.point=n}function s(){e.push("Z")}return r}function mn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Tr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Tr+=o,Ar+=(o=n*t-r*e)*(r+t),Mr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function Tn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Mt)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Ct),n=16;function i(e){return(n?function(e){var r,i,o,s,l,c,u,h,f,p,d,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){h=NaN,v.point=x,e.lineStart()}function x(r,i){var o=Pr([r,i]),s=t(r,i);a(h,f,u,p,d,g,h=s[0],f=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(h,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=k}function w(t,e){x(r=t,e),i=h,o=f,s=p,l=d,c=g,v.point=x}function k(){a(h,f,u,p,d,g,i,o,r,s,l,c,n,e),v.lineEnd=b,b()}return v}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function a(n,i,o,s,l,c,u,h,f,p,d,g,v,m){var x=u-n,b=h-i,_=x*x+b*b;if(_>4*e&&v--){var w=s+p,k=l+d,T=c+g,A=Math.sqrt(w*w+k*k+T*T),M=Math.asin(T/=A),S=y(y(T)-1)e||y((x*P+b*O)/_-.5)>.3||s*p+l*d+c*g0&&16,i):Math.sqrt(e)},i}function Mn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function En(t){return Cn(function(){return t})()}function Cn(e){var r,n,i,a,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]}),c=150,u=480,h=250,f=0,p=0,d=0,g=0,v=0,m=tn,x=P,b=null,_=null;function w(t){return[(t=i(t[0]*Ct,t[1]*Ct))[0]*c+a,o-t[1]*c]}function k(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function T(){i=Gr(n=zn(d,g,v),r);var t=r(f,p);return a=u-t[0]*c,o=h+t[1]*c,A()}function A(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Ln(m(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(m=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e>0,n=y(e)>kt;return Jr(i,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var p,d=[h,f],g=i(h,f),v=r?g?0:o(h,f):g?o(h+(h<0?At:-At),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=a(e,d),(Br(e,p)||Br(d,p))&&(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var m;v&s||!(m=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&Br(e,d)||t.point(d[0],d[1]),e=d,l=g,s=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}},Fn(t,6*Ct),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)>e}function a(t,r,n){var i=[1,0,0],a=zr(Pr(t),Pr(r)),o=Or(a,a),s=a[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,h=zr(i,a),f=Dr(i,c);Ir(f,Dr(a,u));var p=h,d=Or(f,p),g=Or(p,p),v=d*d-g*(Or(f,f)-1);if(!(v<0)){var m=Math.sqrt(v),x=Dr(p,(-d-m)/g);if(Ir(x,f),x=Fr(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],T=r[1];w<_&&(b=_,_=w,w=b);var A=w-_,M=y(A-At)0^x[1]<(y(x[0]-_)At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+m)/g);return Ir(S,f),[x,Fr(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}}((b=+t)*Ct),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):P,A()):_},w.scale=function(t){return arguments.length?(c=+t,T()):c},w.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],T()):[u,h]},w.center=function(t){return arguments.length?(f=t[0]%360*Ct,p=t[1]%360*Ct,T()):[f*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Ct,g=t[1]%360*Ct,v=t.length>2?t[2]%360*Ct:0,T()):[d*Lt,g*Lt,v*Lt]},t.rebind(w,l,"precision"),function(){return r=e.apply(this,arguments),w.invert=r.invert&&k,T()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Ct,r*Ct)})}function Pn(t,e){return[t,e]}function On(t,e){return[t>At?t-Mt:t<-At?t+Mt:t,e]}function zn(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):On}function In(t){return function(e,r){return[(e+=t)>At?e-Mt:e<-At?e+Mt:e,r]}}function Dn(t){var e=In(t);return e.invert=In(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),It(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),It(u*r-s*n)]},o}function Fn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Bn(r,i),a=Bn(r,a),(o>0?ia)&&(i+=o*Mt)):(i=t+o*Mt,a=t-.5*l);for(var c,u=i;o>0?u>a:u2?t[2]*Ct:0),e.invert=function(e){return(e=t.invert(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e},e},On.invert=Pn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t="function"==typeof r?r.apply(this,arguments):r,n=zn(-t[0]*Ct,-t[1]*Ct,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Fn((t=+r)*Ct,n*Ct),i):t},i.precision=function(r){return arguments.length?(e=Fn(t*Ct,(n=+r)*Ct),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ct,i=t[1]*Ct,a=e[1]*Ct,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=c*u-l*h*s)*r),l*u+c*h*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,h,f,p=10,d=p,g=90,v=360,m=2.5;function x(){return{type:"MultiLineString",coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(h).concat(t.range(Math.ceil(l/v)*v,s,v).map(f)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)>kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter(function(t){return y(t%v)>kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},x.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(f(s).slice(1),h(n).reverse().slice(1),f(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(m)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),x.precision(m)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],x):[g,v]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(m=+t,c=Nn(o,a,90),u=jn(r,e,m),h=Nn(l,s,90),f=jn(i,n,m),x):m},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Un,i=Vn;function a(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r="function"==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Ct,n=t[1]*Ct,i=e[0]*Ct,a=e[1]*Ct,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),h=o*Math.sin(r),f=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rt(a-n)+o*l*Rt(i-r))),g=1/Math.sin(d),(v=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*f,i=r*h+e*p,a=r*s+e*c;return[Math.atan2(i,n)*Lt,Math.atan2(a,Math.sqrt(n*n+i*i))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,v;var r,n,i,a,o,s,l,c,u,h,f,p,d,g,v},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Ct),o=Math.cos(i),s=y((n*=Ct)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}qn.point=function(i,a){t=i*Ct,e=Math.sin(a*=Ct),r=Math.cos(a),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return En(Gn)}).raw=Gn;var Yn=Hn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},P);function Wn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return Jn;function o(t,e){a>0?e<-Et+kt&&(e=-Et+kt):e>Et-kt&&(e=Et-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=Pt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Et]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)1&&Ot(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function ii(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return En(Qn)}).raw=Qn,ti.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Et]},(t.geo.transverseMercator=function(){var t=Kn(ti),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ti,t.geom={},t.geom.hull=function(t){var e=ei,r=ri;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ve(e),a=ve(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+h;nkt)s=s.L;else{if(!((i=a-wi(s,o))>kt)){n>-kt?(e=s.P,r=s):i>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=mi(t);if(hi.insert(e,l),e||r){if(e===r)return Si(e),r=mi(e.site),hi.insert(l,r),l.edge=r.edge=Li(e.site,l.site),Mi(e),void Mi(r);if(r){Si(e),Si(r);var c=e.site,u=c.x,h=c.y,f=t.x-u,p=t.y-h,d=r.site,g=d.x-u,v=d.y-h,m=2*(f*v-p*g),y=f*f+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+u,y:(f*x-g*y)/m+h};Pi(r.edge,c,d,b),l.edge=Li(c,t,null,b),r.edge=Li(t,d,null,b),Mi(e),Mi(r)}else l.edge=Li(e.site,l.site)}}function _i(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,h=1/a-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-a/2)))/h+n:(n+s)/2}function wi(t,e){var r=t.N;if(r)return _i(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Ti(t,e){return e.angle-t.angle}function Ai(){Ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Mi(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,h=2*(l*(v=a.y-s)-c*u);if(!(h>=-Tt)){var f=l*l+c*c,p=u*u+v*v,d=(v*f-c*p)/h,g=(l*p-u*f)/h,v=g+s,m=gi.pop()||new Ai;m.arc=t,m.site=i,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=pi._;x;)if(m.y=s)return;if(f>d){if(a){if(a.y>=c)return}else a={x:v,y:l};r={x:v,y:c}}else{if(a){if(a.y1)if(f>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xkt||y(i-r)>kt)&&(s.splice(o,0,new Oi((m=a.site,x=u,b=y(n-h)kt?{x:h,y:y(e-h)kt?{x:y(r-d)kt?{x:f,y:y(e-f)kt?{x:y(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Bi(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Bi(s(t)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Ti),u=-1,h=c.length,f=c[h-1].edge,p=f.l===l?f.r:f.l;++ua&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Gi(r,n)})),a=Xi.lastIndex;return ag&&(g=l.x),l.y>v&&(v=l.y),c.push(l.x),u.push(l.y);else for(h=0;hg&&(g=b),_>v&&(v=_),c.push(b),u.push(_)}var w=g-p,k=v-d;function T(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,h=n>=c,f=h<<1|u;t.leaf=!1,u?i=l:o=l,h?a=c:s=c,T(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}}),e,r,n,i,a,o,s)}w>k?v=d+w:g=p+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}};if(M.visit=function(t){!function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=.5*(n+a),l=.5*(i+o),c=r.nodes;c[0]&&t(e,c[0],n,i,s,l),c[1]&&t(e,c[1],s,i,a,l),c[2]&&t(e,c[2],n,l,s,o),c[3]&&t(e,c[3],s,l,a,o)}}(t,M,p,d,g,v)},M.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,h,f,p){if(!(u>a||h>o||f=_)<<1|e>=b,k=w+4;w=0&&!(n=t.interpolators[i](e,r)););return n}function Ji(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function aa(t){return 1-Math.cos(t*Et)}function oa(t){return Math.pow(2,10*(t-1))}function sa(t){return 1-Math.sqrt(1-t*t)}function la(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ca(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ua(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=fa(i),s=ha(i,a),l=fa(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]=0?t.slice(0,n):t,a=n>=0?t.slice(n+1):"in";return i=$i.get(i)||Ki,a=Qi.get(a)||P,e=a(i.apply(null,r.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Wt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+""}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return te(n+o*t,i+s*t,a+l*t)+""}},t.interpolateRound=ca,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(t){if(null!=t){r.setAttribute("transform",t);var e=r.transform.baseVal.consolidate()}return new ua(e?e.matrix:pa)})(e)},ua.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pa={a:1,b:0,c:0,d:1,e:0,f:0};function da(t){return t.length?t.pop()+",":""}function ga(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(da(r)+"rotate(",null,")")-2,x:Gi(t,e)})):e&&r.push(da(r)+"rotate("+e+")")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(da(r)+"skewX(",null,")")-2,x:Gi(t,e)}):e&&r.push(da(r)+"skewX("+e+")")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(da(r)+"scale(",null,",",null,")");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(da(r)+"scale("+e+")")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Te(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,u=c[0],d=c[1];for(t=0;t=0;)r.push(i[n])}function Ca(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Ca(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ea(t,function(t){t.children&&(t.value=0)}),Ca(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=e);return n}function qa(t){return t.reduce(Ha,0)}function Ha(t,e){return t+e[1]}function Ga(t,e){return Ya(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ya(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Wa(e){return[t.min(e),t.max(e)]}function Xa(t,e){return t.value-e.value}function Za(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ja(t,e){t._pack_next=e,e._pack_prev=t}function Ka(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function $a(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(e.forEach(Qa),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(eo(r,n,i=e[2]),x(i),Za(r,i),r._pack_prev=i,Za(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&((s=c[t.bisect(f,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=ve(t),a):n},a.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Ya(e,t)}:ve(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xa),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Ca(s,function(t){t.r=+u(t.value)}),Ca(s,$a),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ca(s,function(t){t.r+=h}),Ca(s,$a),Ca(s,function(t){t.r-=h})}return function t(e,r,n,i){var a=e.children;e.x=r+=i*e.x;e.y=n+=i*e.y;e.r*=i;if(a)for(var o=-1,s=a.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)});var g=r(f,p)/2-f.x,v=n[0]/(p.x+r(p,f)/2+g),m=n[1]/(d.depth||1);Ea(u,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,h=s.m,f=l.m;s=io(s),a=no(a),s&&a;)l=no(l),(o=io(o)).a=t,(i=s.z+h-a.z-c+r(s._,a._))>0&&(ao(oo(s,t,n),t,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!io(o)&&(o.t=s,o.m+=h-u),a&&!no(l)&&(l.t=a,l.m+=c-f,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Sa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Ca(c,function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var h=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),f=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=h.x-r(h,f)/2,d=f.x+r(f,h)/2;return Ca(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Sa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=so,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,g))<=f?(c.pop(),f=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,f=1/0);s.length&&(d(s,g,a,!0),s.length=s.area=0),e.forEach(h)}}function f(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(f)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?vo:ho,s=i?ma:va;return a=t(e,r,s,n),o=t(r,e,s,Zi),l}function l(t){return a(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ca)};l.clamp=function(t){return arguments.length?(i=t,s()):i};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,i)};return s()}([0,1],[0,1],Zi,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]>=0,r.domain((a=t.map(Number)).map(o)),l):a};l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n};l.nice=function(){var t=fo(a.map(o),i?Math:Ao);return r.domain(t),a=t.map(s),l};l.ticks=function(){var t=co(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),h=n%1?2:n;if(isFinite(u-c)){if(i){for(;c0;f--)e.push(s(c)*f);for(c=0;e[c]l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return To;arguments.length<2?r=To:"function"!=typeof r&&(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n0?i[t-1]:r[0],th?0:1;if(c=St)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,g,v,m,y,x,b,_,w,k,T,A,M=0,S=0,E=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===Oo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=It(v/c*Math.sin(m))),s&&(M=It(v/s*Math.sin(m)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(h-S),_=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=At?0:1;if(S&&Bo(y,x,b,_)===p^C){var L=(u+h)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(h-M),k=s*Math.sin(h-M),T=s*Math.cos(u+M),A=s*Math.sin(u+M);var P=Math.abs(u-h+2*M)<=At?0:1;if(M&&Bo(w,k,T,A)===1-p^P){var O=(u+h)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=A=null}}else w=k=0;if(f>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s0?0:1}function No(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,h=t[1]+c,f=e[0]+l,p=e[1]+c,d=(u+f)/2,g=(h+p)/2,v=f-u,m=p-h,y=v*v+m*m,x=r-n,b=u*p-f*h,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,T=(b*m+v*_)/y,A=(-b*v+m*_)/y,M=w-d,S=k-g,E=T-d,C=A-g;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ei,r=ri,n=Yr,i=Vo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,f=ve(e),p=ve(r);function d(){l.push("M",i(t(c),o))}for(;++u1&&i.push("H",n[0]);return i.join("")},"step-before":Ho,"step-after":Go,basis:Xo,"basis-open":function(t){if(t.length<4)return Vo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(Zo($o,a)+","+Zo($o,o)),--n;for(;++n9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Vo(t){return t.length>1?t.join("L"):t+"Z"}function qo(t){return t.join("L")+"Z"}function Ho(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cAt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=ve(t),a):r},a.source=function(e){return arguments.length?(t=ve(e),a):t},a.target=function(t){return arguments.length?(e=ve(t),a):e},a.startAngle=function(t){return arguments.length?(n=ve(t),a):n},a.endAngle=function(t){return arguments.length?(i=ve(t),a):i},a},t.svg.diagonal=function(){var t=Un,e=Vn,r=is;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=is,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=as;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Ct);W.transition=function(t){for(var e,r,n=ds||++ms,i=bs(t),a=[],o=gs||{time:Date.now(),ease:ia,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(t,o);if(a>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}h||(a=i.time,o=Te(function(t){var e=h.delay;if(o.t=e+a,e<=t)return f(t-e);o.c=f},0,a),h=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}vs.call=W.call,vs.empty=W.empty,vs.node=W.node,vs.size=W.size,t.transition=function(e,r){return e&&e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=vs,vs.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function g(t){t.select(".extent").attr("y",l[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function v(){var h,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,k=!/^(e|w)$/.test(_)&&a,T=y.classed("extent"),A=xt(m),M=t.mouse(m),S=t.select(o(m)).on("keydown.brush",function(){32==t.event.keyCode&&(T||(h=null,M[0]-=s[1],M[1]-=l[1],T=2),B())}).on("keyup.brush",function(){32==t.event.keyCode&&2==T&&(M[0]+=s[1],M[1]+=l[1],T=0,B())});if(t.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);v=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else t.event.altKey&&(h=M.slice());function L(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),T||(t.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(e[0]1?{floor:function(e){for(;s(e=t.floor(e));)e=zs(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=zs(+e+1);return e}}:t))},i.ticks=function(t,e){var r=co(i.domain()),n=null==t?a(r,10):"number"==typeof t?a(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],zs(+r[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Os(e.copy(),r,n)},mo(i,e)}function zs(t){return new Date(t)}Es.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ps:Ls,Ps.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ps.toString=Ls.toString,ze.second=Fe(function(t){return new Ie(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),ze.seconds=ze.second.range,ze.seconds.utc=ze.second.utc.range,ze.minute=Fe(function(t){return new Ie(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),ze.minutes=ze.minute.range,ze.minutes.utc=ze.minute.utc.range,ze.hour=Fe(function(t){var e=t.getTimezoneOffset()/60;return new Ie(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),ze.hours=ze.hour.range,ze.hours.utc=ze.hour.utc.range,ze.month=Fe(function(t){return(t=ze.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),ze.months=ze.month.range,ze.months.utc=ze.month.utc.range;var Is=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[ze.second,1],[ze.second,5],[ze.second,15],[ze.second,30],[ze.minute,1],[ze.minute,5],[ze.minute,15],[ze.minute,30],[ze.hour,1],[ze.hour,3],[ze.hour,6],[ze.hour,12],[ze.day,1],[ze.day,2],[ze.week,1],[ze.month,1],[ze.month,3],[ze.year,1]],Rs=Es.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Yr]]),Fs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(zs)},floor:P,ceil:P};Ds.year=ze.year,ze.scale=function(){return Os(t.scale.linear(),Ds,Rs)};var Bs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Cs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Yr]]);function js(t){return JSON.parse(t.responseText)}function Us(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Bs.year=ze.year.utc,ze.scale.utc=function(){return Os(t.scale.linear(),Bs,Ns)},t.text=me(function(t){return t.responseText}),t.json=function(t,e){return ye(t,"application/json",js,e)},t.html=function(t,e){return ye(t,"text/html",Us,e)},t.xml=me(function(t){return t.responseXML}),"object"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],164:[function(t,e,r){e.exports=function(){for(var t=0;t=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0});if(1&s)for(var u=0;u<_.length;++u){var b=_[u],f=b[0];b[0]=b[1],b[1]=f}return _}},{"incremental-convex-hull":413,uniq:547}],166:[function(t,e,r){"use strict";e.exports=a;var n=(a.canvas=document.createElement("canvas")).getContext("2d"),i=o([32,126]);function a(t,e){Array.isArray(t)&&(t=t.join(", "));var r,a={},s=16,l=.05;e&&(2===e.length&&"number"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=i),n.font=s+"px "+t;for(var c=0;cs*l){var p=(f-h)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:105}],168:[function(t,e,r){var n=t("abs-svg-path"),i=t("normalize-svg-path"),a={M:"moveTo",C:"bezierCurveTo"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{"abs-svg-path":60,"normalize-svg-path":452}],169:[function(t,e,r){e.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],170:[function(t,e,r){"use strict";e.exports=function(t,e){switch("undefined"==typeof e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=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=k?f.call(k,T,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r0?1:-1}},{}],183:[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":180}],184:[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":183}],185:[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,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(c),u=s(r),f&&u.sort("function"==typeof f?a.call(f,r):void 0),"function"!=typeof t&&(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,h,r[t],t,r,n):e})}}},{"./valid-callable":203,"./valid-value":205}],186:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":187,"./shim":188}],187:[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")}},{}],188:[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}},{}],209:[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}},{}],210:[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}},{}],211:[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"))},{"./":214,d:151,"es5-ext/object/set-prototype-of":200,"es5-ext/string/#/contains":206,"es6-symbol":219}],212:[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,h,f,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),h=function(){f=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,m,u.value,h),f)return;u=t.next()}else for(d=t.length,p=0;p=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,h),!f);++p);else c.call(t,function(t){return l.call(e,m,t,h),f})}},{"./get":213,"es5-ext/function/is-arguments":177,"es5-ext/object/valid-callable":203,"es5-ext/string/is-string":209}],213:[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":211,"./string":216,"./valid-iterable":217,"es5-ext/function/is-arguments":177,"es5-ext/string/is-string":209,"es6-symbol":219}],214:[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"),h=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(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,f(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)):h(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})}))),h(n.prototype,u.iterator,l(function(){return this}))},{d:151,"d/auto-bind":150,"es5-ext/array/#/clear":173,"es5-ext/object/assign":186,"es5-ext/object/valid-callable":203,"es5-ext/object/valid-value":205,"es6-symbol":219}],215:[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":177,"es5-ext/object/is-value":194,"es5-ext/string/is-string":209,"es6-symbol":219}],216:[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"))},{"./":214,d:151,"es5-ext/object/set-prototype-of":200,"es6-symbol":219}],217:[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":215}],218:[function(t,e,r){(function(n,i){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){"use strict";function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&&(s?s(v):_())};var c="undefined"!=typeof window?window:void 0,u=c||{},h=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof n&&"[object process]"==={}.toString.call(n),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var g=new Array(1e3);function v(){for(var t=0;t=r-1){f=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var u=s.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)n.push(a(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var p=a(c[f-1],u[f-1],arguments[f]);n.push(p),i.push((p-n[o++])*h)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,h=u>1e-6?1/u:0;this._time.push(t);for(var f=r;f>0;--f){var p=arguments[f];n.push(a(l[f-1],c[f-1],n[o++]+p)),i.push(p*h)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--h)n.push(a(l[h],c[h],n[o]+u*i[o])),i.push(0),o+=1}}},{"binary-search-bounds":91,"cubic-hermite":145}],227:[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&&(f=o[0]/2,p+=o[1]);return r}},{"css-font/stringify":142}],229:[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,h=u.getContext("2d"),f={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,h.font=t;var d={top:0};h.clearRect(0,0,p,p),h.textBaseline="top",h.fillStyle="black",h.fillText("H",0,0);var g=a(h.getImageData(0,0,p,p));h.clearRect(0,0,p,p),h.textBaseline="bottom",h.fillText("H",0,p);var v=a(h.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-v+g,h.clearRect(0,0,p,p),h.textBaseline="alphabetic",h.fillText("H",0,p);var m=p-a(h.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=m,h.clearRect(0,0,p,p),h.textBaseline="middle",h.fillText("H",0,.5*p);var y=a(h.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="hanging",h.fillText("H",0,.5*p);var x=a(h.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="ideographic",h.fillText("H",0,p);var b=a(h.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,f.upper&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.upper,0,0),d.upper=a(h.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),f.lower&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.lower,0,0),d.lower=a(h.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),f.tittle&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.tittle,0,0),d.tittle=a(h.getImageData(0,0,p,p))),f.ascent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.ascent,0,0),d.ascent=a(h.getImageData(0,0,p,p))),f.descent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.descent,0,0),d.descent=o(h.getImageData(0,0,p,p))),f.overshoot){h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.overshoot,0,0);var _=o(h.getImageData(0,0,p,p));d.overshoot=_-m}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement("canvas"),n.cache={}},{}],230:[function(t,e,r){"use strict";e.exports=function(t){return new c(t||d,null)};var n=0,i=1;function a(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function o(t){return new a(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new a(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],h=[];o;){var f=r(t,o.key);u.push(o),h.push(f),o=f<=0?o.left:o.right}u.push(new a(n,t,e,null,null,1));for(var p=u.length-2;p>=0;--p){o=u[p];h[p]<=0?u[p]=new a(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new a(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p>1;--p){var d=u[p-1];o=u[p];if(d._color===i||o._color===i)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(v=g.right)||v._color!==n){if(g._color=n,g.left=d.right,d._color=i,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).left===g?m.left=d:m.right=d;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else{if(!(v=g.right)||v._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=i,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).left===g?m.left=o:m.right=o;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else if(d.right===o){if(!(v=g.left)||v._color!==n){if(g._color=n,g.right=d.left,d._color=i,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).right===g?m.right=d:m.left=d;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}else{var v;if(!(v=g.left)||v._color!==n){var m;if(d.left=o.right,g._color=n,g.right=o.left,o._color=i,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).right===g?m.right=o:m.left=o;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}}return u[0]._color=i,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&&(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(r(e,i.key)<=0){var a;if(i.left&&(a=t(e,r,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);if(s<=0){if(a.left&&(o=t(e,r,n,i,a.left)))return o;if(l>0&&(o=i(a.key,a.value)))return o}if(l>0&&a.right)return t(e,r,n,i,a.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(u,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),u.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=h.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return te?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new h(this.tree,this._stack.slice())},f.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new a(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u>=0;--u){(r=t[u]).left===t[u+1]?e[u]=new a(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&&r.right){var h=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var f=e[h-1];e.push(new a(r._color,f.key,f.value,r.left,r.right,r._count)),e[h-1].key=r.key,e[h-1].value=r.value;for(u=e.length-2;u>=h;--u)r=e[u],e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count);e[h-1].left=e[h]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&&(d.right=null),e.pop();for(u=0;u=0;--u){if(e=t[u],0===u)return void(e._color=i);if((r=t[u-1]).left===e){if((a=r.right).right&&a.right._color===n)return c=(a=r.right=o(a)).right=o(a.right),r.right=a.left,a.left=r,a.right=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u>1&&((h=t[u-2]).left===r?h.left=a:h.right=a),void(t[u-1]=a);if(a.left&&a.left._color===n)return c=(a=r.right=o(a)).left=o(a.left),r.right=c.left,a.left=c.right,c.left=r,c.right=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((h=t[u-2]).left===r?h.left=c:h.right=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.right=s(n,a));r.right=s(n,a);continue}a=o(a),r.right=a.left,a.left=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((h=t[u-2]).left===r?h.left=a:h.right=a),t[u-1]=a,t[u]=r,u+11&&((h=t[u-2]).right===r?h.right=a:h.left=a),void(t[u-1]=a);if(a.right&&a.right._color===n)return c=(a=r.left=o(a)).right=o(a.right),r.left=c.right,a.right=c.left,c.right=r,c.left=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((h=t[u-2]).right===r?h.right=c:h.left=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.left=s(n,a));r.left=s(n,a);continue}var h;a=o(a),r.left=a.right,a.right=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((h=t[u-2]).right===r?h.right=a:h.left=a),t[u-1]=a,t[u]=r,u+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),f.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),f.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new a(n._color,n.key,t,n.left,n.right,n._count);for(var i=e.length-2;i>=0;--i)(n=e[i]).left===e[i+1]?r[i]=new a(n._color,n.key,n.value,r[i+1],n.right,n._count):r[i]=new a(n._color,n.key,n.value,n.left,r[i+1],n._count);return new c(this.tree._compare,r[0])},f.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],231:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=607/128,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number("0/0");for(var e=a[0],r=a.length-1;r>0;--r)e+=a[r]/(t+r);var n=t+i+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},e.exports.log=o},{}],232:[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;o0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};h.isOpaque=function(){return!0},h.isTransparent=function(){return!1},h.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];h.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,u=o(r,n,i,a,s),h=u.cubeEdges,f=u.axis,b=n[12],_=n[13],w=n[14],k=n[15],T=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*k)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=h[A],this.lastCubeProps.axis[A]=f[A];var M=p;for(A=0;A<3;++A)d(p[A],A,this.bounds,h,f);e=this.gl;var S,E=g;for(A=0;A<3;++A)this.backgroundEnable[A]?E[A]=f[A]:E[A]=0;this._background.draw(r,n,i,a,E,this.backgroundColor),this._lines.bind(r,n,i,this);for(A=0;A<3;++A){var C=[0,0,0];f[A]>0?C[A]=a[1][A]:C[A]=a[0][A];for(var L=0;L<2;++L){var P=(A+1+L)%3,O=(A+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,O,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(L=0;L<2;++L){P=(A+1+L)%3,O=(A+1+(1^L))%3;this.zeroEnable[O]&&Math.min(a[0][O],a[1][O])<=0&&Math.max(a[0][O],a[1][O])>=0&&this._lines.drawZero(P,O,this.bounds,C,this.zeroLineColor[O],this.zeroLineWidth[O]*this.pixelRatio)}}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var z=c(m,M[A].primalMinor),I=c(y,M[A].mirrorMinor),D=this.lineTickLength;for(L=0;L<3;++L){var R=T/r[5*L];z[L]*=D[L]*R,I[L]*=D[L]*R}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,I,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);var F,B;function N(t){(B=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0?N(n):a>0&&l<0?N(n):a<0&&l>0?N(n):a<0&&l<0?N(n):o>0&&s>0?N(i):o>0&&s<0?N(i):o<0&&s>0?N(i):o<0&&s<0&&N(i)}for(A=0;A<3;++A){var U=M[A].primalMinor,V=M[A].mirrorMinor,q=c(x,M[A].primalOffset);for(L=0;L<3;++L)this.lineTickEnable[A]&&(q[L]+=T*U[L]*Math.max(this.lineTickLength[L],0)/r[5*L]);var H=[0,0,0];if(H[A]=1,this.tickEnable[A]){-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,F=1,"auto"===(S=[this.tickAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]),B=[0,0,0],j(A,U,V);for(L=0;L<3;++L)q[L]+=T*U[L]*this.tickPad[L]/r[5*L];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],q,this.tickColor[A],H,B,S)}if(this.labelEnable[A]){F=0,B=[0,0,0],this.labels[A].length>4&&(N(A),F=1),"auto"===(S=[this.labelAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]);for(L=0;L<3;++L)q[L]+=T*U[L]*this.labelPad[L]/r[5*L];q[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],q,this.labelColor[A],[0,0,0],B,S)}}this._text.unbind()},h.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":234,"./lib/cube.js":235,"./lib/lines.js":236,"./lib/text.js":238,"./lib/ticks.js":239}],234:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],f=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=p,f[l]=p;for(var d=-1;d<=1;d+=2){h[c]=d;for(var g=-1;g<=1;g+=2)h[u]=g,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),s+=1}var v=c;c=u,u=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":237,"gl-buffer":241,"gl-vao":327}],235:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,p){i(s,e,t),i(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=a[x][2];for(var b=0;b<2;++b){u[1]=a[b][1];for(var _=0;_<2;++_)u[0]=a[_][0],f(l[y],u,s),y+=1}}for(var w=-1,x=0;x<8;++x){for(var k=l[x][3],T=0;T<3;++T)c[x][T]=l[x][T]/k;p&&(c[x][2]*=-1),k<0&&(w<0?w=x:c[x][2]E&&(w|=1<E&&(w|=1<c[x][1]&&(R=x));for(var F=-1,x=0;x<3;++x){var B=R^1<c[N][0]&&(N=B)}}var j=g;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^N)]=R&N;var U=7^N;U===w||U===D?(U=7^F,j[n.log2(N^U)]=U&N):j[n.log2(F^U)]=U&F;for(var V=v,q=w,A=0;A<3;++A)V[A]=q&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(t){return i(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":301,glslify:409}],238:[function(t,e,r){(function(r){"use strict";e.exports=function(t,e,r,a,s,l){var u=n(t),h=i(t,[{buffer:u,size:3}]),f=o(t);f.attributes.position.location=0;var p=new c(t,f,u,h);return p.update(e,r,a,s,l),p};var n=t("gl-buffer"),i=t("gl-vao"),a=t("vectorize-text"),o=t("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,h=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var c=l[r];c||(c=l[r]={});var u=c[e];u||(u=c[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var h=(n||12)/12,f=u.positions,p=u.cells,d=0,g=p.length;d=0;--m){var y=f[v[m]];o.push(h*y[0],-h*y[1],t)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){h[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),f[d]=(o.length/3|0)-h[d],c[d]=o.length/3|0;for(var g=0;g=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var h=""+c;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?h:h.subarray(0,t.length),e),n.free(h)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:450,"ndarray-ops":444,"typedarray-pool":545}],242:[function(t,e,r){"use strict";var n=t("gl-vec3"),i=function(t,e){for(var r=0;r=e)return r-1;return r},a=n.create(),o=n.create(),s=function(t,e,r){return tr?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],h=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=i(r[0],c),v=i(r[1],u),m=i(r[2],h),y=g+1,x=v+1,b=m+1;if(l&&(g=s(g,0,f-1),y=s(y,0,f-1),v=s(v,0,p-1),x=s(x,0,p-1),m=s(m,0,d-1),b=s(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][v])/(r[1][x]-r[1][v]),k=(h-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],z=e[S+T+C],I=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(a,O,z,_),n.lerp(B,B,a,w),n.lerp(a,I,D,_),n.lerp(o,R,F,_),n.lerp(a,a,o,w),n.lerp(B,B,a,k),B};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],i=[],a=0;as&&(s=n.length(b)),x&&(y=Math.min(y,2*n.distance(g,_)/(n.length(v)+n.length(b)))),g=_,v=b,m.push(b)}var w=[c,h,p],k=[u,f,d];e&&(e[0]=w,e[1]=k),0===s&&(s=1);var T=1/s;isFinite(y)&&!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var i=n.create();return void 0!==t&&n.set(i,t,e,r),i}(0,1,0),M=t.coneSize||.5;t.absoluteConeSize&&(M=t.absoluteConeSize*T),o.coneScale=M;x=0;for(var S=0;x=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),h=i(t),f=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:3}]),x=i(t),_=i(t),w=i(t),k=i(t),T=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),M=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=i(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,a(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":244,colormap:126,"gl-buffer":241,"gl-mat4/invert":265,"gl-mat4/multiply":267,"gl-shader":301,"gl-texture2d":322,"gl-vao":327,ndarray:450,normals:453,"simplicial-complex-contour":518,"typedarray-pool":545}],244:[function(t,e,r){var n=t("glslify"),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float coneScale;\n\nuniform float coneOffset;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nuniform float vectorScale;\nuniform float coneScale;\nuniform float coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:409}],245:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34000:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],246:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":245}],247:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho||!1?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function h(t,e,r,n){for(var i=u[n],a=0;a0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+h(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":248,"gl-buffer":241,"gl-vao":327}],248:[function(t,e,r){"use strict";var n=t("glslify"),i=t("gl-shader"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":301,glslify:409}],249:[function(t,e,r){"use strict";var n=t("gl-texture2d");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;au||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var f=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&h>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");f=t.FLOAT}else n.preferFloat&&h>0&&p&&(f=t.FLOAT);var g=!0;"depth"in n&&(g=!!n.depth);var v=!1;"stencil"in n&&(v=!!n.stencil);return new d(t,e,r,f,h,g,v,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function h(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?d?t.depth=f(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=f(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;mi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,h=this.bounds,p=h[0]=r[0],d=h[1]=o[0],g=1/((h[2]=r[r.length-1])-p),v=1/((h[3]=o[o.length-1])-d),m=e[0],y=e[1];this.shape=[m,y];var x=(m-1)*(y-1)*(f.length>>>1);this.numVertices=x;for(var b=a.mallocUint8(4*x),_=a.mallocFloat32(2*x),w=a.mallocUint8(2*x),k=a.mallocUint32(x),T=0,A=0;A max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\nlowp vec4 encode_float_1540259130(highp float v) {\n highp float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{"gl-shader":301,glslify:409}],255:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),f=l(new Array(1024),[256,1,4]),p=0;p<1024;++p)f.data[p]=255;var d=a(e,f);d.wrap=e.REPEAT;var g=new v(e,r,o,s,c,d);return g.update(t),g};var n=t("gl-buffer"),i=t("gl-vao"),a=t("gl-texture2d"),o=t("glsl-read-float"),s=t("binary-search-bounds"),l=t("ndarray"),c=t("./lib/shaders"),u=c.createShader,h=c.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var m=v.prototype;m.isTransparent=function(){return this.hasAlpha},m.isOpaque=function(){return!this.hasAlpha},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],c=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=t.position||t.positions;if(f){var d=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,v=!0}continue t}h[0][r]=Math.min(h[0][r],b[r],_[r]),h[1][r]=Math.max(h[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=c;if(c+=p(b,_),v){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);u+=2,v=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],c,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],c,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(c),o.push(f[f.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in t){var T=t.dashes.slice();for(T.unshift(0),e=1;e1.0001)return null;v+=g[u]}if(Math.abs(v-1)>.001)return null;return[h,function(t,e){for(var r=[0,0,0],n=0;n max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},{glslify:409}],280:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./lib/shaders"),g=t("./lib/closest-point"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_,k,T,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=T,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=k.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function E(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(t){this.pickId=t},T.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;ai[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t],r.uniforms.angle=m[t],a.drawArrays(a.TRIANGLES,i[T],i[A]-i[T]))),y[t]&&k&&(u[1^t]-=M*p*x[t],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),u[1^t]=M*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=M*p*g[t+2],Ti[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],a.drawArrays(a.TRIANGLES,i[T],i[A]-i[T]))),y[t+2]&&k&&(u[1^t]+=M*p*x[t+2],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(f=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],h=a[o],g=a[o+2]-h,v=i[o],m=i[o+2]-v;p[o]=2*l/u*g/m,f[o]=2*(s-c)/u*g/m}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=f,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],h=[-1/0],f=l[o];for(e=0;e=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],f[d]):o.drawLine(e[0],g,e[2],g,p[d],f[d])}}for(d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}},!0)},d.enableMouseListeners(),d};var n=t("right-now"),i=t("3d-view"),a=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset"),l=t("has-passive-events")},{"3d-view":52,"has-passive-events":411,"mouse-change":435,"mouse-event-offset":436,"mouse-wheel":438,"right-now":504}],289:[function(t,e,r){var n=t("glslify"),i=t("gl-shader"),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":301,glslify:409}],290:[function(t,e,r){"use strict";var n=t("./camera.js"),i=t("gl-axes3d"),a=t("gl-axes3d/properties"),o=t("gl-spikes3d"),s=t("gl-select-static"),l=t("gl-fbo"),c=t("a-big-triangle"),u=t("mouse-change"),h=t("mouse-wheel"),f=t("gl-mat4/perspective"),p=t("gl-mat4/ortho"),d=t("./lib/shader"),g=t("is-mobile")({tablet:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function y(t){return"boolean"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;if(!e)if(e=document.createElement("canvas"),t.container){var r=t.container;r.appendChild(e)}else document.body.appendChild(e);var x=t.gl;x||(x=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:g}));if(!x)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],_=new v,w=l(x,[x.drawingBufferWidth,x.drawingBufferHeight],{preferFloat:!g}),k=d(x),T=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,A={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:T},M=t.axes||{},S=i(x,M);S.enable=!M.disable;var E=t.spikes||{},C=o(x,E),L=[],P=[],O=[],z=[],I=!0,D=!0,R=new Array(16),F=new Array(16),B={view:null,projection:R,model:F,_ortho:!1},D=!0,N=[x.drawingBufferWidth,x.drawingBufferHeight],j=t.cameraObject||n(e,A),U={gl:x,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:_,camera:j,axes:S,axesPixels:null,spikes:C,bounds:b,objects:L,shape:N,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:y(t.autoResize),autoBounds:y(t.autoBounds),autoScale:!!t.autoScale,autoCenter:y(t.autoCenter),clipToBounds:y(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:B,oncontextloss:null,mouseListener:null,_stopped:!1},V=[x.drawingBufferWidth/U.pixelRatio|0,x.drawingBufferHeight/U.pixelRatio|0];function q(){if(!U._stopped&&U.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*U.pixelRatio),a=0|Math.ceil(n*U.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",I=!0}}}U.autoResize&&q();function H(){for(var t=L.length,e=z.length,r=0;r0&&0===O[e-1];)O.pop(),z.pop().dispose()}function G(){if(U.contextLost)return!0;x.isContextLost()&&(U.contextLost=!0,U.mouseListener.enabled=!1,U.selection.object=null,U.oncontextloss&&U.oncontextloss())}window.addEventListener("resize",q),U.update=function(t){U._stopped||(t=t||{},I=!0,D=!0)},U.add=function(t){U._stopped||(t.axes=S,L.push(t),P.push(-1),I=!0,D=!0,H())},U.remove=function(t){if(!U._stopped){var e=L.indexOf(t);e<0||(L.splice(e,1),P.pop(),I=!0,D=!0,H())}},U.dispose=function(){if(!U._stopped&&(U._stopped=!0,window.removeEventListener("resize",q),e.removeEventListener("webglcontextlost",G),U.mouseListener.enabled=!1,!U.contextLost)){S.dispose(),C.dispose();for(var t=0;te?1.1:1/1.1;U.aspect[0]*=r,U.aspect[1]*=r,U.aspect[2]*=r,U.redraw()}},!0),U._mouseRotating=!1,U._prevButtons=0,U.enableMouseListeners=function(){U.mouseListener=u(e,function(t,e,r){if(!U._stopped){var n=z.length,i=L.length,a=_.object;_.distance=1/0,_.mouse[0]=e,_.mouse[1]=r,_.object=null,_.screen=null,_.dataCoordinate=_.dataPosition=null;var o=!1;if(t&&U._prevButtons)U._mouseRotating=!0;else{U._mouseRotating&&(D=!0),U._mouseRotating=!1;for(var s=0;s_.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:409}],292:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("typedarray-pool"),o=t("./lib/shader");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),h=new s(t,a,l,c,u);return h.update(e),t.addObject(h),h};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var h=n.getParameter(n.BLEND),f=n.getParameter(n.DITHER);return h&&!this.blend&&n.disable(n.BLEND),f&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),h&&!this.blend&&n.enable(n.BLEND),f&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":291,"gl-buffer":241,"gl-shader":301,"typedarray-pool":545}],293:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],h=e[2],f=e[3],p=r[0],d=r[1],g=r[2],v=r[3];(a=c*p+u*d+h*g+f*v)<0&&(a=-a,p=-p,d=-d,g=-g,v=-v);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*h+l*g,t[3]=s*f+l*v,t}},{}],294:[function(t,e,r){"use strict";e.exports=function(t){return t||0===t?t.toString():""}},{}],295:[function(t,e,r){"use strict";var n=t("vectorize-text");e.exports=function(t,e,r){var a=i[e];a||(a=i[e]={});if(t in a)return a[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,c,u=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:a,fragment:l,attributes:u},f={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},v={vertex:s,fragment:c,attributes:u};function m(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return m(t,h)},r.createOrtho=function(t){return m(t,f)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{"gl-shader":301,glslify:409}],297:[function(t,e,r){"use strict";var n=t("is-string-blank"),i=t("gl-buffer"),a=t("gl-vao"),o=t("typedarray-pool"),s=t("gl-mat4/multiply"),l=t("./lib/shaders"),c=t("./lib/glyphs"),u=t("./lib/get-simple-string"),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return f(n,n),f(n,n),f(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t){return!0===t?1:t>1?1:t}function v(t,e,r,n,i,a,o,s,l,c,u,h){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),h=i(e),f=i(e),p=i(e),d=i(e),g=a(e,[{buffer:h,size:3,type:e.FLOAT},{buffer:f,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),m=new v(e,r,n,o,h,f,p,d,g,s,c,u);return m.update(t),m};var m=v.prototype;m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],k=h.slice(),T=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,d=e.axesBounds,g=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=u,l.projection=f,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=g,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var v=0;v<3;++v)if(a[v]){l.scale=e.projectScale[v],l.opacity=e.projectOpacity[v];for(var m=k,C=0;C<16;++C)m[C]=0;for(C=0;C<4;++C)m[5*C]=1;m[5*v]=0,i[v]<0?m[12+v]=d[0][v]:m[12+v]=d[1][v],s(m,c,m),l.model=m;var L=(v+1)%3,P=(v+2)%3,O=M(x),z=M(b);O[L]=1,z[P]=1;var I=p(0,0,0,S(_,O)),D=p(0,0,0,S(w,z));if(Math.abs(I[1])>Math.abs(D[1])){var R=I;I=D,D=R,R=O,O=z,z=R;var F=L;L=P,P=F}I[0]<0&&(O[L]=-1),D[1]>0&&(z[P]=-1);var B=0,N=0;for(C=0;C<4;++C)B+=Math.pow(c[4*L+C],2),N+=Math.pow(c[4*P+C],2);O[L]/=Math.sqrt(B),z[P]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=z,l.fragClipBounds[0]=E(T,g[0],v,-1e8),l.fragClipBounds[1]=E(T,g[1],v,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function P(t,e,r,n,i,a,o){var s=r.gl;if((a===r.projectHasAlpha||o)&&C(e,r,n,i),a===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||h,l.view=n.view||h,l.projection=n.projection||h,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=L,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=i,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*i),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(t,e,r,i){var a;a=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},m.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},m.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=g(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=g(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||"normal",c=t.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else{i=[],a=[];for(n=0;n0){var z=0,I=x,D=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(m)&&Array.isArray(m[0]);t:for(n=0;n<_;++n){y+=1;for(w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue t;h[k]=Math.max(h[k],w[k]),u[k]=Math.min(u[k],w[k])}T=(N=O(f,n,l,this.pixelRatio)).mesh,A=N.lines,M=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(U=F?n0?1-M[0][0]:Y<0?1+M[1][0]:1,W*=W>0?1-M[0][1]:W<0?1+M[1][1]:1],Z=T.cells||[],J=T.positions||[];for(k=0;k0){var m=r*u;o.drawBox(h-m,f-m,p+m,f+m,a),o.drawBox(h-m,d-m,p+m,d+m,a),o.drawBox(h-m,f-m,h+m,d+m,a),o.drawBox(p-m,f-m,p+m,d+m,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":298,"gl-buffer":241,"gl-shader":301}],300:[function(t,e,r){"use strict";e.exports=function(t,e){var r=n(t,e),a=i.mallocUint8(e[0]*e[1]*4);return new c(t,r,a)};var n=t("gl-fbo"),i=t("typedarray-pool"),a=t("ndarray"),o=t("bit-twiddle").nextPow2,s=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_fthis.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;ar)for(t=r;te)for(t=e;t=0){for(var k=0|w.type.charAt(w.type.length-1),T=new Array(k),A=0;A=0;)M+=1;_[y]=M}var S=new Array(r.length);function E(){f.program=o.program(p,f._vref,f._fref,b,_);for(var t=0;t=0){var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);o(t,e,p[0],i,d,a,h)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+f);var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);s(t,e,p,i,d,a,h)}}}return a};var n=t("./GLError");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=["gl","v"],c=[],u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+a+"fv(locations["+e+"],false,obj"+t+")"}throw new i("","Unknown uniform data type for "+name+": "+r)}var a=r.charCodeAt(r.length-1)-48;if(a<2||a>4)throw new i("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+a+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+a+"fv(locations["+e+"],obj"+t+")";default:throw new i("","Unrecognized data type for vector "+name+": "+r)}}}function c(e){for(var n=["return function updateProperty(obj){"],i=function t(e,r){if("object"!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+""===i?o+="["+i+"]":o+="."+i,"object"==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}("",e),a=0;a4)throw new i("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[u].type);var p}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float tubeScale;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:409}],312:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./shaders"),g=d.meshShader,v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,y,x,b,_,w,k,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=i,this.triangleVectors=a,this.triangleColors=s,this.triangleNormals=c,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=u,this.triangleCount=0,this.lineWidth=1,this.edgePositions=h,this.edgeColors=p,this.edgeUVs=d,this.edgeIds=f,this.edgeVAO=g,this.edgeCount=0,this.pointPositions=v,this.pointColors=x,this.pointUVs=b,this.pointSizes=_,this.pointIds=y,this.pointVAO=w,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1],this.pixelRatio=1}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),h=i(t),f=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:4}]),x=i(t),_=i(t),w=i(t),k=i(t),T=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),M=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=i(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,a(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":311,colormap:126,"gl-buffer":241,"gl-mat4/invert":265,"gl-mat4/multiply":267,"gl-shader":301,"gl-texture2d":322,"gl-vao":327,ndarray:450,normals:453,"simplicial-complex-contour":518,"typedarray-pool":545}],313:[function(t,e,r){"use strict";var n=t("gl-vec3"),i=t("gl-vec4"),a=function(t,e,r,a){for(var o=0,s=0;so&&(o=u)}var h=t.map(function(t){return function(t,e,r,a){var o,s,l,c=t.points,u=t.velocities,h=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var f=[],p=[],d=[],g=[],v=[],m=[],y=0,x=0,b=i.create(),_=i.create(),w=0;w0)for(k=0;k<8;k++){var T=(k+1)%8;f.push(g[k],v[k],v[T],v[T],g[T],g[k]),d.push(_,b,b,b,_,_),m.push(y,x,x,x,y,y),p.push([f.length-6,f.length-5,f.length-4],[f.length-3,f.length-2,f.length-1])}var A=g;g=v,v=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:f,cells:p,vectors:d,vertexIntensity:m}}(t,r,a,o)}),f=[],p=[],d=[],g=[];for(s=0;se)return r-1}return r},c=n.create(),u=n.create(),h=function(t,e,r){return tr?r:t},f=function(t,e,r,i){var a=t[0],o=t[1],s=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],a),v=l(r[1],o),m=l(r[2],s),y=g+1,x=v+1,b=m+1;if(r[0][g]===a&&(y=g),r[1][v]===o&&(x=v),r[2][m]===s&&(b=m),i&&(g=h(g,0,f-1),y=h(y,0,f-1),v=h(v,0,p-1),x=h(x,0,p-1),m=h(m,0,d-1),b=h(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(a-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][v])/(r[1][x]-r[1][v]),k=(s-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],z=e[S+T+C],I=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(c,O,z,_),n.lerp(B,B,c,w),n.lerp(c,I,D,_),n.lerp(u,R,F,_),n.lerp(c,c,u,w),n.lerp(B,B,c,k),B},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r=h&&r<=g&&n>=f&&n<=v&&i>=d&&i<=m},x=10*n.distance(e[0],e[1])/i,b=x*x,_=1,w=0;n.create();r.length>=2&&(_=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=0;sw&&!isNaN(I)&&isFinite(I)&&(w=I),C.push(I),u.push({points:A,velocities:M,divergences:C});for(var P=0;P<100*i&&A.lengthb&&n.scale(O,O,x/Math.sqrt(z)),n.add(O,O,T),S=t.getVelocity(O),n.squaredDistance(E,O)-b>-1e-4*b){A.push(O),E=O,M.push(S);L=t.getDivergence(O,S);(I=n.length(L))>w&&!isNaN(I)&&isFinite(I)&&(w=I),C.push(I)}T=O}}for(k=0;k max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":301,glslify:409}],315:[function(t,e,r){arguments[4][111][0].apply(r,arguments)},{dup:111}],316:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=i(e),f=a(e,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,h,f,p,d,[0,0,0]),m={levels:[[],[],[]]};for(var k in t)m[k]=t[k];return m.colormap=m.colormap||"jet",v.update(m),v};var n=t("bit-twiddle"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("typedarray-pool"),l=t("colormap"),c=t("ndarray-ops"),u=t("ndarray-pack"),h=t("ndarray"),f=t("surface-nets"),p=t("gl-mat4/multiply"),d=t("gl-mat4/invert"),g=t("binary-search-bounds"),v=t("ndarray-gradient"),m=t("./lib/shaders"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(t,e,r,n,i,a,o,l,c,u,f,p,d,g,v){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=v,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.isTransparent=function(){return this.opacity<1},C.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},C.pickSlots=1,C.setPickBase=function(t){this.pickId=t};var L=[0,0,0],P={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=P.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var c=P.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return P.showSurface=o,P.showContour=s,P}var z={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=z;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=I;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=O(n,this);if(u.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!e){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var f=this._contourVAO;for(f.bind(),i=0;i<3;++i)for(h.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?a:1-a,f=0;f<2;++f)for(var p=i+u,d=s+f,v=h*(f?l:1-l),m=0;m<3;++m)c[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},C.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},C.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=B(t.contourWidth,Number)),"showContour"in t&&(this.showContour=B(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=B(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=j(t.contourColor)),"contourProject"in t&&(this.contourProject=B(t.contourProject,function(t){return B(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=j(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=B(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=B(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=h(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var d=p[o];for(b=0;b<2;++b)if(d.shape[b]!==a[b])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var m=g[o];if((Array.isArray(m)||m.length)&&(m=h(m)),m.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var y=h(m.data,a);y.stride[o]=m.stride[0],y.stride[1^o]=0,this.padField(this._field[o],y)}}else{for(o=0;o<2;++o){var x=[0,0];x[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b0){for(var kt=0;kt<5;++kt)rt.pop();G-=1}continue t}rt.push(st[0],st[1],ut[0],ut[1],st[2]),G+=1}}ot.push(G)}this._contourOffsets[nt]=at,this._contourCounts[nt]=ot}var Tt=s.mallocFloat(rt.length);for(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:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=h(t.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var c=t.family.join(", "),u=[t.style];t.style!=t.variant&&u.push(t.variant),t.variant!=t.weight&&u.push(t.weight),_&&t.weight!=t.stretch&&u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[i]=e.font[r]}}),(a||o)&&this.font.forEach(function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)}),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),f=0;f2){for(var w=!t.position[0].length,T=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],k.normalViewport||(i*=-1),i})),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var 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=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{"bit-twiddle":92,"color-normalize":120,"css-font":139,"detect-kerning":166,"es6-weak-map":318,"flatten-vertex-data":227,"font-atlas":228,"font-measure":229,"gl-util/context":323,"is-plain-obj":422,"object-assign":454,"parse-rect":459,"parse-unit":461,"pick-by-alias":465,regl:502,"to-px":539,"typedarray-pool":545}],318:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?WeakMap:t("./polyfill")},{"./is-implemented":319,"./polyfill":321}],319:[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)))))}},{}],320:[function(t,e,r){"use strict";e.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],321:[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"),h=t("es6-iterator/for-of"),f=t("es6-symbol").toStringTag,p=t("./is-native-implemented"),d=Array.isArray,g=Object.defineProperty,v=Object.prototype.hasOwnProperty,m=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,m(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(h(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!!v.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:c(function(t){if(v.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:c(function(t){return v.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,f,c("c","WeakMap"))},{"./is-native-implemented":320,d:151,"es5-ext/object/is-value":194,"es5-ext/object/set-prototype-of":200,"es5-ext/object/valid-object":204,"es5-ext/object/valid-value":205,"es5-ext/string/random-uniq":210,"es6-iterator/for-of":212,"es6-iterator/get":213,"es6-symbol":219}],322:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("ndarray-ops"),a=t("typedarray-pool");e.exports=function(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if("number"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new f(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=d(o,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var h,p,v=0;if(2===o.length)v=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])v=t.ALPHA;else if(2===o[2])v=t.LUMINANCE_ALPHA;else if(3===o[2])v=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)h=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];p=a.malloc(m,r);var x=n(p,o,y,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):u(x,e),h=p.subarray(0,m)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,v,o[0],o[1],0,v,c,h),l||a.free(p);return new f(t,b,o[0],o[1],v,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function h(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function f(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=f.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new f(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,c,h){var f=h.dtype,p=h.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var g=0,v=0,m=d(p,h.stride.slice());"float32"===f?g=t.FLOAT:"float64"===f?(g=t.FLOAT,m=!1,f="float32"):"uint8"===f?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,m=!1,f="uint8");if(2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],h=n(h.data,p,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}p[2]}v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s);if(v!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=h.size,x=c.indexOf(o)<0;x&&c.push(o);if(g===l&&m)0===h.offset&&h.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data.subarray(h.offset,h.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data.subarray(h.offset,h.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,h):i.assign(_,h),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:450,"ndarray-ops":444,"typedarray-pool":545}],323:[function(t,e,r){(function(r){"use strict";var n=t("pick-by-alias");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*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)}if(!t.gl)try{t.gl=t.canvas.getContext("webgl",t.attrs)}catch(e){try{t.gl=t.canvas.getContext("experimental-webgl",t.attrs)}catch(e){t.gl=t.canvas.getContext("webgl-experimental",t.attrs)}}return t.gl}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":465}],324:[function(t,e,r){"use strict";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=t("./fromValues"),i=t("./normalize"),a=t("./dot")},{"./dot":339,"./fromValues":345,"./normalize":356}],330:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],331:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],332:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],333:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],334:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],335:[function(t,e,r){e.exports=t("./distance")},{"./distance":336}],336:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],337:[function(t,e,r){e.exports=t("./divide")},{"./divide":338}],338:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],339:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],340:[function(t,e,r){e.exports=1e-6},{}],341:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t("./epsilon")},{"./epsilon":340}],342:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],343:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],344:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],357:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],358:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],359:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],360:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],361:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],362:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],363:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],364:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],365:[function(t,e,r){e.exports=t("./squaredDistance")},{"./squaredDistance":367}],366:[function(t,e,r){e.exports=t("./squaredLength")},{"./squaredLength":368}],367:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],368:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],369:[function(t,e,r){e.exports=t("./subtract")},{"./subtract":370}],370:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],371:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],372:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],373:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t}},{}],374:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],375:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],376:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],377:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],378:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],379:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],380:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],381:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],382:[function(t,e,r){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),inverse:t("./inverse"),normalize:t("./normalize"),dot:t("./dot"),lerp:t("./lerp"),random:t("./random"),transformMat4:t("./transformMat4"),transformQuat:t("./transformQuat")}},{"./add":374,"./clone":375,"./copy":376,"./create":377,"./distance":378,"./divide":379,"./dot":380,"./fromValues":381,"./inverse":383,"./length":384,"./lerp":385,"./max":386,"./min":387,"./multiply":388,"./negate":389,"./normalize":390,"./random":391,"./scale":392,"./scaleAndAdd":393,"./set":394,"./squaredDistance":395,"./squaredLength":396,"./subtract":397,"./transformMat4":398,"./transformQuat":399}],383:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],384:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],385:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],386:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],387:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],388:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],389:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],390:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],391:[function(t,e,r){var n=t("./normalize"),i=t("./scale");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{"./normalize":390,"./scale":392}],392:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],393:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],394:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],395:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],396:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],397:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],398:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],399:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t[3]=e[3],t}},{}],400:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],401:[function(t,e,r){var n=t("glsl-tokenizer"),i=t("atob-lite");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return F(r),P+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function G(){return"."===e?(S.push(e),M=g,r=e,T+1):/[eE]/.test(e)?(S.push(e),M=g,r=e,T+1):"x"===e&&1===S.length&&"0"===S[0]?(M=_,S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function Y(){return"f"===e&&(S.push(e),r=e,T+=1),/[eE]/.test(e)?(S.push(e),r=e,T+1):"-"===e&&/[eE]/.test(r)?(S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function W(){if(/[^\d\w_]/.test(e)){var t=S.join("");return M=R.indexOf(t)>-1?y:D.indexOf(t)>-1?m:v,F(S.join("")),M=l,T}return S.push(e),r=e,T+1}};var n=t("./lib/literals"),i=t("./lib/operators"),a=t("./lib/builtins"),o=t("./lib/literals-300es"),s=t("./lib/builtins-300es"),l=999,c=9999,u=0,h=1,f=2,p=3,d=4,g=5,v=6,m=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":404,"./lib/builtins-300es":403,"./lib/literals":406,"./lib/literals-300es":405,"./lib/operators":407}],403:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":404}],404:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],405:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":406}],406:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],407:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],408:[function(t,e,r){var n=t("./index");e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{"./index":402}],409:[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,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,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,f=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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-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}},{}],413:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new a(l,new Array(i+1),!1),f=h.adjacent,p=new Array(i+2),u=0;u<=i;++u){for(var d=l.slice(),g=0;g<=i;++g)g===u&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new a(d,new Array(i+1),!0);f[u]=m,p[u]=m}p[i+1]=h;for(var u=0;u<=i;++u)for(var d=f[u].vertices,y=f[u].adjacent,g=0;g<=i;++g){var x=d[g];if(x<0)y[g]=h;else for(var b=0;b<=i;++b)f[b].vertices.indexOf(x)<0&&(y[g]=f[b])}for(var _=new c(i,o,p),w=!!e,u=i+1;u0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var i=new Function("test",e.join("")),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var f=u[h];i[h]=f<0?e:a[f]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=a[u];a[u]=t;var p=this.orient();if(a[u]=f,p<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var f=[];h.length>0;){var p=(e=h.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,c.push(m),h.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),T=new a(w,k,!0);u.push(T);var A=_.indexOf(e);if(!(A<0)){_[A]=T,k[g]=m,w[v]=-1,k[v]=e,d[v]=T,T.flip();for(b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}f.push(new o(S,T,b))}}}}}}f.sort(s);for(v=0;v+1=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":510,"simplicial-complex":520}],414:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=0,a=1;function o(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function h(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?i:(r.splice(n,1),c(t,r),a)}function f(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r>1],i=[],a=[],s=[];for(r=0;r3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,v),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?h(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?h(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return a}for(s=n.ge(this.leftPoints,t,v);sthis.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return ethis.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":91}],415:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r13)&&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}},{}],424:[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))}},{}],425:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],426:[function(t,e,r){var n,i;n=this,i=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){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r0;)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 g(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 v(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 y(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function x(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 b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?y(t,b):t}var _={};function w(t){_[t]||("undefined"!=typeof console&&console.warn(t),_[t]=!0)}function k(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}function M(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var S,E,C,L=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),P=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,O=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,z={now:L,frame:function(t){var e=P(t);return{cancel:function(){return O(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){return S||(S=self.document.createElement("a")),S.href=t,S.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio}},I={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},D={supported:!1,testSupport:function(t){!R&&C&&(F?B(t):E=t)}},R=!1,F=!1;function B(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,C),t.isContextLost())return;D.supported=!0}catch(t){}t.deleteTexture(e),R=!0}self.document&&((C=self.document.createElement("img")).onload=function(){E&&B(E),E=null,F=!0},C.onerror=function(){R=!0,E=null},C.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var N="01",j=function(t){this._transformRequestFn=t,this._createSkuToken()};j.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",N,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},j.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},j.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},j.prototype.normalizeStyleURL=function(t,e){return Y(t,e)},j.prototype.normalizeGlyphsURL=function(t,e){return W(t,e)},j.prototype.normalizeSourceURL=function(t,e){return X(t,e)},j.prototype.normalizeSpriteURL=function(t,e,r,n){return Z(t,e,r,n)},j.prototype.normalizeTileURL=function(t,e,r){return this._isSkuTokenExpired()&&this._createSkuToken(),K(t,e,r,this._skuToken)},j.prototype.canonicalizeTileURL=function(t){return Q(t)},j.prototype.canonicalizeTileset=function(t,e){return tt(t,e)};var U="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes";function V(t,e){var r=rt(I.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!I.REQUIRE_ACCESS_TOKEN)return nt(t);if(!(e=e||I.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+U);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+U);return t.params.push("access_token="+e),nt(t)}function q(t){return 0===t.indexOf("mapbox:")}var H=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function G(t){return H.test(t)}var Y=function(t,e){if(!q(t))return t;var r=rt(t);return r.path="/styles/v1"+r.path,V(r,e)},W=function(t,e){if(!q(t))return t;var r=rt(t);return r.path="/fonts/v1"+r.path,V(r,e)},X=function(t,e){if(!q(t))return t;var r=rt(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),V(r,e)},Z=function(t,e,r,n){var i=rt(t);return q(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,V(i,n)):(i.path+=""+e+r,nt(i))},J=/(\.(png|jpg)\d*)(?=$)/,K=function(t,e,r,n){if(!e||!q(e))return t;var i=rt(t),a=z.devicePixelRatio>=2||512===r?"@2x":"",o=D.supported?".webp":"$1";return i.path=i.path.replace(J,""+a+o),i.path="/v4"+i.path,I.REQUIRE_ACCESS_TOKEN&&I.ACCESS_TOKEN&&n&&i.params.push("sku="+n),V(i)},$=/\.[\w]+$/,Q=function(t){var e=rt(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match($))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var n=e.params.filter(function(t){return!t.match(/^access_token=/)});return n.length&&(r+="?"+n.join("&")),r},tt=function(t,e){if(!q(e))return t.tiles||[];for(var r=[],n=0,i=t.tiles;n=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},at.prototype.processRequests=function(){},at.prototype.postEvent=function(t,e,r){var n=this;if(I.EVENTS_URL){var i=rt(I.EVENTS_URL);i.params.push("access_token="+(I.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.1.1",skuId:N,userId:this.anonId},o=e?h(a,e):a,s={url:nt(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([o])};this.pendingRequest=St(s,function(t){n.pendingRequest=null,r(t),n.saveEventData(),n.processRequests()})}},at.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()};var ot,st=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){this.skuToken=r,I.EVENTS_URL&&I.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return q(t)||G(t)})&&this.queueRequest({id:e,timestamp:Date.now()})},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var e=this.queue.shift(),r=e.id,n=e.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=d()),this.postEvent(n,{skuToken:this.skuToken},function(e){e||r&&(t.success[r]=!0)}))}},e}(at),lt=new(function(t){function e(){t.call(this,"appUserTurnstile")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t){I.EVENTS_URL&&I.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return q(t)||G(t)})&&this.queueRequest(Date.now())},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var e=it(I.ACCESS_TOKEN),r=e?e.u:I.ACCESS_TOKEN,n=r!==this.eventData.tokenU;g(this.anonId)||(this.anonId=d(),n=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),o=new Date(i),s=(i-this.eventData.lastSuccess)/864e5;n=n||s>=1||s<-1||a.getDate()!==o.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},function(e){e||(t.eventData.lastSuccess=i,t.eventData.tokenU=r)})}},e}(at)),ct=lt.postTurnstileEvent.bind(lt),ut=new st,ht=ut.postMapLoadEvent.bind(ut),ft="mapbox-tiles",pt=500,dt=50,gt=42e4;function vt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var mt=1/0,yt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(yt);var xt=function(t){function e(e,r,n){401===r&&G(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);function bt(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var _t=bt()?function(){return self.worker&&self.worker.referrer}:function(){var t=self.location.origin;if(t&&"null"!==t&&"file://"!==t)return t+self.location.pathname};function wt(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:_t(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf("sku=")>0&&G(r);"json"===t.type&&i.headers.set("Accept","application/json");var l=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&w(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 xt(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&&function(t,e,r){if(self.caches){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")||"");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()-rDate.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})})}(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var kt,Tt,At=function(t,e){if(!/^file:/.test(t.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return wt(t,e);if(bt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}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.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 xt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},Mt=function(t,e){return At(h(t,{type:"arrayBuffer"}),e)},St=function(t,e){return At(h(t,{method:"POST"}),e)};kt=[],Tt=0;var Et=function(t,e){if(Tt>=I.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return kt.push(r),r}Tt++;var n=!1,i=function(){if(!n)for(n=!0,Tt--;kt.length&&Tt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},zt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var It={$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"},"*":{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}},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:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{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"},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:"string",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-offset"}],"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-anchor"},{"!":"text-offset"},{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",requires:["text-field"],values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",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-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":{}}},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:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"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"},"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"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"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:"string",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:"string",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:"string",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,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:"string",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"}}},Dt=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Rt(t){var e=t.key,r=t.value;return r?[new Dt(e,r,"constants have been deprecated as of v8")]:[]}function Ft(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 te=[qt,Ht,Gt,Yt,Wt,Kt,Xt,$t(Zt)];function ee(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ee(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=te;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),h=i.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),g=o(h[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),f];default:return null}}return null}}catch(t){}}).parseCSSColor,ne=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};ne.parse=function(t){if(t){if(t instanceof ne)return t;if("string"==typeof t){var e=re(t);if(e)return new ne(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ne.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+")"},ne.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]},ne.black=new ne(0,0,0,1),ne.white=new ne(1,1,1,1),ne.transparent=new ne(0,0,0,0),ne.red=new ne(1,0,0,1);var ie=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"})};ie.prototype.compare=function(t,e){return this.collator.compare(t,e)},ie.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ae=function(t,e,r){this.text=t,this.scale=e,this.fontStack=r},oe=function(t){this.sections=t};function se(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function le(t){if(null===t)return qt;if("string"==typeof t)return Gt;if("boolean"==typeof t)return Yt;if("number"==typeof t)return Ht;if(t instanceof ne)return Wt;if(t instanceof ie)return Jt;if(t instanceof oe)return Kt;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n2){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=Zt;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=$t(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 de=function(t){this.type=Kt,this.sections=t};de.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],n=1;n4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":se(e[0],e[1],e[2],e[3])))return new ne(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new he(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=0)return!1;var r=!0;return t.eachChild(function(t){r&&!ke(t,e)&&(r=!1)}),r}be.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Yt);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Yt);if(!i)return null;var a=null;return r.locale&&!(a=e.parse(r.locale,1,Gt))?null:new be(n,i,a)},be.prototype.evaluate=function(t){return new ie(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},be.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},be.prototype.possibleOutputs=function(){return[void 0]},be.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Te=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Te.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Te(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Te.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Te.prototype.eachChild=function(){},Te.prototype.possibleOutputs=function(){return[void 0]},Te.prototype.serialize=function(){return["var",this.name]};var Ae=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new Vt),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=n,this.errors=i,this.expectedType=r};function Me(t,e){for(var r,n,i=t.length-1,a=0,o=i,s=0;a<=o;)if(r=t[s=Math.floor((a+o)/2)],n=t[s+1],r<=e){if(s===i||ee))throw new he("Input is not a number.");o=s-1}return 0}Ae.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)},Ae.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new pe(e,[t]):"coerce"===r?new ve(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||"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 ue)&&function t(e){if(e instanceof Te)return t(e.boundExpression);if(e instanceof xe&&"error"===e.name)return!1;if(e instanceof be)return!1;var r=e instanceof ve||e instanceof pe,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof ue}),!!n&&(_e(e)&&ke(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]))}(a)){var l=new ye;try{a=new ue(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.")},Ae.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 Ae(this.registry,n,e||null,i,this.errors)},Ae.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 Ut(n,t))},Ae.prototype.checkSubtype=function(t,e){var r=ee(t,e);return r&&this.error(r),r};var Se=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 Se(i,r,n)},Se.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[Me(e,n)].evaluate(t)},Se.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 Ce=Object.freeze({number:Ee,color:function(t,e,r){return new ne(Ee(t.r,e.r,r),Ee(t.g,e.g,r),Ee(t.b,e.b,r),Ee(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return Ee(t,e[n],r)})}}),Le=.95047,Pe=1,Oe=1.08883,ze=4/29,Ie=6/29,De=3*Ie*Ie,Re=Ie*Ie*Ie,Fe=Math.PI/180,Be=180/Math.PI;function Ne(t){return t>Re?Math.pow(t,1/3):t/De+ze}function je(t){return t>Ie?t*t*t:De*(t-ze)}function Ue(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ve(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qe(t){var e=Ve(t.r),r=Ve(t.g),n=Ve(t.b),i=Ne((.4124564*e+.3575761*r+.1804375*n)/Le),a=Ne((.2126729*e+.7151522*r+.072175*n)/Pe);return{l:116*a-16,a:500*(i-a),b:200*(a-Ne((.0193339*e+.119192*r+.9503041*n)/Oe)),alpha:t.a}}function He(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=Pe*je(e),r=Le*je(r),n=Oe*je(n),new ne(Ue(3.2404542*r-1.5371385*e-.4985314*n),Ue(-.969266*r+1.8760108*e+.041556*n),Ue(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var Ge={forward:qe,reverse:He,interpolate:function(t,e,r){return{l:Ee(t.l,e.l,r),a:Ee(t.a,e.a,r),b:Ee(t.b,e.b,r),alpha:Ee(t.alpha,e.alpha,r)}}},Ye={forward:function(t){var e=qe(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Be;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*Fe,r=t.c;return He({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:Ee(t.c,e.c,r),l:Ee(t.l,e.l,r),alpha:Ee(t.alpha,e.alpha,r)}}},We=Object.freeze({lab:Ge,hcl:Ye}),Xe=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,Ht)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Wt:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(f,d,c);if(!g)return null;c=c||g.type,l.push([h,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new Xe(c,r,n,i,l):e.error("Type "+Qt(c)+" is not interpolatable.")},Xe.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=Me(e,n),o=e[a],s=e[a+1],l=Xe.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return"interpolate"===this.operator?Ce[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?Ye.reverse(Ye.interpolate(Ye.forward(c),Ye.forward(u),l)):Ge.reverse(Ge.interpolate(Ge.forward(c),Ge.forward(u),l))},Xe.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new he("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new he("Array index must be an integer, but found "+e+" instead.");return r[e]},$e.prototype.eachChild=function(t){t(this.index),t(this.input)},$e.prototype.possibleOutputs=function(){return[void 0]},$e.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Qe=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};Qe.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 f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,le(f)))return null}else r=le(f);if(void 0!==i[String(f)])return c.error("Branch labels must be unique.");i[String(f)]=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,Zt);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 Qe(r,n,d,i,a,g):null},Qe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(le(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Qe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Qe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Qe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i",function(t,e,r){return e>r},function(t,e,r,n){return n.compare(e,r)>0}),lr=nr("<=",function(t,e,r){return e<=r},function(t,e,r,n){return n.compare(e,r)<=0}),cr=nr(">=",function(t,e,r){return e>=r},function(t,e,r,n){return n.compare(e,r)>=0}),ur=function(t,e,r,n,i){this.type=Gt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};ur.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Ht);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,Gt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Gt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,Ht)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Ht))?null:new ur(r,i,a,o,s)},ur.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))},ur.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)},ur.prototype.possibleOutputs=function(){return[void 0]},ur.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 hr=function(t){this.type=Ht,this.input=t};hr.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 "+Qt(r.type)+" instead."):new hr(r):null},hr.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 he("Expected value to be of type string or array, but found "+Qt(le(e))+" instead.")},hr.prototype.eachChild=function(t){t(this.input)},hr.prototype.possibleOutputs=function(){return[void 0]},hr.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var fr={"==":ir,"!=":ar,">":sr,"<":or,">=":cr,"<=":lr,array:pe,at:$e,boolean:pe,case:tr,coalesce:Je,collator:be,format:de,interpolate:Xe,"interpolate-hcl":Xe,"interpolate-lab":Xe,length:hr,let:Ke,literal:ue,match:Qe,number:pe,"number-format":ur,object:pe,step:Se,string:pe,"to-boolean":ve,"to-color":ve,"to-number":ve,"to-string":ve,var:Te};function pr(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=se(r,n,i,o);if(s)throw new he(s);return new ne(r/255*o,n/255*o,i/255*o,o)}function dr(t,e){return t in e}function gr(t,e){var r=e[t];return void 0===r?null:r}function vr(t){return{type:t}}function mr(t){return{result:"success",value:t}}function yr(t){return{result:"error",value:t}}function xr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function br(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function _r(t){return!!t.expression&&t.expression.interpolated}function wr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function kr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Tr(t){return t}function Ar(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Mr(t,e,r,n,i){return Ar(typeof r===i?n[r]:void 0,t.default,e.default)}function Sr(t,e,r){if("number"!==wr(r))return Ar(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=Me(t.stops.map(function(t){return t[0]}),r);return t.stops[i][1]}function Er(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==wr(r))return Ar(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=Me(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=Ce[e.type]||Tr;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=We[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 Cr(t,e,r){return"color"===e.type?r=ne.parse(r):"formatted"===e.type?r=oe.fromString(r.toString()):wr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Ar(r,t.default,e.default)}xe.register(fr,{error:[{kind:"error"},[Gt],function(t,e){var r=e[0];throw new he(r.evaluate(t))}],typeof:[Gt,[Zt],function(t,e){return Qt(le(e[0].evaluate(t)))}],"to-rgba":[$t(Ht,4),[Wt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Wt,[Ht,Ht,Ht],pr],rgba:[Wt,[Ht,Ht,Ht,Ht],pr],has:{type:Yt,overloads:[[[Gt],function(t,e){return dr(e[0].evaluate(t),t.properties())}],[[Gt,Xt],function(t,e){var r=e[0],n=e[1];return dr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Zt,overloads:[[[Gt],function(t,e){return gr(e[0].evaluate(t),t.properties())}],[[Gt,Xt],function(t,e){var r=e[0],n=e[1];return gr(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Zt,[Gt],function(t,e){return gr(e[0].evaluate(t),t.featureState||{})}],properties:[Xt,[],function(t){return t.properties()}],"geometry-type":[Gt,[],function(t){return t.geometryType()}],id:[Zt,[],function(t){return t.id()}],zoom:[Ht,[],function(t){return t.globals.zoom}],"heatmap-density":[Ht,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Ht,[],function(t){return t.globals.lineProgress||0}],accumulated:[Zt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Ht,vr(Ht),function(t,e){for(var r=0,n=0,i=e;n":[Yt,[Gt,Zt],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->":[Yt,[Zt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[Yt,[Gt,Zt],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-<=":[Yt,[Zt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[Yt,[Gt,Zt],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->=":[Yt,[Zt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[Yt,[Zt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Yt,[],function(t){return null!==t.id()}],"filter-type-in":[Yt,[$t(Gt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Yt,[$t(Zt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Yt,[Gt,$t(Zt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Yt,[Gt,$t(Zt)],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:Yt,overloads:[[[Yt,Yt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[vr(Yt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in fr}function Or(t,e){var r=new Ae(fr,[],e?function(t){var e={color:Wt,string:Gt,number:Ht,enum:Gt,boolean:Yt,formatted:Kt};return"array"===t.type?$t(e[t.value]||Zt,t.length):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?mr(new Lr(n,e)):yr(r.errors)}Lr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this.expression.evaluate(this._evaluator)},Lr.prototype.evaluate=function(t,e,r){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new he("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(n)+" instead.");return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var zr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!we(e.expression)};zr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},zr.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)};var Ir=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!we(e.expression),r instanceof Xe&&(this.interpolationType=r.interpolation)};function Dr(t,e){if("error"===(t=Or(t,e)).result)return t;var r=t.value.expression,n=_e(r);if(!n&&!xr(e))return yr([new Ut("","data expressions not supported")]);var i=ke(r,["zoom"]);if(!i&&!br(e))return yr([new Ut("","zoom expressions not supported")]);var a=function t(e){var r=null;if(e instanceof Ke)r=t(e.result);else if(e instanceof Je)for(var n=0,i=e.args;nn.maximum?[new Dt(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function jr(t){var e,r,n,i=t.valueSpec,a=Nt(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l=!s,c="array"===wr(t.value.stops)&&"array"===wr(t.value.stops[0])&&"object"===wr(t.value.stops[0][0]),u=Fr({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 Dt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Br({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===wr(r)&&0===r.length&&e.push(new Dt(t.key,r,"array must have at least one stop")),e},default:function(t){return ln({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&u.push(new Dt(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||u.push(new Dt(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!_r(t.valueSpec)&&u.push(new Dt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!xr(t.valueSpec)?u.push(new Dt(t.key,t.value,"property functions not supported")):s&&!br(t.valueSpec)&&u.push(new Dt(t.key,t.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==t.value.property||u.push(new Dt(t.key,t.value,'"property" property is required')),u;function h(t){var e=[],a=t.value,s=t.key;if("array"!==wr(a))return[new Dt(s,a,"array expected, "+wr(a)+" found")];if(2!==a.length)return[new Dt(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==wr(a[0]))return[new Dt(s,a,"object expected, "+wr(a[0])+" found")];if(void 0===a[0].zoom)return[new Dt(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Dt(s,a,"object stop key must have value")];if(n&&n>Nt(a[0].zoom))return[new Dt(s,a[0].zoom,"stop zoom values must appear in ascending order")];Nt(a[0].zoom)!==n&&(n=Nt(a[0].zoom),r=void 0,o={}),e=e.concat(Fr({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Nr,value:f}}))}else e=e.concat(f({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Pr(jt(a[1]))?e.concat([new Dt(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(ln({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function f(t,n){var s=wr(t.value),l=Nt(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Dt(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 Dt(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 xr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Dt(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":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 Wr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Xr(t[1],t[2],"=="):"!="===r?Kr(Xr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Xr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Wr))):"all"===r?["all"].concat(t.slice(1).map(Wr)):"none"===r?["all"].concat(t.slice(1).map(Wr).map(Kr)):"in"===r?Zr(t[1],t.slice(2)):"!in"===r?Kr(Zr(t[1],t.slice(2))):"has"===r?Jr(t[1]):"!has"!==r||Kr(Jr(t[1]))}function Xr(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 Zr(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(Yr)]]:["filter-in-small",t,["literal",e]]}}function Jr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Kr(t){return["!",t]}function $r(t){return qr(jt(t.value))?Ur(Ft({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==wr(r))return[new Dt(n,r,"array expected, "+wr(r)+" found")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Dt(n,r,"filter array must have at least 1 element")];switch(o=o.concat(Vr({key:n+"[0]",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Nt(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Nt(r[1])&&o.push(new Dt(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new Dt(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=wr(r[1]))&&o.push(new Dt(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[f]=!0,a.push(c[f])):o[f]=!1}}},bn.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),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=h;p++){var d=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},bn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},bn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},bn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=xn+this.cells.length+1+1,r=0,n=0;n=0)){var h=t[u];c[u]=wn[l].shallow.indexOf(u)>=0?h:An(h,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 Mn(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof _n)return t;if(Array.isArray(t))return t.map(Mn);if("object"==typeof t){var e=t.$name||"Object",r=wn[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:Mn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var Sn=function(){this.first=!0};Sn.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 Cn(t){for(var e=0,r=t;e=65097&&t<=65103)||En["CJK Compatibility Ideographs"](t)||En["CJK Compatibility"](t)||En["CJK Radicals Supplement"](t)||En["CJK Strokes"](t)||!(!En["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||En["CJK Unified Ideographs Extension A"](t)||En["CJK Unified Ideographs"](t)||En["Enclosed CJK Letters and Months"](t)||En["Hangul Compatibility Jamo"](t)||En["Hangul Jamo Extended-A"](t)||En["Hangul Jamo Extended-B"](t)||En["Hangul Jamo"](t)||En["Hangul Syllables"](t)||En.Hiragana(t)||En["Ideographic Description Characters"](t)||En.Kanbun(t)||En["Kangxi Radicals"](t)||En["Katakana Phonetic Extensions"](t)||En.Katakana(t)&&12540!==t||!(!En["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)||!(!En["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||En["Unified Canadian Aboriginal Syllabics"](t)||En["Unified Canadian Aboriginal Syllabics Extended"](t)||En["Vertical Forms"](t)||En["Yijing Hexagram Symbols"](t)||En["Yi Syllables"](t)||En["Yi Radicals"](t)))}function zn(t){return!(On(t)||function(t){return!!(En["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||En["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)||En["Letterlike Symbols"](t)||En["Number Forms"](t)||En["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)||En["Control Pictures"](t)&&9251!==t||En["Optical Character Recognition"](t)||En["Enclosed Alphanumerics"](t)||En["Geometric Shapes"](t)||En["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||En["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||En["CJK Symbols and Punctuation"](t)||En.Katakana(t)||En["Private Use Area"](t)||En["CJK Compatibility Forms"](t)||En["Small Form Variants"](t)||En["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 In(t,e){return!(!e&&(t>=1424&&t<=2303||En["Arabic Presentation Forms-A"](t)||En["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||En.Khmer(t))}var Dn,Rn=!1,Fn=null,Bn=!1,Nn=new zt,jn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Bn||null!=jn.applyArabicShaping}},Un=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 Sn,this.transition={})};Un.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 Vn=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(kr(t))return new Rr(t,e);if(Pr(t)){var r=Dr(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=ne.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Vn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Vn.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var qn=function(t){this.property=t,this.value=new Vn(t,void 0)};qn.prototype.transitioned=function(t,e){return new Gn(this.property,this.value,e,h({},t.transition,this.transition),t.now)},qn.prototype.untransitioned=function(){return new Gn(this.property,this.value,null,{},0)};var Hn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Hn.prototype.getValue=function(t){return b(this._values[t].value.value)},Hn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new qn(this._values[t].property)),this._values[t].value=new Vn(this._values[t].property,null===e?void 0:b(e))},Hn.prototype.getTransition=function(t){return b(this._values[t].transition)},Hn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new qn(this._values[t].property)),this._values[t].transition=b(e)||void 0},Hn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e=1)return 1;var e=i*i,r=e*i;return 4*(i<.5?r:3*(i-e)+r-.75)}())}return r};var Yn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Yn.prototype.possiblyEvaluate=function(t){for(var e=new Zn(this._properties),r=0,n=Object.keys(this._values);rn.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Kn),Qn=function(t){this.specification=t};Qn.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Un(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Un(Math.floor(e.zoom),e)),t.expression.evaluate(new Un(Math.floor(e.zoom+1),e)),e)}},Qn.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Qn.prototype.interpolate=function(t){return t};var ti=function(t){this.specification=t};ti.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},ti.prototype.interpolate=function(){return!1};var ei=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new Vn(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new qn(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};kn("DataDrivenProperty",Kn),kn("DataConstantProperty",Jn),kn("CrossFadedDataDrivenProperty",$n),kn("CrossFadedProperty",Qn),kn("ColorRampProperty",ti);var ri=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter=function(){return!0},"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 Wn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Hn(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.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(vn,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(gn,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();return this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t),this._transitionablePaint._values[t].value.isDataDriven()||o||a},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},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){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(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)&&mn(this,t.call(pn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:It,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 Xn&&xr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(zt),ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ii=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},ai=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function oi(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i,a=(i=t.type,ni[i].BYTES_PER_ELEMENT),o=r=si(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:si(r,Math.max(n,e)),alignment:e}}function si(t,e){return Math.ceil(t/e)*e}ai.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},ai.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},ai.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ai.prototype.clear=function(){this.length=0},ai.prototype.resize=function(t){this.reserve(t),this.length=t},ai.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)}},ai.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var li=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}(ai);li.prototype.bytesPerElement=4,kn("StructArrayLayout2i4",li);var ci=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}(ai);ci.prototype.bytesPerElement=8,kn("StructArrayLayout4i8",ci);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.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}(ai);ui.prototype.bytesPerElement=12,kn("StructArrayLayout2i4i12",ui);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=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}(ai);hi.prototype.bytesPerElement=8,kn("StructArrayLayout2i4ub8",hi);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.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,a,o,s)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l){var c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=n,this.uint16[c+3]=i,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(ai);fi.prototype.bytesPerElement=16,kn("StructArrayLayout8ui16",fi);var pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,a,o,s)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l){var c=8*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(ai);pi.prototype.bytesPerElement=16,kn("StructArrayLayout4i4ui16",pi);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.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}(ai);di.prototype.bytesPerElement=12,kn("StructArrayLayout3f12",di);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.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}(ai);gi.prototype.bytesPerElement=4,kn("StructArrayLayout1ul4",gi);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,c,u){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,h){var f=12*t,p=6*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=i,this.int16[f+4]=a,this.int16[f+5]=o,this.uint32[p+3]=s,this.uint16[f+8]=l,this.uint16[f+9]=c,this.int16[f+10]=u,this.int16[f+11]=h,t},e}(ai);vi.prototype.bytesPerElement=24,kn("StructArrayLayout6i1ul2ui2i24",vi);var 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.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}(ai);mi.prototype.bytesPerElement=12,kn("StructArrayLayout2i2i2i12",mi);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.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}(ai);yi.prototype.bytesPerElement=12,kn("StructArrayLayout2ub2f12",yi);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,h,f,p,d){var g=this.length;return this.resize(g+1),this.emplace(g,t,e,r,n,i,a,o,s,l,c,u,h,f,p,d)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g){var v=22*t,m=11*t,y=44*t;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[m+2]=a,this.uint32[m+3]=o,this.uint32[m+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[m+7]=h,this.float32[m+8]=f,this.uint8[y+36]=p,this.uint8[y+37]=d,this.uint32[m+10]=g,t},e}(ai);xi.prototype.bytesPerElement=44,kn("StructArrayLayout2i2ui3ul3ui2f2ub1ul44",xi);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.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,h,f,p,d,g,v,m){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,m,y){var x=22*t,b=11*t;return this.int16[x+0]=e,this.int16[x+1]=r,this.int16[x+2]=n,this.int16[x+3]=i,this.int16[x+4]=a,this.int16[x+5]=o,this.uint16[x+6]=s,this.uint16[x+7]=l,this.uint16[x+8]=c,this.uint16[x+9]=u,this.uint16[x+10]=h,this.uint16[x+11]=f,this.uint16[x+12]=p,this.uint16[x+13]=d,this.uint16[x+14]=g,this.uint32[b+8]=v,this.float32[b+9]=m,this.float32[b+10]=y,t},e}(ai);bi.prototype.bytesPerElement=44,kn("StructArrayLayout6i9ui1ul2f44",bi);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.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}(ai);_i.prototype.bytesPerElement=4,kn("StructArrayLayout1f4",_i);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)},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}(ai);wi.prototype.bytesPerElement=6,kn("StructArrayLayout3i6",wi);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}(ai);ki.prototype.bytesPerElement=8,kn("StructArrayLayout1ul2ui8",ki);var Ti=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}(ai);Ti.prototype.bytesPerElement=6,kn("StructArrayLayout3ui6",Ti);var Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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}(ai);Ai.prototype.bytesPerElement=4,kn("StructArrayLayout2ui4",Ai);var 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.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}(ai);Mi.prototype.bytesPerElement=2,kn("StructArrayLayout1ui2",Mi);var Si=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}(ai);Si.prototype.bytesPerElement=8,kn("StructArrayLayout2f8",Si);var Ei=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}(ai);Ei.prototype.bytesPerElement=16,kn("StructArrayLayout4f16",Ei);var Ci=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(ii);Ci.prototype.size=24;var Li=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 Ci(this,t)},e}(vi);kn("CollisionBoxArray",Li);var Pi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},Object.defineProperties(e.prototype,r),e}(ii);Pi.prototype.size=44;var Oi=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 Pi(this,t)},e}(xi);kn("PlacedSymbolArray",Oi);var zi=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},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+4]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+5]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+12]},r.numHorizontalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+13]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+13]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+14]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+8]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+8]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+9]},r.textBoxScale.set=function(t){this._structArray.float32[this._pos4+9]=t},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+10]},r.radialTextOffset.set=function(t){this._structArray.float32[this._pos4+10]=t},Object.defineProperties(e.prototype,r),e}(ii);zi.prototype.size=44;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.get=function(t){return new zi(this,t)},e}(bi);kn("SymbolInstanceArray",Ii);var Di=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(ii);Di.prototype.size=4;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.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new Di(this,t)},e}(_i);kn("GlyphOffsetArray",Ri);var Fi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(ii);Fi.prototype.size=6;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.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new Fi(this,t)},e}(wi);kn("SymbolLineVertexArray",Bi);var Ni=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(ii);Ni.prototype.size=8;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.get=function(t){return new Ni(this,t)},e}(ki);kn("FeatureIndexArray",ji);var Ui=oi([{name:"a_pos",components:2,type:"Int16"}],4).members,Vi=function(t){void 0===t&&(t=[]),this.segments=t};function qi(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}Vi.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>Vi.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Vi.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>Vi.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},Vi.prototype.get=function(){return this.segments},Vi.prototype.destroy=function(){for(var t=0,e=this.segments;t>1;this.ids[n]>=t?r=n:e=n+1}for(var i=[];this.ids[e]===t;){var a=this.positions[3*e],o=this.positions[3*e+1],s=this.positions[3*e+2];i.push({index:a,start:o,end:s}),e++}return i},Hi.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){if(!(n>=i)){for(var a=e[n+i>>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;Gi(e,o,s),Gi(r,3*o,3*s),Gi(r,3*o+1,3*s+1),Gi(r,3*o+2,3*s+2)}t(e,r,n,s),t(e,r,s+1,i)}}(r,n,0,r.length-1),e.push(r.buffer,n.buffer),{ids:r,positions:n}},Hi.deserialize=function(t){var e=new Hi;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},kn("FeaturePositionMap",Hi);var Yi=function(t,e){this.gl=t.gl,this.location=e},Wi=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Yi),Xi=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Yi),Zi=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Yi),Ji=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Yi),Ki=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Yi),$i=function(t){function e(e,r){t.call(this,e,r),this.current=ne.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Yi),Qi=new Float32Array(16),ta=function(t){function e(e,r){t.call(this,e,r),this.current=Qi}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Yi);function ea(t){return[qi(255*t.r,255*t.g),qi(255*t.b,255*t.a)]}var ra=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0};ra.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},ra.prototype.setConstantPatternPositions=function(){},ra.prototype.populatePaintArray=function(){},ra.prototype.updatePaintArray=function(){},ra.prototype.upload=function(){},ra.prototype.destroy=function(){},ra.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},ra.prototype.getBinding=function(t,e){return"color"===this.type?new $i(t,e):new Xi(t,e)},ra.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:An(e),names:r,type:n}},ra.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new ra(Mn(e),r,n)};var na=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};na.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},na.prototype.populatePaintArray=function(){},na.prototype.updatePaintArray=function(){},na.prototype.upload=function(){},na.prototype.destroy=function(){},na.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},na.prototype.setUniforms=function(t,e,r,n,i){var a=this.patternPositions;"u_pattern_to"===i&&a.patternTo&&e.set(a.patternTo),"u_pattern_from"===i&&a.patternFrom&&e.set(a.patternFrom)},na.prototype.getBinding=function(t,e){return new Ki(t,e)};var ia=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new n};ia.prototype.defines=function(){return[]},ia.prototype.setConstantPatternPositions=function(){},ia.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Un(0),e,{});if("color"===this.type)for(var a=ea(i),o=n;ofa.max||o.yfa.max)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function da(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var ga=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 li,this.indexArray=new Ti,this.segments=new Vi,this.programConfigurations=new la(Ui,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function va(t,e){for(var r=0;r1){if(ba(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Ta(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 Aa(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 Ma(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=k(t,e,r[0]);return a!==k(t,e,r[1])||a!==k(t,e,r[2])||a!==k(t,e,r[3])}function Sa(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].maxValue}function Ea(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ca(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=ha||c<0||c>=ha)){var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=u.vertexLength;da(this.layoutVertexArray,l,c,-1,-1),da(this.layoutVertexArray,l,c,1,-1),da(this.layoutVertexArray,l,c,1,1),da(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),u.vertexLength+=4,u.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},kn("CircleBucket",ga,{omit:["layers"]});var La={paint:new ei({"circle-radius":new Kn(It.paint_circle["circle-radius"]),"circle-color":new Kn(It.paint_circle["circle-color"]),"circle-blur":new Kn(It.paint_circle["circle-blur"]),"circle-opacity":new Kn(It.paint_circle["circle-opacity"]),"circle-translate":new Jn(It.paint_circle["circle-translate"]),"circle-translate-anchor":new Jn(It.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Jn(It.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Jn(It.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Kn(It.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Kn(It.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Kn(It.paint_circle["circle-stroke-opacity"])})},Pa="undefined"!=typeof Float32Array?Float32Array:Array;function Oa(){var t=new Pa(9);return Pa!=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}function za(){var t=new Pa(3);return Pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ia(t,e,r){var n=new Pa(3);return n[0]=t,n[1]=e,n[2]=r,n}Math.PI;function Da(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 Ra(){var t=new Pa(4);return Pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}za(),function(){var t;t=new Pa(4),Pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();za(),Ia(1,0,0),Ia(0,1,0),Ra(),Ra(),Oa(),function(){var t;t=new Pa(2),Pa!=Float32Array&&(t[0]=0,t[1]=0)}();var Fa=function(t){function e(e){t.call(this,e,La)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ga(t)},e.prototype.queryRadius=function(t){var e=t;return Sa("circle-radius",this,e)+Sa("circle-stroke-width",this,e)+Ea(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=Ca(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"),h=u?l:function(t,e){return l.map(function(t){return Ba(t,e)})}(0,s),f=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 ro(f,p,r,n,i,c),p}function to(t,e,r,n,i){var a,o;if(i===wo(t,e,r,n)>0)for(a=e;a=e;a-=n)o=xo(a,t[a],t[a+1],o);return o&&go(o,o.next)&&(bo(o),o=o.next),o}function eo(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!go(n,n.next)&&0!==po(n.prev,n,n.next))n=n.next;else{if(bo(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function ro(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=co(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?io(t,n,i,a):no(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),bo(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?ro(t=ao(t,e,r),e,r,n,i,a,2):2===o&&oo(t,e,r,n,i,a):ro(eo(t),e,r,n,i,a,1);break}}}function no(t){var e=t.prev,r=t,n=t.next;if(po(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(ho(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&po(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function io(t,e,r,n){var i=t.prev,a=t,o=t.next;if(po(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,h=co(s,l,e,r,n),f=co(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&po(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&po(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&po(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&po(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function ao(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!go(i,a)&&vo(i,n,n.next,a)&&mo(i,a)&&mo(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),bo(n),bo(n.next),n=t=a),n=n.next}while(n!==t);return n}function oo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&fo(o,s)){var l=yo(o,s);return o=eo(o,o.next),l=eo(l,l.next),ro(o,e,r,n,i,a),void ro(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function so(t,e){return t.x-e.x}function lo(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&&ho(ar.x)&&mo(n,t)&&(r=n,f=l),n=n.next;return r}(t,e)){var r=yo(e,t);eo(r,r.next)}}function co(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 uo(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 fo(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&&vo(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&mo(t,e)&&mo(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function po(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function go(t,e){return t.x===e.x&&t.y===e.y}function vo(t,e,r,n){return!!(go(t,e)&&go(r,n)||go(t,n)&&go(r,e))||po(t,e,r)>0!=po(t,e,n)>0&&po(r,n,t)>0!=po(r,n,e)>0}function mo(t,e){return po(t.prev,t,t.next)<0?po(t,e,t.next)>=0&&po(t,t.prev,e)>=0:po(t,e,t.prev)<0||po(t,t.next,e)<0}function yo(t,e){var r=new _o(t.i,t.x,t.y),n=new _o(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 xo(t,e,r,n){var i=new _o(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 bo(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 _o(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 wo(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);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var h=e[r],f=n,p=i;for(To(e,n,r),a(e[i],h)>0&&To(e,n,i);f0;)p--}0===a(e[n],h)?To(e,n,p):To(e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}(t,e,r||0,n||t.length-1,i||Ao)}function To(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Ao(t,e){return te?1:0}function Mo(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},Ka.default=$a;var Lo=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 li,this.indexArray=new Ti,this.indexArray2=new Ai,this.programConfigurations=new la(Ja,t.layers,t.zoom),this.segments=new Vi,this.segments2=new Vi,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};Lo.prototype.populate=function(t,e){this.features=[],this.hasPattern=Eo("fill",this.layers,e);for(var r=0,n=t;r>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},Do.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]},Do.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=Do.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 Uo(t,e,r){if(3===t){var n=new Bo(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}No.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 Io(this._pbf,e,this.extent,this._keys,this._values)};var Vo={VectorTile:function(t,e){this.layers=t.readFields(Uo,{},e)},VectorTileFeature:Io,VectorTileLayer:Bo},qo=Vo.VectorTileFeature.types,Ho=Math.pow(2,13);function Go(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ho)+o,i*Ho*2,a*Ho*2,Math.round(s))}var Yo=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 ui,this.indexArray=new Ti,this.programConfigurations=new la(zo,t.layers,t.zoom),this.segments=new Vi,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Wo(t,e){return t.x===e.x&&(t.x<0||t.x>ha)||t.y===e.y&&(t.y<0||t.y>ha)}function Xo(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>ha})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>ha})}Yo.prototype.populate=function(t,e){this.features=[],this.hasPattern=Eo("fill-extrusion",this.layers,e);for(var r=0,n=t;r=1){var m=p[g-1];if(!Wo(v,m)){u.vertexLength+4>Vi.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=v.sub(m)._perp()._unit(),x=m.dist(v);d+x>32768&&(d=0),Go(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,0,d),Go(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,1,d),d+=x,Go(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,d),Go(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,d);var b=u.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),u.vertexLength+=4,u.primitiveLength+=2}}}}if(u.vertexLength+s>Vi.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===qo[t.type]){for(var _=[],w=[],k=u.vertexLength,T=0,A=o;T>6)}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.features=[],this.hasPattern=!1,this.layoutVertexArray=new hi,this.indexArray=new Ti,this.programConfigurations=new la(Qo,t.layers,t.zoom),this.segments=new Vi,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function ss(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(is-1)}os.prototype.populate=function(t,e){this.features=[],this.hasPattern=Eo("line",this.layers,e);for(var r=0,n=t;r=2&&t[u-1].equals(t[u-2]);)u--;for(var h=0;hh){var L=g.dist(_);if(L>2*f){var P=g.sub(g.sub(_)._mult(f/L)._round());this.distance+=P.dist(_),this.addCurrentVertex(P,this.distance,k.mult(1),0,0,!1,d,l),_=P}}var O=_&&w,z=O?r:w?y:x;if(O&&"round"===z&&(Ei&&(z="bevel"),"bevel"===z&&(E>2&&(z="flipbevel"),E100)M=T.clone().mult(-1);else{var I=k.x*T.y-k.y*T.x>0?-1:1,D=E*k.add(T).mag()/k.sub(T).mag();M._perp()._mult(D*I)}this.addCurrentVertex(g,this.distance,M,0,0,!1,d,l),this.addCurrentVertex(g,this.distance,M.mult(-1),0,0,!1,d,l)}else if("bevel"===z||"fakeround"===z){var R=k.x*T.y-k.y*T.x>0,F=-Math.sqrt(E*E-1);if(R?(m=0,v=F):(v=0,m=F),b||this.addCurrentVertex(g,this.distance,k,v,m,!1,d,l),"fakeround"===z){for(var B=Math.floor(8*(.5-(S-.5))),N=void 0,j=0;j=0;U--)N=k.mult((U+1)/(B+1))._add(T)._unit(),this.addPieSliceVertex(g,this.distance,N,R,d,l)}w&&this.addCurrentVertex(g,this.distance,T,-v,-m,!1,d,l)}else"butt"===z?(b||this.addCurrentVertex(g,this.distance,k,0,0,!1,d,l),w&&this.addCurrentVertex(g,this.distance,T,0,0,!1,d,l)):"square"===z?(b||(this.addCurrentVertex(g,this.distance,k,1,1,!1,d,l),this.e1=this.e2=-1),w&&this.addCurrentVertex(g,this.distance,T,-1,-1,!1,d,l)):"round"===z&&(b||(this.addCurrentVertex(g,this.distance,k,0,0,!1,d,l),this.addCurrentVertex(g,this.distance,k,1,1,!0,d,l),this.e1=this.e2=-1),w&&(this.addCurrentVertex(g,this.distance,T,-1,-1,!0,d,l),this.addCurrentVertex(g,this.distance,T,0,0,!1,d,l)));if(C&&A2*f){var q=g.add(w.sub(g)._mult(f/V)._round());this.distance+=q.dist(g),this.addCurrentVertex(q,this.distance,T.mult(1),0,0,!1,d,l),g=q}}b=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,s)}},os.prototype.addCurrentVertex=function(t,e,r,n,i,a,o,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&&(e=ss(e,s)),l=r.clone(),n&&l._sub(r.perp()._mult(n)),as(c,t,l,a,!1,n,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&&l._sub(r.perp()._mult(i)),as(c,t,l,a,!0,-i,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>is/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a,o))},os.prototype.addPieSliceVertex=function(t,e,r,n,i,a){r=r.mult(n?-1:1);var o=this.layoutVertexArray,s=this.indexArray;a&&(e=ss(e,a)),as(o,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},kn("LineBucket",os,{omit:["layers","features"]});var ls=new ei({"line-cap":new Jn(It.layout_line["line-cap"]),"line-join":new Kn(It.layout_line["line-join"]),"line-miter-limit":new Jn(It.layout_line["line-miter-limit"]),"line-round-limit":new Jn(It.layout_line["line-round-limit"])}),cs={paint:new ei({"line-opacity":new Kn(It.paint_line["line-opacity"]),"line-color":new Kn(It.paint_line["line-color"]),"line-translate":new Jn(It.paint_line["line-translate"]),"line-translate-anchor":new Jn(It.paint_line["line-translate-anchor"]),"line-width":new Kn(It.paint_line["line-width"]),"line-gap-width":new Kn(It.paint_line["line-gap-width"]),"line-offset":new Kn(It.paint_line["line-offset"]),"line-blur":new Kn(It.paint_line["line-blur"]),"line-dasharray":new Qn(It.paint_line["line-dasharray"]),"line-pattern":new $n(It.paint_line["line-pattern"]),"line-gradient":new ti(It.paint_line["line-gradient"])}),layout:ls},us=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 Un(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=h({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Kn))(cs.paint.properties["line-width"].specification);us.useIntegerZoom=!0;var hs=function(t){function e(e){t.call(this,e,cs)}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=Ya(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=us.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new os(t)},e.prototype.queryRadius=function(t){var e=t,r=fs(Sa("line-width",this,e),Sa("line-gap-width",this,e)),n=Sa("line-offset",this,e);return r/2+Math.abs(n)+Ea(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=Ca(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*fs(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 ps=oi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),ds=oi([{name:"a_projected_pos",components:3,type:"Float32"}],4),gs=(oi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),oi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),vs=(oi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),oi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),ms=oi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function ys(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()),jn.applyArabicShaping&&(t=jn.applyArabicShaping(t)),t}(t.text,e,r)}),t}oi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"}]),oi([{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:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),oi([{type:"Float32",name:"offsetX"}]),oi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var xs={"!":"\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"},bs=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(i);kn("Anchor",bs);var _s=256;function ws(t,e){var r=e.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new Un(t+1))};if("source"===r.kind)return{kind:"source"};for(var n=r.zoomStops,i=r.interpolationType,a=0;a0)&&("constant"!==i.value.kind||i.value.value.length>0),l="constant"!==o.value.kind||o.value.value&&o.value.value.length>0,c=n.get("symbol-sort-key");if(this.features=[],s||l){for(var u=e.iconDependencies,h=e.glyphDependencies,f=new Un(this.zoom),p=0,d=t;p=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;this.addCollisionDebugVertices(a,o,s,l,c?this.collisionCircle:this.collisionBox,i.anchorPoint,r,c)}},Os.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t0},Os.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Os.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Os.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Os.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,n=e.vertexStartIndex;n1||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.addIndicesForPlacedTextSymbol(t)}),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(a.verticalPlacedTextSymbolIndex);var o=this.icon.placedSymbolArray.get(i);if(o.numGlyphs){var s=o.vertexStartIndex;this.icon.indexArray.emplaceBack(s,s+1,s+2),this.icon.indexArray.emplaceBack(s+1,s+2,s+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},kn("SymbolBucket",Os,{omit:["layers","collisionBoxArray","features","compareText"]}),Os.MAX_GLYPHS=65535,Os.addDynamicAttributes=Cs;var zs=new ei({"symbol-placement":new Jn(It.layout_symbol["symbol-placement"]),"symbol-spacing":new Jn(It.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Jn(It.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Kn(It.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Jn(It.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Jn(It.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Jn(It.layout_symbol["icon-ignore-placement"]),"icon-optional":new Jn(It.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Jn(It.layout_symbol["icon-rotation-alignment"]),"icon-size":new Kn(It.layout_symbol["icon-size"]),"icon-text-fit":new Jn(It.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Jn(It.layout_symbol["icon-text-fit-padding"]),"icon-image":new Kn(It.layout_symbol["icon-image"]),"icon-rotate":new Kn(It.layout_symbol["icon-rotate"]),"icon-padding":new Jn(It.layout_symbol["icon-padding"]),"icon-keep-upright":new Jn(It.layout_symbol["icon-keep-upright"]),"icon-offset":new Kn(It.layout_symbol["icon-offset"]),"icon-anchor":new Kn(It.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Jn(It.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Jn(It.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Jn(It.layout_symbol["text-rotation-alignment"]),"text-field":new Kn(It.layout_symbol["text-field"]),"text-font":new Kn(It.layout_symbol["text-font"]),"text-size":new Kn(It.layout_symbol["text-size"]),"text-max-width":new Kn(It.layout_symbol["text-max-width"]),"text-line-height":new Jn(It.layout_symbol["text-line-height"]),"text-letter-spacing":new Kn(It.layout_symbol["text-letter-spacing"]),"text-justify":new Kn(It.layout_symbol["text-justify"]),"text-radial-offset":new Kn(It.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Jn(It.layout_symbol["text-variable-anchor"]),"text-anchor":new Kn(It.layout_symbol["text-anchor"]),"text-max-angle":new Jn(It.layout_symbol["text-max-angle"]),"text-rotate":new Kn(It.layout_symbol["text-rotate"]),"text-padding":new Jn(It.layout_symbol["text-padding"]),"text-keep-upright":new Jn(It.layout_symbol["text-keep-upright"]),"text-transform":new Kn(It.layout_symbol["text-transform"]),"text-offset":new Kn(It.layout_symbol["text-offset"]),"text-allow-overlap":new Jn(It.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Jn(It.layout_symbol["text-ignore-placement"]),"text-optional":new Jn(It.layout_symbol["text-optional"])}),Is={paint:new ei({"icon-opacity":new Kn(It.paint_symbol["icon-opacity"]),"icon-color":new Kn(It.paint_symbol["icon-color"]),"icon-halo-color":new Kn(It.paint_symbol["icon-halo-color"]),"icon-halo-width":new Kn(It.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Kn(It.paint_symbol["icon-halo-blur"]),"icon-translate":new Jn(It.paint_symbol["icon-translate"]),"icon-translate-anchor":new Jn(It.paint_symbol["icon-translate-anchor"]),"text-opacity":new Kn(It.paint_symbol["text-opacity"]),"text-color":new Kn(It.paint_symbol["text-color"]),"text-halo-color":new Kn(It.paint_symbol["text-halo-color"]),"text-halo-width":new Kn(It.paint_symbol["text-halo-width"]),"text-halo-blur":new Kn(It.paint_symbol["text-halo-blur"]),"text-translate":new Jn(It.paint_symbol["text-translate"]),"text-translate-anchor":new Jn(It.paint_symbol["text-translate-anchor"])}),layout:zs},Ds=function(t){function e(e){t.call(this,e,Is)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("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"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e,{}),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||Pr(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):""}))},e.prototype.createBucket=function(t){return new Os(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(ri),Rs={paint:new ei({"background-color":new Jn(It.paint_background["background-color"]),"background-pattern":new Qn(It.paint_background["background-pattern"]),"background-opacity":new Jn(It.paint_background["background-opacity"])})},Fs=function(t){function e(e){t.call(this,e,Rs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ri),Bs={paint:new ei({"raster-opacity":new Jn(It.paint_raster["raster-opacity"]),"raster-hue-rotate":new Jn(It.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Jn(It.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Jn(It.paint_raster["raster-brightness-max"]),"raster-saturation":new Jn(It.paint_raster["raster-saturation"]),"raster-contrast":new Jn(It.paint_raster["raster-contrast"]),"raster-resampling":new Jn(It.paint_raster["raster-resampling"]),"raster-fade-duration":new Jn(It.paint_raster["raster-fade-duration"])})},Ns=function(t){function e(e){t.call(this,e,Bs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ri),js=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(ri),Us={circle:Fa,heatmap:Wa,hillshade:Za,fill:Oo,"fill-extrusion":Jo,line:hs,symbol:Ds,background:Fs,raster:Ns};function Vs(t){for(var e=0,r=0,n=0,i=t;n=0;f--){var p=o[f];if(!(h.w>p.w||h.h>p.h)){if(h.x=p.x,h.y=p.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===p.w&&h.h===p.h){var d=o.pop();f>1,u=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,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)},$s=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-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},Qs=tl;function tl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function el(t){return t.type===tl.Bytes?t.readVarint()+t.pos:t.pos+1}function rl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function nl(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 il(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function gl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}tl.Varint=0,tl.Fixed64=1,tl.Bytes=2,tl.Fixed32=5,tl.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=pl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=gl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*pl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*gl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ks(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ks(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return rl(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return rl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n="",i=e;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,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==tl.Bytes)return t.push(this.readVarint(e));var r=el(this);for(t=t||[];this.pos127;);else if(e===tl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===tl.Fixed32)this.pos+=4;else{if(e!==tl.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;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;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&&nl(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),$s(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),$s(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&&nl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,tl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,al,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ll,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,sl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,cl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ul,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,fl,e)},writeBytesField:function(t,e){this.writeTag(t,tl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,tl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,tl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var vl=3;function ml(t,e,r){1===t&&r.readMessage(yl,e)}function yl(t,e,r){if(3===t){var n=r.readMessage(xl,{}),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 qa({width:o+2*vl,height:s+2*vl},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function xl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var bl=vl,_l=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,v(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function wl(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}_l.prototype.send=function(t,e,r,n){var i=this,a=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[a]=r);var o=[];if(this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(a),data:An(e,o)},o),r)return{cancel:function(){i.callbacks[a]=null,i.target.postMessage({targetMapId:n,sourceMapId:i.mapId,type:"",id:String(a)})}}},_l.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var a=function(t,e){delete r.callbacks[i];var n=[];r.target.postMessage({sourceMapId:r.mapId,type:"",id:String(i),error:t?An(t):null,data:An(e,n)},n)};if(""===n.type||""===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(Mn(n.error)):e&&e(null,Mn(n.data));else if(void 0!==n.id&&this.parent[n.type]){this.callbacks[n.id]=null;var o=this.parent[n.type](n.sourceMapId,Mn(n.data),a);o&&null===this.callbacks[n.id]&&(this.callbacks[n.id]=o.cancel)}else if(void 0!==n.id&&this.parent.getWorkerSource){var s=n.type.split("."),l=Mn(n.data);this.parent.getWorkerSource(n.sourceMapId,s[0],l.source)[s[1]](l,a)}else this.parent[n.type](Mn(n.data))}},_l.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var kl=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]))};kl.prototype.setNorthEast=function(t){return this._ne=t instanceof Tl?new Tl(t.lng,t.lat):Tl.convert(t),this},kl.prototype.setSouthWest=function(t){return this._sw=t instanceof Tl?new Tl(t.lng,t.lat):Tl.convert(t),this},kl.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Tl)e=t,r=t;else{if(!(t instanceof kl))return Array.isArray(t)?t.every(Array.isArray)?this.extend(kl.convert(t)):this.extend(Tl.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Tl(e.lng,e.lat),this._ne=new Tl(r.lng,r.lat)),this},kl.prototype.getCenter=function(){return new Tl((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},kl.prototype.getSouthWest=function(){return this._sw},kl.prototype.getNorthEast=function(){return this._ne},kl.prototype.getNorthWest=function(){return new Tl(this.getWest(),this.getNorth())},kl.prototype.getSouthEast=function(){return new Tl(this.getEast(),this.getSouth())},kl.prototype.getWest=function(){return this._sw.lng},kl.prototype.getSouth=function(){return this._sw.lat},kl.prototype.getEast=function(){return this._ne.lng},kl.prototype.getNorth=function(){return this._ne.lat},kl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},kl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},kl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},kl.convert=function(t){return!t||t instanceof kl?t:new kl(t)};var Tl=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")};function Al(t){return 2*Math.PI*6378137*Math.cos(t*Math.PI/180)}function Ml(t){return(180+t)/360}function Sl(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function El(t,e){return t/Al(e)}function Cl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}Tl.prototype.wrap=function(){return new Tl(u(this.lng,-180,180),this.lat)},Tl.prototype.toArray=function(){return[this.lng,this.lat]},Tl.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Tl.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 kl(new Tl(this.lng-r,this.lat-e),new Tl(this.lng+r,this.lat+e))},Tl.convert=function(t){if(t instanceof Tl)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Tl(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Tl(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 Ll=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Ll.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Tl.convert(t);return new Ll(Ml(r.lng),Sl(r.lat),El(e,r.lat))},Ll.prototype.toLngLat=function(){return new Tl(360*this.x-180,Cl(this.y))},Ll.prototype.toAltitude=function(){return this.z*Al(Cl(this.y))};var Pl=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Il(0,t,e,r)};Pl.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Pl.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=wl(256*r,256*(n=Math.pow(2,i)-n-1),i),o=wl(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 zl(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zl(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},zl.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},zl.prototype.children=function(t){if(this.overscaledZ>=t)return[new zl(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 zl(e,this.wrap,e,r,n),new zl(e,this.wrap,e,r+1,n),new zl(e,this.wrap,e,r,n+1),new zl(e,this.wrap,e,r+1,n+1)]},zl.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)},Dl.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Dl.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Dl.prototype.getPixels=function(){return new Ha({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Dl.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)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e&&e>=0)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},jl.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},i=this.stateChanges[t]||{},a=h({},n[r],i[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var o=this.deletedStates[t][e];if(null===o)return{};for(var s in o)delete a[s]}return a},jl.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},jl.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var i={};for(var a in this.stateChanges[n])this.state[n][a]||(this.state[n][a]={}),h(this.state[n][a],this.stateChanges[n][a]),i[a]=this.state[n][a];r[n]=i}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var c in this.deletedStates[o]){if(null===this.deletedStates[o][c])this.state[o][c]={};else for(var u=0,f=Object.keys(this.deletedStates[o][c]);u=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Ul.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Vo.VectorTile(new Qs(this.rawTileData)).layers,this.sourceLayerCoder=new Fl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ul.prototype.query=function(t,e,r){var n=this;this.loadVTLayers();for(var a=t.params||{},o=ha/t.tileSize/t.scale,s=Gr(a.filter),l=t.queryGeometry,c=t.queryPadding*o,u=Vl(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=Vl(t.cameraQueryGeometry),p=0,d=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,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,h=c;u=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(i(new Un(this.tileID.overscaledZ),u))for(var h=0;h>l.z,u=new i(l.x*c,l.y*c),h=new i(u.x+c,u.y+c),f=this.segments.prepareSegment(4,r,n);r.emplaceBack(u.x,u.y,u.x,u.y),r.emplaceBack(h.x,u.y,h.x,u.y),r.emplaceBack(u.x,h.y,u.x,h.y),r.emplaceBack(h.x,h.y,h.x,h.y);var p=f.vertexLength;n.emplaceBack(p,p+1,p+2),n.emplaceBack(p+1,p+2,p+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,Rl.members),this.maskedIndexBuffer=e.createIndexBuffer(n)}},Hl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Hl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Hl.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=A(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),i=!1;if(this.expirationTime>n)i=!1;else if(e)if(this.expirationTime=0&&n>=t&&Zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Wl.prototype.substring=function(t,e){var r=new Wl;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Wl.prototype.toString=function(){return this.text},Wl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)};var Zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Jl={};function Kl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,l=0,c=0;c-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+=h.dist(f)}return!0}function ac(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=Ee(h.x,f.x,d),v=Ee(h.y,f.y,d),m=new bs(g,v,f.angleTo(h),u);return m._round(),!o||ic(t,m,s,o,e)?m:void 0}l+=p}}function cc(t,e,r,n,i,a,o,s,l){var c=oc(n,a,o),u=sc(n,i),h=u*o,f=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&_=0&&w=0&&p+u<=h){var k=new bs(_,w,x,g);k._round(),i&&!ic(e,k,o,i,a)||d.push(k)}}f+=y}return l||d.length||s||(d=t(e,f/2,n,i,a,o,s,!0,c)),d}(t,f?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,h,f,!1,l)}Jl[10]=!0,Jl[32]=!0,Jl[38]=!0,Jl[40]=!0,Jl[41]=!0,Jl[43]=!0,Jl[45]=!0,Jl[47]=!0,Jl[173]=!0,Jl[183]=!0,Jl[8203]=!0,Jl[8208]=!0,Jl[8211]=!0,Jl[8231]=!0;var uc=function(t,e,r,n,a,o,s,l,c,u,h,f){var p=s.top*l-c,d=s.bottom*l+c,g=s.left*l-c,v=s.right*l+c;if(this.boxStartIndex=t.length,u){var m=d-p,y=v-g;m>0&&(m=Math.max(10*l,m),this._addLineCollisionCircles(t,e,r,r.segment,y,m,n,a,o,h))}else{if(f){var x=new i(g,p),b=new i(v,p),_=new i(g,d),w=new i(v,d),k=f*Math.PI/180;x._rotate(k),b._rotate(k),_._rotate(k),w._rotate(k),g=Math.min(x.x,b.x,_.x,w.x),v=Math.max(x.x,b.x,_.x,w.x),p=Math.min(x.y,b.y,_.y,w.y),d=Math.max(x.y,b.y,_.y,w.y)}t.emplaceBack(r.x,r.y,g,p,v,d,n,a,o,0,0)}this.boxEndIndex=t.length};uc.prototype._addLineCollisionCircles=function(t,e,r,n,i,a,o,s,l,c){var u=a/2,h=Math.floor(i/u)||1,f=1+.4*Math.log(c)/Math.LN2,p=Math.floor(h*f/2),d=-a/2,g=r,v=n+1,m=d,y=-i/2,x=y-i/4;do{if(--v<0){if(m>y)return;v=0;break}m-=e[v].dist(g),g=e[v]}while(m>x);for(var b=e[v].dist(e[v+1]),_=-p;_i&&(k+=w-i),!(k=e.length)return;b=e[v].dist(e[v+1])}var T=k-m,A=e[v],M=e[v+1].sub(A)._unit()._mult(T)._add(A)._round(),S=Math.abs(k-d)0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function fc(t,e){return te?1:0}function pc(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 h=o-n,f=s-a,p=Math.min(h,f),d=p/2,g=new hc([],dc);if(0===p)return new i(n,a);for(var v=n;vy.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 gc(b.p.x-d,b.p.y-d,d,t)),g.push(new gc(b.p.x+d,b.p.y-d,d,t)),g.push(new gc(b.p.x-d,b.p.y+d,d,t)),g.push(new gc(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 dc(t,e){return e.max-t.max}function gc(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,ka(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}hc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},hc.prototype.pop=function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},hc.prototype.peek=function(){return this.data[0]},hc.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},hc.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 vc=e(function(t){t.exports=function(t,e){var r,n,i,a,o,s,l,c;for(r=3&t.length,n=t.length-r,i=e,o=3432918353,s=461845907,c=0;c>>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}}),mc=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}}),yc=vc,xc=vc,bc=mc;yc.murmur3=xc,yc.murmur2=bc;var _c=7;function wc(t,e){var r=0,n=0,i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-_c;break;case"bottom-right":case"bottom-left":n=-i+_c;break;case"bottom":n=-e+_c;break;case"top":n=e-_c}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]}function kc(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 Tc(t,e,r,n,a,o,s){var l=o.layoutTextSize.evaluate(e,{}),c=o.layoutIconSize.evaluate(e,{}),u=o.textMaxSize.evaluate(e,{});void 0===u&&(u=l);var h=t.layers[0].layout,f=h.get("icon-offset").evaluate(e,{}),p=Sc(r.horizontal),d=l/24,g=t.tilePixelRatio*d,v=t.tilePixelRatio*u/24,m=t.tilePixelRatio*c,y=t.tilePixelRatio*h.get("symbol-spacing"),x=h.get("text-padding")*t.tilePixelRatio,b=h.get("icon-padding")*t.tilePixelRatio,_=h.get("text-max-angle")/180*Math.PI,k="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),T="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),A=h.get("symbol-placement"),M=y/2,S=function(l,c){c.x<0||c.x>=ha||c.y<0||c.y>=ha||function(t,e,r,n,a,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_){var k,T,A=t.addToLineVertexArray(e,r),M=0,S=0,E=0,C={},L=yc(""),P=(o.layout.get("text-radial-offset").evaluate(x,{})||0)*Gl;for(var O in n.horizontal){var z=n.horizontal[O];if(!k){L=yc(z.text);var I=o.layout.get("text-rotate").evaluate(x,{});k=new uc(s,r,e,l,c,u,z,h,f,p,t.overscaling,I)}var D=1===z.lineCount;if(S+=Mc(t,e,z,o,p,x,d,A,n.vertical?Yl.horizontal:Yl.horizontalOnly,D?Object.keys(n.horizontal):[O],C,b,_),D)break}n.vertical&&(E+=Mc(t,e,n.vertical,o,p,x,d,A,Yl.vertical,["vertical"],C,b,_));var R=k?k.boxStartIndex:t.collisionBoxArray.length,F=k?k.boxEndIndex:t.collisionBoxArray.length;if(a){var B=function(t,e,r,n,a,o){var s,l,c,u,h=e.image,f=r.layout,p=e.top-1/h.pixelRatio,d=e.left-1/h.pixelRatio,g=e.bottom+1/h.pixelRatio,v=e.right+1/h.pixelRatio;if("none"!==f.get("icon-text-fit")&&a){var m=v-d,y=g-p,x=f.get("text-size").evaluate(o,{})/24,b=a.left*x,_=a.right*x,w=a.top*x,k=_-b,T=a.bottom*x-w,A=f.get("icon-text-fit-padding")[0],M=f.get("icon-text-fit-padding")[1],S=f.get("icon-text-fit-padding")[2],E=f.get("icon-text-fit-padding")[3],C="width"===f.get("icon-text-fit")?.5*(T-y):0,L="height"===f.get("icon-text-fit")?.5*(k-m):0,P="width"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?k:m,O="height"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?T:y;s=new i(b+L-E,w+C-A),l=new i(b+L+M+P,w+C-A),c=new i(b+L+M+P,w+C+S+O),u=new i(b+L-E,w+C+S+O)}else s=new i(d,p),l=new i(v,p),c=new i(v,g),u=new i(d,g);var z=r.layout.get("icon-rotate").evaluate(o,{})*Math.PI/180;if(z){var I=Math.sin(z),D=Math.cos(z),R=[D,-I,I,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:h.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,a,o,0,Sc(n.horizontal),x),N=o.layout.get("icon-rotate").evaluate(x,{});T=new uc(s,r,e,l,c,u,a,g,v,!1,t.overscaling,N),M=4*B.length;var j=t.iconSizeData,U=null;"source"===j.kind?(U=[_s*o.layout.get("icon-size").evaluate(x,{})])[0]>Ac&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===j.kind&&((U=[_s*_.compositeIconSizes[0].evaluate(x,{}),_s*_.compositeIconSizes[1].evaluate(x,{})])[0]>Ac||U[1]>Ac)&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),t.addSymbols(t.icon,B,U,y,m,x,!1,e,A.lineStartIndex,A.lineLength)}var V=T?T.boxStartIndex:t.collisionBoxArray.length,q=T?T.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=Os.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),t.symbolInstances.emplaceBack(e.x,e.y,C.right>=0?C.right:-1,C.center>=0?C.center:-1,C.left>=0?C.left:-1,C.vertical||-1,L,R,F,V,q,l,S,E,M,0,h,P)}(t,c,l,r,n,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,x,k,s,m,b,T,f,e,a,o)};if("line"===A)for(var E=0,C=function(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),c&&h.equals(c[c.length-1])||(c=[h],o.push(c)),c.push(f)))))}return o}(e.geometry,0,0,ha,ha);E1){var F=lc(R,_,r.vertical||p,n,24,v);F&&S(R,F)}}else if("Polygon"===e.type)for(var B=0,N=Mo(e.geometry,0);BAc&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===g.kind&&((v=[_s*p.compositeTextSizes[0].evaluate(o,{}),_s*p.compositeTextSizes[1].evaluate(o,{})])[0]>Ac||v[1]>Ac)&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),t.addSymbols(t.text,d,v,s,a,o,c,e,l.lineStartIndex,l.lineLength);for(var m=0,y=u;m=0;o--)if(n.dist(a[o])dt&&(t.send("enforceCacheSizeLimit",pt),mt=0)},t.clamp=c,t.clearTileCache=function(t){var e=self.caches.delete(ft);t&&e.catch(t).then(function(){return t()})},t.clone=function(t){var e=new Pa(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=b,t.config=I,t.create=function(){var t=new Pa(16);return Pa!=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=Oa,t.create$2=function(){var t=new Pa(4);return Pa!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Or,t.createLayout=oi,t.createStyleLayer=function(t){return"custom"===t.type?new js(t):new Us[t.type](t)},t.deepEqual=o,t.ease=l,t.emitValidationErrors=mn,t.endsWith=m,t.enforceCacheSizeLimit=function(t){self.caches&&self.caches.open(ft).then(function(e){e.keys().then(function(r){for(var n=0;n=M.maxzoom||"none"!==M.visibility&&(o(A,this.zoom),(d[M.id]=M.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g),c.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send("getGlyphs",{uid:this.uid,stacks:S},function(t,e){u||(u=t,h=e,L.call(s))}):h={};var E=Object.keys(g.iconDependencies);E.length?n.send("getImages",{icons:E},function(t,e){u||(u=t,f=e,L.call(s))}):f={};var C=Object.keys(g.patternDependencies);function L(){if(u)return a(u);if(h&&f&&p){var e=new i(h),r=new t.ImageAtlas(f,p);for(var n in d){var s=d[n];s instanceof t.SymbolBucket?(o(s.layers,this.zoom),t.performSymbolLayout(s,h,e.positions,f,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof t.LineBucket||s instanceof t.FillBucket||s instanceof t.FillExtrusionBucket)&&(o(s.layers,this.zoom),s.addFeatures(g,r.patternPositions))}this.status="done",a(null,{buckets:t.values(d).filter(function(t){return!t.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}C.length?n.send("getImages",{icons:C},function(t,e){u||(u=t,p=e,L.call(s))}):p={},L.call(this)};var s="undefined"!=typeof performance,l={getEntriesByName:function(t){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(s&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(s&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},c=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},l.mark(this._marks.start)};function u(e,r){var n=t.getArrayBuffer(e.request,function(e,n,i,a){e?r(e):n&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(n)),rawData:n,cacheControl:i,expires:a})});return function(){n.cancel(),r()}}c.prototype.finish=function(){l.mark(this._marks.end);var t=l.getEntriesByName(this._marks.measure);return 0===t.length&&(l.measure(this._marks.measure,this._marks.start,this._marks.end),t=l.getEntriesByName(this._marks.measure),l.clearMarks(this._marks.start),l.clearMarks(this._marks.end),l.clearMeasures(this._marks.measure)),t},l.Performance=c;var h=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||u,this.loading={},this.loaded={}};h.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new l.Performance(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 h=o.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[i]=s})},h.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&&r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};"parsing"===a.status?a.reloadCallback=o:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.actor,o):o())}},h.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()},h.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var f=function(){this.loaded={}};f.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=new t.DEMData(n,a,i);this.loaded=this.loaded||{},this.loaded[n]=o,r(null,o)},f.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var p={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function d(t){var e=0;if(t&&t.length>0){e+=Math.abs(g(t[0]));for(var r=1;r2){for(o=0;o=0}(t)===e?t:t.reverse()}var _=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=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))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function F(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),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+h)),Math.min(a,Math.floor(n+(s-l)*u/s+h)),o)}var f=r[2*n+o],p=i,d=a;for(N(e,r,i,n),r[2*a+o]>f&&N(e,r,i,a);pf;)d--}r[2*i+o]===f?N(e,r,i,d):N(e,r,++d,a),d<=n&&(i=d+1),n<=d&&(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}}(o,s,n,0,o.length-1,0)};H.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var h=c.pop(),f=c.pop(),p=c.pop();if(f-p<=o)for(var d=p;d<=f;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[d]);else{var g=Math.floor((p+f)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[g]);var v=(h+1)%2;(0===h?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(v)),(0===h?i>=s:a>=l)&&(c.push(g+1),c.push(f),c.push(v))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},H.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(),h=o.pop();if(u-h<=a)for(var f=h;f<=u;f++)U(e[2*f],e[2*f+1],r,n)<=l&&s.push(t[f]);else{var p=Math.floor((h+u)/2),d=e[2*p],g=e[2*p+1];U(d,g,r,n)<=l&&s.push(t[p]);var v=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(h),o.push(p-1),o.push(v)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var G={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},Y=function(t){this.options=Q(Object.create(G),t),this.trees=new Array(this.options.maxZoom+1)};function W(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function X(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:K(n),y:$(i),zoom:1/0,index:e,parentId:-1}}function Z(t){return{type:"Feature",id:t.id,properties:J(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 J(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Q(Q({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function K(t){return t/360+.5}function $(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 Q(t,e){for(var r in e)t[r]=e[r];return t}function tt(t){return t.x}function et(t){return t.y}function rt(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 nt(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)it(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],h=e[n],f=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 lt(t,e,r,n){for(var i=0;i1?1:r}function ht(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"===f||"MultiPoint"===f)ft(h,g,r,n,i);else if("LineString"===f)pt(h,g,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)gt(h,g,r,n,i,!1);else if("Polygon"===f)gt(h,g,r,n,i,!0);else if("MultiPolygon"===f)for(var v=0;v=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function pt(t,e,r,n,i,a,o){for(var s,l,c=dt(t),u=0===i?mt:yt,h=t.start,f=0;fr&&(l=u(c,p,d,v,m,r),o&&(c.start=h+s*l)):y>n?x=r&&(l=u(c,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,v,m,n),b=!0),!a&&b&&(o&&(c.end=h+s*l),e.push(c),c=dt(t)),o&&(h+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)>=r&&y<=n&&vt(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&vt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function dt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function gt(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),h>o.maxY&&(o.maxY=h)}return o}function Tt(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 H(s,tt,et,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},Y.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,h=l.range(K(r),$(a),K(i),$(n));u>5,r=t%32,n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);var a=i.points[e];if(!a)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,c=i.within(a.x,a.y,o);l1&&console.time("creation"),f=this.tiles[h]=kt(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,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,T=1+_;g=v=m=y=null,x=ht(t,u,r-_,r+k,0,f.minX,f.maxX,l),b=ht(t,u,r+w,r+T,0,f.minX,f.maxX,l),t=null,x&&(g=ht(x,u,n-_,n+k,1,f.minY,f.maxY,l),v=ht(x,u,n+w,n+T,1,f.minY,f.maxY,l),x=null),b&&(m=ht(b,u,n-_,n+k,1,f.minY,f.maxY,l),y=ht(b,u,n+w,n+T,1,f.minY,f.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},Mt.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,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[St(c,u,h)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,h),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?_t(this.tiles[s],i):null):null};var Ct=function(e){function r(t,r,n){e.call(this,t,r,Et),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var 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 l.Performance(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."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(y(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(y(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=x(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(y(x,e))),t}(e,r);default:return e}}(o,!0);try{e._geoJSONIndex=n.cluster?new Y(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 f=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{var l=a.requests[s];l||(l=a.requests[s]=[],y.loadGlyphRange(r,s,n.url,n.requestManager,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=l;nthis.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.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n,this.workerID),this},r.prototype._updateWorkerData=function(e){var r=this,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.workerID=this.dispatcher.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.dispatcher.send(r.type+".coalesce",{source:n.source},null,r.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(e,r){var n=this,i=void 0===e.workerID?"loadTile":"reloadTile",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};e.workerID=this.dispatcher.send(i,a,function(t,a){return e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),L=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;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){i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())})},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;othis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},B.prototype.has=function(t){return t.wrapped().key in this.data},B.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},B.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},B.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},B.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},B.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var N=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};N.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},N.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},N.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var j={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},U=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};U.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},U.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},U.prototype.enableAttributes=function(t,e){for(var r=0;r1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._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){for(var r=t.overscaledZ-1;r>=e;r--){var n=t.scaledTo(r);if(!n)return;var i=String(n.key),a=this._tiles[i];if(a&&a.hasData())return a;if(this._cache.has(n))return this._cache.get(n)}},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=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(Pt(this._source.type)){for(var c={},u={},h=0,f=Object.keys(l);hthis._source.maxzoom){var v=d.children(this._source.maxzoom)[0],m=this.getTile(v);if(m&&m.hasData()){n[v.key]=v;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._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,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(),h=1/0,f=1/0,p=-1/0,d=-1/0,g=0,v=c;g=0&&m[1].y+v>=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}(t.Evented);function Lt(t,e){return t%32-e%32||e-t}function Pt(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(Jn.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=function(){this.active={}};zt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function Kt(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],f=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;f.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;mMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function te(e,r,n,i,a,o,s,l,c,u,h,f,p,d){var g,v=r/24,m=e.lineOffsetX*v,y=e.lineOffsetY*v;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=$t(v,l,m,y,n,h,f,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=Zt(w.first.point,s).point,T=Zt(w.last.point,s).point;if(i&&!n){var A=Qt(e.writingMode,k,T,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?L.point:ee(f,C,S,1,a),O=Qt(e.writingMode,S,P,d);if(O)return O}var z=re(v*l.getoffsetX(e.glyphStartIndex),m,y,n,h,f,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!z)return{notEnoughRoom:!0};g=[z]}for(var I=0,D=g;I0?1:-1,v=0;i&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?l+s:l+s+1,y=m,x=a,b=a,_=0,w=0,k=Math.abs(d);_+w<=k;){if((m+=g)=c)return null;if(b=x,void 0===(x=f[m])){var T=new t.Point(u.getx(m),u.gety(m)),A=Zt(T,h);if(A.signedDistanceFromCamera>0)x=f[m]=A.point;else{var M=m-g;x=ee(0===_?o:new t.Point(u.getx(M),u.gety(M)),T,b,k-_+1,h)}}_+=w,w=b.dist(x)}var S=(k-_)/w,E=x.sub(b),C=E.mult(S)._add(b);return C._add(E._unit()._perp()._mult(n*g)),{point:C,angle:v+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:m-g===y?0:u.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:k-_}:null}}Yt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Yt.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)},Yt.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)},Yt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Yt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Yt.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},Yt.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},Yt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Yt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Yt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Yt.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,h=0,f=c;h=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 v=this.circles,m=0,y=g;mo*o+s*s},Yt.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 h=l-s,f=u-c;return h*h+f*f<=r*r};var ne=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ie(t,e){for(var r=0;rS)se(e,E,!1);else{var z=this.projectPoint(c,C,L),I=P*T;if(d.length>0){var D=z.x-d[d.length-4],R=z.y-d[d.length-3];if(I*I*2>D*D+R*R&&E+8-M&&F=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},oe.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(g=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={radialOffset:a,width:n,height:i,anchor:e,textBoxScale:o,prevAnchor:g},this.markUsedJustification(d,e,p),m},ge.prototype.placeLayerBucket=function(e,r,n,i,a,o,s,l,c,u){var h=this,f=e.layers[0].layout,p=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom),d=f.get("text-optional"),g=f.get("icon-optional"),v=f.get("text-allow-overlap"),m=f.get("icon-allow-overlap"),y=v&&(m||!e.hasIconData()||g),x=m&&(v||!e.hasTextData()||d),b=this.collisionGroups.get(e.sourceID),_="map"===f.get("text-rotation-alignment"),w="map"===f.get("text-pitch-alignment"),k="viewport-y"===f.get("symbol-z-order");!e.collisionArrays&&u&&e.deserializeCollisionBoxes(u);var T=function(i,u){if(!c[i.crossTileID])if(l)h.placements[i.crossTileID]=new he(!1,!1,!1);else{var m=!1,k=!1,T=!0,A=null,M=null,S=null,E=0,C=0;u.textFeatureIndex&&(E=u.textFeatureIndex);var L=u.textBox;if(L)if(f.get("text-variable-anchor")){var P=L.x2-L.x1,O=L.y2-L.y1,z=i.textBoxScale,I=f.get("text-variable-anchor");if(h.prevPlacement&&h.prevPlacement.variableOffsets[i.crossTileID]){var D=h.prevPlacement.variableOffsets[i.crossTileID];I[0]!==D.anchor&&(I=I.filter(function(t){return t!==D.anchor})).unshift(D.anchor)}for(var R=0,F=I;R0;T=A&&A.offscreen;var j=u.textCircles;if(j){var U=e.text.placedSymbolArray.get(i.centerJustifiedTextSymbolIndex),V=t.evaluateSizeForFeature(e.textSizeData,p,U);M=h.collisionIndex.placeCollisionCircles(j,f.get("text-allow-overlap"),a,o,U,e.lineVertexArray,e.glyphOffsetArray,V,r,n,s,w,b.predicate),m=f.get("text-allow-overlap")||M.circles.length>0,T=T&&M.offscreen}u.iconFeatureIndex&&(C=u.iconFeatureIndex),u.iconBox&&(k=(S=h.collisionIndex.placeCollisionBox(u.iconBox,f.get("icon-allow-overlap"),o,r,b.predicate)).box.length>0,T=T&&S.offscreen);var q=d||0===i.numHorizontalGlyphVertices&&0===i.numVerticalGlyphVertices,H=g||0===i.numIconVertices;q||H?H?q||(k=k&&m):m=k&&m:k=m=k&&m,m&&A&&h.collisionIndex.insertCollisionBox(A.box,f.get("text-ignore-placement"),e.bucketInstanceId,E,b.ID),k&&S&&h.collisionIndex.insertCollisionBox(S.box,f.get("icon-ignore-placement"),e.bucketInstanceId,C,b.ID),m&&M&&h.collisionIndex.insertCollisionCircles(M.circles,f.get("text-ignore-placement"),e.bucketInstanceId,E,b.ID),h.placements[i.crossTileID]=new he(m||y,k||x,T||e.justReloaded),c[i.crossTileID]=!0}};if(k)for(var A=e.getSortedSymbolIndexes(this.transform.angle),M=A.length-1;M>=0;--M){var S=A[M];T(e.symbolInstances.get(S),e.collisionArrays[S])}else for(var E=0;E=0&&(e.text.placedSymbolArray.get(s).crossTileID=a>=0&&s!==a?0:n.crossTileID)}},ge.prototype.commit=function(t){this.commitTime=t;var e=this.prevPlacement,r=!1,n=e&&0!==this.fadeDuration?(this.commitTime-e.commitTime)/this.fadeDuration:1,i=e?e.opacities:{},a=e?e.variableOffsets:{};for(var o in this.placements){var s=this.placements[o],l=i[o];l?(this.opacities[o]=new ue(l,n,s.text,s.icon),r=r||s.text!==l.text.placed||s.icon!==l.icon.placed):(this.opacities[o]=new ue(null,n,s.text,s.icon,s.skipFade),r=r||s.text||s.icon)}for(var c in i){var u=i[c];if(!this.opacities[c]){var h=new ue(u,n,!1,!1);h.isHidden()||(this.opacities[c]=h,r=r||u.text.placed||u.icon.placed)}}for(var f in a)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=a[f]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},ge.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n0||g>0,b=p.numIconVertices>0;if(x){for(var _=Te(y.text),w=(d+g)/4,k=0;k=0&&(e.text.placedSymbolArray.get(t).hidden=T)});var A=this.variableOffsets[p.crossTileID];A&&this.markUsedJustification(e,A.anchor,p)}if(b){for(var M=Te(y.icon),S=0;St},ge.prototype.setStale=function(){this.stale=!0};var me=Math.pow(2,25),ye=Math.pow(2,24),xe=Math.pow(2,17),be=Math.pow(2,16),_e=Math.pow(2,9),we=Math.pow(2,8),ke=Math.pow(2,1);function Te(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*me+e*ye+r*xe+e*be+r*_e+e*we+r*ke+e}var Ae=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ae.prototype.continuePlacement=function(t,e,r,n,i){for(;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 Ae),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Me.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Se=512/t.EXTENT/2,Ee=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,h=l.x,f=l.y,p=l.sdf,d=l.pixelRatio,g=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,g,{x:h,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:g,pixelRatio:d,sdf:p}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e.sprite,this.map._requestManager,function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var a=Ft(this.stylesheet.layers);this._order=a.map(function(t){return t.id}),this._layers={};for(var o=0,s=a;o0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return n.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.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.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(Oe(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}})}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._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.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],o=parseInt(e.id,10);if(void 0!==a){var s=a.getSource().type;"geojson"===s&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||i?isNaN(o)||o<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):a.setFeatureState(i,o,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,s=parseInt(e.id,10);"vector"!==a||o?void 0!==e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):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,s,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],a=parseInt(e.id,10);if(void 0!==i)if("vector"!==i.getSource().type||n){if(!(isNaN(a)||a<0))return i.getFeatureState(n,a);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else 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]&&(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 v=i.length-1;v>=0;v--){var m=i[v].feature;if(n[m.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;}"),Ge=lr("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;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);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),Ye=lr("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),We=lr("#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);}"),Xe=lr("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;}"),Ze=lr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),Je=lr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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);}"),Ke=lr("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;}"),$e=lr("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\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\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 vec4 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\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\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 pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),Qe=lr("#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;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/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;}"),tr=lr("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;}"),er=lr("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);}"),rr=lr("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);}"),nr=lr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 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 pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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 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,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));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;\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 vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_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);}"),ir=lr("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);}"),ar=lr("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;}"),or=lr("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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),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));}"),sr=lr("#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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),0.0,1.0);float gamma_scale=gl_Position.w;vec2 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;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function lr(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 cr=Object.freeze({prelude:Fe,background:Be,backgroundPattern:Ne,circle:je,clippingMask:Ue,heatmap:Ve,heatmapTexture:qe,collisionBox:He,collisionCircle:Ge,debug:Ye,fill:We,fillOutline:Xe,fillOutlinePattern:Ze,fillPattern:Je,fillExtrusion:Ke,fillExtrusionPattern:$e,hillshadePrepare:Qe,hillshade:tr,line:er,lineGradient:rr,linePattern:nr,lineSDF:ir,raster:ar,symbolIcon:or,symbolSDF:sr}),ur=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};ur.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,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}hr.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g){var v,m=t.gl;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,h,{zoom:f});for(var x=(v={},v[m.LINES]=2,v[m.TRIANGLES]=3,v[m.LINE_STRIP]=1,v)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new ur)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),m.drawElements(e,w.primitiveLength*x,m.UNSIGNED_SHORT,w.primitiveOffset*x*2)}};var pr=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}},dr=function(e,r,n,i,a,o,s){return t.extend(pr(e,r,n,i),fr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},gr=function(t){return{u_matrix:t}},vr=function(e,r,n,i){return t.extend(gr(e),fr(n,r,i))},mr=function(t,e){return{u_matrix:t,u_world:e}},yr=function(e,r,n,i,a){return t.extend(vr(e,r,n,i),{u_world:a})},xr=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=le(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}},br=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)}},_r=function(t,e,r){var n=le(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}},wr=function(t,e){return{u_matrix:t,u_color:e}},kr=function(t){return{u_matrix:t}},Tr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:le(e,1,r),u_intensity:n}},Ar=function(t,e,r){var n=r.paint.get("hillshade-shadow-color"),i=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),o=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Sr(t,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),o],u_shadow:n,u_highlight:i,u_accent:a}},Mr=function(e,r){var n=e.dem.stride,i=t.create();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function Sr(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 Er=function(e,r,n){var i=e.transform;return{u_matrix:zr(e,r,n),u_ratio:1/le(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Cr=function(e,r,n){return t.extend(Er(e,r,n),{u_image:0})},Lr=function(e,r,n,i){var a=e.transform,o=Or(r,a);return{u_matrix:zr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/le(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[t.browser.devicePixelRatio,o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Pr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=Or(r,o),c="round"===n.layout.get("line-cap"),u=s.getDash(i.from,c),h=s.getDash(i.to,c),f=u.width*a.fromScale,p=h.width*a.toScale;return t.extend(Er(e,r,n),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/p,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:a.t})};function Or(t,e){return 1/le(t,1,e.tileZoom)}function zr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Ir=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:function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(i.paint.get("raster-hue-rotate"))};var a,o};var Dr=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}},Rr=function(e,r,n,i,a,o,s,l,c,u,h){var f=a.transform;return t.extend(Dr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+h})},Fr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Br=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from),a=r.imageManager.getPattern(t.to),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,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=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/le(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,f>>16],u_pixel_coord_lower:[65535&h,65535&f]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Nr={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.Uniform4f(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.Uniform4f(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.Uniform4f(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:br,collisionCircle:br,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},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)}},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.Uniform4f(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.Uniform1f(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.Uniform1f(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.Uniform1f(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 jr(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),h=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),p=f&&e.refreshedUponExpiration?1:t.clamp(f?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}}function Qr(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=Tt.disabled,c=At.disabled,u=e.colorModeForRenderPass(),h="$debug";s.draw(i,a.LINE_STRIP,l,c,u,St.disabled,wr(o,t.Color.red),h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var f=r.getTileByID(n.key).latestRawTileData,p=f&&f.byteLength||0,d=Math.floor(p/1024),g=function(t,e,r,n){n=n||1;var i,a,o,s,l,c,u,h,f=[];for(i=0,a=t.length;i":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},en={symbol:function(t,e,r,n,i){if("translucent"===t.renderPass){var a=At.disabled,o=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Yr(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,o,i),0!==r.paint.get("text-opacity").constantOr(1)&&Yr(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,o,i),e.map.showCollisionBoxes&&function(t,e,r,n){Vr(t,e,r,n,!1),Vr(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if("translucent"===t.renderPass){var i=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),o=r.paint.get("circle-stroke-opacity");if(0!==i.constantOr(1)||0!==a.constantOr(1)&&0!==o.constantOr(1))for(var s=t.context,l=s.gl,c=t.depthModeForSublayer(0,Tt.ReadOnly),u=At.disabled,h=t.colorModeForRenderPass(),f=0;fe.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function an(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fl.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&an(c,s,n,i,a),l.dy&&an(c,l,n,i,a)}rn.prototype.resize=function(e,r){var n=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,a=this.style._order;i256&&this.clearStencil(),r.setColorMode(Mt.disabled),r.setDepthMode(Tt.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 At({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},rn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new At({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},rn.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Mt([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Mt.unblended:Mt.alphaBlended},rn.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return Tt.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new Tt(r||this.context.gl.LEQUAL,e,[n,n])},rn.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var M=this.style._layers[n[this.currentLayer]],S=i[M.source],E=s[M.source];this._renderTileClippingMasks(M,E),this.renderLayer(this,S,M,E)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},rn.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},rn.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new hr(this.context,cr[t],e,Nr[t],this._showOverdrawInspector)),this.cache[r]},rn.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()},rn.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)};var sn=function(e,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=e||0,this._maxZoom=r||22,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._posMatrixCache={},this._alignedPosMatrixCache={}},ln={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};sn.prototype.clone=function(){var t=new sn(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},ln.minZoom.get=function(){return this._minZoom},ln.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},ln.maxZoom.get=function(){return this._maxZoom},ln.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},ln.renderWorldCopies.get=function(){return this._renderWorldCopies},ln.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},ln.worldSize.get=function(){return this.tileSize*this.scale},ln.centerPoint.get=function(){return this.size._div(2)},ln.size.get=function(){return new t.Point(this.width,this.height)},ln.bearing.get=function(){return-this.angle/Math.PI*180},ln.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))},ln.pitch.get=function(){return this._pitch/Math.PI*180},ln.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},ln.fov.get=function(){return this._fov/Math.PI*180},ln.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())},ln.zoom.get=function(){return this._zoom},ln.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())},ln.center.get=function(){return this._center},ln.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},sn.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},sn.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},sn.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=new t.Point(a*i.x-.5,a*i.y-.5);return function(e,r,n,i){void 0===i&&(i=!0);var a=1<=0&&l<=a)for(c=r;co&&(i=o-v)}if(this.lngRange){var m=p.x,y=c.x/2;m-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}},sn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),i=this.point,a=i.x,o=i.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=new Float64Array(16);t.perspective(l,this._fov,this.width/this.height,1,s),t.scale(l,l,[1,-1,1]),t.translate(l,l,[0,0,-this.cameraToCenterDistance]),t.rotateX(l,l,this._pitch),t.rotateZ(l,l,this.angle),t.translate(l,l,[-a,-o,0]),this.mercatorMatrix=t.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),t.scale(l,l,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;var c=this.width%2/2,u=this.height%2/2,h=Math.cos(this.angle),f=Math.sin(this.angle),p=a-Math.round(a)+h*c+f*u,d=o-Math.round(o)+h*u+f*c,g=new Float64Array(l);if(t.translate(g,g,[p>.5?p-1:p,d>.5?d-1:d,0]),this.alignedProjMatrix=g,l=t.create(),t.scale(l,l,[this.width/2,-this.height/2,1]),t.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=t.create(),t.scale(l,l,[1,-1,1]),t.translate(l,l,[-1,-1,0]),t.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(l=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}},sn.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},sn.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},sn.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&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},cn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var un=function(e){function n(n,i,a,o){void 0===o&&(o={});var s=r.mousePos(i.getCanvasContainer(),a),l=i.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:a},o)),this._defaultPrevented=!1,this.target=i}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),hn=function(e){function n(n,i,a){var o=r.touchPos(i.getCanvasContainer(),a),s=o.map(function(t){return i.unproject(t)}),l=o.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.Point(0,0)),c=i.unproject(l);e.call(this,n,{points:o,point:l,lngLats:s,lngLat:c,originalEvent:a}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),fn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),pn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};pn.prototype.setZoomRate=function(t){this._defaultZoomRate=t},pn.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},pn.prototype.isEnabled=function(){return!!this._enabled},pn.prototype.isActive=function(){return!!this._active},pn.prototype.isZooming=function(){return!!this._zooming},pn.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},pn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},pn.prototype.onWheel=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.isActive()||this._start(e)),e.preventDefault()}},pn.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},pn.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var 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=this._map._requestRenderFrame(this._onScrollFrame))}},pn.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?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="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&s&&l){var u=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=l(u);r.zoom=t.number(s,o,h),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else r.zoom=o,c=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},pn.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};var dn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};dn.prototype.isEnabled=function(){return!!this._enabled},dn.prototype.isActive=function(){return!!this._active},dn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},dn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},dn.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},dn.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)180&&(p=180);var d=p/180;c+=h*p*(d/2),Math.abs(r._normalizeBearing(c,0))0&&r-e[0][0]>160;)e.shift()};var mn=t.bezier(0,0,.3,1),yn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};yn.prototype.isEnabled=function(){return"disabled"!==this._state},yn.prototype.isActive=function(){return"active"===this._state},yn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},yn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},yn.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},yn.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},yn.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},yn.prototype._onMove=function(e){e.preventDefault();var n=r.mousePos(this._el,e);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:mn,noMoveStart:!0},{originalEvent:t})}}},yn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},yn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var xn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function bn(t){return t*(2-t)}xn.prototype.isEnabled=function(){return!!this._enabled},xn.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},xn.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},xn.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:bn,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-i,100*-a],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var _n=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};_n.prototype.isEnabled=function(){return!!this._enabled},_n.prototype.isActive=function(){return!!this._active},_n.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},_n.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},_n.prototype.onTouchStart=function(t){var e=this;if(this.isEnabled()&&!(t.points.length>1))if(this._tapped){var r=t.points[0],n=this._tappedPoint;if(n&&n.dist(r)<=30){t.originalEvent.preventDefault();var i=function(){e._tapped&&e._zoom(t),e._map.off("touchcancel",a),e._resetTapped()},a=function(){e._map.off("touchend",i),e._resetTapped()};this._map.once("touchend",i),this._map.once("touchcancel",a)}else this._resetTapped()}else this._tappedPoint=t.points[0],this._tapped=setTimeout(function(){e._tapped=null,e._tappedPoint=null},300)},_n.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},_n.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},_n.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},_n.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var wn=t.bezier(0,0,.15,1),kn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};kn.prototype.isEnabled=function(){return!!this._enabled},kn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},kn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},kn.prototype.disableRotation=function(){this._rotationDisabled=!0},kn.prototype.enableRotation=function(){this._rotationDisabled=!1},kn.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var n=r.mousePos(this._el,e.touches[0]),i=r.mousePos(this._el,e.touches[1]),a=n.add(i).div(2);this._startVec=n.sub(i),this._startAround=this._map.transform.pointLocation(a),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},kn.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),n=r.mousePos(this._el,t.touches[1]),i=e.sub(n);return{vec:i,center:e.add(n).div(2),scale:i.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*i.angleWith(this._startVec)/Math.PI}},kn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,a=r.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==i||Math.abs(1-i)>.15;Math.abs(a)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},kn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,a=n.bearing,o=n.scale,s=r.pointLocation(i),l=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+a),r.zoom=r.scaleZoom(this._startScale*o),r.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),o,i])}},kn.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var n=this._gestureIntent,i=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new t.Event(n+"end",{originalEvent:e})),this._drainInertiaBuffer();var a=this._inertia,o=this._map;if(a.length<2)o.snapToNorth({},{originalEvent:e});else{var s=a[a.length-1],l=a[0],c=o.transform.scaleZoom(i*s[1]),u=o.transform.scaleZoom(i*l[1]),h=c-u,f=(s[0]-l[0])/1e3,p=s[2];if(0!==f&&c!==u){var d=.15*h/f;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),v=c+d*g/2e3;v<0&&(v=0),o.easeTo({zoom:v,duration:g,easing:wn,around:this._aroundCenter?o.getCenter():o.unproject(p),noMoveStart:!0},{originalEvent:e})}else o.snapToNorth({},{originalEvent:e})}}},kn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Tn={scrollZoom:pn,boxZoom:dn,dragRotate:vn,dragPan:yn,keyboard:xn,doubleClickZoom:_n,touchZoomRotate:kn},An=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())e?1:0}),["bottom","left","right","top"])){var o=this.transform,s=o.project(t.LngLat.convert(e)),l=o.project(t.LngLat.convert(r)),c=s.rotate(-n*Math.PI/180),u=l.rotate(-n*Math.PI/180),h=new t.Point(Math.max(c.x,u.x),Math.max(c.y,u.y)),f=new t.Point(Math.min(c.x,u.x),Math.min(c.y,u.y)),p=h.sub(f),d=(o.width-i.padding.left-i.padding.right)/p.x,g=(o.height-i.padding.top-i.padding.bottom)/p.y;if(!(g<0||d<0)){var v=Math.min(o.scaleZoom(o.scale*Math.min(d,g)),i.maxZoom),m=t.Point.convert(i.offset),y=(i.padding.left-i.padding.right)/2,x=(i.padding.top-i.padding.bottom)/2,b=new t.Point(m.x+y,m.y+x).mult(o.scale/o.zoomScale(v));return{center:o.unproject(s.add(l).div(2).sub(b)),zoom:v,bearing:n}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,i,a){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,i),i,a)},r.prototype._fitInternal=function(e,r,n){return e?(r=t.extend(e,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return"zoom"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),"bearing"in e&&n.bearing!==+e.bearing&&(a=!0,n.bearing=+e.bearing),"pitch"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),i&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),a&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),o&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:a,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:s,h=i.centerPoint.add(t.Point.convert(e.offset)),f=i.pointLocation(h),p=t.LngLat.convert(e.center||f);this._normalizeCenter(p);var d,g,v=i.project(f),m=i.project(p).sub(v),y=i.zoomScale(l-a);return e.around&&(d=t.LngLat.convert(e.around),g=i.locationPoint(d)),this._zooming=l!==a,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(i.zoom=t.number(a,l,e)),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e)),d)i.setLocationAtPoint(d,g);else{var f=i.zoomScale(i.zoom-a),p=l>a?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=i.unproject(v.add(m.mult(e*x)).mult(f));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,h)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),i&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):a,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:s,h=i.zoomScale(l-a),f=i.centerPoint.add(t.Point.convert(e.offset)),p=i.pointLocation(f),d=t.LngLat.convert(e.center||p);this._normalizeCenter(d);var g=i.project(p),v=i.project(d).sub(g),m=e.curve,y=Math.max(i.width,i.height),x=y/h,b=v.mag();if("minZoom"in e){var _=t.clamp(Math.min(e.minZoom,a,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(_-a);m=Math.sqrt(w/b*2)}var k=m*m;function T(t){var e=(x*x-y*y+(t?-1:1)*k*k*b*b)/(2*(t?x:y)*k*b);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function M(t){return(Math.exp(t)+Math.exp(-t))/2}var S=T(0),E=function(t){return M(S)/M(S+m*t)},C=function(t){return y*((M(S)*(A(e=S+m*t)/M(e))-A(S))/k)/b;var e},L=(T(1)-S)/m;if(Math.abs(b)<1e-6||!isFinite(L)){if(Math.abs(y-x)<1e-6)return this.easeTo(e,r);var P=xe.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,!1),this._ease(function(e){var h=e*L,p=1/E(h);i.zoom=1===e?l:a+i.scaleZoom(p),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e));var m=1===e?d:i.unproject(g.add(v.mult(C(h))).mult(p));i.setLocationAtPoint(i.renderWorldCopies?m.wrap():m,f),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(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),Mn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Mn.prototype.getDefaultPosition=function(){return"bottom-right"},Mn.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},Mn.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},Mn.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: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)}},Mn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Sn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Sn.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","Mapbox logo"),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},Sn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Sn.prototype.getDefaultPosition=function(){return"bottom-left"},Sn.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Sn.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}},Sn.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 En=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};En.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},En.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 minZoom");var a=new sn(e.minZoom,e.maxZoom,e.renderWorldCopies);if(n.call(this,a,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 En,this._controls=[],this._mapId=t.uniqueId(),this._requestManager=new t.RequestManager(e.transformRequest),"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 Ln))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 i._update(!1)}),this.on("moveend",function(){return i._update(!1)}),this.on("zoom",function(){return i._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var n=t.getCanvasContainer(),i=null,a=!1,o=null;for(var s in Tn)t[s]=new Tn[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(n,"mouseout",function(e){t.fire(new un("mouseout",t,e))}),r.addEventListener(n,"mousedown",function(i){a=!0,o=r.mousePos(n,i);var s=new un("mousedown",t,i);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(i),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(i),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(i))}),r.addEventListener(n,"mouseup",function(e){var r=t.dragRotate.isActive();i&&!r&&t.fire(new un("contextmenu",t,i)),i=null,a=!1,t.fire(new un("mouseup",t,e))}),r.addEventListener(n,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new un("mousemove",t,e))}}),r.addEventListener(n,"mouseover",function(e){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new un("mouseover",t,e))}),r.addEventListener(n,"touchstart",function(r){var n=new hn("touchstart",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),r.addEventListener(n,"touchmove",function(e){t.fire(new hn("touchmove",t,e))},{passive:!1}),r.addEventListener(n,"touchend",function(e){t.fire(new hn("touchend",t,e))}),r.addEventListener(n,"touchcancel",function(e){t.fire(new hn("touchcancel",t,e))}),r.addEventListener(n,"click",function(i){var a=r.mousePos(n,i);(a.equals(o)||a.dist(o)-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];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),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?0:t)>=0&&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.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},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.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},i.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},i.prototype.on=function(t,e,r){var i=this;if(void 0===r)return n.prototype.on.call(this,t,e);var a=function(){var n;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 un(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 un(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new un(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)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(a),a.delegates)this.on(o,a.delegates[o]);return this},i.prototype.off=function(t,e,r){if(void 0===r)return n.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],a=0;a180;){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}Dn.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.classList.toggle("mapboxgl-ctrl-icon-disabled",t===this._map.getMaxZoom()),this._zoomOutButton.classList.toggle("mapboxgl-ctrl-icon-disabled",t===this._map.getMinZoom())},Dn.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Dn.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new vn(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Dn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Dn.prototype._createButton=function(t,e,n){var i=r.create("button",t,this._container);return i.type="button",i.title=e,i.setAttribute("aria-label",e),i.addEventListener("click",n),i};var Fn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Bn(t,e,r){var n=t.classList;for(var i in Fn)n.remove("mapboxgl-"+r+"-anchor-"+i);n.add("mapboxgl-"+r+"-anchor-"+e)}var Nn,jn=function(e){function n(n,i){if(e.call(this),(n instanceof t.window.HTMLElement||i)&&(n=t.extend({element:n},i)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var a=r.createNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var c=0,u=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c5280?Yn(e,c,f/5280,"mi"):Yn(e,c,f,"ft")}else r&&"nautical"===r.unit?Yn(e,c,h/1852,"nm"):Yn(e,c,h,"m")}function Yn(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))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),t.style.width=e*l+"px",t.innerHTML=s+n}Hn.prototype.getDefaultPosition=function(){return"bottom-left"},Hn.prototype._onMove=function(){Gn(this._map,this._container,this.options)},Hn.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},Hn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Hn.prototype.setUnit=function(t){this.options.unit=t,Gn(this._map,this._container,this.options)};var Wn=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"),this._className="mapboxgl-ctrl"};Wn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Wn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Wn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Wn.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Wn.prototype._updateTitle=function(){var t=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Wn.prototype._isFullscreen=function(){return this._fullscreen},Wn.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(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Wn.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 Xn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Zn=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Xn),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){var r=this;return this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",function(t){r._update(t.point)}),this._map.on("mouseup",function(t){r._update(t.point)}),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("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),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._map&&(this._map.on("move",this._update),this._map.off("mousemove"),this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this._trackPointer=!1,this._update(),this},n.prototype.trackPointer=function(){var t=this;return this._trackPointer=!0,this._pos=null,this._map&&(this._map.off("move",this._update),this._map.on("mousemove",function(e){t._update(e.point)}),this._map.on("drag",function(e){t._update(e.point)}),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.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._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._onClickClose))},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.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Rn(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 h=a.add(s[o]).round();r.setTransform(this._container,Fn[o]+" translate("+h.x+"px,"+h.y+"px)"),Bn(this._container,o,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(t.Evented),Jn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:On,NavigationControl:Dn,GeolocateControl:Vn,AttributionControl:Mn,ScaleControl:Hn,FullscreenControl:Wn,Popup:Zn,Marker:jn,Style:De,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,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 zt.workerCount},set workerCount(t){zt.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 Jn}),r},"object"==typeof r&&"undefined"!=typeof e?e.exports=i():(n=n||self).mapboxgl=i()},{}],427:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1<p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{"./normalize":429,"gl-mat4/clone":259,"gl-mat4/create":260,"gl-mat4/determinant":261,"gl-mat4/invert":265,"gl-mat4/transpose":276,"gl-vec3/cross":334,"gl-vec3/dot":339,"gl-vec3/length":349,"gl-vec3/normalize":356}],429:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],430:[function(t,e,r){var n=t("gl-vec3/lerp"),i=t("mat4-recompose"),a=t("mat4-decompose"),o=t("gl-mat4/determinant"),s=t("quat-slerp"),l=h(),c=h(),u=h();function h(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,h){if(0===o(e)||0===o(r))return!1;var f=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!p||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{"gl-mat4/determinant":261,"gl-vec3/lerp":350,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":483}],431:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":260,"gl-mat4/fromRotationTranslation":263,"gl-mat4/identity":264,"gl-mat4/multiply":267,"gl-mat4/scale":274,"gl-mat4/translate":275}],432:[function(t,e,r){"use strict";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],433:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=t("mat4-interpolate"),a=t("gl-mat4/invert"),o=t("gl-mat4/rotateX"),s=t("gl-mat4/rotateY"),l=t("gl-mat4/rotateZ"),c=t("gl-mat4/lookAt"),u=t("gl-mat4/translate"),h=(t("gl-mat4/scale"),t("gl-vec3/normalize")),f=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],f=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)f[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&f[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=f[c];else i(o,f,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],h(g,g);var v=this.computedInverse;a(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=m[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,i=0,f=o.length;i0;--p)r[h++]=s[p];return r};var n=t("robust-orientation")[3]},{"robust-orientation":510}],435:[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 h(){(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 f(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",g),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",h),t.addEventListener("keyup",f),t.addEventListener("keydown",f),t.addEventListener("keypress",f),t!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",g),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",h),t.removeEventListener("keyup",f),t.removeEventListener("keydown",f),t.removeEventListener("keypress",f),t!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t("mouse-event")},{"mouse-event":437}],436:[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}},{}],437:[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< 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var E=t.getters||[],C=new Array(M),L=0;L=0?C[L]=!0:C[L]=!1;return function(t,e,r,M,S,E){var C=E.length,L=S.length;if(L<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var P="extractContour"+S.join("_"),O=[],z=[],I=[],D=0;D0&&N.push(l(D,S[R-1])+"*"+s(S[R-1])),z.push(d(D,S[R])+"=("+N.join("-")+")|0")}for(var D=0;D=0;--D)j.push(s(S[D]));z.push(w+"=("+j.join("*")+")|0",b+"=mallocUint32("+w+")",x+"=mallocUint32("+w+")",k+"=0"),z.push(g(0)+"=0");for(var R=1;R<1<0;T=T-1&d)w.push(x+"["+k+"+"+m(T)+"]");w.push(y(0));for(var T=0;T=0;--e)G(e,0);for(var r=[],e=0;e0){",p(S[e]),"=1;");t(e-1,r|1<=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),a.push("1"),o.push("s["+l+"]-2"));var c=".lo("+a.join()+").hi("+o.join()+")";if(0===a.length&&(c=""),i>0){n.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");n.push("){grad",i,"(src.pick(",s.join(),")",c);for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",c);n.push(");")}for(var l=0;l1){dst.set(",s.join(),",",u,",0.5*(src.get(",f.join(),")-src.get(",p.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>1){diff(",h,",src.pick(",f.join(),")",c,",src.pick(",p.join(),")",c,");}else{zero(",h,");};");break;case"mirror":0===i?n.push("dst.set(",s.join(),",",u,",0);"):n.push("zero(",h,");");break;case"wrap":var d=s.slice(),g=s.slice();e[l]<0?(d[u]="s["+u+"]-2",g[u]="0"):(d[u]="s["+u+"]-1",g[u]="1"),0===i?n.push("if(s[",u,"]>2){dst.set(",s.join(),",",u,",0.5*(src.get(",d.join(),")-src.get(",g.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>2){diff(",h,",src.pick(",d.join(),")",c,",src.pick(",g.join(),")",c,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}i>0&&n.push("};")}for(var s=0;s<1<>",rrshift:">>>"};!function(){for(var t in s){var e=s[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in l){var e=l[t];r[t]=o({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:i,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":146}],445:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":446,ndarray:450}],446:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":146}],447:[function(t,e,r){"use strict";var n=t("typedarray-pool"),i=32;function a(t){switch(t){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r0?s.push(["d",d,"=s",d,"-d",h,"*n",h].join("")):s.push(["d",d,"=s",d].join("")),h=d),0!=(p=t.length-1-l)&&(f>0?s.push(["e",p,"=s",p,"-e",f,"*n",f,",f",p,"=",c[p],"-f",f,"*n",f].join("")):s.push(["e",p,"=s",p,",f",p,"=",c[p]].join("")),f=p)}r.push("var "+s.join(","));var g=["0","n0-1","data","offset"].concat(o(t.length));r.push(["if(n0<=",i,"){","insertionSort(",g.join(","),")}else{","quickSort(",g.join(","),")}"].join("")),r.push("}return "+n);var v=new Function("insertionSort","quickSort",r.join("\n")),m=function(t,e){var r=["'use strict'"],n=["ndarrayInsertionSort",t.join("d"),e].join(""),i=["left","right","data","offset"].concat(o(t.length)),s=a(e),l=["i,j,cptr,ptr=left*s0+offset"];if(t.length>1){for(var c=[],u=1;u1){for(r.push("dptr=0;sptr=ptr"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"b){break __l}"].join("")),u=t.length-1;u>=1;--u)r.push("sptr+=e"+u,"dptr+=f"+u,"}");for(r.push("dptr=cptr;sptr=cptr-s0"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"scratch)){",f("cptr",h("cptr-s0")),"cptr-=s0","}",f("cptr","scratch"));return r.push("}"),t.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(t,e),y=function(t,e,r){var n=["'use strict'"],s=["ndarrayQuickSort",t.join("d"),e].join(""),l=["left","right","data","offset"].concat(o(t.length)),c=a(e),u=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var h=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var f=[],p=1;p=0;--a)0!==(o=t[a])&&n.push(["for(i",o,"=0;i",o,"1)for(a=0;a1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function y(e,r,i,a){if(1===r.length)n.push("ptr0="+d(r[0]));else{for(var o=0;o1)for(o=0;o=1;--o)i&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function x(){t.length>1&&c&&n.push("free(pivot1)","free(pivot2)")}function b(e,r){var i="el"+e,a="el"+r;if(t.length>1){var o="__l"+ ++u;y(o,[i,a],!1,["comp=",g("ptr0"),"-",g("ptr1"),"\n","if(comp>0){tmp0=",i,";",i,"=",a,";",a,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",g(d(i)),">",g(d(a)),"){tmp0=",i,";",i,"=",a,";",a,"=tmp0}"].join(""))}function _(e,r){t.length>1?m([e,r],!1,v("ptr0",g("ptr1"))):n.push(v(d(e),g(d(r))))}function w(e,r,i){if(t.length>1){var a="__l"+ ++u;y(a,[r],!0,[e,"=",g("ptr0"),"-pivot",i,"[pivot_ptr]\n","if(",e,"!==0){break ",a,"}"].join(""))}else n.push([e,"=",g(d(r)),"-pivot",i].join(""))}function k(e,r){t.length>1?m([e,r],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join("")):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join(""))}function T(e,r,i){t.length>1?(m([e,r,i],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join("")),n.push("++"+r,"--"+i)):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","ptr2=",d(i),"\n","++",r,"\n","--",i,"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join(""))}function A(t,e){k(t,e),n.push("--"+e)}function M(e,r,i){t.length>1?m([e,r],!0,[v("ptr0",g("ptr1")),"\n",v("ptr1",["pivot",i,"[pivot_ptr]"].join(""))].join("")):n.push(v(d(e),g(d(r))),v(d(r),"pivot"+i))}function S(e,r){n.push(["if((",r,"-",e,")<=",i,"){\n","insertionSort(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}else{\n",s,"(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}"].join(""))}function E(e,r,i){t.length>1?(n.push(["__l",++u,":while(true){"].join("")),m([e],!0,["if(",g("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",u,"}"].join("")),n.push(i,"}")):n.push(["while(",g(d(e)),"===pivot",r,"){",i,"}"].join(""))}return n.push("var "+h.join(",")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?m(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",g("ptr1"),"\n","pivot2[pivot_ptr]=",g("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",g("ptr0"),"\n","y=",g("ptr2"),"\n","z=",g("ptr4"),"\n",v("ptr5","x"),"\n",v("ptr6","y"),"\n",v("ptr7","z")].join("")):n.push(["pivot1=",g(d("el2")),"\n","pivot2=",g(d("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",g(d("el1")),"\n","y=",g(d("el3")),"\n","z=",g(d("el5")),"\n",v(d("index1"),"x"),"\n",v(d("index3"),"y"),"\n",v(d("index5"),"z")].join("")),_("index2","left"),_("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),T("k","less","great"),n.push("break"),n.push("}else{"),A("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--greatindex5){"),E("less",1,"++less"),E("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great1&&c?new Function("insertionSort","malloc","free",n.join("\n"))(r,c[0],c[1]):new Function("insertionSort",n.join("\n"))(r)}(t,e,m);return v(m,y)}},{"typedarray-pool":545}],448:[function(t,e,r){"use strict";var n=t("./lib/compile_sort.js"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{"./lib/compile_sort.js":447}],449:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_3_arg4_)}",args:[{name:"_inline_3_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_4_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_4_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":149,"ndarray-linear-interpolate":443}],450:[function(t,e,r){var n=t("iota-array"),i=t("is-buffer"),a="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),i?a.push("return this.data.set("+u+",v)}"):a.push("return this.data["+u+"]=v}"),a.push("proto.get=function "+r+"_get("+l.join(",")+"){"),i?a.push("return this.data.get("+u+")}"):a.push("return this.data["+u+"]}"),a.push("proto.index=function "+r+"_index(",l.join(),"){return "+u+"}"),a.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+o.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=o.map(function(t){return"a"+t+"=this.shape["+t+"]"}),d=o.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+o.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");return a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map(function(t){return"shape["+t+"]"}).join(",")+","+o.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",a.join("\n"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1;return n.pack(o,r)}},{"double-bits":167}],452:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return["C",t,e,r,n,r,n]}function o(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,h,f,p){if(p)k=p[0],T=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(h=(d=l(h,f,-o)).x))/2,v=(e-(f=d.y))/2,m=g*g/(r*r)+v*v/(a*a);m>1&&(r*=m=Math.sqrt(m),a*=m);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/a+(t+h)/2,w=b*-a*g/r+(e+f)/2,k=Math.asin(((e-w)/a).toFixed(9)),T=Math.asin(((f-w)/a).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(T=h<_?n-T:T)<0&&(T=2*n+T),u&&k>T&&(k-=2*n),!u&&T>k&&(T-=2*n)}if(Math.abs(T-k)>i){var A=T,M=h,S=f;T=k+i*(u&&T>k?1:-1);var E=s(h=_+r*Math.cos(T),f=w+a*Math.sin(T),r,a,o,0,u,M,S,[T,A,_,w])}var C=Math.tan((T-k)/4),L=4/3*r*C,P=4/3*a*C,O=[2*t-(t+L*Math.sin(k)),2*e-(e-P*Math.cos(k)),h+L*Math.sin(T),f-P*Math.cos(T),h,f];if(p)return O;E&&(O=O.concat(E));for(var z=0;z7&&(r.push(m.splice(0,7)),m.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-n,b+=b-i),m=["C",x,b,m[1],m[2],m[3],m[4]];break;case"T":"Q"==e||"T"==e?(h=2*p-h,f=2*d-f):(h=p,f=d),m=o(p,d,h,f,m[1],m[2]);break;case"Q":h=m[1],f=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case"L":m=a(p,d,m[1],m[2]);break;case"H":m=a(p,d,m[1],d);break;case"V":m=a(p,d,p,m[1]);break;case"Z":m=a(p,d,l,u)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],i=m[m.length-3]):(n=p,i=d),r.push(m)}return r}},{}],453:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var b=i[c],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;oa)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0;for(c=0;c<3;++c)f[c]*=p;i[o]=f}return i}},{}],454:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l0){var h=Math.sqrt(u+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,c),h=Math.sqrt(2*f-u+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}},{}],456:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new h(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up);return i};var n=t("filtered-vector"),i=t("gl-mat4/lookAt"),a=t("gl-mat4/fromQuat"),o=t("gl-mat4/invert"),s=t("./lib/quatFromFrame");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function h(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=h.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*i[h];r[12+l]=-c}},f.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},f.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},f.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],h=i[4],f=i[8],p=u*a+h*o+f*s,d=l(u-=a*p,h-=o*p,f-=s*p);u/=d,h/=d,f/=d;var g=i[2],v=i[6],m=i[10],y=g*a+v*o+m*s,x=g*u+v*h+m*f,b=l(g-=y*a+x*u,v-=y*o+x*h,m-=y*s+x*f);g/=b,v/=b,m/=b;var _=u*e+a*r,w=h*e+o*r,k=f*e+s*r;this.center.move(t,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(t,Math.log(T))},f.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],h=i[5],f=i[9],p=i[2],d=i[6],g=i[10],v=e*a+r*u,m=e*o+r*h,y=e*s+r*f,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var T=this.computedRotation,A=T[0],M=T[1],S=T[2],E=T[3],C=A*w+E*x+M*_-S*b,L=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){x=p,b=d,_=g;var z=Math.sin(n)/l(x,b,_);x*=z,b*=z,_*=z,O=O*(w=Math.cos(e))-(C=C*w+O*x+L*_-P*b)*x-(L=L*w+O*b+P*x-C*_)*b-(P=P*w+O*_+C*b-L*x)*_}var I=c(C,L,P,O);I>1e-6?(C/=I,L/=I,P/=I,O/=I):(C=L=P=0,O=1),this.rotation.set(t,C,L,P,O)},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var h=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.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},f.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":455,"filtered-vector":226,"gl-mat4/fromQuat":262,"gl-mat4/invert":265,"gl-mat4/lookAt":266}],457:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return n(r="undefined"!=typeof r?r+"":" ",e)+t}},{"repeat-string":503}],458:[function(t,e,r){"use strict";function n(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",a=!!e.flat;n.forEach(function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])}),e})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r},"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],459:[function(t,e,r){"use strict";var n=t("pick-by-alias");e.exports=function(t){var e;arguments.length>1&&(t=arguments);"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]);t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{"pick-by-alias":465}],460:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),"m"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{"invert-permutation":415,"typedarray-pool":545}],465:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n,a,o={};if("string"==typeof e&&(e=i(e)),Array.isArray(e)){var s={};for(a=0;a0){o=a[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var f=a[h][r],p=0;p0&&(o=d,s=g,l=h)}return i?s:(o&&c(o,l),s)}function h(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],h=t,f=o[1],p=u(l,h,!0);if(n(e[l],e[h],e[f],e[p])<0)break;o.push(t),s=u(l,h)}return o}function f(t,e){return e[1]===e[e.length-1]}for(var o=0;o0;){a[0][o].length;var g=h(o,p);f(d,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t("compare-angle")},{"compare-angle":127}],467:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s0})).length,v=new Array(g),m=new Array(g),p=0;p0;){var N=F.pop(),j=C[N];l(j,function(t,e){return t-e});var U,V=j.length,q=B[N];if(0===q){var k=d[N];U=[k]}for(var p=0;p=0)&&(B[H]=1^q,F.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),U.push(k))}}0===q&&r.push(U)}return r};var n=t("edges-to-adjacency-list"),i=t("planar-dual"),a=t("point-in-big-polygon"),o=t("two-product"),s=t("robust-sum"),l=t("uniq"),c=t("./lib/trim-leaves");function u(t,e){for(var r=new Array(t),n=0;n>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(h(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;mr){for(var f=0;fl||A>c||M=C||o===s)){var u=y[a];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=w&&P.push(f)}var b=x[a],_=b[4*o+0],k=b[4*o+1],E=b[4*o+2],L=b[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(b,o+1),z=.5*i,I=a+1;e(r,n,z,I,_,k||E||L||O),e(r,n+z,z,I,k,E||L||O),e(r+z,n,z,I,E,L||O),e(r+z,n+z,z,I,L,O)}}}(0,0,1,0,0,1),P},d;function E(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(m.slabs,m.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t("robust-orientation")[3],i=t("slab-decomposition"),a=t("interval-tree-1d"),o=t("binary-search-bounds");function s(){return!0}function l(t){for(var e={},r=0;r=-t},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}},{}],476:[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 h=e.linesIntersect(o,s,c,u);if(!1===h){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var f=e.pointsSame(o,c),p=e.pointsSame(s,u);if(f&&p)return n;var d=!f&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(f)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===h.alongA&&(-1===h.alongB?l(t,c):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,u)),0===h.alongB&&(-1===h.alongA?l(n,o):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!a.isEmpty();){var f=a.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var p=c(f),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=u(f,d);if(t)return t}return!!g&&u(f,g)}r&&r.tempStatus(f.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x)t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,r&&r.segmentUpdate(x.seg),f.other.remove(),f.remove();if(a.getHead()!==f){r&&r.rewind(f.seg);continue}t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:i,f.seg.myFill.above=y?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(m=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:i,f.seg.otherFill={above:m,below:m}),r&&r.status(f.seg,!!d&&d.seg,!!g&&g.seg),f.other.status=p.insert(n.node({ev:f}))}else{var b=f.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(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}h.push(f.seg)}a.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d):(T=0,p>=0?(A=0,y=d):-p>=h?(A=1,y=h+2*p+d):y=p*(A=-p/h)+d);else if(A<0)A=0,f>=0?(T=0,y=d):-f>=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d;else{var M=1/k;y=(T*=M)*(c*T+u*(A*=M)+2*f)+A*(u*T+h*A+2*p)+d}else T<0?(b=h+p)>(x=u+f)?(_=b-x)>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d:(T=0,b<=0?(A=1,y=h+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/h)+d):A<0?(b=c+f)>(x=u+p)?(_=b-x)>=(w=c-2*u+h)?(A=1,T=0,y=h+2*p+d):y=(T=1-(A=_/w))*(c*T+u*A+2*f)+A*(u*T+h*A+2*p)+d:(A=0,b<=0?(T=1,y=c+2*f+d):f>=0?(T=0,y=d):y=f*(T=-f/c)+d):(_=h+p-u-f)<=0?(T=0,A=1,y=h+2*p+d):_>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d;var S=1-T-A;for(l=0;l1)for(var r=1;r0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{"cell-orientation":112,"compare-cell":128,"compare-oriented-cell":129}],490:[function(t,e,r){"use strict";var n=t("array-bounds"),i=t("color-normalize"),a=t("update-diff"),o=t("pick-by-alias"),s=t("object-assign"),l=t("flatten-vertex-data"),c=t("to-float32"),u=c.float32,h=c.fract32;e.exports=function(t,e){"function"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,p,d,g,v,m=t._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=t.buffer({usage:"static",type:"float",data:f}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:f.length}),s(b,{update:k,draw:_,destroy:T,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&T(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){"number"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},v.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold?t.shaders.rect(e):"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,h){var d=e.passes[h];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),d||(e.passes[h]=d={id:h,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,h80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function i(t,e,r,n,i){var a,o;if(i===A(t,e,r,n)>0)for(a=e;a=e;a-=n)o=w(a,t[a],t[a+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;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,h);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,v=g.next;else if((t=g)===v){f?1===f?o(t=c(t,e,r),e,r,n,i,h,2):2===f&&u(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(m(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(m(i,a,o)>=0)return!1;for(var s=i.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,h=p(s,l,e,r,n),f=p(c,u,e,r,n),d=t.prevZ,v=t.nextZ;d&&d.z>=h&&v&&v.z<=f;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!y(i,a)&&x(i,n,n.next,a)&&b(i,a)&&b(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),k(n),k(n.next),n=t=a),n=n.next}while(n!==t);return n}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=_(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function f(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&&g(ar.x)&&b(n,t)&&(r=n,f=l),n=n.next;return r}(t,e)){var r=_(e,t);a(r,r.next)}}function p(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||m(t,e,r)>0!=m(t,e,n)>0&&m(r,n,t)>0!=m(r,n,e)>0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function _(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w(t,e,r,n){var i=new T(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],493:[function(t,e,r){arguments[4][318][0].apply(r,arguments)},{"./is-implemented":494,"./polyfill":496,dup:318}],494:[function(t,e,r){arguments[4][319][0].apply(r,arguments)},{dup:319}],495:[function(t,e,r){arguments[4][320][0].apply(r,arguments)},{dup:320}],496:[function(t,e,r){arguments[4][321][0].apply(r,arguments)},{"./is-native-implemented":495,d:151,dup:321,"es5-ext/object/is-value":194,"es5-ext/object/set-prototype-of":200,"es5-ext/object/valid-object":204,"es5-ext/object/valid-value":205,"es5-ext/string/random-uniq":210,"es6-iterator/for-of":212,"es6-iterator/get":213,"es6-symbol":219}],497:[function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e 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=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(palette,\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) * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),d&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.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},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=l(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var f={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(f):e.elements=s.elements(f)}return i({data:g.float(t),usage:"dynamic"}),a({data:g.fract(t),usage:"dynamic"}),c({data:new Uint8Array(u),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&&t.destroy&&t.destroy()}),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],o=0,l=Math.min(e.length,r.count);o=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},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?g=new(h(e.dtype))(m):e.dtype&&(g=e.dtype,Array.isArray(g)&&(g.length=m));for(var y=0;yr||s>p){for(var f=0;fl||A>c||M=E||o===s)){var u=x[a];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=y&&P.push(f)}var _=b[a],w=_[4*o+0],k=_[4*o+1],C=_[4*o+2],L=_[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(_,o+1),z=.5*i,I=a+1;e(r,n,z,I,w,k||C||L||O),e(r,n+z,z,I,k,C||L||O),e(r+z,n,z,I,C,L||O),e(r+z,n+z,z,I,L,O)}}}(0,0,1,0,0,1),P},g;function C(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s2?(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;nT))&&(s.lower||!(k>>=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===h?i>>=1:5125===h&&(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 h=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),h.primType=4,h.vertCount=0|t,h.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,f=0;Array.isArray(t)||W(t)||l(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=$[t.usage]),"primitive"in t&&(n=rt[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(f=u[t.type]),"length"in t?o=0|t.length:(o=i,5123===f||5122===f?o*=2:5125!==f&&5124!==f||(o*=4))),a(h,e,r,n,i,o,f)}else c(),h.primType=4,h.vertCount=0,h.type=5121;return s}var c=r.create(null,34963,!0),h=new i(c._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=h,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(h)},s},createStream:function(t){var e=h.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){h.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 L(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(mt).forEach(function(e){t+=mt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=C();return"number"==typeof t?M(a,0|t,"number"==typeof e?0|e:0|t):t?(O(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),z(r,3553),R(),L(a),o.profile&&(i.stats.size=k(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return mt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=m();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,D(i),d(o,3553,e,r,a),R(),T(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l,c=i.channels,u=i.type,h=0;i.mipmask>>h;++h){var f=a>>h,p=s>>h;if(!f||!p)break;l=G.zero.allocType(u,f*p*c),t.texImage2D(3553,h,i.format,f,p,0,i.format,i.type,l),l&&G.zero.freeType(l)}return R(),o.profile&&(i.stats.size=k(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function h(t,e,r,n,i,a){var s,l=f.texInfo;for(P.call(l),s=0;6>s;++s)g[s]=C();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(O(l,t),u(f,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],f),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(f,g[0]),f.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,f.internalformat=g[0].internalformat,h.width=g[0].width,h.height=g[0].height,D(f),s=0;6>s;++s)E(g[s],34069+s);for(z(l,34067),R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,l.genMipmaps,!0)),h.format=tt[f.internalformat],h.type=et[f.type],h.mag=rt[l.magFilter],h.min=nt[l.minFilter],h.wrapS=it[l.wrapS],h.wrapT=it[l.wrapT],s=0;6>s;++s)L(g[s]);return h}var f=new I(34067);mt[f.id]=f,a.cubeCount++;var g=Array(6);return h(e,r,n,i,s,l),h.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=m();return c(a,f),a.width=0,a.height=0,p(a,e),a.width=a.width||(f.width>>i)-r,a.height=a.height||(f.height>>i)-n,D(f),d(a,34069+t,r,n,i),R(),T(a),h},h.resize=function(e){if((e|=0)!==f.width){h.width=f.width=e,h.height=f.height=e,D(f);for(var r=0;6>r;++r)for(var n=0;f.mipmask>>n;++n)t.texImage2D(34069+r,n,f.format,e>>n,e>>n,0,f.format,f.type,null);return R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=f,o.profile&&(h.stats=f.stats),h.destroy=function(){f.decRef()},h},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);z(e.texInfo,e.target)})}}}function A(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return"object"==typeof t&&(i=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=i._reglType)?r=i:"textureCube"===t?r=i:"renderbuffer"===t&&(n=i,e=36161),new o(e,r,n)}function h(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function f(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function d(){this.id=k++,T[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete T[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;ni;++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(T).forEach(v)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(T).forEach(function(e){e.framebuffer=t.createFramebuffer(),m(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){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;rt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return f.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={},f.forEach(function(e){t.deleteProgram(e.program)}),f.length=0,h={},r.shaderCount=0},program:function(t,e,n){var i=h[e];i||(i=h[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a),i[t]=a,f.push(a)),a},restore:function(){c={},u={};for(var t=0;t"+e+"?"+i+".constant["+e+"]:0;"}).join(""),"}}else{","if(",o,"(",i,".buffer)){",u,"=",s,".createStream(",34962,",",i,".buffer);","}else{",u,"=",s,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),o}function A(t,e,r,n,i){var o=_(t),s=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:t=!1,"height"in r?o=0|r.height:t=!1,new I(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,a=n;"width"in r||(a=e.def(i,".","framebufferWidth","-",s));var c=o;return"height"in r||(c=e.def(i,".","framebufferHeight","-",l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=F(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,".x|0"),a=e.def(r,".y|0");return[i,a,e.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",i,")"),r=e.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",a,")")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new I(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".","framebufferWidth"),e.def(r,".","framebufferHeight")]}):null}var i=t.static,a=t.dynamic;if(t=n("viewport")){var o=t;t=new I(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,".viewportWidth",r[2]),e.set(n,".viewportHeight",r[3]),r})}return{viewport:t,scissor_box:n("scissor.box")}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,i={};return nt.forEach(function(t){function e(e,a){if(t in r){var s=e(r[t]);i[o]=R(function(){return s})}else if(t in n){var l=n[t];i[o]=F(l,function(t,e){return a(t,e,t.invoke(e,l))})}}var o=m(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return e(function(t){return t},function(t,e,r){return r});case"depth.func":return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,"[",r,"]")});case"depth.range":return e(function(t){return t},function(t,e,r){return[e.def("+",r,"[0]"),e=e.def("+",r,"[1]")]});case"blend.func":return e(function(t){return[wt["srcRGB"in t?t.srcRGB:t.src],wt["dstRGB"in t?t.dstRGB:t.dst],wt["srcAlpha"in t?t.srcAlpha:t.src],wt["dstAlpha"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('"',t,n,'" in ',r,"?",r,".",t,n,":",r,".",t)}t=t.constants.blendFuncs;var i=n("src","RGB"),a=n("dst","RGB"),o=(i=e.def(t,"[",i,"]"),e.def(t,"[",n("src","Alpha"),"]"));return[i,a=e.def(t,"[",a,"]"),o,t=e.def(t,"[",n("dst","Alpha"),"]")]});case"blend.equation":return e(function(t){return"string"==typeof t?[J[t],J[t]]:"object"==typeof t?[J[t.rgb],J[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond("typeof ",r,'==="string"')).then(i,"=",a,"=",n,"[",r,"];"),t.else(i,"=",n,"[",r,".rgb];",a,"=",n,"[",r,".alpha];"),e(t),[i,a]});case"blend.color":return e(function(t){return a(4,function(e){return+t[e]})},function(t,e,r){return a(4,function(t){return e.def("+",r,"[",t,"]")})});case"stencil.mask":return e(function(t){return 0|t},function(t,e,r){return e.def(r,"|0")});case"stencil.func":return e(function(t){return[kt[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]},function(t,e,r){return[t=e.def('"cmp" in ',r,"?",t.constants.compareFuncs,"[",r,".cmp]",":",7680),e.def(r,".ref|0"),e=e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return e(function(e){return["stencil.opBack"===t?1029:1028,Tt[e.fail||"keep"],Tt[e.zfail||"keep"],Tt[e.zpass||"keep"]]},function(e,r,n){function i(t){return r.def('"',t,'" in ',n,"?",a,"[",n,".",t,"]:",7680)}var a=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,i("fail"),i("zfail"),i("zpass")]});case"polygonOffset.offset":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,".factor|0"),e=e.def(r,".units|0")]});case"cull.face":return e(function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e},function(t,e,r){return e.def(r,'==="front"?',1028,":",1029)});case"lineWidth":return e(function(t){return t},function(t,e,r){return r});case"frontFace":return e(function(t){return At[t]},function(t,e,r){return e.def(r+'==="cw"?2304:2305')});case"colorMask":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return a(4,function(t){return"!!"+r+"["+t+"]"})});case"sample.coverage":return e(function(t){return["value"in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('"value" in ',r,"?+",r,".value:1"),e=e.def("!!",r,".invert")]})}}),i}(t),u=w(t),h=s.viewport;return h&&(c.viewport=h),(s=s[h=m("scissor.box")])&&(c[h]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,g,v,s],");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(u+".drawElements("+[d,v,m,g+"<<(("+m+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[d,g,v]+");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,h=c.draw,f=n.draw,p=function(){var i=f.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(h,".","elements"),i&&a("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);"),i}(),d=i("primitive"),g=i("offset"),v=function(){var i=f.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(h,".","count"),i}();if("number"==typeof v){if(0===v)return}else r("if(",v,"){"),r.exit("}");$&&(s=i("instances"),l=t.instancing);var m=p+".type",y=f.elements&&D(f.elements);$&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function q(t,e,r,n,i){return i=(e=b()).proc("body",i),$&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),U(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId="a1",L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),U(t,e,e,r)}function Y(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),C(t,u,r.state,i),r.profile&&i(r.profile)&&B(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),U(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link(function(e){return q(G,t,r,e,2)}),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function W(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),z(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);v(n)?n.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,n)}),B(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(a,"."+t,n[t])})}),n("vert"),n("frag"),0=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o)},o._reglType="renderbuffer",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=["x","y","z","w"],_t="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),wt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},kt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Tt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},At={cw:2304,ccw:2305},Mt=new I(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),Q=null;else{Q=q.next(e),h();for(var t=Z.length-1;0<=t;--t){var r=Z[t];r&&r(P,null,0)}v.flush(),w&&w.update()}}function r(){!Q&&0=Z.length&&n()}}}}function u(){var t=W.viewport,e=W.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function h(){P.tick+=1,P.time=g(),u(),G.procs.poll()}function f(){u(),G.procs.refresh(),w&&w.update()}function g(){return(H()-k)/1e3}if(!(t=i(t)))return null;var v=t.gl,m=v.getContextAttributes();v.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(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 z.create(t,34962,!1,!1)},elements:function(t){return I.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:F.create,framebuffer:U.create,framebufferCube:U.createCube,attributes:m,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=J;break;case"restore":r=K;break;case"destroy":r=$}return r.push(e),{cancel:function(){for(var t=0;t=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)}},{}],504:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],505:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&&(t[--n]=r,r=l)}for(var c=0,i=n;i>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(function(t){for(var e=new Array(t),r=0;r>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return u(e,t)}function h(t){if(2===t.length)return[["diff(",u(t[0][0],t[1][1]),",",u(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var o=0;o0&&r.push(","),o===i?r.push("+b[",a,"]"):r.push("+A[",a,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o: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],h=e[2]-n[2],f=r[2]-n[2],d=a*c,g=o*l,v=o*s,m=i*c,y=i*l,x=a*s,b=u*(d-g)+h*(v-m)+f*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(h)+(Math.abs(y)+Math.abs(x))*Math.abs(f));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;d.length<=s;)d.push(h(d.length));for(var t=[],r=["slow"],n=0;n<=s;++n)t.push("a"+n),r.push("o"+n);var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&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],h=Math.min(c,u),f=Math.max(c,u);if(f=n?(i=h,(l+=1)=n?(i=h,(l+=1)0?1:0}},{}],517:[function(t,e,r){"use strict";e.exports=function(t){return i(n(t))};var n=t("boundary-cells"),i=t("reduce-simplicial-complex")},{"boundary-cells":95,"reduce-simplicial-complex":489}],518:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){r=r||0,"undefined"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}for(var a=t+1;a>1;--a){a>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[v],s)););}return r}function h(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=h,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0){var n=m(r);if(e0){var t=T[0];return v(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=T[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}for(var T=[],A=new Array(a),h=0;h>1;h>=0;--h)x(h);for(;;){var E=_();if(E<0||c[E]>r)break;k(E)}for(var C=[],h=0;h=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&P.push([n,i])}}),i.unique(i.normalize(P)),{positions:C,edges:P}};var n=t("robust-orientation"),i=t("simplicial-complex")},{"robust-orientation":510,"simplicial-complex":522}],525:[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 h(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 h=this.horizontal[e];if(h.length>0){var f=n.ge(h,t[1],l);if(f=h.length)return i;p=h[f]}}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":525,"binary-search-bounds":91,"functional-red-black-tree":230,"robust-orientation":510}],527:[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 h=o(s,u,l,i);r.push(h),n.push(h.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":507,"robust-sum":515}],528:[function(t,e,r){!function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(r){return function(r,n){var i,a,o,s,l,c,u,h,f,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)||h&&!s.sign?f="":(f=h?"+":"-",i=i.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+i).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?f+i+l:"0"===c?f+l+i:l+f+i)}return g}(function(e){if(i[e])return i[e];var r,n=e,a=[],o=0;for(;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push("%");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({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 i[e]=a}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var i=Object.create(null);"undefined"!=typeof r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],529:[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]){for(var v=[],m=[],y=0,d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=h.length,x===e){l.length=d;break}}h.push(v);for(var b=new Array(y),d=0;d c)|0 },"),"generic"===e&&a.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){");for(var c=0;c<1<<(1<128&&c%128==0){h.length>0&&f.push("}}");var p="vExtra"+h.length;a.push("case ",c>>>7,":",p,"(m&0x7f,",l.join(),");break;"),f=["function ",p,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(A="+"+v[b]+"*c");var M=d[b].length/y*.5,S=.5+m[b]/y*.5;T.push("d"+b+"-"+S+"-"+M+"*("+d[b].join("+")+A+")/("+g[b].join("+")+")")}f.push("a.push([",T.join(),"]);","break;")}a.push("}},"),h.length>0&&f.push("}}");for(var E=[],c=0;c<1<1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,h=t.ry,f=t.xAxisRotation,p=void 0===f?0:f,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===h)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),h=Math.abs(h);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(h,2);k>1&&(u*=Math.sqrt(k),h*=Math.sqrt(k));var T=function(t,e,r,n,a,o,l,c,u,h,f,p){var d=Math.pow(a,2),g=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*f,_=h*x-u*b+(t+r)/2,w=u*x+h*b+(e+n)/2,k=(f-x)/a,T=(p-b)/o,A=(-f-x)/a,M=(-p-b)/o,S=s(1,0,k,T),E=s(k,T,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,h,g,m,x,b,_,w),A=n(T,4),M=A[0],S=A[1],E=A[2],C=A[3],L=Math.abs(C)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var P=Math.max(Math.ceil(L),1);C/=P;for(var O=0;Oe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":60,assert:68,"is-svg-path":424,"normalize-svg-path":534,"parse-svg-path":460}],534:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,h=null,f=0,p=0,d=0,g=t.length;d4?(o=v[v.length-4],s=v[v.length-3]):(o=f,s=p),r.push(v)}return r};var n=t("svg-arc-to-cubic-bezier");function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{"svg-arc-to-cubic-bezier":532}],535:[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,h;e.shape?(r=e.shape[0],h=e.shape[1]):(r=c.width=e.w||e.width||200,h=c.height=e.h||e.height||200);var f=Math.min(r,h),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),h/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,r,h),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*h),u.scale(v,v),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 m=new Path2D(t);u.fill(m),p&&u.stroke(m)}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*f})}},{"bitmap-sdf":93,"draw-svg-path":168,"is-svg-path":424,"parse-svg-path":460,"svg-path-bounds":533}],536:[function(t,e,r){(function(r){"use strict";e.exports=function t(e,r,i){var i=i||{};var o=a[e];o||(o=a[e]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o0&&(h+=.02);for(var p=new Float32Array(u),d=0,g=-.5*h,f=0;f1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),h=!0,f="hsl"),e.hasOwnProperty("a")&&(a=e.a));var p,d,g;return a=C(a),{ok:h,format:e.format||f,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e>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=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(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 f(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=[z(a(t).toString(16)),z(a(e).toString(16)),z(a(r).toString(16)),z(D(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+"%",g:a(100*L(this._g,255))+"%",b:a(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*L(this._r,255))+"%, "+a(100*L(this._g,255))+"%, "+a(100*L(this._b,255))+"%)":"rgba("+a(100*L(this._r,255))+"%, "+a(100*L(this._g,255))+"%, "+a(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);r="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:I(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 C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function z(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var 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)}"undefined"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],538:[function(t,e,r){"use strict";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=i(t),r=0,n=e.length;rh&&(h=l[0]),l[1]f&&(f=l[1])}function i(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(i);break;case"Point":n(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(n)}}if(!e){var a,o,s=r(t),l=new Array(2),c=1/0,u=c,h=-c,f=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=l[0]),l[1]f&&(f=l[1])}),t.objects)i(t.objects[o]);e=t.bbox=[c,u,h,f]}return e},i=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r};function a(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,a=o(t,e);return null==r&&null==n?{type:"Feature",properties:i,geometry:a}:null==n?{type:"Feature",id:r,properties:i,geometry:a}:{type:"Feature",id:r,bbox:n,properties:i,geometry:a}}function o(t,e){var n=r(t),a=t.arcs;function o(t,e){e.length&&e.pop();for(var r=a[t<0?~t:t],o=0,s=r.length;o1)n=function(t,e,r){var n,i=[],a=[];function o(t){var e=t<0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":e.arcs.forEach(l)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,o,c=1,u=l(i[0]);cu&&(o=i[0],i[0]=i[c],i[c]=o,u=a);return i})}}var u=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var r,i=n(t),a=i[0],o=(i[2]-a)/(e-1)||1,s=i[1],l=(i[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-a)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":c(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,i=1,c=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-a)/o),p=h[1]=Math.round((h[1]-s)/l);iMath.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 f(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=f.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 h=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=h;var f=this.computedToward;o(f,e,r),s(f,f);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,A=-m*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=_*r[a]+w*f[a]+k*e[a];E[4*a+1]=T*r[a]+A*f[a]+M*e[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],P=E[5],O=E[9],z=E[2],I=E[6],D=E[10],R=P*D-O*I,F=O*z-L*D,B=L*I-P*z,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],h=i[4],f=i[8],p=u*a+h*o+f*s,d=c(u-=a*p,h-=o*p,f-=s*p),g=(u/=d)*e+a*r,v=(h/=d)*e+o*r,m=(f/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],h=e[a+8];if(n){var f=Math.abs(s),p=Math.abs(l),d=Math.abs(h),g=Math.max(f,p,d);f===g?(s=s<0?-1:1,l=h=0):d===g?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var v=c(s,l,h);s/=v,l/=v,h/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*h,k=c(x-=s*w,b-=l*w,_-=h*w),T=l*(_/=k)-h*(b/=k),A=h*(x/=k)-s*_,M=s*b-l*x,S=c(T,A,M);if(T/=S,A/=S,M/=S,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,s,l,h),this.right.jump(t,x,b,_),2===a){var E=e[1],C=e[5],L=e[9],P=E*x+C*b+L*_,O=E*T+C*A+L*M;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,P)}else{var z=e[2],I=e[6],D=e[10],R=z*s+I*l+D*h,F=z*x+I*b+D*_,B=z*T+I*A+D*M;m=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var q=V[15],H=V[12]/q,G=V[13]/q,Y=V[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-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],h=e[1]-r[1],f=e[2]-r[2],p=c(l,h,f);if(!(p<1e-6)){l/=p,h/=p,f/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=i*g+a*v+o*m,x=c(g-=y*i,v-=y*a,m-=y*o);if(!(x<.01&&(x=c(g=a*f-o*h,v=o*l-i*f,m=i*h-a*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,i,a,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*m-o*v,_=o*g-i*m,w=i*v-a*g,k=c(b,_,w),T=i*l+a*h+o*f,A=g*l+v*h+m*f,M=(b/=k)*l+(_/=k)*h+(w/=k)*f,S=Math.asin(u(T)),E=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],P=C[C.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-E),z=Math.abs(L-E),I=Math.abs(L-2*Math.PI-E);O0?r.pop():new ArrayBuffer(t)}function f(t){return new Uint8Array(h(t),0,t)}function p(t){return new Uint16Array(h(2*t),0,t)}function d(t){return new Uint32Array(h(4*t),0,t)}function g(t){return new Int8Array(h(t),0,t)}function v(t){return new Int16Array(h(2*t),0,t)}function m(t){return new Int32Array(h(4*t),0,t)}function y(t){return new Float32Array(h(4*t),0,t)}function x(t){return new Float64Array(h(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(h(t),0,t):f(t)}function _(t){return new DataView(h(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),r=c[e];return r.length>0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[i.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|i.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[i.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return h(t);switch(e){case"uint8":return f(t);case"uint16":return p(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return y(t);case"double":case"float64":return x(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return _(t);default:return null}return null},r.mallocArrayBuffer=h,r.mallocUint8=f,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=v,r.mallocInt32=m,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":92,buffer:105,dup:170}],546:[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",w(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(k=0;k-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",F())),A+=.25*C*(l-s)}if(!0===o.superscripts){var c=t.indexOf(d),h=r.indexOf(d),p=c>-1?parseInt(t[1+c]):0,g=h>-1?parseInt(r[1+h]):0;p!==g&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,g-p),n=n.replace("?px ",F())),A-=.25*C*(g-p)}if(!0===o.bolds){var v=t.indexOf(u)>-1,y=r.indexOf(u)>-1;!v&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),v&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=t.indexOf(f)>-1,b=r.indexOf(f)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w",a="",o=i.length,s=a.length,l=e[0]===d||e[0]===m,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var f=n[h].indexOf(e[0]);-1===f?n[h]+=e:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var p=c+o,g=r.substr(p,u-p).indexOf(i);c=-1!==g?g:u+s}return n}function b(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var i=b(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:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:x(function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this})},delete___:{value:x(function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!i&&i.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==v)throw new Error("bogus call to permitHostObjects___");a=!0})}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&"___"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],553:[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":554}],554:[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}},{}],555:[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":553}],556:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":232}],557:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>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=f[o-f[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 h=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(h/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=h[t-h[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l="number"==typeof t&&t>=1888&&t<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var c="number"==typeof e&&e>=1&&e<=12;if(!c)throw new Error("Lunar month outside range 1 - 12");var u,p="number"==typeof r&&r>=1&&r<=30;if(!p)throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(u=!1,a=n):(u=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=h[o.year-h[0]],v=g>>13;d=v?o.month>v?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var m=0;m>9&4095,(x>>5&15)-1,(31&x)+s);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{var o="number"==typeof t&&t>=1888&&t<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s="number"==typeof e&&e>=1&&e<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l="number"==typeof r&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var c=f[i.year-f[0]],u=i.year<<9|i.month<<5|i.day;a.year=u>=c?i.year:i.year-1,c=f[a.year-f[0]];var p,d=new Date(c>>9&4095,(c>>5&15)-1,31&c),g=new Date(i.year,i.month-1,i.day);p=Math.round((g-d)/864e5);var v,m=h[a.year-h[0]];for(v=0;v<13;v++){var y=m&1<<12-v?30:29;if(p>13;!x||v=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":571,"object-assign":454}],560:[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":571,"object-assign":454}],561:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=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":571,"object-assign":454}],562:[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":571,"object-assign":454}],563:[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":571,"object-assign":454}],564:[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":571,"object-assign":454}],565:[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":571,"object-assign":454}],566:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;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),h=t-this.toJD(l,u,1)+1;return this.newDate(l,u,h)}}),n.calendars.persian=a,n.calendars.jalali=a},{"../main":571,"object-assign":454}],568:[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":571,"object-assign":454}],569:[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":571,"object-assign":454}],570:[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":571,"object-assign":454}],571:[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":454}],572:[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,h=r.monthNamesShort||this.local.monthNamesShort,f=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(f,p);d>E;E=this.daysInMonth(f,p))p++,d-=E}return h>-1?this.fromJD(h):this.newDate(f,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":571,"object-assign":454}],573:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":146}],574:[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":573}],575:[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}]},{}],576:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../../plots/font_attributes":793,"./arrow_paths":575}],577:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)})}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],c=t["a"+a+"ref"],u=t["_"+a+"padplus"],h=t["_"+a+"padminus"],f={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+f,g=p-f,v=3*t.startarrowsize*t.arrowwidth||0,m=v+f,y=v-f;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(h,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(h,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":719,"../../plots/cartesian/axes":767,"./draw":582}],578:[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,h=[],f=[],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),h={},f=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 H=!1,G=["x","y"],Y=0;Y1)&&(tt===Q?((ct=et.r2fraction(e["a"+$]))<0||ct>1)&&(H=!0):H=!0),W=et._offset+et.r2p(e[$]),J=.5}else"x"===$?(Z=e[$],W=b.l+b.w*Z):(Z=1-e[$],W=b.t+b.h*Z),J=e.showarrow?.5:Z;if(e.showarrow){lt.head=W;var ut=e["a"+$];K=nt*U(.5,e.xanchor)-it*U(.5,e.yanchor),tt===Q?(lt.tail=et._offset+et.r2p(ut),X=K):(lt.tail=W+ut,X=K+ut),lt.text=lt.tail+K;var ht=x["x"===$?"width":"height"];if("paper"===Q&&(lt.head=o.constrain(lt.head,1,ht-1)),"pixel"===tt){var ft=-Math.max(lt.tail-3,lt.text),pt=Math.min(lt.tail+3,lt.text)-ht;ft>0?(lt.tail+=ft,lt.text+=ft):pt>0&&(lt.tail-=pt,lt.text-=pt)}lt.tail+=st,lt.head+=st}else X=K=at*U(J,ot),lt.text=W+K;lt.text+=st,K+=st,X+=st,e["_"+$+"padplus"]=at/2+X,e["_"+$+"padminus"]=at/2-X,e["_"+$+"size"]=at,e["_"+$+"shift"]=K}if(t._dragging||!H){var dt=0,gt=0;if("left"!==e.align&&(dt=(w-m)*("center"===e.align?.5:1)),"top"!==e.valign&&(gt=(O-y)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:R+dt-1,y:R+gt}).call(c.setClipUrl,B?M:null,t);else{var vt=R+gt-d.top,mt=R+dt-d.left;V.call(h.positionText,mt,vt).call(c.setClipUrl,B?M:null,t)}N.select("rect").call(c.setRect,R,R,w,O),F.call(c.setRect,I/2,I/2,D-I,j-I),z.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:"rotate("+E+","+S.x.text+","+S.y.text+")"});var yt,xt=function(r,n){C.selectAll(".annotation-arrow-g").remove();var u=S.x.head,h=S.y.head,f=S.x.tail+r,d=S.y.tail+n,m=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(E,m,y),w=o.apply2DTransform(x),M=o.apply2DTransform2(x),P=+F.attr("width"),O=+F.attr("height"),I=m-.5*P,D=I+P,R=y-.5*O,B=R+O,N=[[I,R,I,B],[I,B,D,B],[D,B,D,R],[D,R,I,R]].map(M);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,h,u+1e6,h+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(f,d,u,h,t[0],t[1],t[2],t[3]);e&&(f=e.x,d=e.y)});var j=e.arrowwidth,U=e.arrowcolor,V=e.arrowside,q=C.append("g").style({opacity:l.opacity(U)}).classed("annotation-arrow-g",!0),H=q.append("path").attr("d","M"+f+","+d+"L"+u+","+h).style("stroke-width",j+"px").call(l.stroke,l.rgb(U));if(g(H,V,e),_.annotationPosition&&H.node().parentNode&&!a){var G=u,Y=h;if(e.standoff){var W=Math.sqrt(Math.pow(u-f,2)+Math.pow(h-d,2));G+=e.standoff*(f-u)/W,Y+=e.standoff*(d-h)/W}var X,Z,J=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-G)+","+(d-Y),transform:"translate("+G+","+Y+")"}).style("stroke-width",j+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:t,prepFn:function(){var t=c.getTranslate(z);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+".autorange",!0),v&&v.autorange&&k(v._name+".autorange",!0)},moveFn:function(t,r){var n=w(X,Z),i=n[0]+t,a=n[1]+r;z.call(c.setTranslate,i,a),T("x",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),T("y",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&T("ax",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&T("ay",v.p2r(v.r2p(e.ay)+r)),q.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+E+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&xt(0,0),P)p.init({element:z.node(),gd:t,prepFn:function(){yt=L.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?T("ax",s.p2r(s.r2p(e.ax)+t)):T("ax",e.ax+t),e.ayref===e.yref?T("ay",v.p2r(v.r2p(e.ay)+r)):T("ay",e.ay+r),xt(t,r);else{if(a)return;var i,o;if(s)i=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;i=p.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,h=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(h-r/b.h,u,0,1,e.yanchor)}T("x",i),T("y",o),s&&v||(n=p.getCursor(s?.5:i,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+yt}),f(z,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(z),i.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}else z.remove()}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,v=e.indexOf("end")>=0,m=h.backoff*p+r.standoff,y=f.backoff*d+r.startstandoff;if("line"===u.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},s={x:+t.attr("x2"),y:+t.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void P();if(m){if(m*m>x*x+b*b)return void P();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void P();var k=y*Math.cos(l),T=y*Math.sin(l);o.x-=k,o.y-=T,t.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var A=u.getTotalLength(),M="";if(A1){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":816,"../annotations/draw":582}],589:[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+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,l))),(i.isDark()?e?i.lighten(e):l:r?i.darken(r):s).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10));Y*=Z*c.roundUp(X/Z,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(G.tick0=0)}G.dtick=Y}G.domain=[V+N,V+R-N],G.setScale(),t.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var J,K=t.select("."+T.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),$=t.select("."+T.cbaxis),Q=0;function tt(n,i){var a={propContainer:G,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),d.draw(r,n,u(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+F)*l.w,n=G.title.font.size;t="top"===A?(1-(V+R-N))*l.h+l.t+3+.75*n:(1-(V+N))*l.h+l.t-3-.25*n,tt(G._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var a=t.select("."+T.cbtitle),o=a.select("text"),u=[-e.outlinewidth/2,e.outlinewidth/2],h=a.select(".h"+G._id+"title-math-group").node(),p=15.6;if(o.node()&&(p=parseInt(o.node().style.fontSize,10)*_),h?(Q=f.bBox(h).height)>p&&(u[1]-=(Q-p)/2):o.node()&&!o.classed(T.jsPlaceholder)&&(Q=f.bBox(o.node()).height),Q){if(Q+=5,"top"===A)G.domain[1]-=Q/l.h,u[1]*=-1;else{G.domain[0]+=Q/l.h;var d=g.lineCount(o);u[1]+=(1-d)*p}a.attr("transform","translate("+u+")"),G.setScale()}}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-G.domain[1]))+")"),$.attr("transform","translate(0,"+Math.round(-l.t)+")");var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).data(P);m.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),m.exit().remove();var y=M.map(G.c2p).map(Math.round).sort(function(t,e){return t-e});m.each(function(t,a){var o=[0===a?M[0]:(P[a]+P[a-1])/2,a===P.length-1?M[1]:(P[a]+P[a+1])/2].map(G.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[1]);var s=n.select(this).attr({x:j,width:Math.max(z,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(e._fillgradient)f.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=E(t).replace("e-","");s.attr("fill",i(l).toHexString())}});var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(v.color&&v.width?O:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr("d","M"+j+","+(Math.round(G.c2p(t))+v.width/2%1)+"h"+z).call(f.lineGroupStyle,v.width,S(t),v.dash)}),$.selectAll("g."+G._id+"tick,path").remove();var b=j+z+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),w=s.calcTicks(G),k=s.makeTransFn(G),C=s.getTickSigns(G)[2];return s.drawTicks(r,G,{vals:"inside"===G.ticks?s.clipEnds(G,w):w,layer:$,path:s.makeTickPath(G,b,C),transFn:k}),s.drawLabels(r,G,{vals:w,layer:$,transFn:k,labelFns:s.makeLabelFns(G,b)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=G.title.font.size,e=G._offset+G._length/2,i=l.l+(G.position||0)*l.w+("right"===G.side?10+t*(G.showticklabels?1:.5):-10-t*(G.showticklabels?.5:0));tt("h"+G._id+"title",{avoid:{selection:n.select(r).selectAll("g."+G._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:i,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},a.previousPromises,function(){var n=z+e.outlinewidth/2+f.bBox($.node()).width;if((J=K.select("text")).node()&&!J.classed(T.jsPlaceholder)){var i,o=K.select(".h"+G._id+"title-math-group").node();i=o&&-1!==["top","bottom"].indexOf(A)?f.bBox(o).width:f.bBox(K.node()).right-j-l.l,n=Math.max(n,i)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=q-H;t.select("."+T.cbbg).attr({x:j-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:H-B,width:Math.max(s,2),height:Math.max(c+2*B,2)}).call(p.fill,e.bgcolor).call(p.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+T.cboutline).attr({x:j,y:H+e.ypad+("top"===A?Q:0),width:Math.max(z,2),height:Math.max(c-2*e.ypad-Q,2)}).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var u=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform","translate("+(l.l-u)+","+l.t+")");var h={},d=w[e.yanchor],g=k[e.yanchor];"pixels"===e.lenmode?(h.y=e.y,h.t=c*d,h.b=c*g):(h.t=h.b=0,h.yt=e.y+e.len*d,h.yb=e.y-e.len*g);var v=w[e.xanchor],m=k[e.xanchor];if("pixels"===e.thicknessmode)h.x=e.x,h.l=s*v,h.r=s*m;else{var y=s-z;h.l=y*v,h.r=y*m,h.xl=e.x-e.thickness*v,h.xr=e.x+e.thickness*m}a.autoMargin(r,e._id,h)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=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+" translate("+r+","+o+")"),i=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),a=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,c)},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":688,"../../lib":719,"../../lib/extend":710,"../../lib/setcursor":739,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"../../plots/plots":828,"../../registry":847,"../color":593,"../colorscale/helpers":604,"../dragelement":611,"../drawing":614,"../titles":681,"./constants":595,d3:163,tinycolor2:537}],598:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":719}],599:[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":594,"./defaults":596,"./draw":597,"./has_colorbar":598}],600:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),i=t("../../lib/regex").counter,a=t("./scales.js").scales;Object.keys(a);function o(t){return"`"+t+"`"}e.exports=function(t,e){t=t||"";var r,s=(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"===s,u="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,h=e.editTypeOverride||"",f=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(f+(r={z:"z",c:"color"}[s]));var p=s+"auto",d=s+"min",g=s+"max",v=s+"mid",m=(o(f+p),o(f+d),o(f+g),{});m[d]=m[g]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:h||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[d]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},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":735,"../colorbar/attributes":594,"./scales.js":608}],601:[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,h=a(u),f=!1!==h.auto,p=h.min,d=h.max,g=h.mid,v=function(){return i.aggNums(Math.min,null,l)},m=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.min(p,v()):v()),void 0===d?d=m():f&&(d=u._colorAx&&n(d)?Math.max(d,m()):m()),f&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}},{"../../lib":719,"./helpers":604,"fast-isnumeric":225}],602:[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}},{}],610:[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":719}],611:[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 h(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,f,p,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._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&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,p),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(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)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=u},{"../../lib":719,"../../plots/cartesian/constants":773,"./align":609,"./cursor":610,"./unhover":612,"has-hover":410,"has-passive-events":411,"mouse-event-offset":436}],612:[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&&!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":708,"../../lib/events":709,"../../lib/throttle":744,"../fx/constants":626}],613:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],614:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=t("../../lib/svg_text_utils"),h=t("../../constants/xmlns_namespaces"),f=t("../../constants/alignment").LINE_SPACING,p=t("../../constants/interactions").DESELECTDIM,d=t("../../traces/scatter/subtypes"),g=t("../../traces/scatter/make_bubble_size_func"),v=e.exports={};v.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},v.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},v.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},v.setRect=function(t,e,r,n,i){t.call(v.setPosition,e,r).call(v.setSize,n,i)},v.translatePoint=function(t,e,r,n){var a=r.c2p(t.x),o=n.c2p(t.y);return!!(i(a)&&i(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"),!0)},v.translatePoints=function(t,e,r){t.each(function(t){var i=n.select(this);v.translatePoint(t,i,e,r)})},v.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},v.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each(function(e){var a=e[0].trace,s=a.xcalendar,l=a.ycalendar,c=o.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each(function(t){v.hideOutsideRangePoint(t,n.select(this),r,i,s,l)})})}},v.crispRound=function(t,e,r){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},v.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,l=i||a.dash||"";s.stroke(e,n||a.color),v.dashLine(e,l,o)},v.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=i||a.dash||"";n.select(this).call(s.stroke,r||a.color).call(v.dashLine,l,o)})},v.dashLine=function(t,e,r){r=+r||0,e=v.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},v.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},v.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},v.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)})};var m=t("./symbol_defs");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(m).forEach(function(t){var e=m[t];v.symbolList=v.symbolList.concat([e.n,t,e.n+100,t+"-open"]),v.symbolNames[e.n]=t,v.symbolFuncs[e.n]=e.f,e.needLine&&(v.symbolNeedLines[e.n]=!0),e.noDot?v.symbolNoDot[e.n]=!0:v.symbolList=v.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"]),e.noFill&&(v.symbolNoFill[e.n]=!0)});var y=v.symbolNames.length,x="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function b(t,e){var r=t%100;return v.symbolFuncs[r](e)+(t>=200?x:"")}v.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=v.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=y||t>=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format("~.1f"),T={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:_},horizontalreversed:{node:"linearGradient",attrs:_,reversed:!0},vertical:{node:"linearGradient",attrs:w},verticalreversed:{node:"linearGradient",attrs:w,reversed:!0}};v.gradient=function(t,e,r,i,o,l){for(var u=o.length,h=T[i],f=new Array(u),p=0;p=100,e.attr("d",b(u,l))}var h,f,p,d=!1;if(t.so)p=o.outlierwidth,f=o.outliercolor,h=a.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,f="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(a.color)&&(h=s.defaultLine,d=!0),h="mc"in t?t.mcc=n.markerScale(t.mc):a.color||"rgba(0,0,0,0)",n.selectedColorFn&&(h=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",p+"px");var m=a.gradient,y=t.mgt;if(y?d=!0:y=m&&m.type,Array.isArray(y)&&(y=y[0],T[y]||(y=0)),y&&"none"!==y){var x=t.mgc;x?d=!0:x=m.color;var _=r.uid;d&&(_+="-"+t.i),v.gradient(e,i,_,y,[[0,x],[1,h]],"fill")}else s.fill(e,h);p&&s.stroke(e,f)}},v.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=v.tryColorscale(r,""),e.lineScale=v.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,v.makeSelectedPointStyleFns(t)),e},v.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},s=n.marker||{},l=i.opacity,u=a.opacity,h=s.opacity,f=void 0!==u,d=void 0!==h;(c.isArrayOrTypedArray(l)||f||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?f?u:e:d?h:p*e});var g=i.color,v=a.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=i.size,x=a.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},v.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},l=i.color,c=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},v.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push(function(t,e){t.style("opacity",r.selectedOpacityFn(e))}),r.selectedColorFn&&a.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&a.push(function(t,e){var n=e.mx||i.symbol||0,a=r.selectedSizeFn(e);t.attr("d",b(v.symbolNumber(n),a)),e.mrc2=a}),a.length&&t.each(function(t){for(var e=n.select(this),r=0;r0?r:0}v.textPointStyle=function(t,e,r){if(t.size()){var i;if(e.selectedpoints){var a=v.makeSelectedTextStyleFns(e);i=a.selectedTextColorFn}t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,"tx","text");if(o||0===o){var s=t.tp||e.textposition,l=S(t,e),h=i?i(t):t.tc||e.textfont.color;a.call(v.font,t.tf||e.textfont.family,l,h).text(o).call(u.convertToTspans,r).call(M,s,l,t.mrc)}else a.remove()})}},v.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedTextStyleFns(e);t.each(function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=S(t,e);s.fill(i,a),M(i,o,l,t.mrc2||t.mrc)})}};var E=.5;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,E/2),u=Math.pow(s*s+l*l,E/2),h=(u*u*a-c*c*s)*i,f=(u*u*o-c*c*l)*i,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&h/p),2),n.round(e[1]+(p&&f/p),2)],[n.round(e[0]-(d&&h/d),2),n.round(e[1]-(d&&f/d),2)]]}v.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=1e4&&(v.savedBBoxes={},O=0),r&&(v.savedBBoxes[r]=m),O++,c.extendFlat({},m)},v.setClipUrl=function(t,e,r){t.attr("clip-path",I(e,r))},v.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||0,y:+e[1]||0}},v.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=" translate("+e+", "+r+")").trim(),t[i]("transform",a),a},v.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||1,y:+e[1]||1}},v.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+=" scale("+e+", "+r+")").trim(),t[i]("transform",a),a};var D=/\s*sc.*/;v.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":" scale("+e+","+r+")";t.each(function(){var t=(this.getAttribute("transform")||"").replace(D,"");t=(t+=n).trim(),this.setAttribute("transform",t)})}};var R=/translate\([^)]*\)\s*$/;v.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(R);t=1===e&&1===r?[]:["translate("+o+","+s+")","scale("+e+","+r+")","translate("+-o+","+-s+")"],l&&t.push(l),i.attr("transform",t.join(" "))}})}},{"../../constants/alignment":688,"../../constants/interactions":694,"../../constants/xmlns_namespaces":696,"../../lib":719,"../../lib/svg_text_utils":743,"../../registry":847,"../../traces/scatter/make_bubble_size_func":1128,"../../traces/scatter/subtypes":1135,"../color":593,"../colorscale":605,"./symbol_defs":615,d3:163,"fast-isnumeric":225,tinycolor2:537}],615:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+a+","+c+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:163}],616:[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"}}}},{}],617:[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),h=0;h0;e.each(function(e){var h,f=e[0].trace,p=f.error_x||{},d=f.error_y||{};f.ids&&(h=function(t){return t.id});var g=o.hasMarkers(f)&&f.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,h);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),d.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var m=v.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(v,r.layerClipId,t),v.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 h=d.width;a="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(a+="m-"+h+",0h"+2*h),!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 f=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?d:p).width;a="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(a+="m0,-"+v+"v"+2*v),!f.size()?f=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(s.duration).ease(s.easing)),f.attr("d",a)}else f.remove()}})}})}},{"../../traces/scatter/subtypes":1135,"../drawing":614,d3:163,"fast-isnumeric":225}],622:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":593,d3:163}],623:[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":710,"../../plots/font_attributes":793,"./layout_attributes":633}],624:[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.indexw[0]._length||et<0||et>k[0]._length)return f.unhoverRaw(t,e)}if(e.pointerX=tt+w[0]._offset,e.pointerY=et+k[0]._offset,D="xval"in e?g.flat(l,e.xval):g.p2c(w,tt),R="yval"in e?g.flat(l,e.yval):g.p2c(k,et),!i(D[0])||!i(R[0]))return o.warn("Fx.hover failed",e,t),f.unhoverRaw(t,e)}var it=1/0;for(B=0;BW&&(J.splice(0,W),it=J[0].distance),y&&0!==Z&&0===J.length){Y.distance=Z,Y.index=!1;var ct=j._module.hoverPoints(Y,H,G,"closest",u._hoverlayer);if(ct&&(ct=ct.filter(function(t){return t.spikeDistance<=Z})),ct&&ct.length){var ut,ht=ct.filter(function(t){return t.xa.showspikes});if(ht.length){var ft=ht[0];i(ft.x0)&&i(ft.y0)&&(ut=vt(ft),(!$.vLinePoint||$.vLinePoint.spikeDistance>ut.spikeDistance)&&($.vLinePoint=ut))}var pt=ct.filter(function(t){return t.ya.showspikes});if(pt.length){var dt=pt[0];i(dt.x0)&&i(dt.y0)&&(ut=vt(dt),(!$.hLinePoint||$.hLinePoint.spikeDistance>ut.spikeDistance)&&($.hLinePoint=ut))}}}}function gt(t,e){for(var r,n=null,i=1/0,a=0;a1||J.length>1)||"closest"===I&&Q&&J.length>1,Pt=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),Ot={hovermode:I,rotateLabels:Lt,bgColor:Pt,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},zt=A(J,Ot,t);if(function(t,e,r){var n,i,a,o,s,l,c,u=0,h=1,f=t.size(),p=new Array(f),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--)}}}for(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&&(h=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?x:1)/2,pmin:0,pmax:i?r.width:r.height}]}),p.sort(function(t,e){return t[0].posref-e[0].posref||h*(e[0].traceIndex-t[0].traceIndex)});!n&&u<=f;){for(u++,n=!0,o=0;o.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=i;for(v.push.apply(v,m),p.splice(o+1,1),c=0,s=v.length-1;s>=0;s--)c+=v[s].dp;for(a=c/v.length,s=v.length-1;s>=0;s--)v[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var _=p[o];for(s=_.length-1;s>=0;s--){var w=_[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(zt,Lt?"xa":"ya",u),M(zt,Lt),e.target&&e.target.tagName){var It=d.getComponentMethod("annotations","hasClickToShow")(t,Mt);c(n.select(e.target),It?"pointer":"")}if(!e.target||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,At))return;At&&t.emit("plotly_unhover",{event:e,points:At});t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:w,yaxes:k,xvals:D,yvals:R})}(t,e,r,a)})},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=t.map(function(t){return{color:t.color||h.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,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}}),a=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):a,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||h.background,container:a,outerContainer:o},l=A(i,s,e.gd),c=0,u=0;return l.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 A(t,e,r){var i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,c=e.bgColor,f=e.container,p=e.outerContainer,d=e.commonLabelOpts||{},g=e.fontFamily||v.HOVERFONT,y=e.fontSize||v.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,A="y"===a?"yLabel":"xLabel",M=x[A],S=(String(M)||"").split(" ")[0],E=p.node().getBoundingClientRect(),C=E.top,P=E.width,O=E.height,z=void 0!==M&&x.distance<=e.hoverdistance&&("x"===a||"y"===a);if(z){var I,D,R=!0;for(I=0;I"),void 0!==t.yLabel&&(p+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(p+=(p?"z: ":"")+t.zLabel)):z&&t[a+"Label"]===M?p=t[("x"===a?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(p=t.yLabel):p=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(p+=(p?"
":"")+t.text),void 0!==t.extraText&&(p+=(p?"
":"")+t.extraText),""!==p||t.hovertemplate||(""===f&&e.remove(),p=f);var _=i._d3locale,A=t.hovertemplate||!1,S=t.hovertemplateLabels||t,E=t.eventData[0]||{};A&&(p=(p=o.hovertemplateString(A,S,_,E,t.trace._meta)).replace(T,function(e,r){return f=L(r,t.nameLength),""}));var I=e.select("text.nums").call(u.font,t.fontFamily||g,t.fontSize||y,t.fontColor||b).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),D=e.select("text.name"),R=0,F=0;if(f&&f!==p){D.call(u.font,t.fontFamily||g,t.fontSize||y,x).text(f).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var B=D.node().getBoundingClientRect();R=B.width+2*k,F=B.height+2*k}else D.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:b});var N,j,U=I.node().getBoundingClientRect(),V=t.xa._offset+(t.x0+t.x1)/2,q=t.ya._offset+(t.y0+t.y1)/2,H=Math.abs(t.x1-t.x0),G=Math.abs(t.y1-t.y0),Y=U.width+w+k+R;if(t.ty0=C-U.top,t.bx=U.width+2*k,t.by=Math.max(U.height+2*k,F),t.anchor="start",t.txwidth=U.width,t.tx2width=R,t.offset=0,s)t.pos=V,N=q+G/2+Y<=O,j=q-G/2-Y>=0,"top"!==t.idealAlign&&N||!j?N?(q+=G/2,t.anchor="start"):t.anchor="middle":(q-=G/2,t.anchor="end");else if(t.pos=q,N=V+H/2+Y<=P,j=V-H/2-Y>=0,"left"!==t.idealAlign&&N||!j)if(N)V+=H/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=V+W-P,Z=V-W;X>0&&(V-=X),Z<0&&(V+=-Z)}else V-=H/2,t.anchor="end";I.attr("text-anchor",t.anchor),R&&D.attr("text-anchor",t.anchor),e.attr("transform","translate("+V+","+q+")"+(s?"rotate("+m+")":""))}),N}function M(t,e){t.each(function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select("text.nums"),a=t.anchor,o="end"===a?-1:1,s={start:1,end:-1,middle:0}[a],c=s*(w+k),h=c+s*(t.txwidth+k),f=0,p=t.offset;"middle"===a&&(c-=t.tx2width/2,h+=t.txwidth/2+k),e&&(p*=-_,f=t.offset*b),r.select("path").attr("d","middle"===a?"M-"+(t.bx/2+t.tx2width/2)+","+(p-t.by/2)+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(o*w+f)+","+(w+p)+"v"+(t.by/2-w)+"h"+o*t.bx+"v-"+t.by+"H"+(o*w+f)+"V"+(p-w)+"Z");var d=c+f,g=p+t.ty0-t.by/2+k,v=t.textAlign||"auto";"auto"!==v&&("left"===v&&"start"!==a?(i.attr("text-anchor","start"),d="middle"===a?-t.bx/2-t.tx2width/2+k:-t.bx-k):"right"===v&&"end"!==a&&(i.attr("text-anchor","end"),d="middle"===a?t.bx/2-t.tx2width/2-k:t.bx+k)),i.call(l.positionText,d,g),t.tx2width&&(r.select("text.name").call(l.positionText,h+s*k+f,p+t.ty0-t.by/2+k),r.select("rect").call(u.setRect,h+(s-1)*t.tx2width/2+f,p-t.by/2-1,t.tx2width,t.by+2))})}function S(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:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=p.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+p.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var f=p.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+f+" / -"+p.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+f,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function E(t,e){var r,n,i=e.container,o=e.fullLayout,s=e.event,l=!!t.hLinePoint,c=!!t.vLinePoint;if(i.selectAll(".spikeline").remove(),c||l){var f=h.combine(o.plot_bgcolor,o.paper_bgcolor);if(l){var p,d,g=t.hLinePoint;r=g&&g.xa,"cursor"===(n=g&&g.ya).spikesnap?(p=s.pointerX,d=s.pointerY):(p=r._offset+g.x,d=n._offset+g.y);var v,m,y=a.readability(g.color,f)<1.5?h.contrast(f):g.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,k=(w.left+w.right)/20){for(var n=[],i=0;i-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){f||p||d||"independent"===T("pattern")&&(f=!0),v._hasSubplotGrid=f;var x,b,_="top to bottom"===T("roworder"),w=f?.2:.1,k=f?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u("x",T,w,x,y),y:u("y",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,f=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(d){var x=f.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==x||p.uirevision){var b=a.newContainer(e,"legend");if(w("uirevision",e.uirevision),!1!==x){if(w("bgcolor",e.paper_bgcolor),w("bordercolor"),w("borderwidth"),i.coerceFont(w,"font",e.font),w("orientation"),"h"===b.orientation){var _=t.xaxis;n.getComponentMethod("rangeslider","isVisible")(_)?(c=0,h="left",u=1.1,f="bottom"):(c=0,h="left",u=-.1,f="top")}w("traceorder",v),l.isGrouped(e.legend)&&w("tracegroupgap"),w("itemsizing"),w("itemclick"),w("itemdoubleclick"),w("x",c),w("xanchor",h),w("y",u),w("yanchor",f),w("valign"),i.noneOrAll(p,b,["x","y"])}}function w(t,e){return i.coerce(p,b,o,t,e)}}},{"../../lib":719,"../../plot_api/plot_template":757,"../../plots/layout_attributes":819,"../../registry":847,"./attributes":642,"./helpers":648}],645:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),h=t("../../lib/svg_text_utils"),f=t("./handle_click"),p=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,v=d.FROM_TL,m=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(){f(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)&&f(r,t,n)}}function w(t,e,r){var n=t.data()[0][0],a=e._fullLayout,s=n.trace,l=o.traceIs(s,"pie-like"),u=s.index,f=e._context.edits.legendText&&!l,d=l?n.label:s.name;s._meta&&(d=i.templateString(d,s._meta));var v=i.ensureSingle(t,"text","legendtext");function m(r){h.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select("g[class*=math-group]"),o=a.node(),s=e._fullLayout.legend.font.size*g;if(o){var l=c.bBox(o);n=l.height,i=l.width,c.setTranslate(a,0,n/4)}else{var u=t.select(".legendtext"),f=h.lineCount(u),d=u.node();n=s*f,i=d?c.bBox(d).width:0;var v=s*(.3+(1-f)/2);h.positionText(u,p.textOffsetX,v)}r.lineHeight=s,r.height=Math.max(n,16)+3,r.width=i}(t,e)})}v.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,a.legend.font).text(f?k(d,r):d),h.positionText(v,p.textOffsetX,0),f?v.call(h.makeEditable,{gd:e,text:d}).call(m).on("edit",function(t){this.text(k(t,r)).call(m);var a=n.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var l=o.getTransformIndices(a,"groupby"),c=l[l.length-1],h=i.keyedContainer(a,"transforms["+c+"].styles","target","value.name");h.set(n.trace._group,t),s=h.constructUpdate()}else s.name=t;return o.call("_guiRestyle",e,s,u)}):m(v)}function k(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 T(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,"rect","legendtoggle",function(t){t.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")});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){var a=t._fullLayout,o=a.legend,s=o.borderwidth,l=b.isGrouped(o),u=0;if(o._width=0,o._height=0,b.isVertical(o))l&&e.each(function(t,e){c.setTranslate(this,0,e*o.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;c.setTranslate(this,s,5+s+o._height+r/2),o._height+=r,o._width=Math.max(o._width,n)}),o._width+=45+2*s,o._height+=10+2*s,l&&(o._height+=(o._lgroupsLength-1)*o.tracegroupgap),u=40;else if(l){var h,f=0,p=0,d=e.data(),g=0;for(h=0;h0?o.tracegroupgap:0,w.push(T),_.push(o._width)}e.each(function(t,e){c.setTranslate(this,_[e],w[e])}),e.each(function(){var t=n.select(this).selectAll("g.traces"),e=0;t.each(function(t){var r=t[0].height;c.setTranslate(this,0,5+s+e+r/2),e+=r})});var A=w[w.length-1]+f;o._height=10+2*s+A;var M=Math.max.apply(null,_);o._width=M+p+40,o._width+=2*s}else{var S=0,E=0,C=0,L=0,P=0;r.each(function(t){C=Math.max(40+t[0].width,C),P+=40+t[0].width+5});var O=a._size.w>s+P-5;r.each(function(t){var e=t[0],r=O?40+t[0].width:C;s+L+5+r>a._size.w&&(L=0,S+=E,o._height+=E,E=0),c.setTranslate(this,s+L,5+s+e.height/2+S),o._width+=5+r,L+=5+r,E=Math.max(e.height,E)}),O?o._height=E:o._height+=E,o._width+=2*s,o._height+=10+2*s}o._width=Math.ceil(o._width),o._height=Math.ceil(o._height);var z=t._context.edits.legendText||t._context.edits.legendPosition;r.each(function(t){var e=t[0],r=n.select(this).select(".legendtoggle");c.setRect(r,0,-e.height/2,(z?0:o._width)+u,e.height)})}function M(t){var e=t._fullLayout.legend,r="left";i.isRightAnchor(e)?r="right":i.isCenterAnchor(e)&&(r="center");var n="top";i.isBottomAnchor(e)?n="bottom":i.isMiddleAnchor(e)&&(n="middle"),a.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._height*m[n],t:e._height*v[n]})}e.exports=function(t){var e=t._fullLayout,r="legend"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,h=e.showlegend&&y(t.calcdata,s),f=e.hiddenlabels||[];if(!e.showlegend||!h.length)return e._infolayer.selectAll(".legend").remove(),e._topdefs.select("#"+r).remove(),void a.autoMargin(t,"legend");for(var d=0,g=0;gh?function(t){var e=t._fullLayout.legend,r="left";i.isRightAnchor(e)?r="right":i.isCenterAnchor(e)&&(r="center");a.autoMargin(t,"legend",{x:e.x,y:.5,l:e._width*v[r],r:e._width*m[r],b:0,t:0})}(t):M(t);var f=e._size,d=f.l+f.w*s.x,g=f.t+f.h*(1-s.y);i.isRightAnchor(s)?d-=s._width:i.isCenterAnchor(s)&&(d-=s._width/2),i.isBottomAnchor(s)?g-=s._height:i.isMiddleAnchor(s)&&(g-=s._height/2);var y=s._width,x=f.w;y>x?(d=f.l,y=x):(d+y>u&&(d=u-y),d<0&&(d=0),y=Math.min(u-d,s._width));var b,w,k,T,S=s._height,E=f.h;if(S>E?(g=f.t,S=E):(g+S>h&&(g=h-S),g<0&&(g=0),S=Math.min(h-g,s._height)),c.setTranslate(L,d,g),I.on(".drag",null),L.on("wheel",null),s._height<=S||t._context.staticPlot)O.attr({width:y-s.borderwidth,height:S-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),c.setTranslate(z,0,0),P.select("rect").attr({width:y-2*s.borderwidth,height:S-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth}),c.setClipUrl(z,r,t),c.setRect(I,0,0,0,0),delete s._scrollY;else{var F,B,N=Math.max(p.scrollBarMinHeight,S*S/s._height),j=S-N-2*p.scrollBarMargin,U=s._height-S,V=j/U,q=Math.min(s._scrollY||0,U);O.attr({width:y-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:S-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),P.select("rect").attr({width:y-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:S-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth+q}),c.setClipUrl(z,r,t),G(q,N,V),L.on("wheel",function(){G(q=i.constrain(s._scrollY+n.event.deltaY/j*U,0,U),N,V),0!==q&&q!==U&&n.event.preventDefault()});var H=n.behavior.drag().on("dragstart",function(){F=n.event.sourceEvent.clientY,B=q}).on("drag",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||G(q=i.constrain((t.clientY-F)/V+B,0,U),N,V)});I.call(H)}function G(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(z,0,-e),c.setRect(I,y,p.scrollBarMargin+e*n,p.scrollBarWidth,r),P.select("rect").attr({y:s.borderwidth+e})}t._context.edits.legendPosition&&(L.classed("cursor-move",!0),l.init({element:L.node(),gd:t,prepFn:function(){var t=c.getTranslate(L);k=t.x,T=t.y},moveFn:function(t,e){var r=k+t,n=T+e;c.setTranslate(L,r,n),b=l.align(r,0,f.l,f.l+f.w,s.xanchor),w=l.align(n,0,f.t+f.h,f.t,s.yanchor)},doneFn:function(){void 0!==b&&void 0!==w&&o.call("_guiRelayout",t,{"legend.x":b,"legend.y":w})},clickFn:function(r,n){var i=e._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});i.size()>0&&_(t,L,i,r,n)}}))}],t)}}},{"../../constants/alignment":688,"../../lib":719,"../../lib/events":709,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":847,"../color":593,"../dragelement":611,"../drawing":614,"./constants":643,"./get_legend_data":646,"./handle_click":647,"./helpers":648,"./style":650,d3:163}],646:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){var r,a,o={},s=[],l=!1,c={},u=0;function h(t,r){if(""!==t&&i.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;i=e.width}return v?n:Math.min(i,r)}function y(t,e,r){var a=t[0].trace,o=a.marker||{},l=o.line||{},c=r?a.type===r&&a.visible:i.traceIs(a,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each(function(t){var e=n.select(this),r=t[0],i=m(r.mlw,o.line,g,p);e.style("stroke-width",i+"px").call(s.fill,r.mc||o.color),i&&s.stroke(e,r.mlc||l.color)})}function x(t,e,r){var o=t[0],s=o.trace,l=r?s.type===r&&s.visible:i.traceIs(s,r),h=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(h.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),h.exit().remove(),h.size()){var f=(s.marker||{}).line,d=m(u(f.width,o.pts),f,g,p),v=a.minExtend(s,{marker:{line:{width:d}}});v.marker.line.color=f.color;var y=a.minExtend(o,{trace:v});c(h,y,v)}}t.each(function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var o=r.valign,s=t[0].lineHeight,l=t[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));i.attr("transform","translate(0,"+c+")")}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 u=i.selectAll("g.legendsymbols").data([t]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(function(t){var e=t[0].trace,r=[];"waterfall"===e.type&&e.visible&&(r=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 i=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(r);i.enter().append("path").classed("legendwaterfall",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),i.exit().remove(),i.each(function(t){var r=n.select(this),i=e[t[0]].marker,a=m(void 0,i.line,g,p);r.attr("d",t[1]).style("stroke-width",a+"px").call(s.fill,i.color),a&&r.call(s.stroke,i.line.color)})}).each(function(t){y(t,this,"funnel")}).each(function(t){y(t,this)}).each(function(t){var r=t[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(i.traceIs(r,"box-violin")&&r.visible?[t]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),l.exit().remove(),l.each(function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var i=m(void 0,r.line,g,p);t.style("stroke-width",i+"px").call(s.fill,r.fillcolor),i&&s.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:v?h:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,e)}})}).each(function(t){x(t,this,"funnelarea")}).each(function(t){x(t,this,"pie")}).each(function(t){var r,i,s=t[0],c=s.trace,u=c.visible&&c.fill&&"none"!==c.fill,h=l.hasLines(c),p=c.contours,g=!1,v=!1;if(p){var y=p.coloring;"lines"===y?g=!0:h="none"===y||"heatmap"===y||p.showlines,"constraint"===p.type?u="="!==p._operation:"fill"!==y&&"heatmap"!==y||(v=!0)}var x=l.hasMarkers(c)||l.hasText(c),b=u||v,_=h||g,w=x||!b?"M5,0":_?"M5,-2":"M5,-3",k=n.select(this),T=k.select(".legendfill").selectAll("path").data(u||v?[t]:[]);if(T.enter().append("path").classed("js-fill",!0),T.exit().remove(),T.attr("d",w+"h30v6h-30z").call(u?o.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+c.uid;o.gradient(t,e,r,"horizontalreversed",c.colorscale,"fill")}}),h||g){var A=m(void 0,c.line,d,f);i=a.minExtend(c,{line:{width:A}}),r=[a.minExtend(s,{trace:i})]}var M=k.select(".legendlines").selectAll("path").data(h||g?[r]:[]);M.enter().append("path").classed("js-line",!0),M.exit().remove(),M.attr("d",w+(g?"l30,0.0001":"h30")).call(h?o.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+c.uid;o.lineGroupStyle(t),o.gradient(t,e,r,"horizontalreversed",c.colorscale,"stroke")}})}).each(function(t){var r,i,s=t[0],c=s.trace,u=l.hasMarkers(c),d=l.hasText(c),g=l.hasLines(c);function m(t,e,r,n){var i=a.nestedProperty(c,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function y(t){return t[0]}if(u||d||g){var x={},b={};if(u){x.mc=m("marker.color",y),x.mx=m("marker.symbol",y),x.mo=m("marker.opacity",a.mean,[.2,1]),x.mlc=m("marker.line.color",y),x.mlw=m("marker.line.width",a.mean,[0,5],p),b.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _=m("marker.size",a.mean,[2,16],h);x.ms=_,b.marker.size=_}g&&(b.line={width:m("line.width",y,[0,10],f)}),d&&(x.tx="Aa",x.tp=m("textposition",y),x.ts=10,x.tc=m("textfont.color",y),x.tf=m("textfont.family",y)),r=[a.minExtend(s,x)],(i=a.minExtend(c,b)).selectedpoints=null}var w=n.select(this).select("g.legendpoints"),k=w.selectAll("path.scatterpts").data(u?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),k.exit().remove(),k.call(o.pointStyle,i,e),u&&(r[0].mrc=3);var T=w.selectAll("g.pointtext").data(d?r:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),T.exit().remove(),T.selectAll("text").call(o.textPointStyle,i,e)}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data("candlestick"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=m(void 0,a.line,g,p);i.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(i,a.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data("ohlc"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],l=m(void 0,a.line,g,p);i.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(i,a.line.color)})})}},{"../../lib":719,"../../registry":847,"../../traces/pie/helpers":1091,"../../traces/pie/style_one":1097,"../../traces/scatter/subtypes":1135,"../color":593,"../drawing":614,d3:163}],651:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/plots"),a=t("../../plots/cartesian/axis_ids"),o=t("../../lib"),s=t("../../fonts/ploticon"),l=o._,c=e.exports={};function u(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=a.list(t,null,!0),f="on";if("zoom"===s){var p,d="in"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(i=0;i1?(A=["toggleHover"],M=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],M=["resetGeo"]):h?(A=["hoverClosest3d"],M=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(A=["toggleHover"],M=["resetViewMapbox"]):g?A=["hoverClosestGl2d"]:p?A=["hoverClosestPie"]:x?(A=["hoverClosestCartesian","hoverCompareCartesian"],M=["resetViewSankey"]):A=["toggleHover"];u&&(A=["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;a0?f+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,h,f=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=h)));return p>=f?[f,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;o10?t/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:a}).style(i).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:a}).style(i).classed("cursor-grab",!0),n}():e,X={element:W.node(),gd:t,prepFn:function(n){D&&(_=q(r.xanchor));R&&(w=H(r.yanchor));"path"===r.type?P=r.path:(m=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));mb?(k=y,S="y0",T=b,E="y1"):(k=b,S="y1",T=y,E="y0");Z(n),$(p,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),l=a.getFromId(r,i),c="";"paper"===n||o.autorange||(c+=n);"paper"===i||l.autorange||(c+=i);s.setClipUrl(t,c?"clip"+r._fullLayout._uid+c:null,r)}(e,r,t),X.moveFn="move"===O?J:K},doneFn:function(){u(e),Q(p),d(e,t,r),n.call("_guiRelayout",t,N.getUpdateObj())},clickFn:function(){Q(p)}};function Z(t){if(F)O="path"===t.target.tagName?"move":"start-point"===t.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,i=r.bottom-r.top,a=t.clientX-r.left,o=t.clientY-r.top,s=!B&&n>z&&i>I&&!t.shiftKey?c.getCursor(a/n,1-o/i):"move";u(e,s),O=s.split("-")[0]}}function J(n,i){if("path"===r.type){var a=function(t){return t},o=a,s=a;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},U&&"date"===U.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+i)):(s=function(t){return Y(H(t)+i)},V&&"date"===V.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else D?j("xanchor",r.xanchor=G(_+n)):(j("x0",r.x0=G(m+n)),j("x1",r.x1=G(x+n))),R?j("yanchor",r.yanchor=Y(w+i)):(j("y0",r.y0=Y(y+i)),j("y1",r.y1=Y(b+i)));e.attr("d",g(t,r)),$(p,r)}function K(n,i){if(B){var a=function(t){return t},o=a,s=a;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},U&&"date"===U.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+i)):(s=function(t){return Y(H(t)+i)},V&&"date"===V.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else if(F){if("resize-over-start-point"===O){var l=m+n,c=R?y-i:y+i;j("x0",r.x0=D?l:G(l)),j("y0",r.y0=R?c:Y(c))}else if("resize-over-end-point"===O){var u=x+n,h=R?b-i:b+i;j("x1",r.x1=D?u:G(u)),j("y1",r.y1=R?h:Y(h))}}else{var d=~O.indexOf("n")?k+i:k,N=~O.indexOf("s")?T+i:T,W=~O.indexOf("w")?A+n:A,X=~O.indexOf("e")?M+n:M;~O.indexOf("n")&&R&&(d=k-i),~O.indexOf("s")&&R&&(N=T-i),(!R&&N-d>I||R&&d-N>I)&&(j(S,r[S]=R?d:Y(d)),j(E,r[E]=R?N:Y(N))),X-W>z&&(j(C,r[C]=D?W:G(W)),j(L,r[L]=D?X:G(X)))}e.attr("d",g(t,r)),$(p,r)}function $(t,e){(D||R)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=q(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:f.extractPathCoords(e.path,h.paramIsX))),o=H(R?e.yanchor:i.midRange(r?[e.y0,e.y1]:f.extractPathCoords(e.path,h.paramIsY)));if(a=f.roundPositionForSharpStrokeRendering(a,1),o=f.roundPositionForSharpStrokeRendering(o,1),D&&R){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(D){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function Q(t){t.selectAll(".visual-cue").remove()}c.init(X),W.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=a.getFromId(t,e.xref),v=a.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=f.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=f.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},"path"===d)return g&&"date"===g.type&&(n=f.decodeDate(n)),v&&"date"===v.type&&(s=f.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(h.segmentRE,function(t){var n=0,c=t.charAt(0),u=h.paramIsX[c],f=h.paramIsY[c],p=h.numParams[c],d=t.substr(1).replace(h.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>p&&(t="X"),t});return n>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+d})}(e,n,s);if("pixel"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+p;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+p+"H"+l+"Z";var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),T="A"+w+","+k,A=b+w+","+_;return"M"+A+T+" 0 1,1 "+(b+","+(_-k))+T+" 0 0,1 "+A+"Z"}function v(t,e,r){return t.replace(h.segmentRE,function(t){var n=0,i=t.charAt(0),a=h.paramIsX[i],o=h.paramIsY[i],s=h.numParams[i];return i+t.substr(1).replace(h.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var i=0;i0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+e._dims.currentValueTotalHeight+")")}}function S(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",u.railTouchRectClass,function(n){n.call(T,e,t,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function L(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,i=s.ensureSingle(t,"rect",u.railRectClass);i.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[u.name],n=[],i=0;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(a.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),a.exit().each(function(){n.select(this).selectAll("g."+u.groupClassName).each(s)}).remove(),0!==r.length){var l=a.selectAll("g."+u.groupClassName).data(r,v);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||f<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr("transform","translate("+g+")")}}}z.call(I),P&&(M?z.on(".opacity",null):(k=0,T=!0,z.text(v).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)})),z.call(u.makeEditable,{gd:t}).on("edit",function(e){void 0!==m?o.call("_guiRestyle",t,g,e,m):o.call("_guiRelayout",t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(I)}).on("input",function(t){this.text(t||" ").call(u.positionText,x.x,x.y)}));return z.classed("js-placeholder",T),_}};var f=/ [XY][0-9]* /},{"../../constants/interactions":694,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":847,"../color":593,"../drawing":614,d3:163,"fast-isnumeric":225}],682:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({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":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/font_attributes":793,"../../plots/pad_attributes":827,"../color/attributes":592}],683:[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"}}},{}],684:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/array_container_defaults"),a=t("./attributes"),o=t("./constants").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("label"),r("execute"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":719,"../../plots/array_container_defaults":763,"./attributes":682,"./constants":683}],685:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("../color"),o=t("../drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../plot_api/plot_template").arrayEditor,u=t("../../constants/alignment").LINE_SPACING,h=t("./constants"),f=t("./scrollbox");function p(t){return t._index}function d(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,h.name,e).applyUpdate("active",o),"buttons"===e.type?m(t,n,null,null,e):"dropdown"===e.type&&(i.attr(h.menuIndexAttrName,"-1"),v(t,n,i,a,e),s||m(t,n,i,a,e))}function v(t,e,r,n,i){var a=s.ensureSingle(e,"g",h.headerClassName,function(t){t.style("pointer-events","all")}),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,f,p),s.ensureSingle(e,"text",h.headerArrowClassName,function(t){t.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,i.font).text(h.arrowSymbol[i.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on("click",function(){r.call(S,String(d(r,i)?-1:i._index)),m(t,e,r,n,i)}),a.on("mouseover",function(){a.call(w)}),a.on("mouseout",function(){a.call(k,i)}),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,v=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?v=m.headerHeight+h.gapButtonHeader:d=m.headerWidth+h.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(v=-h.gapButtonHeader+h.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},T={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||(g(t,o,0,e,r,a,l),s.execute&&i.executeAPICommand(t,s.method,s.args),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))}),c.on("mouseover",function(){c.call(w)}),c.on("mouseout",function(){c.call(k,o),u.call(_,o)})}),u.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,f=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(a)}).remove(),0!==r.length){var l=o.selectAll("g."+h.headerGroupClassName).data(r,p);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",h.dropdownButtonGroupClassName,function(t){t.style("pointer-events","all")}),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=v+m;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),T?(this.hbar=C.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 L=m>k,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,z=d+g,I=v;z+P>l&&(z=l-P);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:z,y:I,width:P,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?h+P+.5:h+.5,N=f-.5,j=T?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),T||L?(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:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),T||L){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 q=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":719,"../color":593,"../drawing":614,d3:163}],688:[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"}}},{}],689:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},{}],690:[function(t,e,r){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format"}},{}],691:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],692:[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]}},{}],693:[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"}},{}],694:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],695:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],696:[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}},{}],697:[function(t,e,r){"use strict";r.version="1.49.1",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),i=r.register=n.register,a=t("./plot_api"),o=Object.keys(a),s=0;splotly-logomark"}}},{}],700:[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}},{}],701:[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 h(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,h,f,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,h=o,f=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return h(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return h(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return h(t,e,r,n,i,a,1)}}},{"./mod":726}],702:[function(t,e,r){"use strict";var n=Array.isArray,i="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},a="undefined"==typeof DataView?function(){}: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(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(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&&!!c(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),m=t.charAt(0);!c||"G"!==m&&"g"!==m||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var P=v.getComponentMethod("calendars","getCal")(e);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),L=P.newDate(T,P.toMonthIndex(T,A,O),M)}else L=P.newDate(T,Number(A),M)}catch(t){return u}return L?(L.toJD()-g)*h+S*f+E*p+C*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var z=new Date(Date.UTC(2e3,A,M,S,E));return z.setUTCFullYear(T),z.getUTCMonth()!==A?u:z.getUTCDate()!==M?u:z.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),i=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*h,T=3*f,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/h)+g,E=Math.floor(l(t,h));try{a=v.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=m("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+h&&t<=i-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var S=/%\d?f/g;function E(t,e,r,n){t=t.replace(S,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"});var i=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var C=[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,h),n=w(Math.floor(r/f),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),C[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+E(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return E(e,t,n,i)};var L=3*h;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var i=Math.round(t/h)+g,a=v.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-g)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&v.getComponentMethod("calendars","getCal")(e),u=0;u0&&(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+h*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,h=n-e,f=o-i,p=c-a,d=u*u+h*h,g=f*f+p*p,v=Math.min(l(u,h,d,i-t,a-e),l(u,h,d,o-t,c-e),l(f,p,g,t-i,e-a),l(f,p,g,r-i,n-a));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=t.getPointAtLength(o(r,e)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=f,f},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(),h=u;function f(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===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,h=0,f=0,p=s;h0?p=i:f=i,h++}return a}},{"./mod":726}],716:[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),u=1;function h(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 p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,i,s,d,g,v=t.color,m=l(v),y=l(e),x=o.extractOpts(t),b=[];if(n=void 0!==x.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,m||y)for(var _=0;_o?s:i(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(i(t)&&t>=0&&t%1==0)},l.noop=t("./noop"),l.identity=t("./identity"),l.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o=Math.pow(2,r)?i>10?(l.warn("randstr failed uniqueness"),c):t(e,r,n,(i||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){var n;function i(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0})},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.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},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)(:[^}]*)?}/g;var C=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,n){return C.test(n)?e[n]||"":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||"")})};var L=/^:/,P=0;l.hovertemplateString=function(t,e,r){var i=arguments,a={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,o,s){var c,u,h;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 O=2e9;l.seedPseudoRandom=function(){O=2e9},l.pseudoRandom=function(){var t=O;return O=(69069*O+1)%4294967296,Math.abs(O-t)<429496729?l.pseudoRandom():O/4294967296},l.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=l.extractOption(t,e,"htx","hovertext");if(l.isValidTextValue(i))return n(i);var a=l.extractOption(t,e,"tx","text");return l.isValidTextValue(a)?n(a):void 0},l.isValidTextValue=function(t){return t||0===t},l.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;n2)return c[e]=2|c[e],f.set(t,null);if(h){for(o=e;o1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;ee/2?t-Math.round(t/e)*e:t}}},{}],727:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./array").isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,a,o,l=0,c=e.split(".");l/g),o=0;oa||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,h,f,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;uMath.max(h,v)||c>Math.max(f,m)))if(cu||Math.abs(n(o,f))>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":695,"./matrix":725}],732:[function(t,e,r){(function(r){"use strict";var n=t("./show_no_webgl_msg"),i=t("regl");e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each(function(n){if(!n.regl&&(!n.pick||a._has("parcoords"))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&&this.addEventListener("webglcontextlost",function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})},!1)}}),o||n({container:a._glcontainer.node()}),o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":740,regl:502}],733:[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(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,u,h=0,f=e.length,p=0,d=f>1?(e[f-1]-e[0])/(f-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);h90&&i.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;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":702,"fast-isnumeric":225}],742:[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":120}],743:[function(t,e,r){"use strict";var n=t("d3"),i=t("../lib"),a=t("../constants/xmlns_namespaces"),o=t("../constants/alignment").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,M){var S=t.text(),C=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(e&&e._promises||[]).push(new Promise(function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var a,o,s,l;MathJax.Hub.Queue(function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})},function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},function(){var r="math-output-"+i.randstr({},64);return l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(l.node())},function(){var e=n.select("body").select("#MathJax_SVG_glyphs");if(l.select(".MathJax_SVG").empty()||!l.select("svg").node())i.log("There was an error in the tex syntax.",t),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),e,o)}if(l.remove(),"SVG"!==a)return MathJax.Hub.setRenderer(a)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})}(C[2],a,function(n,i,a){L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return O(),void e();var l=L.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(o.node()),i&&i.node()&&o.node().insertBefore(i.node().cloneNode(!0),o.node().firstChild),o.attr({class:P,height:a.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=t.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var h=s(u,"width"),f=s(u,"height"),p=+t.attr("x")-h*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],d=-(r||s(t,"height"))/4;"y"===P[0]?(l.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-h/2,d-f/2]+")"}),o.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===P[0]?o.attr({x:t.attr("x"),y:d-f/2}):"a"===P[0]&&0!==P.indexOf("atitle")?o.attr({x:0,y:d}):o.attr({x:p,y:+t.attr("y")+d-f/2}),M&&M.call(t,l),e(l)})})):O(),t}function O(){L.empty()||(P=t.attr("class")+"-math",L.select("svg."+P).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(v," ");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,"tspan");n.select(e).attr({class:"line",dy:c*o+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var s=1;s doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),P=0;P|>|>)/g;var h={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"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},d="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i,b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\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&&E(n)}var A=/(^|;)\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 M={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,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)):M[e])||t})}function C(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-c.top+"px",left:a()-c.left+"px","z-index":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i("x",e),o=i("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:a,y:o})})},r.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch("edit","input","cancel"),o=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");function s(){!function(){var i=n.select(r).select(".svg-container"),o=i.append("div"),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&&(u=t.attr("data-unformatted"));o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":s.fontFamily||"Arial","font-size":c,color:e.fill||s.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(u).call(C(t,i,e)).on("blur",function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)}).on("focus",function(){var t=this;r._editing=!0,n.select(document).on("mouseup",function(){if(n.event.target===t)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(C(t,i,e)))}).on("keydown",function(){13===n.event.which&&this.blur()}).call(l)}(),t.style({opacity:0});var i,s=o.attr("class");(i=s?"."+s.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(i).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,a,"on")}},{"../constants/alignment":688,"../constants/xmlns_namespaces":696,"../lib":719,d3:163}],744:[function(t,e,r){"use strict";var n={};function i(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var a=n[t],o=Date.now();if(!a){for(var s in n)n[s].tsa.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)}},{}],745:[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":225}],746:[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":795,"topojson-client":540}],747:[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"}}},{}],748:[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"}}},{}],749:[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,h=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.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",h);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",h,y),!0;e.set(y)}return!g&&(f(v,m),p(t),!0)}var x,b,_,w,k,T,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(m,h).get(),P=[],O=-1,z=C.length;for(x=0;xC.length-(A?0:1))a.warn("index out of range",h,_);else if(void 0!==T)k.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",h,_),c(T)?P.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):a.warn("Unrecognized full object edit value",h,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(P[x],1),L&&L.splice(P[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(f(v,m),d!==i){var I;if(-1===O)I=S;else{for(z=Math.max(C.length,z),I=[],x=0;x=O);x++)I.push(_);for(x=O;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 D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),I(t,e,"currentIndices"),"undefined"==typeof r||Array.isArray(r)||(r=[r]),"undefined"!=typeof r&&I(t,r,"newIndices"),"undefined"!=typeof r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if("undefined"==typeof r)throw new Error("indices must be an integer or array of integers");for(var a in I(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,h,f=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=z(r,t.data.length-1),e)for(var g=0;g-1?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 H(t,e,r){if(t=o.getGraphDiv(t),k.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(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=J(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[f.previousPromises];a.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(G(t,a,i)||f.supplyDefaults(t),a.legend&&s.push(T.doLegend),a.layoutstyle&&s.push(T.layoutStyles),a.axrange&&Y(s,i.rangesAltered),a.ticks&&s.push(T.doTicksRelayout),a.modebar&&s.push(T.doModeBar),a.camera&&s.push(T.doCamera),a.colorbars&&s.push(T.doColorBars),s.push(C)),s.push(f.rehover,f.redrag),c.add(t,H,[t,i.undoit],H,[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 G(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=d.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function Y(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=d.getFromId(t,i);if(r.push(i),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function J(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,f=j(l._preGUI,c),p=Object.keys(e),g=d.list(t),v=o.extendDeepAll({},e),m={};for(q(e),p=Object.keys(e),n=0;n0&&"string"!=typeof z.parts[D];)D--;var R=z.parts[D],F=z.parts[D-1]+"."+R,B=z.parts.slice(0,D).join("."),U=s(t.layout,B).get(),V=s(l,B).get(),H=z.get();if(void 0!==I){T[O]=I,S[O]="reverse"===R?I:N(H);var G=h.getLayoutValObject(l,z.parts);if(G&&G.impliedEdits&&null!==I)for(var Y in G.impliedEdits)E(o.relativeAttr(O,Y),G.impliedEdits[Y]);if(-1!==["width","height"].indexOf(O))if(I){E("autosize",null);var J="height"===O?"width":"height";E(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",I?null:l.width),E("height",I?null:l.height);else if(F.match(W))P(F),s(l,B+"._inputRange").set(null);else if(F.match(X)){P(F),s(l,B+"._inputRange").set(null);var $=s(l,B).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===R){var Q=U,tt="linear"===V.type&&"log"===I,et="log"===V.type&&"linear"===I;if(tt||et){if(Q&&Q.range)if(V.autorange)tt&&(Q.range=Q.range[1]>Q.range[0]?[1,2]:[2,1]);else{var rt=Q.range[0],nt=Q.range[1];tt?(rt<=0&&nt<=0&&E(B+".autorange",!0),rt<=0?rt=nt/1e6:nt<=0&&(nt=rt/1e6),E(B+".range[0]",Math.log(rt)/Math.LN10),E(B+".range[1]",Math.log(nt)/Math.LN10)):(E(B+".range[0]",Math.pow(10,rt)),E(B+".range[1]",Math.pow(10,nt)))}else E(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete l[z.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,V,I,E),u.getComponentMethod("images","convertCoords")(t,V,I,E)}else E(B+".autorange",!0),E(B+".range",null);s(l,B+"._inputRange").set(null)}else if(R.match(M)){var it=s(l,O).get(),at=(I||{}).type;at&&"-"!==at||(at="linear"),u.getComponentMethod("annotations","convertCoords")(t,it,at,E),u.getComponentMethod("images","convertCoords")(t,it,at,E)}var ot=w.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var st=ot.property,lt=G||{editType:"calc"};""!==n&&""===st&&(w.isAddVal(I)?S[O]=null:w.isRemoveVal(I)?S[O]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,lt),m[r]||(m[r]={});var ct=m[r][n];ct||(ct=m[r][n]={}),ct[st]=I,delete e[O]}else"reverse"===R?(U.range?U.range.reverse():(E(B+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==H&&"select"!==H?_.plot=!0:l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,z.set(I))}}for(r in m){w.applyContainerArrayChanges(t,f(a,r),m[r],_,f)||(_.plot=!0)}var ut=l._axisConstraintGroups||[];for(C in L)for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function it(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 h(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&h()};e()}var d,g,v=0;function m(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&TT)&&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,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&"number"==typeof m&&y&&Se.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=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,a];return c&&c.add(t,l,h,u,p),f.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,h=t,f=[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("undefined"==typeof 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(!k(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function k(t){return t===Math.round(t)&&t>=0}function T(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?"data_array"===t.valType?(t.role="data",n[e+"src"]={valType:"string",editType:"none"}):!0===t.arrayOk&&(n[e+"src"]={valType:"string",editType:"none"}):g(t)&&(t.role="object")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[b];if(!n)return;delete t[b],r[e]={items:{}},r[e].items[n]=t,r[e].role="object"})}(t),function(t){!function t(e){for(var r in e)if(g(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)i=u[o];else{var h=t._module;if(h||(h=(n.modules[t.type||a.type.dflt]||{})._module),!h)return!1;if(!(i=(r=h.attributes)&&r[o])){var f=h.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return w(i,e,s)},r.getLayoutValObject=function(t,e){return w(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;s&&(o=i);var l,c=e+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][a]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function f(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:f,applyUpdate:function(e,r){e&&h(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{"../lib":719,"../plots/attributes":764}],758:[function(t,e,r){"use strict";var n=t("d3"),i=t("../registry"),a=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),h=t("../components/modebar"),f=t("../plots/cartesian/axes"),p=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,v=d.clean,m=t("../plots/cartesian/autorange").doAutoRange,y="start",x="middle",b="end";function _(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function w(t){var e,i,a,s,u,d,g=t._fullLayout,v=g._size,m=v.p,y=f.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),r.drawMainTitle(t),h.manage(t),!g._has("cartesian"))return t._promises.length&&Promise.all(t._promises);function x(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-m-n:e._offset+e._length+m+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+m+n:e._offset-m-n:v.l+v.w*(t.position||0)+n%1}for(e=0;ek?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=p(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&d(a)&&t(a,o)}}({data:v,layout:f},""),u.length)return u.map(g)}},{"../lib":719,"../plots/attributes":764,"../plots/plots":828,"./plot_config":755,"./plot_schema":756,"./plot_template":757}],760:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./plot_api"),a=t("../lib"),o=t("../snapshot/helpers"),s=t("../snapshot/tosvg"),l=t("../snapshot/svgtoimg"),c={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(t,e){var r,u,h,f;function p(t){return!(t in e)||a.validate(e[t],c[t])}if(e=e||{},a.isPlainObject(t)?(r=t.data||[],u=t.layout||{},h=t.config||{},f={}):(t=a.getGraphDiv(t),r=a.extendDeep([],t.data),u=a.extendDeep({},t.layout),h=t._context,f=t._fullLayout||{}),!p("width")&&null!==e.width||!p("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!p("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var d={};function g(t,r){return a.coerce(e,d,c,t,r)}var v=g("format"),m=g("width"),y=g("height"),x=g("scale"),b=g("setBackground"),_=g("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=a.extendFlat({},u);m?k.width=m:null===e.width&&n(f.width)&&(k.width=f.width),y?k.height=y:null===e.height&&n(f.height)&&(k.height=f.height);var T=a.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=o.getRedrawFunc(w);function M(){return new Promise(function(t){setTimeout(t,o.getDelay(w._fullLayout))})}function S(){return new Promise(function(t,e){var r=s(w,v,x),n=w._fullLayout.width,c=w._fullLayout.height;if(i.purge(w),document.body.removeChild(w),"svg"===v)return t(_?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=a.randstr(),l({format:v,width:n,height:c,scale:x,canvas:u,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){i.plot(w,r,k,T).then(A).then(M).then(S).then(function(e){t(function(t){return _?t.replace(o.IMAGE_URL_PREFIX,""):t}(e))}).catch(function(t){e(t)})})}},{"../lib":719,"../snapshot/helpers":851,"../snapshot/svgtoimg":853,"../snapshot/tosvg":855,"./plot_api":754,"fast-isnumeric":225}],761:[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 h=Object.keys(t),f=0;fx.length&&i.push(p("unused",a,m.concat(x.length)));var T,A,M,S,E,C=x.length,L=Array.isArray(k);if(L&&(C=Math.min(C,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&i.push(p("unused",a,m.concat(A,x[A].length)));var P=x[A].length;for(T=0;T<(L?Math.min(P,k[A].length):P);T++)M=L?k[A][T]:k,S=y[A][T],E=x[A][T],n.validate(S,M)?E!==S&&E!==+S&&i.push(p("dynamic",a,m.concat(A,T),S,E)):i.push(p("value",a,m.concat(A,T),S))}else i.push(p("array",a,m.concat(A),y[A]));else for(A=0;A1&&f.push(p("object","layout"))),i.supplyDefaults(d);for(var g=d._fullData,v=r.length,m=0;m0&&((b=A-o(v)-o(m))>M?_/b>S&&(y=v,x=m,S=_/b):_/A>S&&(y={val:v.val,pad:0},x={val:m.val,pad:0},S=_/A));if(f===p){var E=f-1,C=f+1;if(k)if(0===f)a=[0,1];else{var L=(f>0?h:u).reduce(function(t,e){return Math.max(t,o(e))},0),P=f/(1-Math.min(.5,L/A));a=f>0?[0,P]:[P,0]}else a=T?[Math.max(0,E),Math.max(1,C)]:[E,C]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):T&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),a=[y.val-S*o(y),x.val+S*o(x)];return d&&a.reverse(),i.simpleMap(a,e.l2r||Number)}function l(t){var e=t._length/20;return"domain"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function c(t,e){var r,n,i,a=e._id,o=t._fullData,s=t._fullLayout,l=[],c=[];function f(t,e){for(r=0;r=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 p(t){return n(t)&&Math.abs(t)=e}e.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(t,e){if(e.setScale(),e.autorange){e.range=s(t,e),e._r=e.range.slice(),e._rl=i.simpleMap(e._r,e.r2l);var r=e._input,n={};n[e._attr+".range"]=e.range,n[e._attr+".autorange"]=e.autorange,o.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,n),r.range=e.range.slice(),r.autorange=e.autorange}var a=e._anchorAxis;if(a&&a.rangeslider){var l=a.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=s(t,e)),a._input.rangeslider[e._name]=i.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var i,o,s,l,c,f,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,k=!1;function T(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=T((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),M=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(i=0;i0&&(g=o),o>v&&o-a&&(g=o),o>v&&o=P;i--)L(i);return{min:m,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":695,"../../lib":719,"../../registry":847,"fast-isnumeric":225}],767:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../components/titles"),u=t("../../components/color"),h=t("../../components/drawing"),f=t("./layout_attributes"),p=t("./clean_ticks"),d=t("../../constants/numerical"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t("../../constants/alignment").MID_SHIFT,T=t("../../constants/alignment").LINE_SPACING,A=e.exports={};A.setConvert=t("./set_convert");var M=t("./axis_autotype"),S=t("./axis_ids");A.id2name=S.id2name,A.name2id=S.name2id,A.cleanId=S.cleanId,A.list=S.list,A.listIds=S.listIds,A.getFromId=S.getFromId,A.getFromTrace=S.getFromTrace;var E=t("./autorange");A.getAutoRange=E.getAutoRange,A.findExtremes=E.findExtremes,A.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return i||(i=l[0]||a),a||(a=i),u[c]={valType:"enumerated",values:l.concat(a?[a]:[]),dflt:i},s.coerce(t,e,u,c)},A.coercePosition=function(t,e,r,n,i,a){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(i,a);else{var c=A.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},A.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:A.getFromId(e,r).cleanPos)(t)},A.redrawComponents=function(t,e){e=e||A.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},A.saveRangeInitial=function(t,e){for(var r=A.list(t,"",!0),n=!1,i=0;i.3*f||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=A.tickIncrement(t,"M6","reverse")+1.5*m:a.exactMonths>.8?t=A.tickIncrement(t,"M1","reverse")+15.5*m:t-=m/2;var l=A.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,a)),v=x,0;v<=u;)v=A.tickIncrement(v,y,!1,a),0;return{start:e.c2r(x,0,a),end:e.c2r(v,0,a),size:y,_dataSpan:u-c}},A.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type||"multicategory"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),"radialaxis"===t._name&&(n*=2)),"array"===t.tickmode&&(n*=100),A.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),j(t)},A.calcTicks=function(t){A.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if("array"===t.tickmode)return function(t){var e=t.tickvals,r=t.ticktext,n=new Array(e.length),i=s.simpleMap(t.range,t.r2l),a=1.0001*i[0]-1e-4*i[1],o=1.0001*i[1]-1e-4*i[0],l=Math.min(a,o),c=Math.max(a,o),u=0;Array.isArray(r)||(r=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var f=0;fl&&p=n:h<=n)&&!(o.length>u||h===c);h=A.tickIncrement(h,t.dtick,a,t.calendar)){c=h;var f=!1;l&&h!==(0|h)&&(f=!0),o.push({minor:f,value:h})}rt(t)&&360===Math.abs(e[1]-e[0])&&o.pop(),t._tmax=(o[o.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;for(var p=new Array(o.length),d=0;d10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=m&&a<=10||e>=15*m)t._tickround="d";else if(e>=x&&a<=16||e>=y)t._tickround="M";else if(e>=b&&a<=19||e>=x)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(q(t.exponentformat)&&!H(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function U(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}A.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar);var a=2*e;a>g?(e/=g,r=n(10),t.dtick="M"+12*N(e,r,O)):a>v?(e/=v,t.dtick="M"+N(e,1,z)):a>m?(t.dtick=N(e,m,D),t.tick0=s.dateTick0(t.calendar,!0)):a>y?t.dtick=N(e,y,z):a>x?t.dtick=N(e,x,I):a>b?t.dtick=N(e,b,I):(r=n(10),t.dtick=N(e,r,O))}else if("log"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick="L"+N(e,r,O)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):rt(t)?(t.tick0=0,r=1,t.dtick=N(e,r,B)):(t.tick0=0,r=n(10),t.dtick=N(e,r,O));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}},A.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,a);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?F:R,h=t+.01*o,f=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)},A.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),a=r[1]"+l,t._prevDateHead=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=G(Math.pow(10,l),t,a,n);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),f=Math.abs(h),p=t.exponentformat;"power"===p||q(p)&&H(h)?(e.text=0===h?1:1===h?"10":"10"+(h>1?"":_)+f+"",e.fontSize*=1.25):("e"===p||"E"===p)&&f>2?e.text="1"+p+(h>0?"+":_)+f:(e.text=G(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,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):rt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=G(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=G(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="\u03c0":e.text=o[0]+"\u03c0":e.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(e.text=_+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=G(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 v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},A.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return A.hoverLabelText(t,e)+" - "+A.hoverLabelText(t,r);var n="log"===t.type&&e<=0,i=A.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":_+i:i};var V=["f","p","n","\u03bc","m","","k","M","G","T"];function q(t){return"SI"===t||"B"===t}function H(t){return t>14||t<-15}function G(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=A.getTickFormat(e),h=e.separatethousands;if(n){var f={exponentformat:l,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};j(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"
":"B"===l&&9===c?t+="B":q(l)&&(t+=V[c/3+5]));return a?_+t:t}function Y(t,e){var r=t._id.charAt(0),n=t._tickAngles[e]||0,i=s.deg2rad(n),a=Math.sin(i),o=Math.cos(i),l=0,c=0;return t._selections[e].each(function(){var t=J(this),e=h.bBox(t.node()),r=e.width,n=e.height;l=Math.max(l,o*r,a*n),c=Math.max(c,a*r,o*n)}),{x:c,y:l}[r]}function W(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function X(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return"free"!==e.anchor?r=S.getFromId(t,e.anchor):"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0}function Z(t,e){var r=t.l2p(e);return r>1&&r=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[i]+=l),e.title.text!==f._dfltTitle[d]&&(r[i]+=e.title.font.size),"x"===d&&c.width>0){var h=c.right-(e._offset+e._length);h>0&&(r.x=1,r.r=h);var p=e._offset-c.left;p>0&&(r.x=0,r.l=p)}else if("y"===d&&c.height>0){var v=c.bottom-(e._offset+e._length);v>0&&(r.y=0,r.b=v);var m=e._offset-c.top;m>0&&(r.y=1,r.t=m)}}a.autoMargin(t,K(e),r)}),r.skipTitle||tt&&e._boundingBox&&"bottom"===e.side||G.push(function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if("multicategory"===e.type)r=e._labelLength;else{r=10+1.5*o+(e.linewidth?e.linewidth-1:0)}var s,l,u,f,p=X(t,e);"x"===a?(l=e._offset+e._length/2,u="top"===e.side?-r-o*(e.showticklabels?1:0):r+o*(e.showticklabels?1.5:.5),u+=p):(u=e._offset+e._length/2,l="right"===e.side?r+o*(e.showticklabels?1:.5):-r-o*(e.showticklabels?.5:0),l+=p,s={rotate:"-90",offset:0});if("multicategory"!==e.type){var d=e._selections[e._id+"tick"];if(f={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var g=h.getTranslate(d.node().parentNode);f.offsetLeft=g.x,f.offsetTop=g.y}}return c.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:f,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(t,e)}),s.syncOrAsync(G)}function et(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}},A.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})),i},A.makeTransFn=function(t){var e=t._id.charAt(0),r=t._offset;return"x"===e?function(e){return"translate("+(r+t.l2p(e.x))+",0)"}:function(e){return"translate(0,"+(r+t.l2p(e.x))+")"}},A.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},A.makeLabelFns=function(t,e,r){var n=t._id.charAt(0),a="boundaries"!==t.tickson&&"outside"===t.ticks,o=0,l=0;if(a&&(o+=t.ticklen),r&&"outside"===t.ticks){var c=s.deg2rad(r);o=t.ticklen*Math.cos(c)+1,l=t.ticklen*Math.sin(c)}t.showticklabels&&(a||t.showline)&&(o+=.2*t.tickfont.size);var u,h,f,p,d={labelStandoff:o+=(t.linewidth||1)/2,labelShift:l};return"x"===n?(p="bottom"===t.side?1:-1,u=l*p,h=e+o*p,f="bottom"===t.side?1:-.2,d.xFn=function(t){return t.dx+u},d.yFn=function(t){return t.dy+h+t.fontSize*f},d.anchorFn=function(t,e){return i(e)&&0!==e&&180!==e?e*p<0?"end":"start":"middle"},d.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side?-n:0}):"y"===n&&(p="right"===t.side?1:-1,u=o,h=-l*p,f=90===Math.abs(t.tickangle)?.5:0,d.xFn=function(t){return t.dx+e+(u+t.fontSize*f)*p},d.yFn=function(t){return t.dy+h+t.fontSize*k},d.anchorFn=function(e,r){return i(r)&&90===Math.abs(r)?"middle":"right"===t.side?"start":"end"},d.heightFn=function(e,r,n){return(r*="left"===t.side?1:-1)<-30?-n:r<30?-.5*n:0}),d},A.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",i=r.layer.selectAll("path."+n).data(e.ticks?r.vals:[],W);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,e.tickcolor).style("stroke-width",h.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),i.attr("transform",r.transFn)},A.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&&A.shouldShowZeroLine(t,e,a))for(var o="array"===e.tickmode,s=0;s1)for(n=1;n2*o}(t,e)?"date":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(t)?"category":function(t){if(!t)return!1;for(var e=0;en?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n0;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;nl*x)||k)for(r=0;rz&&RP&&(P=R);p/=(P-L)/(2*O),L=c.l2r(L),P=c.l2r(P),c.range=c._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function I(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",i+"Z")}function D(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function R(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),F(t,e,i,a)}function F(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 B(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(t){S&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),S=!1)}function j(t){return"lasso"===t||"select"===t}function U(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,M)/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 V(t,e,r,n){for(var i,a,o,l,c=!1,u={},h={},f=0;f-1&&w(i,t,X,Z,e.id,St),a.indexOf("event")>-1&&h.click(t,i,e.id);else if(1===r&&pt){var s=S?G:F,c="s"===S||"w"===E?0:1,u=s._name+".range["+c+"]",f=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return"date"===t.type?i:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format("."+String(r)+"g")(i))}(s,c),p="left",d="middle";if(s.fixedrange)return;S?(d="n"===S?"top":"bottom","right"===s.side&&(p="right")):"e"===E&&(p="right"),t._context.showAxisRangeEntryBoxes&&n.select(vt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:d}).on("edit",function(e){var r=s.d2r(e);void 0!==r&&o.call("_guiRelayout",t,u,r)})}}function Lt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,e+mt)),i=Math.max(0,Math.min(Q,r+yt)),a=Math.abs(n-mt),o=Math.abs(i-yt);function s(){kt="",xt.r=xt.l,xt.t=xt.b,At.attr("d","M0,0Z")}if(xt.l=Math.min(mt,n),xt.r=Math.max(mt,n),xt.t=Math.min(yt,i),xt.b=Math.max(yt,i),tt.isSubplotConstrained)a>M||o>M?(kt="xy",a/$>o/Q?(o=a*Q/$,yt>i?xt.t=yt-o:xt.b=yt+o):(a=o*$/Q,mt>n?xt.l=mt-a:xt.r=mt+a),At.attr("d",U(xt))):s();else if(et.isSubplotConstrained)if(a>M||o>M){kt="xy";var l=Math.min(xt.l/$,(Q-xt.b)/Q),c=Math.max(xt.r/$,(Q-xt.t)/Q);xt.l=l*$,xt.r=c*$,xt.b=(1-l)*Q,xt.t=(1-c)*Q,At.attr("d",U(xt))}else s();else!nt||og[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":719,"fast-isnumeric":225}],783:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{"../../constants/alignment":688}],784:[function(t,e,r){"use strict";var n=t("polybooljs"),i=t("../../registry"),a=t("../../components/color"),o=t("../../components/fx"),s=t("../../lib"),l=t("../../lib/polygon"),c=t("../../lib/throttle"),u=t("../../components/fx/helpers").makeEventData,h=t("./axis_ids").getFromId,f=t("../../lib/clear_gl_canvases"),p=t("../../plot_api/subroutines").redrawReglTraces,d=t("./constants"),g=d.MINSELECT,v=l.filter,m=l.tester;function y(t){return t._id}function x(t,e,r,n,i,a,o){var s,l,c,u,h,f,p,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){k(t,e,a);var x=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)&&(f=S(x))){for(o&&o.remove(),g=0;g0?"M"+i.join("M")+"Z":"M0,0Z",e.attr("d",n)}function S(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function E(t,e,r){var n,a,o,s;for(n=0;n-1&&x(e,S,i.xaxes,i.yaxes,i.subplot,i,G),"event"===r&&S.emit("plotly_selected",void 0);o.click(S,e)}).catch(s.error)},i.doneFn=function(){W.remove(),c.done(X).then(function(){c.clear(X),i.gd.emit("plotly_selected",_),p&&i.selectionDefs&&(p.subtract=H,i.selectionDefs.push(p),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,f)),i.doneFnCompleted&&i.doneFnCompleted(Z)}).catch(s.error)}},clearSelect:L,selectOnClick:x}},{"../../components/color":593,"../../components/fx":632,"../../components/fx/helpers":628,"../../lib":719,"../../lib/clear_gl_canvases":704,"../../lib/polygon":731,"../../lib/throttle":744,"../../plot_api/subroutines":758,"../../registry":847,"./axis_ids":770,"./constants":773,polybooljs:473}],785:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../../lib"),o=a.cleanNumber,s=a.ms2DateTime,l=a.dateTime2ms,c=a.ensureNumber,u=a.isArrayOrTypedArray,h=t("../../constants/numerical"),f=h.FP_SAFE,p=h.BADNUM,d=h.LOG_CLIP,g=t("./constants"),v=t("./axis_ids");function m(t){return Math.pow(10,t)}function y(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",h=r.charAt(0);function x(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*d*Math.abs(n-i))}return p}function b(e,r,n){var o=l(e,n||t.calendar);if(o===p){if(!i(e))return p;e=+e;var s=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function _(e,r,n){return s(e,r,n||t.calendar)}function w(e){return t._categories[Math.round(e)]}function k(e){if(y(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 p}function T(e){if(t._categoriesMap)return t._categoriesMap[e]}function A(t){var e=T(t);return void 0!==e?e:i(t)?+t:void 0}function M(e){return i(e)?n.round(t._b+t._m*e,2):p}function S(e){return(e-t._b)/t._m}t.c2l="log"===t.type?x:c,t.l2c="log"===t.type?m:c,t.l2p=M,t.p2l=S,t.c2p="log"===t.type?function(t,e){return M(x(t,e))}:M,t.p2c="log"===t.type?function(t){return m(S(t))}:S,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=S,t.cleanPos=c):"log"===t.type?(t.d2r=t.d2l=function(t,e){return x(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=x,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(S(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=S,t.cleanPos=c):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=b,t.c2d=t.c2r=t.l2d=t.l2r=_,t.d2p=t.r2p=function(e,r,n){return t.l2p(b(e,0,n))},t.p2d=t.p2r=function(t,e,r){return _(S(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,p,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=k,t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:c(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=T,t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:c(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=e._axisMatchGroups;if(l&&l.length&&0===t._categories.length)for(i=0;if&&(s[n]=f),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else a.nestedProperty(t,e).set(o)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=v.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s=t.r2l(t[a][0],o),l=t.r2l(t[a][1],o);if("y"===h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.makeCalcdata=function(e,r){var n,i,o,s,l=t.type,c="date"===l&&e[r+"calendar"];if(r in e){if(n=e[r],s=e._length||a.minRowLength(n),a.isTypedArray(n)&&("linear"===l||"log"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}if("multicategory"===l)return function(t,e){for(var r=new Array(e),n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,s=n.yaxis,l=e.xr0,c=e.xr1,u=i._length,h=e.yr0,f=e.yr1,p=s._length,d=!!c,g=!!f,v=[];if(d){var m=l[1]-l[0],y=c[1]-c[0];v[0]=(l[0]*(1-r)+r*c[0]-l[0])/(l[1]-l[0])*u,v[2]=u*(1-r+r*y/m),i.range[0]=l[0]*(1-r)+r*c[0],i.range[1]=l[1]*(1-r)+r*c[1]}else v[0]=0,v[2]=u;if(g){var x=h[1]-h[0],b=f[1]-f[0];v[1]=(h[1]*(1-r)+r*f[1]-h[1])/(h[0]-h[1])*p,v[3]=p*(1-r+r*b/x),s.range[0]=h[0]*(1-r)+r*f[0],s.range[1]=h[1]*(1-r)+r*f[1]}else v[1]=0,v[3]=p;o.drawOne(t,i,{skipTitle:!0}),o.drawOne(t,s,{skipTitle:!0}),o.redrawComponents(t,[i._id,s._id]);var _=d?u/v[2]:1,w=g?p/v[3]:1,k=d?v[0]:0,T=g?v[1]:0,A=d?v[0]/v[2]*u:0,M=g?v[1]/v[3]*p:0,S=i._offset-A,E=s._offset-M;n.clipRect.call(a.setTranslate,k,T).call(a.setScale,1/_,1/w),n.plot.call(a.setTranslate,S,E).call(a.setScale,_,w),a.setPointGroupScale(n.zoomScalePts,1/_,1/w),a.setTextPointsScale(n.zoomScaleTxt,1/_,1/w)}o.redrawComponents(t)}},{"../../components/drawing":614,"../../registry":847,"./axes":767,d3:163}],790:[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("type",(s.splomStash||{}).type)&&(!function(t,e){if("-"!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf("scene")&&(r=s);var l=function(t,e,r){for(var n=0;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,r,s);if(!l)return;if("histogram"===l.type&&s==={v:"y",h:"x"}[l.orientation||"v"])return void(t.type="linear");var c,u=s+"calendar",h=l[u],f={noMultiCategory:!n(l,"cartesian")||n(l,"noMultiCategory")};if(o(l,s)){var p=a(l),d=[];for(c=0;c0?".":"")+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"],h=0;hi*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(g.precision),i&&r.clipAngle(i-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var h=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],f=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(f.range,p.range);u.fitExtent(h,d);var v=this.bounds=u.getBounds(d),m=this.fitScale=u.scale(),y=u.translate();if(!isFinite(v[0][0])||!isFinite(v[0][1])||!isFinite(v[1][0])||!isFinite(v[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=["projection.rotation","center","lonaxis.range","lataxis.range"],_="Invalid geo settings, relayout'ing to default view.",w={},k=0;k-1&&p(n.event,a,[r.xaxis],[r.yaxis],r.id,g),c.indexOf("event")>-1&&l.click(a,n.event))})}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv,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(s.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"},u.setConvert(t.mockAxis,r)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale}:t._isClipped?this.viewInitial={"projection.scale":r.scale,"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale,"projection.rotation.lon":n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",function(t){return r(t.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},{"../../components/color":593,"../../components/dragelement":611,"../../components/drawing":614,"../../components/fx":632,"../../lib":719,"../../lib/topojson_utils":746,"../../registry":847,"../cartesian/axes":767,"../cartesian/select":784,"../plots":828,"./constants":795,"./projections":800,"./zoom":801,d3:163,"topojson-client":540}],797:[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[o]={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[o],s=0;s0&&w<0&&(w+=360);var k,T,A,M=(_+w)/2;if(!c){var S=u?s.projRotate:[M,0,0];k=r("projection.rotation.lon",S[0]),r("projection.rotation.lat",S[1]),r("projection.rotation.roll",S[2]),r("showcoastlines",!u)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean")&&r("oceancolor")}(c?(T=-96.6,A=38.7):(T=u?M:k,A=(b[0]+b[1])/2),r("center.lon",T),r("center.lat",A),h)&&r("projection.parallels",s.projParallels||[0,60]);r("projection.scale"),r("showland")&&r("landcolor"),r("showlakes")&&r("lakecolor"),r("showrivers")&&(r("rivercolor"),r("riverwidth")),r("showcountries",u&&"usa"!==a)&&(r("countrycolor"),r("countrywidth")),("usa"===a||"north america"===a&&50===n)&&(r("showsubunits",!0),r("subunitcolor"),r("subunitwidth")),u||r("showframe",!0)&&(r("framecolor"),r("framewidth")),r("bgcolor")}e.exports=function(t,e,r){n(t,e,r,{type:"geo",attributes:a,handleDefaults:s,partition:"y"})}},{"../subplot_defaults":842,"./constants":795,"./layout_attributes":798}],800:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length<2?{type:"Point",coordinates:i[0]}:{type:"MultiPoint",coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&&(a.push(i),i=[])},result:function(){var t=a.length?a.length<2?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t<4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++rn^p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),a=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var h=1e-6,f=h*h,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),v=180/p;function m(t){return t>1?d:t<-1?-d:Math.asin(t)}function y(t){return t>1?0:t<-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>h;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function i(t,r){for(var i=r<0?-1:1,a=n[+(r<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}e.invert&&(i.invert=function(t,a){for(var o=r[+(a<0)],s=n[+(a<0)],c=0,u=o.length;c=0;--i){var o=n[1][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,h=180*o[2][0]/p,f=180*o[2][1]/p;r.push(s([[h-e,f-e],[h-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),l)},i},a.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})}),a):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},a},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=m(r),i=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+i)),m((n+r*(i+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length<2&&(e=t),1===e)return w;if(e===1/0)return T;function r(r,n){var i=w(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=w.invert(r/t,n);return i[0]*=e,i},r}function T(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function M(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>h&&--i>0);return e/2}}T.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,M.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(M)}).raw=M,S(p);var E=function(t,e,r){var n=S(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=m(i/e);return[n/(t*Math.cos(a)),m((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/d,Math.SQRT2,p);function C(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(E)}).raw=E,C.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>h&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(C)}).raw=C;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function P(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),i=Math.floor(n),a=n-i,o=(r=L[i])[0],s=r[1],l=(r=L[++i])[0],c=r[1],u=(r=L[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?d:-d)*(c+a*(h-s)/2+a*a*(h-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function z(t,e){var r,n=Math.cos(e),i=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function I(t,e){var r=z(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),P.invert=function(t,e){var r=e/d,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,h=2*(Math.abs(r)-s)/c,p=u/c,m=h*(1-p*h*(1-2*p*h));if(m>=0||1===a){n=(e>=0?5:-5)*(m+i);var y,x=50;do{m=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],n-=(y=(e>=0?d:-d)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*v}while(Math.abs(y)>f&&--x>0);break}}while(--a>=0);var b=L[a][0],_=L[a+1][0],w=L[Math.min(19,a+2)][0];return[t/(_+m*(w-b)/2+m*m*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(P)}).raw=P,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(O)}).raw=O,z.invert=function(t,e){if(!(t*t+4*e*e>p*p+h)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),f=Math.sin(2*n),d=c*c,g=u*u,v=s*s,m=1-g*l*l,x=m?y(u*l)*Math.sqrt(a=1/m):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*v+x*u*l*d),k=a*(.5*o*f-2*x*c*s),T=.25*a*(f*s-x*c*g*o),A=a*(d*l+x*v*u),M=k*T-A*w;if(!M)break;var S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return x(z)}).raw=z,I.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,f=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),v=g*g,m=1-u*p*p,x=m?y(o*p)*Math.sqrt(a=1/m):a=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*a*(u*v+x*o*p*c)+.5/d,k=a*(f*l/4-x*s*g),T=.125*a*(l*g-x*s*u*f),A=.5*a*(c*p+x*v*o)+.5,M=k*T-A*w,S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return x(I)}).raw=I}},{}],801:[function(t,e,r){"use strict";var n=t("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 h(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],h={},f={};function p(t,e){h[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),f[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),o.emit("plotly_relayout",f)}function f(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),h(t,e,i)}),r}function p(t,e){var r,i,a,o,s,f,p,d,g,v=u(0,e),m=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return v.on("zoomstart",function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=y(r)}).on("zoom",function(){if(f=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>m||Math.abs(n[1]-t[1])>m}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?y(f)&&(d=y(f),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=y(r=f),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&&h(t,e,x)}),v}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),f=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/d)*s-p,i=Math.sqrt(d*d-h*h));var g=180-a-2*p,m=(Math.atan2(f,u)-Math.atan2(c,i))*s,x=(Math.atan2(f,u)-Math.atan2(c,-i))*s,b=v(r[0],r[1],a,m),_=v(r[0],r[1],g,x);return b<=_?[a,m,r[2]]:[g,x,r[2]]}(k,r,E);isFinite(T[0])&&isFinite(T[1])&&isFinite(T[2])||(T=E),e.rotate(T),E=T}}else r=g(e,M=b);f.of(this,arguments)({type:"zoom"})}),A=f.of(this,arguments),p++||A({type:"zoomstart"})}).on("zoomend",function(){var r;n.select(this).style(c),d.call(a,"zoom",null),r=f.of(this,arguments),--p||r({type:"zoomend"}),h(t,e,m)}).on("zoom.redraw",function(){t.render();var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),n.rebind(a,f,"on")}function g(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function v(t,e,r,n){var i=m(r-t),a=m(n-e);return Math.sqrt(i*i+a*a)}function m(t){return(t%360+540)%360-180}function y(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 x(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&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n).999&&(v="turntable"):v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":593,"../../../lib":719,"../../../registry":847,"../../get_data":802,"../../subplot_defaults":842,"./axis_defaults":810,"./layout_attributes":813}],813:[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":719,"../../../lib/extend":710,"../../domain":792,"./axis_attributes":809}],814:[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":742}],815:[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 h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var p=n.calcTicks(u),d=0;d/g," "));l[c]=p,u.tickmode=h}}e.ticks=l;for(var c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(var 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;a")):"isosurface"===e.type||"volume"===e.type?(w.valueLabel=h.tickText(t.mockAxis,t.mockAxis.d2l(p.traceCoordinate[3]),"hover").text,M.push("value: "+w.valueLabel),p.textLabel&&M.push(p.textLabel),x=M.join("
")):x=p.textLabel;var S={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:_};f.appendArrayPointValue(S,b,_),e._module.eventData&&(S=b._module.eventData(S,p,b,{},_));var E={points:[S]};t.fullSceneLayout.hovermode&&f.loneHover({trace:b,x:(.5+.5*m[0]/m[3])*a,y:(.5-.5*m[1]/m[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:x,name:c.name,color:f.castHoverOption(b,_,"bgcolor")||c.color,borderColor:f.castHoverOption(b,_,"bordercolor"),fontFamily:f.castHoverOption(b,_,"font.family"),fontSize:f.castHoverOption(b,_,"font.size"),fontColor:f.castHoverOption(b,_,"font.color"),nameLength:f.castHoverOption(b,_,"namelength"),textAlign:f.castHoverOption(b,_,"align"),hovertemplate:u.castOption(b,_,"hovertemplate"),hovertemplateLabels:u.extendFlat({},S,w),eventData:[S]},{container:n,gd:r}),p.buttons&&p.distance<5?r.emit("plotly_click",E):r.emit("plotly_hover",E),s=E}else f.loneUnhover(n),r.emit("plotly_unhover",s);t.drawAnnotations(t)}.bind(null,t),t.traces={},t.make4thDimension(),!0}function b(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e,e[this.id]),this.spikeOptions=m(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),x(this,this.pixelRatio)}var _=b.prototype;_.initializeGLCamera=function(){var t=this.fullSceneLayout.camera,e="orthographic"===t.projection.type;this.camera=a(this.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:e,zoomMin:.01,zoomMax:100,mode:"orbit"})},_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas,n=this.glplot.camera,i=this.glplot.pixelRatio;this.glplot.dispose(),requestAnimationFrame(function a(){e.isContextLost()?requestAnimationFrame(a):x(t,n,i,r)?t.plot.apply(t,t.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")})};var w=["xaxis","yaxis","zaxis"];function k(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=w[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+"calendar"],h=e["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var f,p=0;p<(h||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][a])g[0][a]=-1,g[1][a]=1;else{var E=g[1][a]-g[0][a];g[0][a]-=E/32,g[1][a]+=E/32}if("reversed"===s.autorange){var C=g[0][a];g[0][a]=g[1][a],g[1][a]=C}}else{var L=s.range;g[0][a]=s.r2l(L[0]),g[1][a]=s.r2l(L[1])}g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),v[a]=g[1][a]-g[0][a],this.glplot.bounds[0][a]=g[0][a]*f[a],this.glplot.bounds[1][a]=g[1][a]*f[a]}var P=[1,1,1];for(a=0;a<3;++a){var O=m[l=(s=c[w[a]]).type];P[a]=Math.pow(O.acc,1/O.count)/f[a]}var z;if("auto"===c.aspectmode)z=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===c.aspectmode)z=[1,1,1];else if("data"===c.aspectmode)z=P;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var I=c.aspectratio;z=[I.x,I.y,I.z]}c.aspectratio.x=u.aspectratio.x=z[0],c.aspectratio.y=u.aspectratio.y=z[1],c.aspectratio.z=u.aspectratio.z=z[2],this.glplot.aspect=z;var D=c.domain||null,R=e._size||null;if(D&&R){var F=this.container.style;F.position="absolute",F.left=R.l+D.x[0]*R.w+"px",F.top=R.t+(1-D.y[1])*R.h+"px",F.width=R.w*(D.x[1]-D.x[0])+"px",F.height=R.h*(D.y[1]-D.y[0])+"px"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),T(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]);var r="orthographic"===t.projection.type;if(r!==this.glplot.camera._ortho){this.glplot.redraw();var n=this.glplot.pixelRatio,i=this.glplot.clearColor;this.glplot.gl.clearColor(i[0],i[1],i[2],i[3]),this.glplot.gl.clear(this.glplot.gl.DEPTH_BUFFER_BIT|this.glplot.gl.COLOR_BUFFER_BIT),this.glplot.dispose(),x(this,n),this.glplot.camera._ortho=r}},_.saveCamera=function(t){var e=this.fullLayout,r=this.getCamera(),n=u.nestedProperty(t,this.id+".camera"),i=n.get(),a=!1;function o(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}if(void 0===i)a=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!o(r,i,s,l)){a=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(a=!0)}if(a){var h={};h[this.id+".camera"]=i,c.call("_storeDirectGUIEdit",t,e._preGUI,h),n.set(r),u.nestedProperty(e,this.id+".camera").set(r)}return a},_.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 h=this.id+".camera.up",f={x:0,y:0,z:1},p={};p[h]=f;var d=n.layout;c.call("_storeDirectGUIEdit",d,i._preGUI,p),a.up=f,u.nestedProperty(d,h).set(f)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o\xa9 OpenStreetMap',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:'\xa9 CARTO',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:'\xa9 CARTO',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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, under CC BY SA.',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}]}},i=Object.keys(n);e.exports={requiredVersion:"1.1.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:i,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.1.1."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",i.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\')'}}},{}],821:[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":719}],822:[function(t,e,r){"use strict";var n=t("mapbox-gl"),i=t("../../lib"),a=t("../../plots/get_data").getSubplotCalcData,o=t("../../constants/xmlns_namespaces"),s=t("d3"),l=t("../../components/drawing"),c=t("../../lib/svg_text_utils"),u=t("./mapbox"),h=r.constants=t("./constants");function f(t){return"string"==typeof t&&-1!==h.styleValuesMapbox.indexOf(t)}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=i.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==h.requiredVersion)throw new Error(h.wrongVersionErrorMsg);var s=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(h.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,o);n.accessToken=s;for(var l=0;lx/2){var b=g.split("|").join("
");m.text(b).attr("data-unformatted",b).call(c.convertToTspans,t),y=l.bBox(m.node())}m.attr("transform","translate(-3, "+(8-y.height)+")"),v.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var _=1;y.width+6>x&&(_=x/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];v.attr("transform","translate("+w[0]+","+w[1]+") scale("+_+")")}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0)}function c(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 a=t.symbol,o=i(a.textposition,a.iconsize);n.extendFlat(e,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":a.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}s.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=l(t)},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.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,l(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",i.tileSize=256):"image"===r&&(e="url",i.coordinates=t.coordinates);i[e]=n,t.sourceattribution&&(i.attribution=t.sourceattribution);return i}(t);e.addSource(this.idSource,r)}},s.updateLayer=function(t){var e,r=this.subplot,n=c(t),i=this.subplot.belowLookup["layout-"+this.index];if("traces"===i)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&h(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&a.click(n,e.originalEvent)}}},g.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var i,a=t.dragmode;i="select"===a?function(t,r){(t.range={})[e.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(l)};var s=e.dragOptions;e.dragOptions=o.extendDeep(s||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:i},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),"select"===a||"lasso"===a?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){u(t,r,n,e.dragOptions,a)},c.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 l(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},g.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])},g.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"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){v.sendDataToCloud(t)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&u.text()?" - ":"")}},v.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=v.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1};var x=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],b=["year","month","dayMonth","dayMonthYear"];function _(t,e){var r=t._context.locale,n=!1,i={};function o(t){for(var r=!0,a=0;a1&&O.length>1){for(a.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&O.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has("cartesian"),s._hasGeo=s._has("geo"),s._hasGL3D=s._has("gl3d"),s._hasGL2D=s._has("gl2d"),s._hasTernary=s._has("ternary"),s._hasPie=s._has("pie"),v.linkSubplots(h,s,u,i),v.cleanPlot(h,s,u,i),i._zoomlayer&&!t._dragging&&i._zoomlayer.selectAll(".select-outline").remove(),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var h=1-2*s;n=Math.round(h*n),a=Math.round(h*a)}}var f=v.layoutAttributes.width.min,p=v.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-a)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),v.sanitizeMargins(r)},v.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,s,c=a.componentsRegistry,u=e._basePlotModules,h=a.subplotsRegistry.cartesian;for(i in c)(s=c[i]).includeBasePlot&&s.includeBasePlot(t,e);for(var f in u.length||u.push(h),e._has("cartesian")&&(a.getComponentMethod("grid","contentDefaults")(t,e),h.finalizeSubplots(t,e)),e._subplots)e._subplots[f].sort(l.subplotSort);for(o=0;o.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0);var l=void 0!==r.xl?r.xl:r.x,c=void 0!==r.xr?r.xr:r.x,u=void 0!==r.yt?r.yt:r.y,h=void 0!==r.yb?r.yb:r.y;i[e]={l:{val:l,size:r.l+o},r:{val:c,size:r.r+o},b:{val:h,size:r.b+o},t:{val:u,size:r.t+o}},a[e]=1}else delete i[e],delete a[e];n._replotting||v.doAutoMargin(t)}},v.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),A(e);var r=e._size,n=e.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,h=n.b,f=e.width,p=e.height,d=e._pushmargin,g=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var m in d)g[m]||delete d[m];for(var y in d.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:h}},d){var x=d[y].l||{},b=d[y].b||{},_=x.val,w=x.size,k=b.val,T=b.size;for(var M in d){if(i(w)&&d[M].r){var S=d[M].r.val,E=d[M].r.size;if(S>_){var C=(w*S+(E-f)*_)/(S-_),L=(E*(1-_)+(w-f)*(1-S))/(S-_);C>=0&&L>=0&&f-(C+L)>0&&C+L>s+c&&(s=C,c=L)}}if(i(T)&&d[M].t){var P=d[M].t.val,O=d[M].t.size;if(P>k){var z=(T*P+(O-p)*k)/(P-k),I=(O*(1-k)+(T-p)*(1-P))/(P-k);z>=0&&I>=0&&p-(I+z)>0&&z+I>h+u&&(h=z,u=I)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(h),r.p=Math.round(n.pad),r.w=Math.round(f)-r.l-r.r,r.h=Math.round(p)-r.t-r.b,!e._replotting&&v.didMarginChange(o,r))return"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1,a.call("plot",t)};var M=["l","r","t","b","p","w","h"];function S(t,e,r){var n=!1;var i=[v.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,v.rehover,function(){return t.emit("plotly_transitioning",[]),new Promise(function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return a.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o=0,s=0;function l(){return o++,function(){var e;s++,n||s!==o||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return a.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(e)))}}r.runFn(l),setTimeout(l())})}],o=l.syncOrAsync(i,t);return o&&o.then||(o=Promise.resolve()),o.then(function(){return t})}v.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},v.graphJson=function(t,e,r,n,i){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&v.supplyDefaults(t);var a=i?t._fullData:t.data,o=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if("function"==typeof t)return null;if(l.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=c(t[e])}return i}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(a||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},v.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:u,y:u}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(C(c,f),i=0;i1e-10?t:0}function f(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:h,pathPolygon:function(t,e,r,n,i,a){return"M"+f(u(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=0?f.angularAxis.domain:n.extent(k),E=Math.abs(k[1]-k[0]);A&&!T&&(E=0);var C=S.slice();M&&T&&(C[1]+=E);var L=f.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),f.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var P=f.angularAxis.ticksStep||(C[1]-C[0])/(L*(f.minorTicks+1));w&&(P=Math.max(Math.round(P),1)),C[2]||(C[2]=P);var O=n.range.apply(this,C);if(O=O.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=M?E:0,"undefined"==typeof(t=n.select(this).select("svg.chart-root"))||t.empty()){var z=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),I=this.appendChild(this.ownerDocument.importNode(z.documentElement,!0));t=n.select(I)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var D,R=t.select(".chart-group"),F={fill:"none",stroke:f.tickColor},B={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){D=t.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend="undefined"==typeof t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||"Element"+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:f.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(f.width-j.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else D=t.select(".legend-group").style({display:"none"});t.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var U=[(f.width-(f.margin.left+f.margin.right+2*x+(j?j.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(U[0]=Math.max(0,U[0]),U[1]=Math.max(0,U[1]),t.select(".outer-group").attr("transform","translate("+U+")"),f.title&&f.title.text){var V=t.select("g.title-group text").style(B).text(f.title.text),q=V.node().getBBox();V.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var Y=t.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});function W(t,e){return s(t)%360+f.orientation}if(f.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+f.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(O),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+W(t)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:f.minorTickColor}),Z.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+f.labelOffset,dy:a+"em",transform:function(t,e){var r=W(t),n=x+f.labelOffset,i=f.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(B);f.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var $=n.max(R.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:"translate("+[x+$,f.margin.top]+")"});var Q=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(p);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),p[0]||Q){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return"undefined"!=typeof t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!T){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(Y).angle;ht.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-f.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",function(t,e){var n=o.util.getMousePos(Y).radius;ft.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(Y).radius);var i=o.util.convertToCartesian(n,f.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(e,r){var i=n.select(this),a=this.style.fill,s="black",l=this.style.opacity||1;if(i.attr({"data-opacity":l}),a&&"none"!==a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};T&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,h=this.getBoundingClientRect(),f=t.node().getBoundingClientRect(),p=[h.left+h.width/2-U[0]-f.left,h.top+h.height/2-U[1]-f.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||"black",i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()}).on("mouseout.tooltip",function(t,e){ut.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})})}(c),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},f.getLiveConfig=function(){return u},f.getinputConfig=function(){return c},f.radialScale=function(t){return r},f.angularScale=function(t){return s},f.svg=function(){return t},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if("undefined"==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,i,a)},"stroke-width":function(t,e){return d["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var h=e.angularScale.range(),f=Math.abs(h[1]-h[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-f/2}).endAngle(function(t){return f/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,i){n.select(this).attr({class:"mark arc",d:p,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return"undefined"==typeof t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var v=g.selectAll("path.mark").data(function(t,e){return t});v.enter().append("path").attr({class:"mark"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()})}return a.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)}),this):t},a.getColorScale=function(){},n.rebind(a,e,"on"),a},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,a=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a})}),o=n.merge(a);o=o.filter(function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||"undefined"==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,h=u?e.height:c*o.length,f=s.classed("legend-group",!0).selectAll("svg").data([0]),p=f.enter().append("svg").attr({width:300,height:h+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),v=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,h]);if(u){var m=f.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),f.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=f.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),"line"===(r=o)?"M"+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type("square").size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient("right"),b=f.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",h=i||"";e.style({fill:u,"font-size":a.fontSize+"px"}).text(h);var f=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,"stroke-width":"2px"},g=p.width+2*f+l,v=p.height+2*f;return r.attr({d:"M"+[[l,-v/2],[l,-v/4],[a.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-v/2+2*f]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=i({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=i({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?("undefined"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&"undefined"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&"undefined"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&"undefined"!=typeof s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{"../../../constants/alignment":688,"../../../lib":719,d3:163}],838:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../../lib"),a=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,h=new s;function f(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return f.isPolar=!0,f.svg=function(){return i.svg()},f.getConfig=function(){return e},f.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},f.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},f.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,h.add({undo:function(){n&&i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},f.undo=function(){h.undo()},f.redo=function(){h.redo()},f},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../../components/color":593,"../../../lib":719,"./micropolar":837,"./undo_manager":839,d3:163}],839:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&f<=0?0:Math.max(u,f);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&h>=0?0:Math.min(c,h);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&f>=0?0:Math.min(u,f);n=l>=360?1:c<=0&&h<=0?0:Math.max(c,h);return[e,r,n,i]}(f),x=y[2]-y[0],b=y[3]-y[1],_=h/u,w=Math.abs(b/x);_>w?(p=u,m=(h-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=h,m=(u-(p=h/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],T=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=p/x,M=this.innerRadius=e.hole*A,S=this.cx=k-A*y[0],L=this.cy=T+A*y[3],P=this.cxx=S-k,O=this.cyy=L-T;this.radialAxis=this.mockAxis(t,e,i,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[i.side],domain:[M/n.w,A/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:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",z).attr("transform",R(P,O)),r.frontplot.attr("transform",R(k,T)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",z).attr("transform",R(S,L)).call(s.fill,e.bgcolor)},O.mockAxis=function(t,e,r,n){var i=o.extendFlat({anchor:"free",position:0},r,n);return f(i,e,t),i},O.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:"linear"},r);h(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange="x"===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),p(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,"gregorian"),n.r2l(a[1],null,"gregorian")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.radialaxis,p=E(e.sector[0],360),d=r.radialAxis,g=l90&&p<=270&&(d.tickangle=180);var v=function(t){return"translate("+(d.l2p(t.x)+l)+",0)"},m=z(f);if(r.radialTickLayout!==m&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),g){d.setScale();var y=u.calcTicks(d),x=u.clipEnds(d,y),b=u.getTickSigns(d)[2];u.drawTicks(n,d,{vals:y,layer:i["radial-axis"],path:u.makeTickPath(d,0,b),transFn:v,crisp:!1}),u.drawGrid(n,d,{vals:x,layer:i["radial-grid"],path:function(t){return r.pathArc(d.r2p(t.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,d,{vals:y,layer:i["radial-axis"],transFn:v,labelFns:u.makeLabelFns(d,0)})}var _=r.radialAxisAngle=r.vangles?L(I(C(f.angle),r.vangles)):f.angle,w=R(c,h),k=w+F(-_);D(i["radial-axis"],g&&(f.showticklabels||f.ticks),{transform:k}),D(i["radial-grid"],g&&f.showgrid,{transform:w}),D(i["radial-line"].select("line"),g&&f.showline,{x1:l,y1:0,x2:a,y2:0,transform:k}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,h=C(u),f=Math.cos(h),p=Math.sin(h),d=0;if(s.title){var g=l.bBox(this.layers["radial-axis"].node()).height,v=s.title.font.size;d="counterclockwise"===s.side?-g-.4*v:g+.8*v}this.layers["radial-axis-title"]=m.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:S(n,"Click to enter radial axis title"),attributes:{x:a+i/2*f+d*p,y:o-i/2*p+d*f,"text-anchor":"middle"},transform:{rotate:-u}})},O.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.angularaxis,p=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",f.rotation),p.setGeometry(),p.setScale();var d=function(t){return p.t2g(t.x)};"linear"===p.type&&"radians"===p.thetaunit&&(p.tick0=L(p.tick0),p.dtick=L(p.dtick));var g=function(t){return R(c+a*Math.cos(t),h-a*Math.sin(t))},v=u.makeLabelFns(p,0).labelStandoff,m={xFn:function(t){var e=d(t);return Math.cos(e)*v},yFn:function(t){var e=d(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(v+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*T)},anchorFn:function(t){var e=d(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=d(t);return-.5*(1+Math.sin(n))*r}},y=z(f);r.angularTickLayout!==y&&(i["angular-axis"].selectAll("."+p._id+"tick").remove(),r.angularTickLayout=y);var x,b=u.calcTicks(p);if("linear"===e.gridshape?(x=b.map(d),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===p.type&&(b=b.filter(function(t){return o.isAngleInsideSector(d(t),r.sectorInRad)})),p.visible){var _="inside"===p.ticks?-1:1,w=(p.linewidth||1)/2;u.drawTicks(n,p,{vals:b,layer:i["angular-axis"],path:"M"+_*w+",0h"+_*p.ticklen,transFn:function(t){var e=d(t);return g(e)+F(-L(e))},crisp:!1}),u.drawGrid(n,p,{vals:b,layer:i["angular-grid"],path:function(t){var e=d(t),r=Math.cos(e),n=Math.sin(e);return"M"+[c+l*r,h-l*n]+"L"+[c+a*r,h-a*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,p,{vals:b,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return g(d(t))},labelFns:m})}D(i["angular-line"].select("path"),f.showline,{d:r.pathSubplot(),transform:R(c,h)}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,h=e.innerRadius,f=e.cx,p=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,T=e.radialAxis,S=M.clampTiny,E=M.findXYatLength,C=M.findEnclosingVertexAngles,L=A.cornerHalfWidth,P=A.cornerLen/2,O=d.makeDragger(o,"path","maindrag","crosshair");n.select(O).attr("d",e.pathSubplot()).attr("transform",R(f,p));var z,I,D,F,B,N,j,U,V,q={element:O,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function Y(t,e){return Math.atan2(_-e,t-m)}function W(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=P/t,i=r-n,a=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return"M"+W(s,i)+"A"+[s,s]+" 0,0,0 "+W(s,a)+"L"+W(l,a)+"A"+[l,l]+" 0,0,1 "+W(l,i)+"Z"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var i,a,o=W(t,r),s=W(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,h=-1/u,f=E(L,u,l,c);i=E(P,h,f[0][0],f[0][1]),a=E(P,h,f[1][0],f[1][1])}else{var p,d;c?(p=P,d=L):(p=L,d=P),i=[[l-p,c-d],[l+p,c-d]],a=[[l-p,c+d],[l+p,c+d]]}return"M"+i.join("L")+"L"+a.reverse().join("L")+"Z"}function J(t,e){return e=Math.max(Math.min(e,u),h),tl?(t-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),i.indexOf("event")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,a){var o=r._fullLayout.dragmode,l=O.getBoundingClientRect();if(z=n-l.left,I=a-l.top,k){var c=M.findPolygonOffset(u,w[0],w[1],k);z+=m+c[0],I+=_+c[1]}switch(o){case"zoom":q.moveFn=k?tt:$,q.clickFn=nt,q.doneFn=et,function(){D=null,F=null,B=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=i(t.bgcolor).getLuminance(),(U=d.makeZoombox(s,j,f,p,B)).attr("fill-rule","evenodd"),V=d.makeCorners(s,f,p),b(r)}();break;case"select":case"lasso":y(t,n,a,q,o)}},O.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=O,r._fullLayout._hoversubplot=e.id},O.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},O.updateRadialDrag=function(t,e,r){var i=this,s=i.gd,l=i.layers,c=i.radius,u=i.innerRadius,h=i.cx,f=i.cy,p=i.radialAxis,v=A.radialDragBoxSize,m=v/2;if(p.visible){var y,x,_,T=C(i.radialAxisAngle),M=p._rl,S=M[0],E=M[1],P=M[r],O=.75*(M[1]-M[0])/(1-e.hole)/c;r?(y=h+(c+m)*Math.cos(T),x=f-(c+m)*Math.sin(T),_="radialdrag"):(y=h+(u-m)*Math.cos(T),x=f-(u-m)*Math.sin(T),_="radialdrag-inner");var z,B,N,j=d.makeRectDragger(l,_,"crosshair",-m,-m,v,v),U={element:j,gd:s};D(n.select(j),p.visible&&u0==(r?N>S:Nn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o=u&&(p.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,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 f=o("color"),p=f!==i.color.dflt?f:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,v=o("title.text",g);e._hovertitle=v===g?v:d,a.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:p}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:p}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:f,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:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":593,"../../lib":719,"../../plot_api/plot_template":757,"../cartesian/line_grid_defaults":781,"../cartesian/tick_label_defaults":786,"../cartesian/tick_mark_defaults":787,"../cartesian/tick_value_defaults":788,"../subplot_defaults":842,"./layout_attributes":844}],846:[function(t,e,r){"use strict";var n=t("d3"),i=t("tinycolor2"),a=t("../../registry"),o=t("../../lib"),s=o._,l=t("../../components/color"),c=t("../../components/drawing"),u=t("../cartesian/set_convert"),h=t("../../lib/extend").extendFlat,f=t("../plots"),p=t("../cartesian/axes"),d=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/titles"),m=t("../cartesian/select").prepSelect,y=t("../cartesian/select").selectOnClick,x=t("../cartesian/select").clearSelect,b=t("../cartesian/constants");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;ik*x?i=(a=x)*k:a=(i=y)/k,o=v*i/y,s=m*a/x,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-g)-a/2,f.x0=r,f.y0=n,f.w=i,f.h=a,f.sum=b,f.xaxis={type:"linear",range:[_+2*T-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:"x"},u(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(t){return t.a>=f.aaxis.range[0]&&t.a<=f.aaxis.range[1]&&t.b>=f.baxis.range[1]&&t.b<=f.baxis.range[0]&&t.c>=f.caxis.range[1]&&t.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[_,b-w-T],domain:[g-s/2,g+s/2],_id:"y"},u(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var A=f.yaxis.domain[0],M=f.aaxis=h({},t.aaxis,{range:[_,b-w-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:i});u(M,f.graphDiv._fullLayout),M.setScale();var S=f.baxis=h({},t.baxis,{range:[b-_-T,w],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});u(S,f.graphDiv._fullLayout),S.setScale();var E=f.caxis=h({},t.caxis,{range:[b-_-w,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:i});u(E,f.graphDiv._fullLayout),E.setScale();var C="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDef.select("path").attr("d",C),f.layers.plotbg.select("path").attr("d",C);var L="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDefRelative.select("path").attr("d",L);var P="translate("+r+","+n+")";f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),f.clipDefRelative.select("path").attr("transform",null);var O="translate("+(r-S._offset)+","+(n+a)+")";f.layers.baxis.attr("transform",O),f.layers.bgrid.attr("transform",O);var z="translate("+(r+i/2)+","+n+")rotate(30)translate(0,"+-M._offset+")";f.layers.aaxis.attr("transform",z),f.layers.agrid.attr("transform",z);var I="translate("+(r+i/2)+","+n+")rotate(-30)translate(0,"+-E._offset+")";f.layers.caxis.attr("transform",I),f.layers.cgrid.attr("transform",I),f.drawAxes(!0),f.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",E.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(l.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),c.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},w.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 l=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"]=v.draw(e,"a"+r,{propContainer:i,propName:this.id+".aaxis.title",placeholder:s(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=v.draw(e,"b"+r,{propContainer:a,propName:this.id+".baxis.title",placeholder:s(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"]=v.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(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"}})}},w.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=p.calcTicks(t),h=p.clipEnds(t,u),f=p.makeTransFn(t),d=p.getTickSigns(t)[2],g=o.deg2rad(30),v=d*(t.linewidth||1)/2,m=d*t.ticklen,y=this.w,x=this.h,b="b"===i?"M0,"+v+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+v+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[i];p.drawTicks(r,t,{vals:"inside"===t.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),p.drawGrid(r,t,{vals:h,layer:this.layers[i+"grid"],path:_,transFn:f,crisp:!1}),p.drawLabels(r,t,{vals:u,layer:s,transFn:f,labelFns:p.makeLabelFns(t,0,30)})};var T=b.MINZOOM/2+.87,A="m-0.87,.5h"+T+"v3h-"+(T+5.2)+"l"+(T/2+2.6)+",-"+(.87*T+4.5)+"l2.6,1.5l-"+T/2+","+.87*T+"Z",M="m0.87,.5h-"+T+"v3h"+(T+5.2)+"l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-2.6,1.5l"+T/2+","+.87*T+"Z",S="m0,1l"+T/2+","+.87*T+"l2.6,-1.5l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-"+(T/2+2.6)+","+(.87*T+4.5)+"l2.6,1.5l"+T/2+",-"+.87*T+"Z",E="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",C=!0;function L(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var t,e,r,n,u,h,f,p,v,_,w=this,T=w.layers.plotbg.select("path").node(),P=w.graphDiv,O=P._fullLayout._zoomlayer,z={element:T,gd:P,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(a,o,s){z.xaxes=[w.xaxis],z.yaxes=[w.yaxis];var c=P._fullLayout.dragmode;z.minDrag="lasso"===c?1:void 0,"zoom"===c?(z.moveFn=N,z.clickFn=D,z.doneFn=j,function(a,o,s){var c=T.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,h=i(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),f="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",p=!1,v=O.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",f),_=O.append("path").attr("class","zoombox-corners").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),x(P)}(0,o,s)):"pan"===c?(z.moveFn=U,z.clickFn=D,z.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(P)):"select"!==c&&"lasso"!==c||m(a,o,s,z,c)}};function I(t){var e={};return e[w.id+".aaxis.min"]=t.a,e[w.id+".baxis.min"]=t.b,e[w.id+".caxis.min"]=t.c,e}function D(t,e){var r=P._fullLayout.clickmode;L(P),2===t&&(P.emit("plotly_doubleclick",null),a.call("_guiRelayout",P,I({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&y(e,P,[w.xaxis],[w.yaxis],w.id,z),r.indexOf("event")>-1&&g.click(P,e,w.id)}function R(t,e){return 1-e/w.h}function F(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function N(i,a){var o=t+i,s=e+a,l=Math.max(0,Math.min(1,R(0,e),R(0,s))),c=Math.max(0,Math.min(1,F(t,e),F(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,T=(1-l)*w.h,C=T-x/k;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),p=!0),P.emit("plotly_relayouting",I(u))}function j(){L(P),u!==r&&(a.call("_guiRelayout",P,I(u)),C&&P.data&&P._context.showTips&&(o.notifier(s(P,"Double-click to zoom back out"),"long"),C=!1))}function U(t,e){var n=t/w.xaxis._m,i=e/w.yaxis._m,a=[(u={a:r.a-i,b:r.b+(n+i)/2,c:r.c-(n-i)/2}).a,u.b,u.c].sort(),o=a.indexOf(u.a),s=a.indexOf(u.b),l=a.indexOf(u.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),u={a:a[o],b:a[s],c:a[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var h="translate("+(w.x0+t)+","+(w.y0+e)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var f="translate("+-t+","+-e+")";w.clipDefRelative.select("path").attr("transform",f),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),P.emit("plotly_relayouting",I(u))}function V(){a.call("_guiRelayout",P,I(u))}T.onmousemove=function(t){g.hover(P,t,w.id),P._fullLayout._lasthover=T,P._fullLayout._hoversubplot=w.id},T.onmouseout=function(t){P._dragging||d.unhover(P,t)},d.init(z)}},{"../../components/color":593,"../../components/dragelement":611,"../../components/drawing":614,"../../components/fx":632,"../../components/titles":681,"../../lib":719,"../../lib/extend":710,"../../registry":847,"../cartesian/axes":767,"../cartesian/constants":773,"../cartesian/select":784,"../cartesian/set_convert":785,"../plots":828,d3:163,tinycolor2:537}],847:[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"),h=l.extendFlat,f=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 m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(h[p[r]].title={text:""});for(r=0;rpath, .legendlines>path, .cbfill").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,"TOBESTRIPPED"))}),"pdf"!==e&&"eps"!==e||f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(s.xmlns,"xmlns",s.svg),f.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(f.attr("width",r*d),f.attr("height",r*g),f.attr("viewBox","0 0 "+d+" "+g));var _=(new window.XMLSerializer).serializeToString(f.node());return _=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":593,"../components/drawing":614,"../constants/xmlns_namespaces":696,"../lib":719,d3:163}],856:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r0&&h.s>0||(c=!1)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:!c,padded:!0})}}function m(t){for(var e=t.traces,r=0;rh+c||!n(u))}for(var p=0;p0&&_.s>0||(m=!1)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:!m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],c=[],h=0;ha))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)?e2*v&&p>2*v?v:0;f-=2*d,p-=2*d;var g=!1;if(!("auto"===l)||u<=f&&h<=p||!(u>f||h>p)||(u>p||h>f)&&u2*v?v:0:f>2*v?v:0;var d=1;l&&(d=s?Math.min(1,p/h):Math.min(1,f/u));var g=y(c);o+=.5*(d*(s?h:u)*Math.abs(Math.sin(Math.PI/180*g))+d*(s?u:h)*Math.abs(Math.cos(Math.PI/180*g)));var x=(t+e)/2,b=(r+n)/2;return s?x=e-o*m(e,t):b=n+o*m(r,n),{textX:(i.left+i.right)/2,textY:(i.top+i.bottom)/2,targetX:x,targetY:b,scale:d,rotate:g}}function _(t){var e,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.scale,s=t.rotate;return o<1?e="scale("+o+") ":(o=1,e=""),"translate("+(i-o*r)+" "+(a-o*n)+")"+e+(s?"rotate("+s+" "+r+" "+n+") ":"")}e.exports={plot:function(t,e,r,p,y){var w=e.xaxis,k=e.yaxis,T=t._fullLayout;y||(y={mode:T.barmode,norm:T.barmode,gap:T.bargap,groupgap:T.bargroupgap});var A=a.makeTraceGroups(p,r,"trace bars").each(function(r){var c=n.select(this),p=r[0].trace,T="waterfall"===p.type,A="funnel"===p.type,M="bar"===p.type||A,S=0;T&&p.connector.visible&&"between"===p.connector.mode&&(S=p.connector.line.width/2);var E="h"===p.orientation,C=a.ensureSingle(c,"g","points").selectAll("g.point").data(a.identity);C.enter().append("g").classed("point",!0),C.exit().remove(),C.each(function(c,T){var A,C,L=n.select(this),P=function(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),n?[i,a]:[a,i]}(c,w,k,E),O=P[0][0],z=P[0][1],I=P[1][0],D=P[1][1],R=!(O!==z&&I!==D&&i(O)&&i(z)&&i(I)&&i(D));if(R&&M&&f.getLineWidth(p,c)&&(E?z-O==0:D-I==0)&&(R=!1),c.isBlank=R,S&&(E?(O-=m(O,z)*S,z+=m(O,z)*S):(I-=m(I,D)*S,D+=m(I,D)*S)),"waterfall"===p.type){if(!R){var F=p[c.dir].marker;A=F.line.width,C=F.color}}else A=f.getLineWidth(p,c),C=c.mc||p.marker.color;var B=n.round(A/2%1,2);function N(t){return 0===y.gap&&0===y.groupgap?n.round(Math.round(t)-B,2):t}if(!t._context.staticPlot){var j=s.opacity(C)<1||A>.01?N:function(t,e){return Math.abs(t-e)>=2?N(t):t>e?Math.ceil(t):Math.floor(t)};O=j(O,z),z=j(z,O),I=j(I,D),D=j(D,I)}a.ensureSingle(L,"path").style("vector-effect","non-scaling-stroke").attr("d",R?"M0,0Z":"M"+O+","+I+"V"+D+"H"+z+"V"+I+"Z").call(l.setClipUrl,e.layerClipId,t),function(t,e,r,n,i,s,c,p,m,y){var w,k=e.xaxis,T=e.yaxis,A=t._fullLayout;function M(e,r,n){var i=a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,transform:"","text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t);return i}var S=n[0].trace,E="h"===S.orientation,C=function(t,e,r,n){var i,o=t[0].trace;return i=o.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){var e=o?r:n;return u(e,+t,!0).text}var h,f,p=i.textinfo,d=t[e],g=p.split("+"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m("label")&&v.push((f=t[e].p,u(o?n:r,f,!0).text)),m("text")&&(0===(h=a.castOption(i,d.i,"text"))||h)&&v.push(h),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m("initial")&&v.push(c(b)),m("delta")&&v.push(c(y)),m("final")&&v.push(c(x))}if(l){m("value")&&v.push(c(d.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(h=a.formatPercent(d.begR),w&&(h+=" of initial"),v.push(h)),m("percent previous")&&(h=a.formatPercent(d.difR),w&&(h+=" of previous"),v.push(h)),m("percent total")&&(h=a.formatPercent(d.sumR),w&&(h+=" of total"),v.push(h))}return v.join("
")}(t,e,r,n):f.getValue(o.text,e),f.coerceString(d,i)}(n,i,k,T);w=function(t,e){var r=f.getValue(t.textposition,e);return f.coerceEnumerated(g,r)}(S,i);var L="stack"===y.mode||"relative"===y.mode,P=n[i],O=!L||P._outmost;if(C&&"none"!==w&&(!P.isBlank&&s!==c&&p!==m||"auto"!==w&&"inside"!==w)){var z=A.font,I=h.getBarColor(n[i],S),D=h.getInsideTextFont(S,i,z,I),R=h.getOutsideTextFont(S,i,z),F=r.datum();E?"log"===k.type&&F.s0<=0&&(s=k.range[0]0&&U>0,W=j<=H&&U<=G,X=j<=G&&U<=H,Z=E?H>=j*(G/U):G>=U*(H/j);Y&&(W||X||Z)?w="inside":(w="outside",B.remove(),B=null)}else w="inside";!B&&(B=M(r,C,"outside"===w?R:D),N=l.bBox(B.node()),j=N.width,U=N.height,j<=0||U<=0)?B.remove():("outside"===w?(q="both"===S.constraintext||"outside"===S.constraintext,V=_(b(s,c,p,m,N,{isHorizontal:E,constrained:q,angle:S.textangle}))):(q="both"===S.constraintext||"inside"===S.constraintext,V=_(x(s,c,p,m,N,{isHorizontal:E,constrained:q,angle:S.textangle,anchor:S.insidetextanchor}))),B.attr("transform",V))}else r.select("text").remove()}(t,e,L,r,T,O,z,I,D,y),e.layerClipId&&l.hideOutsideRangePoint(c,L.select("text"),w,k,p.xcalendar,p.ycalendar)});var L=!1===p.cliponaxis;l.setClipUrl(c,L?null:e.layerClipId,t)});c.getComponentMethod("errorbars","plot")(t,A,e)},getTransform:_,toMoveInsideBar:x,toMoveOutsideBar:b}},{"../../components/color":593,"../../components/drawing":614,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../registry":847,"./attributes":857,"./helpers":862,"./style":870,d3:163,"fast-isnumeric":225}],868:[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){p(n.select(this),e[0].trace,t)}),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:d,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.extendFlat({},g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)})}(t.selectAll("text"),e,r)}(r,i,t):(p(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:y,getBarColor:b}},{"../../components/color":593,"../../components/drawing":614,"../../lib":719,"../../registry":847,"./attributes":857,"./helpers":862,d3:163}],871:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":593,"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604}],872:[function(t,e,r){"use strict";var n=t("../../components/fx/hovertemplate_attributes"),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}},{"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../bar/attributes":857,"../scatterpolar/attributes":1179}],873:[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"),h=c.makeCalcdata(e,"theta"),f=e._length,p=new Array(f),d=u,g=h,v=0;vf.range[1]&&(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,h,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":632,"../../lib":719,"../../plots/polar/helpers":830,"../bar/hover":863,"../scatterpolar/hover":1182}],876:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":831,"../bar/select":868,"../bar/style":870,"../scatter/marker_colorbar":1129,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./layout_attributes":877,"./layout_defaults":878,"./plot":879}],877:[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"}}},{}],878:[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 h=s.findEnclosingVertexAngles(c,t.vangles)[0],f=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[h,(c+u)/2,f];return s.pathPolygonAnnulus(n,i,c,u,p,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,r,"trace bars").each(function(){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=h.c2g(t.p0),d=t.thetag1=h.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=f(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":614,"../../lib":719,"../../plots/polar/helpers":830,d3:163,"fast-isnumeric":225}],880:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../bar/attributes"),a=t("../../components/color/attributes"),o=t("../../components/fx/hovertemplate_attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},name:{valType:"string",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers",editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1,editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},c.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:s({},c.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,offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":592,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../bar/attributes":857,"../scatter/attributes":1112}],881:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=i._,o=t("../../plots/cartesian/axes");function s(t,e,r){var n={text:"tx",hovertext:"htx"};for(var i in n)Array.isArray(e[i])&&(t[n[i]]=e[i][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,h,f,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||"x"),v=o.getFromId(t,e.yaxis||"y"),m=[],y="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(u=g,h="x",f=v,p="y"):(u=v,h="y",f=g,p="x");var x,b=u.makeCalcdata(e,h),_=function(t,e,r,a,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+"0"in t?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||i.isDateTime(t.name)&&"date"===r.type)?t.name:o;var l="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]);return a.map(function(){return l})}(e,p,f,b,d[y]),w=i.distinctVals(_),k=w.vals,T=w.minDiff/2,A=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&Cx.uf};for(r=0;r0){var O=S[r].sort(l),z=O.map(c),I=z.length;(x={}).pos=k[r],x.pts=O,x[p]=x.pos,x[h]=x.pts.map(function(t){return t.v}),x.min=z[0],x.max=z[I-1],x.mean=i.mean(z,I),x.sd=i.stdev(z,I,x.mean),x.q1=i.interp(z,.25),x.med=i.interp(z,.5),x.q3=i.interp(z,.75),x.lf=Math.min(x.q1,z[Math.min(i.findBin(2.5*x.q1-1.5*x.q3,z,!0)+1,I-1)]),x.uf=Math.max(x.q3,z[Math.max(i.findBin(2.5*x.q3-1.5*x.q1,z),0)]),x.lo=4*x.q1-3*x.q3,x.uo=4*x.q3-3*x.q1;var D=1.57*(x.q3-x.q1)/Math.sqrt(I);x.ln=x.med-D,x.un=x.med+D,x.pts2=O.filter(P),m.push(x)}!function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(m[0].t={num:d[y],dPos:T,posLetter:p,valLetter:h,labels:{med:a(t,"median:"),min:a(t,"min:"),q1:a(t,"q1:"),q3:a(t,"q3:"),max:a(t,"max:"),mean:"sd"===e.boxmean?a(t,"mean \xb1 \u03c3:"):a(t,"mean:"),lf:a(t,"lower fence:"),uf:a(t,"upper fence:")}},d[y]++,m):[{t:{empty:!0}}]}},{"../../lib":719,"../../plots/cartesian/axes":767,"fast-isnumeric":225}],882:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib"),a=t("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,h=e._fullLayout,f=o._id,p=f.charAt(0),d=[],g=0;for(s=0;s1,b=1-h[t+"gap"],_=1-h[t+"groupgap"];for(s=0;s0){var H=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;H+G>=0&&((W=V*(H+G))>M?(q=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;H-G<=0&&((X=-V*(H-G))>S?(q=!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;lt.lo&&(_.so=!0)}return a});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(a.translatePoints,l,c)}function u(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,h=a.bPosPxOffset||0,f=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+h,i=l.c2p(t.pos+u-o,!0)+h,a=l.c2p(t.pos+u+s,!0)+h,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+p+","+i+"V"+a+("sd"===f?"m0,0L"+d+","+e+"L"+p+","+i+"L"+g+","+e+"Z":"")):n.select(this).attr("d","M"+i+","+p+"H"+a+("sd"===f?"m0,0L"+e+","+d+"L"+i+","+p+"L"+e+","+g+"Z":""))})}e.exports={plot:function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each(function(t){var e,r,i=n.select(this),a=t[0],h=a.t,f=a.trace;h.wdPos=h.bdPos*f.whiskerwidth,!0!==f.visible||h.empty?i.remove():("h"===f.orientation?(e=s,r=o):(e=o,r=s),l(i,{pos:e,val:r},f,h),c(i,{x:o,y:s},f,h),u(i,{pos:e,val:r},f,h))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{"../../components/drawing":614,"../../lib":719,d3:163}],890:[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;var i=1/0;var a=-1/0;var o=e.length;for(var s=0;s0?Math.floor:Math.ceil,O=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,I=C>0?Math.max:Math.min,D=P(S+L),R=O(E-L),F=[[h=M(S)]];for(a=D;a*C=0;i--)a[u-i]=t[h][i],o[u-i]=e[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=t[i][0],o[h-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],904:[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,h,f,p,d,g,v,m,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,C=M.length,L=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function z(n){var i,a,o,s,l,c,u,h,p,d,g,v,m=[],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=L,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),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),m.push(h[0]-d[0]/3),y.push(h[1]-d[1]/3)),m.push(h[0]),y.push(h[1]),l=h;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=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),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,a-1,u,1),m.push(h[0]-v[0]/3),y.push(h[1]-v[1]/3)),m.push(h[0]),y.push(h[1]),l=h;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=f,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function I(n){var i,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=T.length,"b"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),h.xy=function(e){return t.evalxy([],e,n)},h.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;ix.length-1||_.push(i(I(o),{color:b.gridcolor,width:b.gridwidth}));for(f=u;fx.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],a=0;ax[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(I(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(I(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],h=c[1],f=u;f<=h;f++)p=b.tick0+b.dtick*f,_.push(i(z(p),{color:b.gridcolor,width:b.gridwidth}));for(f=u-1;fx[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":710,"../../plots/cartesian/axes":767}],905:[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}}},{}],919:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=t("../../constants/alignment");function h(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),h="M"+o(c,u,i.smoothing);n.select(this).attr("d",h).style("stroke-width",i.width).style("stroke",i.color).style("fill","none")}),u.exit().remove()}function f(t,e,r,a,o,c,u,h){var f=c.selectAll("text."+h).data(u);f.enter().append("text").classed(h,!0);var p=0,d={};return f.each(function(o,c){var u;if("auto"===o.axis.tickangle)u=s(a,e,r,o.xy,o.dxy);else{var h=(o.axis.tickangle+180)*Math.PI/180;u=s(a,e,r,o.xy,[Math.cos(h),Math.sin(h)])}c||(d={angle:u.angle,flip:u.flip});var f=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({"text-anchor":f>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),v=i.bBox(this);g.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*f+","+.3*v.height+")"),p=Math.max(p,v.width+o.axis.labelpadding)}),f.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(i,r,"trace").each(function(e){var r=n.select(this),i=e[0],d=i.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),h(l,u,x,v,"a",v._gridlines),h(l,u,x,m,"b",m._gridlines),h(l,u,y,v,"a",v._minorgridlines),h(l,u,y,m,"b",m._minorgridlines),h(l,u,b,v,"a-boundary",v._boundarylines),h(l,u,b,m,"b-boundary",m._boundarylines);var w=f(t,l,u,d,i,_,v._labels,"a-label"),k=f(t,l,u,d,i,_,m._labels,"b-label");!function(t,e,r,n,i,a,o,l){var u,h,f,p,d=c.aggNums(Math.min,null,r.a),v=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+v),h=m,f=r.ab2xy(u,h,!0),p=r.dxyda_rough(u,h),void 0===o.angle&&c.extendFlat(o,s(r,i,a,f,r.dxydb_rough(u,h)));g(t,e,r,n,f,p,r.aaxis,i,a,o,"a-title"),u=d,h=.5*(m+y),f=r.ab2xy(u,h,!0),p=r.dxydb_rough(u,h),void 0===l.angle&&c.extendFlat(l,s(r,i,a,f,r.dxyda_rough(u,h)));g(t,e,r,n,f,p,r.baxis,i,a,l,"b-title")}(t,_,d,i,l,u,w,k),function(t,e,r,n,i){var s,l,u,h,f=r.select("#"+t._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var p=c.ensureSingle(f,"path","carpetboundary"),d=e.clipsegments,g=[];for(h=0;h90&&v<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*p*a-x),y.attr("transform","translate("+e.p[0]+","+e.p[1]+") rotate("+e.angle+") translate(0,"+x+")").classed("user-select-none",!0).attr("text-anchor","middle").call(i.font,u.title.font)}),y.exit().remove()}},{"../../components/drawing":614,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"./makepath":916,"./map_1d_array":917,"./orient_text":918,d3:163}],920:[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,h=t.aaxis,f=t.baxis,p=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||ev},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,h.smoothing,f.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,h.smoothing,f.smoothing),t.dxydi=s([t._xctrl,t._yctrl],h.smoothing,f.smoothing),t.dxydj=l([t._xctrl,t._yctrl],h.smoothing,f.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 h,f,p,d,g=0,v=0,m=[];ne[c-1]?(h=c-2,f=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):f=o-(h=Math.max(0,Math.min(c-2,Math.floor(o)))),ir[u-1]?(p=u-2,d=1,v=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,h,p,f,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,h,p,f,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":738,"./compute_control_points":908,"./constants":909,"./create_i_derivative_evaluator":910,"./create_j_derivative_evaluator":911,"./create_spline_evaluator":912}],921:[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 h(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",T,"after",A,"iterations"),t}},{"../../lib":719}],922:[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":719}],923:[function(t,e,r){"use strict";var n=t("../../components/fx/hovertemplate_attributes"),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"},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()},a("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":592,"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../scattergeo/attributes":1151}],924:[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 h=0;h")}(t,h,o,f.mockAxis),[t]}},{"../../lib":719,"../../plots/cartesian/axes":767,"./attributes":923}],928:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),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"],meta:{}}},{"../../plots/geo":797,"../heatmap/colorbar":1004,"./attributes":923,"./calc":924,"./defaults":925,"./event_data":926,"./hover":927,"./plot":929,"./select":930,"./style":931}],929:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../lib/polygon"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("./style").style;function c(t,e){for(var r=t[0].trace,n=t.length,i=o(r,e),a=0;a0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===l||"FJI"===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;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 o=a.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(a.tester(t))},o.type){case"MultiPolygon":for(r=0;ro&&(o=c,e=l)}else e=r;return a.default(e).geometry.coordinates}(s),e.fIn=t,e.fOut=s,m.push(s)}else o.log(["Location with id",e.loc,"does not have a valid GeoJSON geometry,","choroplethmapbox traces only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete v[t.id]}switch(o.isArrayOrTypedArray(k.opacity)&&(x=function(t){var e=t.mo;return n(e)?+o.constrain(e,0,1):0}),o.isArrayOrTypedArray(T.color)&&(b=function(t){return t.mlc}),o.isArrayOrTypedArray(T.width)&&(_=function(t){return t.mlw}),d.type){case"FeatureCollection":var M=d.features;for(g=0;g=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":820,"./convert":933}],937:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,e.exports=l},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../mesh3d/attributes":1053}],938:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;c":h.value>f&&(s.prefixBoundary=!0);break;case"<":h.valuef)&&(s.prefixBoundary=!0);break;case"][":a=Math.min.apply(null,h.value),o=Math.max.apply(null,h.value),af&&(s.prefixBoundary=!0)}}},{}],945:[function(t,e,r){"use strict";var n=t("../../components/colorscale").extractOpts,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 h=n(e);r._fillgradient=e.colorscale,r._zrange=[h.min,h.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":605,"./end_plus":953,"./make_color_map":958}],946:[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}}},{}],947:[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,h){var f,p,d,g=e.contours,v=r("contours.operation");(g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===v?f=g.showlines=!0:(f=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),f)&&(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,h)}},{"../../components/color":593,"../../constants/filter_ops":691,"./label_defaults":957,"fast-isnumeric":225}],948:[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":691,"fast-isnumeric":225}],949:[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")}},{}],950:[function(t,e,r){"use strict";var n=t("../../lib");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),a=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":719,"./constraint_mapping":948,"./end_plus":953}],953:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],954:[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),d=[s(t,e,[-p[0],-p[1]])],g=p.join(","),v=t.z.length,m=t.z[0].length;for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],t.crossings[h]=i.SADDLEREMAINDER[f]):delete t.crossings[h],!(p=i.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}d.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],a(d[d.length-1],d[d.length-2],o,l)&&d.pop(),h=e.join(",");var y=p[0]&&(e[0]<0||e[0]>m-2)||p[1]&&(e[1]<0||e[1]>v-2);if(h===u&&p.join(",")===g||r&&y)break;f=t.crossings[h]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,A,M,S,E,C,L,P,O,z,I=a(d[0],d[d.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]=C.concat(d,E));break}V||(t.edgepaths[M]=d.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,h,f=t[0].z,p=f.length,d=f[0].length,g=2===p||2===d;for(r=0;rt.level}return r?"M"+e.join("L")+"Z":""}(t,e),f=0,p=t.edgepaths.map(function(t,e){return e}),d=!0;function g(t){return Math.abs(t[1]-e[2][1])<.01}function v(t){return Math.abs(t[0]-e[0][0])<.01}function m(t){return Math.abs(t[0]-e[2][0])<.01}for(;p.length;){for(c=a.smoothopen(t.edgepaths[f],t.smoothing),h+=d?c:c.replace(/^M/,"L"),p.splice(p.indexOf(f),1),r=t.edgepaths[f][t.edgepaths[f].length-1],s=-1,o=0;o<4;o++){if(!r){i.log("Missing end?",f,t);break}for(u=r,Math.abs(u[1]-e[0][1])<.01&&!m(r)?n=e[1]:v(r)?n=e[0]:g(r)?n=e[3]:m(r)&&(n=e[2]),l=0;l=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;h+="L"+n}if(s===t.edgepaths.length){i.log("unclosed perimeter path");break}f=s,(d=-1===p.indexOf(f))&&(f=p[0],h+="Z")}for(f=0;fn.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(h)+Math.cos(c)*o);if(f<1||p<1)return 1/0;var d=v.EDGECOST*(1/(f-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var g=s-u,m=l-h,y=s+u,x=l+h,b=0;b2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),h=i*u,f=a*c,p=i*c,d=-a*u,g=[[o-h-f,s-p-d],[o+h-f,s+p-d],[o+h+f,s+p+d],[o-h+f,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,a,s){var l=t.selectAll("text").data(e,function(t){return t.text+","+t.x+","+t.y+","+t.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+i+")"}).call(o.convertToTspans,r)}),s){for(var c="",u=0;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,h=r.end,f=t._input.contours;if(u>h&&(r.start=f.start=h,h=r.end=f.end=u,u=r.start),!(r.size>0))c=u===h?1:a(u,h,t.ncontours).dtick,f.size=r.size=c}}},{"../../lib":719,"../../plots/cartesian/axes":767}],962:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("../heatmap/style"),o=t("./make_color_map");e.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",function(t){return t[0].trace.opacity}),e.each(function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u="constraint"===a.type,h=!u&&"lines"===a.coloring,f=!u&&"fill"===a.coloring,p=h||f?o(r):null;e.selectAll("g.contourlevel").each(function(t){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,h?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||(h?p(t.level):s.color)})}),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(f){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":614,"../heatmap/style":1013,"./make_color_map":958,d3:163}],963:[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":603,"./label_defaults":957}],964:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),i=t("../contour/attributes"),a=i.contours,o=t("../scatter/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../lib/extend").extendFlat,c=o.line;e.exports=l({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:a.type,start:a.start,end:a.end,size:a.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:a.operation,value:a.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:l({},c.color,{}),width:c.width,dash:c.dash,smoothing:l({},c.smoothing,{}),editType:"plot"},transforms:void 0},s("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":600,"../../lib/extend":710,"../contour/attributes":942,"../heatmap/attributes":1001,"../scatter/attributes":1112}],965:[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"),h=t("../carpet/lookup_carpetid"),f=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var 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,h,f,p,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,m,y,"a","b",["z"]);r=e._a=e._a||e.a,f=e._b=e._b||e.b,r=r?m.makeCalcdata(e,"_a"):[],f=f?y.makeCalcdata(e,"_b"):[],u=e.a0||0,h=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,h,x,m),w="scaled"===e.ytype?"":f,k=c(e,w,p,d,g.length,y),T={a:_,b:k,z:g};"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"});return[T]}(t,e);return f(e,e._z),g}}},{"../../components/colorscale/calc":601,"../../lib":719,"../carpet/lookup_carpetid":915,"../contour/set_contours":961,"../heatmap/clean_2d_array":1003,"../heatmap/convert_column_xyz":1005,"../heatmap/find_empties":1007,"../heatmap/interp2d":1010,"../heatmap/make_bound_array":1011,"./defaults":966}],966:[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":719,"../contour/constraint_defaults":947,"../contour/contours_defaults":949,"../contour/style_defaults":963,"../heatmap/xyz_defaults":1015,"./attributes":964}],967:[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"],meta:{}}},{"../../plots/cartesian":778,"../contour/colorbar":945,"../contour/style":962,"./attributes":964,"./calc":965,"./defaults":966,"./plot":970}],968:[function(t,e,r){"use strict";var n=t("../../components/drawing"),i=t("../carpet/axis_aligned_line"),a=t("../../lib");e.exports=function(t,e,r,o,s,l,c,u){var h,f,p,d,g,v,m,y="",x=e.edgepaths.map(function(t,e){return e}),b=!0,_=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(t){return Math.abs(t[1]-r[0][1])=0&&(p=C,g=v):Math.abs(f[1]-p[1])=0&&(p=C,g=v):a.log("endpt to newendpt is not vert. or horz.",f,p,C)}if(g>=0)break;y+=S(f,p),f=p}if(g===e.edgepaths.length){a.log("unclosed perimeter path");break}h=g,(b=-1===x.indexOf(h))&&(h=x[0],y+=S(f,p)+"Z",f=null)}for(h=0;h=0;U--)B=S.clipsegments[U],N=i([],B.x,w.c2p),j=i([],B.y,k.c2p),N.reverse(),j.reverse(),q.push(a(N,j,B.bicubic));var H="M"+q.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,h,f,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(f=0;fv&&(n.max=v);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*h.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/O),h.LABELMAX),a=0;a0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)k.push(_[u][0],_[u][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":d?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}},{"../../components/color":593,"../../components/colorscale":605,"../../constants/numerical":695,"../../lib":719,"../../lib/geojson_utils":714,"fast-isnumeric":225}],974:[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":603,"../../lib":719,"./attributes":971}],975:[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}},{}],976:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("../scattermapbox/hover");e.exports=function(t,e,r){var o=a(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 h=s.subplot.mockAxis;s.z=u.z,s.zLabel=i.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(t.hovertemplate)return;var i=(e.hi||t.hoverinfo).split("+"),a=-1!==i.indexOf("all"),o=-1!==i.indexOf("lon"),s=-1!==i.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}a||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(a||-1!==i.indexOf("text"))&&n.fillText(e,t,c);return c.join("
")}(c,u,l[0].t.labels),[s]}}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scattermapbox/hover":1175}],977:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),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":820,"./convert":973}],979:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.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}(c,h),[s]}}},{"../../components/color":593,"../../lib":719,"../bar/hover":863}],987:[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":778,"../bar/select":868,"./attributes":980,"./calc":981,"./cross_trace_calc":983,"./defaults":984,"./event_data":985,"./hover":986,"./layout_attributes":988,"./layout_defaults":989,"./plot":990,"./style":991}],988:[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"}}},{}],989:[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=l.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",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".regions").each(function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,l.connector.fillcolor)}),r.selectAll(".lines").each(function(){var t=l.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":593,"../../components/drawing":614,"../../constants/interactions":694,"../bar/style":870,d3:163}],992:[function(t,e,r){"use strict";var n=t("../pie/attributes"),i=t("../../plots/attributes"),a=t("../../plots/domain").attributes,o=t("../../components/fx/hovertemplate_attributes"),s=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:s({},n.marker.line.color,{dflt:null}),width:s({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:s({},n.scalegroup,{}),textinfo:s({},n.textinfo,{flags:["label","text","value","percent"]}),hoverinfo:s({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),textposition:s({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:s({},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"}}},{"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/domain":792,"../pie/attributes":1086}],993:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/get_data").getModuleCalcData;r.name="funnelarea",r.plot=function(t){var e=n.getModule("funnelarea"),r=i(t.calcdata,e)[0];e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has("funnelarea"),a=e._has&&e._has("funnelarea");i&&!a&&n._funnelarealayer.selectAll("g.trace").remove()}},{"../../plots/get_data":802,"../../registry":847}],994:[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":1088}],995:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText;e.exports=function(t,e,r,s){function l(r,a){return n.coerce(t,e,i,r,a)}var c,u=l("values"),h=n.isArrayOrTypedArray(u),f=l("labels");if(Array.isArray(f)?(c=f.length,h&&(c=Math.min(c,u.length))):h&&(c=u.length,l("label0"),l("dlabel")),c){e._length=c,l("marker.line.width")&&l("marker.line.color",s.paper_bgcolor),l("marker.colors"),l("scalegroup");var p=l("text"),d=l("textinfo",Array.isArray(p)?"text+percent":"percent");if(l("hovertext"),l("hovertemplate"),d&&"none"!==d){var g=l("textposition");o(t,e,s,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,s,l),l("title.text")&&(l("title.position"),n.coerceFont(l,"title.font",s.font)),l("aspectratio"),l("baseratio")}else e.visible=!1}},{"../../lib":719,"../../plots/domain":792,"../bar/defaults":861,"./attributes":992}],996:[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":1097,"./attributes":992,"./base_plot":993,"./calc":994,"./defaults":995,"./layout_attributes":997,"./layout_defaults":998,"./plot":999,"./style":1e3}],997:[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":1093}],998:[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":719,"./layout_attributes":997}],999:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("../../lib"),o=t("../../lib/svg_text_utils"),s=t("../bar/plot"),l=s.getTransform,c=s.toMoveInsideBar,u=t("../pie/helpers"),h=t("../pie/plot"),f=h.attachFxHandlers,p=h.determineInsideTextFont,d=h.layoutAreas,g=h.prerenderTitles,v=h.positionTitleOutside;function m(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;g(e,t),d(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,"trace").each(function(e){var s=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 h,f,p=[];for(p.push(u()),h=t.length-1;h>-1;h--)if(!(f=t[h]).hidden){var d=f.v/l;c+=d,p.push(u())}var g=1/0,v=-1/0;for(h=0;h-1;h--)if(!(f=t[h]).hidden){var A=p[T+=1][0],M=p[T][1];f.TL=[-A,M],f.TR=[A,M],f.BL=w,f.BR=k,f.pxmid=(S=f.TR,E=f.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=f.TL,k=f.TR}var S,E}(e),s.each(function(){var s=n.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove(),s.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=d.index;var s=h.cx,g=h.cy,v=n.select(this),y=v.selectAll("path.surface").data([r]);y.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),v.call(f,t,e);var x="M"+(s+r.TR[0])+","+(g+r.TR[1])+m(r.TR,r.BR)+m(r.BR,r.BL)+m(r.BL,r.TL)+"Z";y.attr("d",x);var b=u.castOption(d.textposition,r.pts),_=v.selectAll("g.slicetext").data(r.text&&"none"!==b?[0]:[]);_.enter().append("g").classed("slicetext",!0),_.exit().remove(),_.each(function(){var e=a.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,p(d,r,t._fullLayout.font)).call(o.convertToTspans,t);var u,h,f,v=i.bBox(e.node()),m=Math.min(r.BL[1],r.BR[1]),y=Math.max(r.TL[1],r.TR[1]);h=Math.max(r.TL[0],r.BL[0]),f=Math.min(r.TR[0],r.BR[0]),u=l(c(h,f,m,y,v,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})),e.attr("transform","translate("+s+","+g+")"+u)})}});var g=n.select(this).selectAll("g.titletext").data(d.title.text?[0]:[]);g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each(function(){var e=a.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),s=d.title.text;d._meta&&(s=a.templateString(s,d._meta)),e.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,d.title.font).call(o.convertToTspans,t);var l=v(h,r._size);e.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")})})})}},{"../../components/drawing":614,"../../lib":719,"../../lib/svg_text_utils":743,"../bar/plot":867,"../pie/helpers":1091,"../pie/plot":1095,d3:163}],1000:[function(t,e,r){"use strict";var n=t("d3"),i=t("../pie/style_one");e.exports=function(t){t._fullLayout._funnelarealayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(i,t,e)})})}},{"../pie/style_one":1097,d3:163}],1001:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../../components/colorscale/attributes"),o=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},n.x,{impliedEdits:{xtype:"array"}}),x0:o({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},n.y,{impliedEdits:{ytype:"array"}}),y0:o({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},n.dy,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},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"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:i()},{transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../constants/docs":690,"../../lib/extend":710,"../scatter/attributes":1112}],1002:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("../histogram2d/calc"),s=t("../../components/colorscale/calc"),l=t("./convert_column_xyz"),c=t("./clean_2d_array"),u=t("./interp2d"),h=t("./find_empties"),f=t("./make_bound_array");e.exports=function(t,e){var r,p,d,g,v,m,y,x,b,_=a.getFromId(t,e.xaxis||"x"),w=a.getFromId(t,e.yaxis||"y"),k=n.traceIs(e,"contour"),T=n.traceIs(e,"histogram"),A=n.traceIs(e,"gl2d"),M=k?"best":e.zsmooth;if(_._minDtick=0,w._minDtick=0,T)r=(b=o(t,e)).x,p=b.x0,d=b.dx,g=b.y,v=b.y0,m=b.dy,y=b.z;else{var S=e.z;i.isArray1D(S)?(l(e,_,w,"x","y",["z"]),r=e._x,g=e._y,S=e._z):(r=e._x=e.x?_.makeCalcdata(e,"x"):[],g=e._y=e.y?w.makeCalcdata(e,"y"):[]),p=e.x0,d=e.dx,v=e.y0,m=e.dy,y=c(S,e,_,w),(k||e.connectgaps)&&(e._emptypoints=h(y),u(y,e._emptypoints))}function E(t){M=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: "fast": '+t)}if("fast"===M)if("log"===_.type||"log"===w.type)E("log axis found");else if(!T){if(r.length){var C=(r[r.length-1]-r[0])/(r.length-1),L=Math.abs(C/100);for(x=0;xL){E("x scale is not linear");break}}if(g.length&&"fast"===M){var P=(g[g.length-1]-g[0])/(g.length-1),O=Math.abs(P/100);for(x=0;xO){E("y scale is not linear");break}}}var z=i.maxRowLength(y),I="scaled"===e.xtype?"":r,D=f(e,I,p,d,z,_),R="scaled"===e.ytype?"":g,F=f(e,R,v,m,y.length,w);A||(e._extremes[_._id]=a.findExtremes(_,D),e._extremes[w._id]=a.findExtremes(w,F));var B={x:D,y:F,z:y,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(I&&I.length===D.length-1&&(B.xCenter=I),R&&R.length===F.length-1&&(B.yCenter=R),T&&(B.xRanges=b.xRanges,B.yRanges=b.yRanges,B.pts=b.pts),k||s(t,e,{vals:y,cLetter:"z"}),k&&e.contours&&"heatmap"===e.contours.coloring){var N={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};B.xfill=f(N,I,p,d,z,_),B.yfill=f(N,R,v,m,y.length,w)}return[B]}},{"../../components/colorscale/calc":601,"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":847,"../histogram2d/calc":1033,"./clean_2d_array":1003,"./convert_column_xyz":1005,"./find_empties":1007,"./interp2d":1010,"./make_bound_array":1011}],1003:[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,h,f;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,h=0;h=0;o--)(s=((h[[(r=(a=f[o])[0])-1,i=a[1]]]||g)[2]+(h[[r+1,i]]||g)[2]+(h[[r,i-1]]||g)[2]+(h[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{"../../lib":719}],1008:[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,c){var u,h,f,p,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,A=y,M=x;if(!1!==t.index){try{f=Math.round(t.index[1]),p=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||p<0||p>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(c){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(m=Math.max(m,Math.abs(t[a][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},{"../../lib":719}],1011:[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,h=[],f=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 f?e.slice(0,o):e.slice(0,o+1);if(f||d)h=e.slice(0,o);else if(1===o)h=[e[0]-.5,e[0]+.5];else{for(h=[1.5*e[0]-.5*e[1]],u=1;u0;)f=p.c2p(k[y]),y--;for(f0;)m=d.c2p(T[y]),y--;if(m0&&(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,f=-.1*e,p=t-f,d=r[0],g=r[1],v=Math.min(h(d+f,d+p,n,a),h(g+f,g+p,n,a)),m=Math.min(h(d+c,d+f,n,a),h(g+c,g+f,n,a));if(v>m&&mo){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)),I.start=r.l2r(j),F||i.nestedProperty(e,m+".start").set(I.start)}var U=b.end,V=r.r2l(z.end),q=void 0!==V;if((b.endFound||q)&&V!==r.r2l(U)){var H=q?V:i.aggNums(Math.max,null,d);I.end=r.l2r(H),q||i.nestedProperty(e,m+".start").set(I.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[m]=i.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[I,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],v=[],m=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=f(t,e,m,y),k=w[0],T=w[1],A="string"==typeof k.size,M=[],S=A?M:k,E=[],C=[],L=[],P=0,O=e.histnorm,z=e.histfunc,I=-1!==O.indexOf("density");_.enabled&&I&&(O=O.replace(/ ?density$/,""),I=!1);var D,R="max"===z||"min"===z?null:0,F=l.count,B=c[O],N=!1,j=function(t){return m.r2c(t,0,b)};for(i.isArrayOrTypedArray(e[x])&&"count"!==z&&(D=e[x],N="avg"===z,F=l[z]),r=j(k.start),p=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/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())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],J=0,K=X-1;for(r=0;r=J;r--)if(v[r]){K=r;break}for(r=J;r<=K;r++)if(n(g[r])&&n(v[r])){var $={p:g[r],s:v[r],b:0};_.enabled||($.pts=L[r],q?$.ph0=$.ph1=L[r].length?T[L[r][0]]:g[r]:($.ph0=U(M[r]),$.ph1=U(M[r+1],!0))),Z.push($)}return 1===Z.length&&(Z[0].width1=o.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),s(Z,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Z,e,Y),Z},calcAllAutoBins:f}},{"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":847,"../bar/arrays_to_calcdata":856,"./average":1020,"./bin_functions":1022,"./bin_label_vals":1023,"./norm_functions":1031,"fast-isnumeric":225}],1025:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1026:[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=i.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,h,f,p,d,g,v,m=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 k(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=m[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&&(m[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+"calendar"]||""}),t["_"+a+"bingroup"]=r}for(d=0;dS&&k.splice(S,k.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],L=[],P="string"==typeof w.size,O="string"==typeof A.size,z=[],I=[],D=P?z:w,R=O?I:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf("density"),q="max"===U||"min"===U?null:0,H=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,H=a[U]);var J=w.size,K=x(w.start),$=x(w.end)+(K-i.tickIncrement(K,J,!1,m))/1e6;for(r=K;r<$;r=i.tickIncrement(r,J,!1,m))C.push(q),z.push(r),Y&&L.push(0);z.push(r);var Q,tt=C.length,et=(r-K)/tt,rt=(Q=K+et/2,g.c2r(Q,0,m)),nt=A.size,it=b(A.start),at=b(A.end)+(it-i.tickIncrement(it,nt,!1,y))/1e6;for(r=it;r=0&&p=0&&d0}function x(t){t.each(function(t){d.stroke(n.select(this),t.line.color)}).each(function(t){d.fill(n.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function b(t,e,r){var n=t._fullLayout,a=i.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return i.coerce(a,o,p,t,e)}return h(a,o,l,s,n),f(a,o,l,s),o}function _(t,e){return"translate("+t+","+e+")"}function w(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(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(c.convertToTspans,i).call(s.font,e),s.bBox(o.node())}function T(t,e,r,n,a,o){var s="_cache"+e;t[s]&&t[s].key===a||(t[s]={key:a,value:r});var l=i.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,h){var f,p=t._fullLayout;y(r)&&h&&(f=h()),i.makeTraceGroups(p._indicatorlayer,e,"trace").each(function(e){var h,A,M,S,E,C=e[0].trace,L=n.select(this),P=C._hasGauge,O=C._isAngular,z=C._isBullet,I=C.domain,D={w:p._size.w*(I.x[1]-I.x[0]),h:p._size.h*(I.y[1]-I.y[0]),l:p._size.l+p._size.w*I.x[0],r:p._size.r+p._size.w*(1-I.x[1]),t:p._size.t+p._size.h*(1-I.y[1]),b:p._size.b+p._size.h*I.y[0]},R=D.l+D.w/2,F=D.t+D.h/2,B=Math.min(D.w/2,D.h),N=l.innerRadius*B,j=C.align||"center";if(A=F,P){if(O&&(h=R,A=F+B/2,M=function(t){return e=t,r=.9*N,n=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),[r/n,e,r];var e,r,n}),z){var U=l.bulletPadding,V=1-l.bulletNumberDomainSize+U;h=D.l+(V+(1-V)*v[j])*D.w,M=function(t){return w(t,(l.bulletNumberDomainSize-U)*D.w,D.h)}}}else h=D.l+v[j]*D.w,M=function(t){return w(t,D.w,D.h)};!function(t,e,r,a){var o,l,h,f=r[0].trace,p=a.numbersX,x=a.numbersY,w=f.align||"center",A=g[w],M=a.transitionOpts,S=a.onComplete,E=i.ensureSingle(e,"g","numbers"),C=[];f._hasNumber&&C.push("number");f._hasDelta&&(C.push("delta"),"left"===f.delta.position&&C.reverse());var L=E.selectAll("text").data(C);function P(e,r,n,i){if(!e.match("s")||n>=0==i>=0||r(n).slice(-1).match(m)||r(i).slice(-1).match(m))return r;var a=e.slice().replace("s","f").replace(/\d+/,function(t){return parseInt(t)-1}),o=b(t,{tickformat:a});return function(t){return Math.abs(t)<1?u.tickText(o,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",function(){return A}).attr("class",function(t){return t}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var O,z=f.mode+f.align;f._hasDelta&&(O=function(){var e=b(t,{tickformat:f.delta.valueformat},f._range);e.setScale(),u.calcTicks(e);var i=function(t){return u.tickText(e,t).text},a=function(t){var e=f.delta.relative?t.relativeDelta:t.delta;return e},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?f.delta.increasing.symbol:f.delta.decreasing.symbol)+e(t)},h=function(t){return t.delta>=0?f.delta.increasing.color:f.delta.decreasing.color};void 0===f._deltaLastValue&&(f._deltaLastValue=a(r[0]));var p=E.select("text.delta");function g(){p.text(o(a(r[0]),i)).call(d.fill,h(r[0])).call(c.convertToTspans,t)}p.call(s.font,f.delta.font).call(d.fill,h({delta:f._deltaLastValue})),y(M)?p.transition().duration(M.duration).ease(M.easing).tween("text",function(){var t=n.select(this),e=a(r[0]),s=f._deltaLastValue,l=P(f.delta.valueformat,i,s,e),c=n.interpolateNumber(s,e);return f._deltaLastValue=e,function(e){t.text(o(c(e),l)),t.call(d.fill,h({delta:c(e)}))}}).each("end",function(){g(),S&&S()}).each("interrupt",function(){g(),S&&S()}):g();return l=k(o(a(r[0]),i),f.delta.font,A,t),p}(),z+=f.delta.position+f.delta.font.size+f.delta.font.family+f.delta.valueformat,z+=f.delta.increasing.symbol+f.delta.decreasing.symbol,h=l);f._hasNumber&&(!function(){var e=b(t,{tickformat:f.number.valueformat},f._range);e.setScale(),u.calcTicks(e);var i=function(t){return u.tickText(e,t).text},a=f.number.suffix,l=f.number.prefix,h=E.select("text.number");function p(){var e="number"==typeof r[0].y?l+i(r[0].y)+a:"-";h.text(e).call(s.font,f.number.font).call(c.convertToTspans,t)}y(M)?h.transition().duration(M.duration).ease(M.easing).each("end",function(){p(),S&&S()}).each("interrupt",function(){p(),S&&S()}).attrTween("text",function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);f._lastValue=r[0].y;var o=P(f.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(l+o(e(r))+a)}}):p();o=k(l+i(r[0].y)+a,f.number.font,A,t)}(),z+=f.number.font.size+f.number.font.family+f.number.valueformat+f.number.suffix+f.number.prefix,h=o);if(f._hasDelta&&f._hasNumber){var I,D,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=.75*f.delta.font.size;"left"===f.delta.position&&(I=T(f,"deltaPos",0,-1*(o.width*v[f.align]+l.width*(1-v[f.align])+B),z,Math.min),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:l.left+I,right:o.right,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"right"===f.delta.position&&(I=T(f,"deltaPos",0,o.width*(1-v[f.align])+l.width*v[f.align]+B,z,Math.max),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:o.left,right:l.right+I,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"bottom"===f.delta.position&&(I=null,D=l.height,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height,bottom:o.bottom+l.height}),"top"===f.delta.position&&(I=null,D=o.top,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height-l.height,bottom:o.bottom}),O.attr({dx:I,dy:D})}(f._hasNumber||f._hasDelta)&&E.attr("transform",function(){var t=a.numbersScaler(h);z+=t[2];var e,r=T(f,"numbersScale",1,t[0],z,Math.min);f._scaleNumbers||(r=1),e=f._isAngular?x-r*h.bottom:x-r*(h.top+h.bottom)/2,f._numbersTop=r*h.top+e;var n=h[w];"center"===w&&(n=(h.left+h.right)/2);var i=p-r*n;return _(i=T(f,"numbersTranslate",0,i,z,Math.max),e)+" scale("+r+")"})}(t,L,e,{numbersX:h,numbersY:A,numbersScaler:M,transitionOpts:r,onComplete:f}),P&&(S={range:C.gauge.axis.range,color:C.gauge.bgcolor,line:{color:C.gauge.bordercolor,width:0},thickness:1},E={range:C.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:C.gauge.bordercolor,width:C.gauge.borderwidth},thickness:1});var q=L.selectAll("g.angular").data(O?e:[]);q.exit().remove();var H=L.selectAll("g.angularaxis").data(O?e:[]);H.exit().remove(),O&&function(t,e,r,i){var s,l,c,h,f=r[0].trace,p=i.size,d=i.radius,g=i.innerRadius,v=i.gaugeBg,m=i.gaugeOutline,w=[p.l+p.w/2,p.t+p.h/2+d/2],k=i.gauge,T=i.layer,A=i.transitionOpts,M=i.onComplete,S=Math.PI/2;function E(t){var e=f.gauge.axis.range[0],r=f.gauge.axis.range[1],n=(t-e)/(r-e)*Math.PI-S;return n<-S?-S:n>S?S:n}function C(t){return n.svg.arc().innerRadius((g+d)/2-t/2*(d-g)).outerRadius((g+d)/2+t/2*(d-g)).startAngle(-S)}function L(t){t.attr("d",function(t){return C(t.thickness).startAngle(E(t.range[0])).endAngle(E(t.range[1]))()})}k.enter().append("g").classed("angular",!0),k.attr("transform",_(w[0],w[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),(s=b(t,f.gauge.axis)).type="linear",s.range=f.gauge.axis.range,s._id="xangularaxis",s.setScale();var P=function(t){return(s.range[0]-t.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},O={},z=u.makeLabelFns(s,0).labelStandoff;O.xFn=function(t){var e=P(t);return Math.cos(e)*z},O.yFn=function(t){var e=P(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*o)},O.anchorFn=function(t){var e=P(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},O.heightFn=function(t,e,r){var n=P(t);return-.5*(1+Math.sin(n))*r};var I=function(t){return _(w[0]+d*Math.cos(t),w[1]-d*Math.sin(t))};c=function(t){return I(P(t))};if(l=u.calcTicks(s),h=u.getTickSigns(s)[2],s.visible){h="inside"===s.ticks?-1:1;var D=(s.linewidth||1)/2;u.drawTicks(t,s,{vals:l,layer:T,path:"M"+h*D+",0h"+h*s.ticklen,transFn:function(t){var e=P(t);return I(e)+"rotate("+-a(e)+")"}}),u.drawLabels(t,s,{vals:l,layer:T,transFn:c,labelFns:O})}var R=[v].concat(f.gauge.steps),F=k.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(x),F.exit().remove();var B=C(f.gauge.bar.thickness),N=k.selectAll("g.value-arc").data([f.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j=N.select("path");y(A)?(j.transition().duration(A.duration).ease(A.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()}).attrTween("d",(U=B,V=E(r[0].lastY),q=E(r[0].y),function(){var t=n.interpolate(V,q);return function(e){return U.endAngle(t(e))()}})),f._lastValue=r[0].y):j.attr("d","number"==typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var U,V,q;j.call(x),N.exit().remove(),R=[];var H=f.gauge.threshold.value;H&&R.push({range:[H,H],color:f.gauge.threshold.color,line:{color:f.gauge.threshold.line.color,width:f.gauge.threshold.line.width},thickness:f.gauge.threshold.thickness});var G=k.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(x),G.exit().remove();var Y=k.selectAll("g.gauge-outline").data([m]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(L).call(x),Y.exit().remove()}(t,0,e,{radius:B,innerRadius:N,gauge:q,layer:H,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var G=L.selectAll("g.bullet").data(z?e:[]);G.exit().remove();var Y=L.selectAll("g.bulletaxis").data(z?e:[]);Y.exit().remove(),z&&function(t,e,r,n){var i,a,o,s,c,h=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,_=h.domain,w=n.transitionOpts,k=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform","translate("+m.l+", "+m.t+")"),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var T=m.h,A=h.gauge.bar.thickness*T,M=_.x[0],S=_.x[0]+(_.x[1]-_.x[0])*(h._hasNumber||h._hasDelta?1-l.bulletNumberDomainSize:1);(i=b(t,h.gauge.axis))._id="xbulletaxis",i.domain=[M,S],i.setScale(),a=u.calcTicks(i),o=u.makeTransFn(i),s=u.getTickSigns(i)[2],c=m.t+m.h,i.visible&&(u.drawTicks(t,i,{vals:"inside"===i.ticks?u.clipEnds(i,a):a,layer:p,path:u.makeTickPath(i,c,s),transFn:o}),u.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:u.makeLabelFns(i,c)}));function E(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)*T}).attr("height",function(t){return t.thickness*T})}var C=[g].concat(h.gauge.steps),L=f.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(x),L.exit().remove();var P=f.selectAll("g.value-bullet").data([h.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",A).attr("y",(T-A)/2).call(x),y(w)?P.select("rect").transition().duration(w.duration).ease(w.easing).each("end",function(){k&&k()}).each("interrupt",function(){k&&k()}).attr("width",Math.max(0,i.c2p(Math.min(h.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(h.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var O=r.filter(function(){return h.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(h.gauge.threshold.value)).attr("x2",i.c2p(h.gauge.threshold.value)).attr("y1",(1-h.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-h.gauge.threshold.thickness)/2)*T).call(d.stroke,h.gauge.threshold.line.color).style("stroke-width",h.gauge.threshold.line.width),z.exit().remove();var I=f.selectAll("g.gauge-outline").data([v]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(E).call(x),I.exit().remove()}(t,0,e,{gauge:G,layer:Y,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var W=L.selectAll("text.title").data(e);W.exit().remove(),W.enter().append("text").classed("title",!0),W.attr("text-anchor",function(){return z?g.right:g[C.title.align]}).text(C.title.text).call(s.font,C.title.font).call(c.convertToTspans,t),W.attr("transform",function(){var t,e=D.l+D.w*v[C.title.align],r=l.titlePadding,n=s.bBox(W.node());if(P){if(O)if(C.gauge.axis.visible)t=s.bBox(H.node()).top-r-n.bottom;else t=D.t+D.h/2-B/2-n.bottom-r;z&&(t=A-(n.top+n.bottom)/2,e=D.l-l.bulletPadding*D.w)}else t=C._numbersTop-r-n.bottom;return _(e,t)})})}},{"../../components/color":593,"../../components/drawing":614,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"./constants":1044,d3:163}],1048:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;var c=e.exports=l(s({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:i()},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764,"../mesh3d/attributes":1053}],1049:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length);for(var r=1/0,i=-1/0,a=e.value.length,o=0;o0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function D(t,e){return null===t?e:t}function R(e,r,n){C();var i,a,o,s=[r],l=[n];if(k>=1)s=[r],l=[n];else if(k>0){var c=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]:E(d,g,v);f[p]=y>-1?y:P(d,g,v,D(e,m))}i=f[0],a=f[1],o=f[2],t._i.push(i),t._j.push(a),t._k.push(o),++h}}function F(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 B(t,e,r){return t>=e&&t<=r}function N(t){var e=.001*(S-M);return t>=M-e&&t<=S+e}function j(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}var U=3;function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[B(e[0][3],n,i),B(e[1][3],n,i),B(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return N(e[0][3])&&N(e[1][3])&&N(e[2][3])?(R(t,e,r),!0):aMath.abs(k-A)?[T,k]:[k,A];Q(e,E[0],E[1])}}var C=[[Math.min(M,A),Math.max(M,A)],[Math.min(T,S),Math.max(T,S)]];["x","y","z"].forEach(function(e){for(var r=[],n=0;n0&&(c.push(x.id),"x"===e?h.push([x.distRatio,0,0]):"y"===e?h.push([0,x.distRatio,0]):h.push([0,0,x.distRatio]))}else l=nt(1,"x"===e?g-1:"y"===e?v-1:m-1);c.length>0&&(r[i]="x"===e?tt(null,c,a,o,h,r[i]):"y"===e?et(null,c,a,o,h,r[i]):rt(null,c,a,o,h,r[i]),i++),l.length>0&&(r[i]="x"===e?Z(null,l,a,o,r[i]):"y"===e?J(null,l,a,o,r[i]):K(null,l,a,o,r[i]),i++)}var b=t.caps[e];b.show&&b.fill&&(z(b.fill),r[i]="x"===e?Z(null,[0,g-1],a,o,r[i]):"y"===e?J(null,[0,v-1],a,o,r[i]):K(null,[0,m-1],a,o,r[i]),i++)}}),0===h&&L(),t._x=x,t._y=b,t._z=_,t._intensity=w,t._Xs=f,t._Ys=p,t._Zs=d}(),t}f.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._x[e],n=this.data._y[e],i=this.data._z[e],a=this.data._Ys.length,o=this.data._Zs.length,s=u(r,this.data._Xs).id,l=u(n,this.data._Ys).id,c=u(i,this.data._Zs).id,h=t.index=c+o*l+o*a*s;t.traceCoordinate=[this.data._x[h],this.data._y[h],this.data._z[h],this.data.value[h]];var f=this.data.hovertext||this.data.text;return Array.isArray(f)&&void 0!==f[h]?t.textLabel=f[h]:f&&(t.textLabel=f),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=p(t);var i={positions:l(n(r.xaxis,t._x,e.dataScale[0],t.xcalendar),n(r.yaxis,t._y,e.dataScale[1],t.ycalendar),n(r.zaxis,t._z,e.dataScale[2],t.zcalendar)),cells:l(t._i,t._j,t._k),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:o(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},c=s(t);i.vertexIntensity=t._intensity,i.vertexIntensityBounds=[c.min,c.max],i.colormap=a(t),this.mesh.update(i)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports={findNearestOnAxis:u,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{"../../components/colorscale":605,"../../lib":719,"../../lib/gl_format_color":716,"../../lib/str2rgbarray":742,"../../plots/gl3d/zip3":818,"gl-mesh3d":280}],1051:[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"),h=a("z"),f=a("value");c&&c.length&&u&&u.length&&h&&h.length&&f&&f.length?(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach(function(t){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,0,i,function(r,i){return n.coerce(t,e,a,r,i)})},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":603,"../../lib":719,"../../registry":847,"./attributes":1048}],1052:[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"],meta:{}}},{"../../plots/gl3d":807,"./attributes":1048,"./calc":1049,"./convert":1050,"./defaults":1051}],1053:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:"calc"},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"})})},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../surface/attributes":1224}],1054:[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":601}],1055:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),i=t("delaunay-triangulate"),a=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function h(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,h=t.x.length,f=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||!v(t.i,h)||!v(t.j,h)||!v(t.k,h))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(f):t.alphahull>0?a(t.alphahull,f):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;ov):g=k>b,v=k;var T=l(b,_,w,k);T.pos=x,T.yc=(b+k)/2,T.i=y,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[w,_],p&&(T.tx=e.text[y]),d&&(T.htx=e.hovertext[y]),m.push(T)}else m.push({pos:x,empty:!0})}return e._extremes[s._id]=a.findExtremes(s,n.concat(h,u),{padded:!0}),m.length&&(m[0].t={labels:{open:i(t,"open:")+" ",high:i(t,"high:")+" ",low:i(t,"low:")+" ",close:i(t,"close:")+" "}}),m}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),o=function(t,e,r){var i=r._minDiff;if(!i){var a,o=t._fullData,s=[];for(i=1/0,a=0;a"+c.labels[x]+n.hoverLabelText(s,b):((y=i.extendFlat({},f)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",h.push(y),v[b]=y)}return h}function f(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,h=a[0].t,f=u(t,e,r,i);if(!f)return[];var p=a[f.index],d=f.index=p.i,g=p.dir;function v(t){return h.labels[t]+n.hoverLabelText(o,l[t][d])}var m=p.hi||l.hoverinfo,y=m.split("+"),x="all"===m,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[v("open"),v("high"),v("low"),v("close")+" "+c[g]]:[];return _&&s(p,l,w),f.extraText=w.join("
"),f.y0=f.y1=o.c2p(p.yc,!0),[f]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?h(t,e,r,n):f(t,e,r,n)},hoverSplit:h,hoverOnPoints:f}},{"../../components/color":593,"../../components/fx":632,"../../constants/delta.js":689,"../../lib":719,"../../plots/cartesian/axes":767}],1062:[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":778,"./attributes":1058,"./calc":1059,"./defaults":1060,"./hover":1061,"./plot":1064,"./select":1065,"./style":1066}],1063:[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 h=Math.min(s.length,l.length,c.length,u.length);return o&&(h=Math.min(h,i.minRowLength(o))),e._length=h,h}}},{"../../lib":719,"../../registry":847}],1064:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib");e.exports=function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,"trace ohlc").each(function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var l=a.tickLen,c=e.selectAll("path").data(i.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",function(t){if(t.empty)return"M0,0Z";var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-l,!0),n=o.c2p(t.pos+l,!0);return"M"+r+","+s.c2p(t.o,!0)+"H"+e+"M"+e+","+s.c2p(t.h,!0)+"V"+s.c2p(t.l,!0)+"M"+n+","+s.c2p(t.c,!0)+"H"+e})}})}},{"../../lib":719,d3:163}],1065:[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,h){function f(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,h,f);o(e,h,f),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,"values",d),f("hoveron"),f("hovertemplate"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var g={family:h.font.family,size:Math.round(h.font.size),color:h.font.color};n.coerceFont(f,"labelfont",g);var v={family:h.font.family,size:Math.round(h.font.size/1.2),color:h.font.color};n.coerceFont(f,"tickfont",v)}},{"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/domain":792,"../parcoords/merge_length":1083,"./attributes":1067}],1071:[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":1067,"./base_plot":1068,"./calc":1069,"./defaults":1070,"./plot":1073}],1072:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plot_api/plot_api"),a=t("../../components/fx"),o=t("../../lib"),s=t("../../components/drawing"),l=t("tinycolor2"),c=t("../../lib/svg_text_utils");function u(t,e,r,i){var a=t.map(function(t,e,r){var n,i=r[0],a=e.margin||{l:80,r:80,t:100,b:80},o=i.trace,s=o.domain,l=e.width,c=e.height,u=Math.floor(l*(s.x[1]-s.x[0])),h=Math.floor(c*(s.y[1]-s.y[0])),f=s.x[0]*l+a.l,p=e.height-s.y[1]*e.height+a.t,d=o.line.shape;n="all"===o.hoverinfo?["count","probability"]:(o.hoverinfo||"").split("+");var g={trace:o,key:o.uid,model:i,x:f,y:p,width:u,height:h,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:a,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};i.dimensions&&(R(g),D(g));return g}.bind(0,e,r)),l=i.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(a,h),v=u.enter().append("g").attr("class","trace parcats");u.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"}),v.append("g").attr("class","paths");var x=u.select("g.paths").selectAll("path.path").data(function(t){return t.paths},h);x.attr("fill",function(t){return t.model.color});var w=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(t){return t.model.color}).attr("fill-opacity",0);y(w),x.attr("d",function(t){return t.svgD}),w.empty()||x.sort(p),x.exit().remove(),x.on("mouseover",d).on("mouseout",g).on("click",m),v.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data(function(t){return t.dimensions},h);k.enter().append("g").attr("class","dimension"),k.attr("transform",function(t){return"translate("+t.x+", 0)"}),k.exit().remove();var T=k.selectAll("g.category").data(function(t){return t.categories},h),A=T.enter().append("g").attr("class","category");T.attr("transform",function(t){return"translate(0, "+t.y+")"}),A.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),b(A);var P=T.selectAll("rect.bandrect").data(function(t){return t.bands},h);P.each(function(){o.raiseToTop(this)}),P.attr("fill",function(t){return t.color});var O=P.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(t){return t.color}).attr("fill-opacity",0);P.attr("fill",function(t){return t.color}).attr("width",function(t){return t.width}).attr("height",function(t){return t.height}).attr("y",function(t){return t.y}).attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"}),_(O),P.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var z=e._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",function(t){return f(t)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",z+" -1px 1px 2px, "+z+" 1px 1px 2px, "+z+" 1px -1px 2px, "+z+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",function(t){return f(t)?t.width+5:-5}).attr("y",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)}),A.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(t){return t.width/2}).attr("y",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)}),T.selectAll("rect.bandrect").on("mouseover",M).on("mouseout",S),T.exit().remove(),k.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on("dragstart",E).on("drag",C).on("dragend",L)),u.each(function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),u.exit().remove()}function h(t){return t.key}function f(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function p(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),S=n.mouse(u)[0];a.loneHover({trace:h,x:y-p.left+d.left,y:b-p.top+d.top,text:M,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_,idealAlign:S1&&c.displayInd===l.dimensions.length-1?(r=o.left,i="left"):(r=o.left+o.width,i="right");var f=s.model.count,p=s.model.categoryLabel,d=f/s.parcatsViewModel.model.count,g={countLabel:f,categoryLabel:p,probabilityLabel:d.toFixed(3)},v=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&v.push(["Count:",g.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&v.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var m=v.join("
");return{trace:u,x:r-t.left,y:h-t.top,text:m,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:i,hovertemplate:u.hovertemplate,hovertemplateLabels:g,eventData:[{data:u._input,fullData:u,count:f,category:p,probability:d}]}}function M(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;if("color"===c?(!function(t){var e=n.select(t).datum(),r=w(e);x(r),r.each(function(){o.raiseToTop(this)}),n.select(t.parentNode).selectAll("rect.bandrect").filter(function(t){return t.color===e.color}).each(function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),T(this,"plotly_hover",n.event)):(!function(t){n.select(t.parentNode).selectAll("rect.bandrect").each(function(t){var e=w(t);x(e),e.each(function(){o.raiseToTop(this)})}),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),k(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===c?e=A(s,this):"color"===c?e=function(t,e){var r,i,a=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],h=c.trace,f=a.y+a.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=a.left,i="left"):(r=a.left+a.width,i="right");var p=s.model.categoryLabel,d=o.parcatsViewModel.model.count,g=0;o.categoryViewModel.bands.forEach(function(t){t.color===o.color&&(g+=t.count)});var v=s.model.count,m=0;c.pathSelection.each(function(t){t.model.color===o.color&&(m+=t.model.count)});var y=g/d,x=g/m,b=g/v,_={countLabel:d,categoryLabel:p,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color \u2229 "+p+"): "+_.probabilityLabel),w.push("P("+p+" | color): "+x.toFixed(3)),w.push("P(color | "+p+"): "+b.toFixed(3)));var k=w.join("
"),T=l.mostReadable(o.color,["black","white"]);return{trace:h,x:r-t.left,y:f-t.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:T,fontSize:10,idealAlign:i,hovertemplate:h.hovertemplate,hovertemplateLabels:_,eventData:[{data:h._input,fullData:h,category:p,count:d,probability:y,categorycount:v,colorcount:m,bandcolorcount:g}]}}(s,this):"dimension"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){r.push(A(t,this))}),r}(s,this)),e&&a.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function S(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(y(e.pathSelection),b(e.dimensionSelection.selectAll("g.category")),_(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(p),-1===e.hoverinfoItems.indexOf("skip"))){"color"===t.parcatsViewModel.hoveron?T(this,"plotly_unhover",n.event):k(this,"plotly_unhover",n.event)}}function E(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each(function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each(function(e){e.yh.y+h.height/2&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var f=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==f&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}R(t.parcatsViewModel),D(t.parcatsViewModel),z(t.parcatsViewModel),O(t.parcatsViewModel)}}function L(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=P(t.parcatsViewModel),a=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),o=t.initialDragDimensionDisplayInds.some(function(t,e){return t!==a[e]});o&&a.forEach(function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+i+"].displayindex"]=r});var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map(function(t){return t.displayInd});if(s=t.initialDragCategoryDisplayInds.some(function(t,e){return t!==l[e]})){var c=t.model.categories.slice().sort(function(t,e){return t.displayInd-e.displayInd}),u=c.map(function(t){return t.categoryValue}),h=c.map(function(t){return t.categoryLabel});e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[h],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?T(t.potentialClickBand,"plotly_click",n.event.sourceEvent):k(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,R(t.parcatsViewModel),D(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each(function(){z(t.parcatsViewModel,!0),O(t.parcatsViewModel,!0)}).each("end",function(){(o||s)&&i.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function P(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+i)+" "+l[s]+","+(e[s]+i)+" "+(t[s]+r[s])+","+(e[s]+i),u+="l-"+r[s]+",0 ";return u+="Z"}function D(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),i=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),a=t.model.dimensions.map(function(t){return t.displayInd}),o=t.dimensions.map(function(t){return t.model.dimensionInd}),s=e.map(function(t){return t.x}),l=e.map(function(t){return t.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(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=h(e),i=h(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 f=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*(m.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=[],h=t.model.maxCats,f=e.categories.length,p=e.count,d=t.height-8*(h-1),g=8*(h-f)/2,v=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(v.sort(function(t,e){return t.displayInd-e.displayInd}),c=0;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){u(r,t,n,e)}},{"../../components/drawing":614,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"../../plot_api/plot_api":754,d3:163,tinycolor2:537}],1073:[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":1072}],1074:[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:"number",editType:"plot"},{valType:"number",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":600,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/layout_attributes":779,"../../plots/domain":792,"../../plots/font_attributes":793}],1075:[function(t,e,r){"use strict";var n=t("./constants"),i=t("d3"),a=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function h(t,e){return t*(1-u)+e*u}function f(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],u=l,f=a;i*fe){f=r;break}}if(a=u,isNaN(a)&&(a=isNaN(h)||isNaN(f)?isNaN(h)?f:h:e-c[h][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 _(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),x(t.parentNode)}function w(t,e){var r=b(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||w(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||m()}).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=b(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){_(this,t)}).on("dragend",function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(w(t,e),_(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,m(),!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&&A(r)):A(r),a.brushCallback(e),x(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||A(r),a.brushCallback(e),c?x(t.parentNode,s):(s(),x(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)}))}function T(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function M(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map(function(t){return t.slice().sort(s)}).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=M(r),e=r.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map(function(t){return t.slice()})}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,a);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(p).call(d).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),e.call(k).attr("height",function(t){return t.height-n.verticalPadding});var r=t.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",function(t){return t.height}).call(y);var i=t.selectAll(".highlight").data(o);i.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(t){return t.height}).call(y)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?M(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[f(0,r,t[0],[]),f(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":719,"../../lib/gup":717,"./constants":1078,d3:163}],1076:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/get_data").getModuleCalcData,a=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter(function(t,e){return e===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":696,"../../plots/get_data":802,"./plot":1085,d3:163}],1077:[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;rh&&(n.log("parcoords traces support up to "+h+" dimensions at the moment"),d.splice(h));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),v=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),f(e,g,"values",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",m),n.coerceFont(u,"tickfont",m),n.coerceFont(u,"rangefont",m),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/cartesian/axes":767,"../../plots/domain":792,"./attributes":1074,"./axisbrush":1075,"./constants":1078,"./merge_length":1083}],1080:[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":719}],1081:[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":1074,"./base_plot":1076,"./calc":1077,"./defaults":1079,"./plot":1085}],1082:[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 sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\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(mask,\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=1e-6,c=2048,u=new Uint8Array(4),h=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function p(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 d(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:u})}(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],p(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 v(t,e,r){for(var n=new Array(8*e),i=0,a=0;ah&&(h=t[i].dim1.canvasX,o=i);0===s&&p(T,0,0,r.canvasWidth,r.canvasHeight);var f=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&ni._length&&(A=A.slice(0,i._length));var M,S=i.tickvals;function E(t,e){return{val:t,text:M[e]}}function C(t,e){return t.val-e.val}if(Array.isArray(S)&&S.length){M=i.ticktext,Array.isArray(M)&&M.length?M.length>S.length?M=M.slice(0,S.length):S.length>M.length&&(S=S.slice(0,M.length)):M=S.map(n.format(i.tickformat));for(var L=1;L=r||l>=a)return;var c=t.lineLayer.readPixel(s,a-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:h};h!==I&&(u?i.hover(f):i.unhover&&i.unhover(f),I=h)}}),z.style("opacity",function(t){return t.pick?0:1}),u.style("background","rgba(255, 255, 255, 0)");var D=u.selectAll("."+g.cn.parcoords).data(O,h);D.exit().remove(),D.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),D.attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var R=D.selectAll("."+g.cn.parcoordsControlView).data(f,h);R.enter().append("g").classed(g.cn.parcoordsControlView,!0),R.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var F=R.selectAll("."+g.cn.yAxis).data(function(t){return t.dimensions},h);F.enter().append("g").classed(g.cn.yAxis,!0),R.each(function(t){S(F,t)}),z.each(function(t){if(t.viewModel){!t.lineLayer||i?t.lineLayer=m(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||i;t.lineLayer.render(t.viewModel.panels,e)}}),F.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),F.call(n.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;P.linePickActive(!1),t.x=Math.max(-g.overdrag,Math.min(t.model.width+g.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,F.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}),S(F,e),F.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),n.select(this).attr("transform","translate("+t.x+", 0)"),F.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(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,S(F,e),n.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),P.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),F.exit().remove();var B=F.selectAll("."+g.cn.axisOverlays).data(f,h);B.enter().append("g").classed(g.cn.axisOverlays,!0),B.selectAll("."+g.cn.axis).remove();var N=B.selectAll("."+g.cn.axis).data(f,h);N.enter().append("g").classed(g.cn.axis,!0),N.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 d.isOrdinal(t)?e:E(t.model.dimensions[t.visibleIndex],e)}).scale(r)),l.font(N.selectAll("text"),t.model.tickFont)}),N.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),N.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=B.selectAll("."+g.cn.axisHeading).data(f,h);j.enter().append("g").classed(g.cn.axisHeading,!0);var U=j.selectAll("."+g.cn.axisTitle).data(f,h);U.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),U.text(function(t){return t.label}).each(function(e){var r=n.select(this);l.font(r,e.model.labelFont),s.convertToTspans(r,t)}).attr("transform",function(t){var e=M(t.model.labelAngle,t.model.labelSide),r=g.axisTitleOffset;return(e.dir>0?"":"translate(0,"+(2*r+t.model.height)+")")+"rotate("+e.degrees+")translate("+-r*e.dx+","+-r*e.dy+")"}).attr("text-anchor",function(t){var e=M(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 V=B.selectAll("."+g.cn.axisExtent).data(f,h);V.enter().append("g").classed(g.cn.axisExtent,!0);var q=V.selectAll("."+g.cn.axisExtentTop).data(f,h);q.enter().append("g").classed(g.cn.axisExtentTop,!0),q.attr("transform","translate(0,"+-g.axisExtentOffset+")");var H=q.selectAll("."+g.cn.axisExtentTopText).data(f,h);H.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(A),H.text(function(t){return C(t,!0)}).each(function(t){l.font(n.select(this),t.model.rangeFont)});var G=V.selectAll("."+g.cn.axisExtentBottom).data(f,h);G.enter().append("g").classed(g.cn.axisExtentBottom,!0),G.attr("transform",function(t){return"translate(0,"+(t.model.height+g.axisExtentOffset)+")"});var Y=G.selectAll("."+g.cn.axisExtentBottomText).data(f,h);Y.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(A),Y.text(function(t){return C(t,!1)}).each(function(t){l.font(n.select(this),t.model.rangeFont)}),v.ensureAxisBrush(B)}},{"../../components/colorscale":605,"../../components/drawing":614,"../../lib":719,"../../lib/gup":717,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"./axisbrush":1075,"./constants":1078,"./helpers":1080,"./lines":1082,"color-rgba":122,d3:163}],1085:[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={},h=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:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map(function(t){return t.slice()}),s="dimensions["+n+"].constraintrange",h=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===h[s]){var f=a.constraintrange;h[s]=f||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":732,"./helpers":1080,"./parcoords":1084}],1086:[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("../../components/fx/hovertemplate_attributes"),l=t("../../lib/extend").extendFlat,c=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:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:l({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},c,{}),insidetextfont:l({},c,{}),outsidetextfont:l({},c,{}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},c,{}),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:l({},c,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":592,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793}],1087:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/get_data").getModuleCalcData;r.name="pie",r.plot=function(t){var e=n.getModule("pie"),r=i(t.calcdata,e)[0];e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has("pie"),a=e._has&&e._has("pie");i&&!a&&n._pielayer.selectAll("g.trace").remove()}},{"../../plots/get_data":802,"../../registry":847}],1088:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").isArrayOrTypedArray,a=t("tinycolor2"),o=t("../../components/color"),s=t("./helpers"),l=t("../../lib").isValidTextValue,c={};function u(t){return function(e,r){return!!e&&(!!(e=a(e)).isValid()&&(e=o.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function h(t,e){var r,n=JSON.stringify(t),i=e[n];if(!i){for(i=t.slice(),r=0;r")}}return o},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r="pie");var n=t._fullLayout,i=t.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=h(a,c));for(var s=0,l=0;l"),name:f.hovertemplate||-1!==p.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:c.castOption(b.bgcolor,t.pts)||t.color,borderColor:c.castOption(b.bordercolor,t.pts),fontFamily:c.castOption(_.family,t.pts),fontSize:c.castOption(_.size,t.pts),fontColor:c.castOption(_.color,t.pts),nameLength:c.castOption(b.namelength,t.pts),textAlign:c.castOption(b.align,t.pts),hovertemplate:c.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[u(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[u(t,f)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,a=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[u(s,a)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,a=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[u(t,a)],i.click(e,n.event))})}function f(t,e,r){var n=c.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=c.castOption(t._input.textfont.color,e.pts));var i=c.castOption(t.insidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,o=c.castOption(t.insidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n||a.contrast(e.color),family:i,size:o}}function p(t,e){for(var r,n,i=0;i=1)return c;var u=i+1/(2*Math.tan(a)),h=l*Math.min(1/(Math.sqrt(u*u+.5)+u),o/(Math.sqrt(i*i+o/2)+i)),f={scale:2*h/t.height,rCenter:Math.cos(h/l)-h*i/l,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/i,d=p+1/(2*Math.tan(a)),g=l*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),v={scale:2*g/t.width,rCenter:Math.cos(g/l)-g/i/l,rotate:(180/Math.PI*e.midangle+810)%180-90},m=v.scale>f.scale?v:f;return c.scale<1&&m.scale>c.scale?m:c}function g(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function v(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 m(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=x(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)),h=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(h+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf("center")?h*=2:-1!==a.title.position.indexOf("right")&&(h+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=h/t.titleBox.width,n=y(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function y(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 x(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 b(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;ni.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-a.hole,r.rInscribed=g(r,i))}(e),i.attr("stroke-linejoin","round"),i.each(function(){var i=n.select(this).selectAll("g.slice").data(e);i.enter().append("g").classed("slice",!0),i.exit().remove();var g=[[[],[]],[[],[]]],y=!1;i.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=p.index,g[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var i=u.cx,a=u.cy,m=n.select(this),x=m.selectAll("path.surface").data([r]);if(x.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),m.call(h,t,e),p.pull){var b=+c.castOption(p.pull,r.pts)||0;b>0&&(i+=b*r.pxmid[0],a+=b*r.pxmid[1])}r.cxFinal=i,r.cyFinal=a;var _=p.hole;if(r.v===u.vTotal){var w="M"+(i+r.px0[0])+","+(a+r.px0[1])+S(r.px0,r.pxmid,!0,1)+S(r.pxmid,r.px0,!0,1)+"Z";_?x.attr("d","M"+(i+_*r.px0[0])+","+(a+_*r.px0[1])+S(r.px0,r.pxmid,!1,_)+S(r.pxmid,r.px0,!1,_)+"Z"+w):x.attr("d",w)}else{var k=S(r.px0,r.px1,!0,1);if(_){var T=1-_;x.attr("d","M"+(i+_*r.px1[0])+","+(a+_*r.px1[1])+S(r.px1,r.px0,!1,_)+"l"+T*r.px0[0]+","+T*r.px0[1]+k+"Z")}else x.attr("d","M"+i+","+a+"l"+r.px0[0]+","+r.px0[1]+k+"Z")}var A=c.castOption(p.textposition,r.pts),M=m.selectAll("g.slicetext").data(r.text&&"none"!==A?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each(function(){var e=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,"outside"===A?function(t,e,r){var n=c.castOption(t.outsidetextfont.color,e.pts)||c.castOption(t.textfont.color,e.pts)||r.color,i=c.castOption(t.outsidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,a=c.castOption(t.outsidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(p,r,t._fullLayout.font):f(p,r,t._fullLayout.font)).call(l.convertToTspans,t);var h,g=o.bBox(e.node());"outside"===A?h=v(g,r):(h=d(g,r,u),"auto"===A&&h.scale<1&&(e.call(o.font,p.outsidetextfont),p.outsidetextfont.family===p.insidetextfont.family&&p.outsidetextfont.size===p.insidetextfont.size||(g=o.bBox(e.node())),h=v(g,r)));var m=i+r.pxmid[0]*h.rCenter+(h.x||0),x=a+r.pxmid[1]*h.rCenter+(h.y||0);h.outside&&(r.yLabelMin=x-g.height/2,r.yLabelMid=x,r.yLabelMax=x+g.height/2,r.labelExtraX=0,r.labelExtraY=0,y=!0),e.attr("transform","translate("+m+","+x+")"+(h.scale<1?"scale("+h.scale+")":"")+(h.rotate?"rotate("+h.rotate+")":"")+"translate("+-(g.left+g.right)/2+","+-(g.top+g.bottom)/2+")")})}function S(t,e,n,i){var a=i*(e[0]-t[0]),o=i*(e[1]-t[1]);return"a"+i*u.r+","+i*u.r+" 0 "+r.largeArc+(n?" 1 ":" 0 ")+a+","+o}});var x=n.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);x.enter().append("g").classed("titletext",!0),x.exit().remove(),x.each(function(){var e,i=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),a=p.title.text;p._meta&&(a=s.templateString(a,p._meta)),i.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,p.title.font).call(l.convertToTspans,t),e="middle center"===p.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}}(u):m(u,r._size),i.attr("transform","translate("+e.x+","+e.y+")"+(e.scale<1?"scale("+e.scale+")":"")+"translate("+e.tx+","+e.ty+")")}),y&&function(t,e){var r,n,i,a,o,s,l,u,h,f,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,u,h,p,d,g,v=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=v-m;if(b*l>0&&(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u=(c.castOption(e.pull,h.pts)||0)||((t.pxmid[1]-h.pxmid[1])*l>0?(p=h.cyFinal+o(h.px0[1],h.px1[1]),(b=p-m-t.labelExtraY)*l>0&&(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l>0&&(i=3*s*Math.abs(u-f.indexOf(t)),d=h.cxFinal+a(h.px0[0],h.px1[0]),(g=d+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=g)))}for(n=0;n<2;n++)for(i=n?v:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(i),h=t[1-n][r],f=h.concat(u),d=[],p=0;pMath.abs(f)?c+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(o+t.labelExtraX+u):c+="l"+t.labelExtraX+","+h+"v"+(f-h)+"h"+u}else c+="V"+(t.yLabelMid+t.labelExtraY)+"h"+u;s.ensureSingle(r,"path","textline").call(a.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:c,fill:"none"})}else r.select("path.textline").remove()})}(i,p)})});setTimeout(function(){i.selectAll("tspan").each(function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)},transformInsideText:d,determineInsideTextFont:f,positionTitleOutside:m,prerenderTitles:p,layoutAreas:b,attachFxHandlers:h}},{"../../components/color":593,"../../components/drawing":614,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"./event_data":1090,"./helpers":1091,d3:163}],1096:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(i,t,e)})})}},{"./style_one":1097,d3:163}],1097:[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":593,"./helpers":1091}],1098:[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":1112}],1099:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),i=t("../../lib/str2rgbarray"),a=t("../../plots/cartesian/autorange").findExtremes,o=t("../scatter/get_trace_color");function s(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,h=this.pickXYData=t.xy,f=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(h){if(n=h,e=h.length>>>1,f)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),v=i(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":742,"../../plots/cartesian/autorange":766,"../scatter/get_trace_color":1121,"gl-pointcloud2d":292}],1100:[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":719,"./attributes":1098}],1101:[function(t,e,r){"use strict";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":805,"../scatter3d/calc":1139,"./attributes":1098,"./convert":1099,"./defaults":1100}],1102:[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("../../components/fx/hovertemplate_attributes"),c=t("../../components/colorscale/attributes"),u=t("../../plot_api/plot_template").templatedArray,h=t("../../lib/extend").extendFlat,f=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK;(e.exports=f({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"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),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},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},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":592,"../../components/colorscale/attributes":600,"../../components/fx/attributes":623,"../../components/fx/hovertemplate_attributes":631,"../../constants/docs":690,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793}],1103:[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"),h=t("../../registry");function f(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 f={_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:f,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[f],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;rm&&(m=a.source[e]),a.target[e]>m&&(m=a.target[e]);var y,x=m+1;t.node._count=x;var b=t.node.groups,_={};for(e=0;e0&&s(S,x)&&s(E,x)&&(!_.hasOwnProperty(S)||!_.hasOwnProperty(E)||_[S]!==_[E])){_.hasOwnProperty(E)&&(E=_[E]),_.hasOwnProperty(S)&&(S=_[S]),E=+E,h[S=+S]=h[E]=!0;var C="";a.label&&a.label[e]&&(C=a.label[e]);var L=null;C&&f.hasOwnProperty(C)&&(L=f[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,concentrationscale:L,source:S,target:E,value:+M}),A.source.push(S),A.target.push(E)}}var P=x+b.length,O=o(r.color),z=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:I,color:O?r.color[e]:r.color})}var D=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1})}(P,A.source,A.target)&&(D=!0),{circular:D,links:c,nodes:z,groups:b,groupLookup:_}}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":605,"../../lib":719,"../../lib/gup":717,"strongly-connected-components":530}],1105:[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",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1106:[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 h(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,f){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(f.hoverlabel,t.hoverlabel),g=t.node,v=c.newContainer(e,"node");function m(t,e){return n.coerce(g,v,i.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,v,m,d),m("hovertemplate");var y=f.colorway;m("color",v.label.map(function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}));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,k=o(f.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(k,b.value.length)),u(x,b,{name:"colorscales",handleItemDefaults:h}),s(e,f,p),p("orientation"),p("valueformat"),p("valuesuffix"),v.x.length&&v.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},f.font)),e._length=null}},{"../../components/color":593,"../../components/fx/hoverlabel_defaults":630,"../../lib":719,"../../plot_api/plot_template":757,"../../plots/array_container_defaults":763,"../../plots/domain":792,"./attributes":1102,tinycolor2:537}],1107:[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":1102,"./base_plot":1103,"./calc":1104,"./defaults":1106,"./plot":1108,"./select.js":1110}],1108:[function(t,e,r){"use strict";var n=t("d3"),i=t("./render"),a=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function h(t,e){return t.filter(function(t){return t.key===e.traceId})}function f(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function p(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",function(t){if(!t.link.concentrationscale)return.4}),i&&h(e,t).selectAll("."+l.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("."+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",function(t){return t.tinyColorAlpha}),i&&h(e,t).selectAll("."+l.sankeyLink).filter(function(t){return t.link.label===i}).style("fill-opacity",function(t){return t.tinyColorAlpha}),r&&h(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,h=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.color,1),borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:n.event.x"),color:b(o,"bgcolor")||i.tinyColorHue,borderColor:b(o,"bordercolor"),fontFamily:b(o,"font.family"),fontSize:b(o,"font.size"),fontColor:b(o,"font.color"),nameLength:b(o,"namelength"),textAlign:b(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});f(y,.85),p(y)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,i,o),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit("plotly_unhover",{event:n.event,points:[i.node]})),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,i),a.click(t,{target:!0})}}})}},{"../../components/color":593,"../../components/fx":632,"../../lib":719,"./constants":1105,"./render":1109,d3:163}],1109:[function(t,e,r){"use strict";var n=t("./constants"),i=t("d3"),a=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),h=t("../../lib"),f=t("../../lib/gup"),p=f.keyFun,d=f.repeat,g=f.unwrap,v=t("d3-interpolate").interpolateNumber,m=t("../../registry");function y(){var t=.5;return function(e){if(e.link.circular)return r=e.link,n=r.width/2,i=r.circularPathData,"top"===r.circularLinkType?"M "+i.targetX+" "+(i.targetY+n)+" L"+i.rightInnerExtent+" "+(i.targetY+n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 1 "+(i.rightFullExtent-n)+" "+(i.targetY-i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 1 "+i.rightInnerExtent+" "+(i.verticalFullExtent-n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY-i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.leftInnerExtent+" "+(i.sourceY-n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 0 "+(i.leftFullExtent-n)+" "+(i.sourceY-i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"L"+i.rightInnerExtent+" "+(i.verticalFullExtent+n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 0 "+(i.rightFullExtent+n)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n)+" "+(i.targetY-i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 0 "+i.rightInnerExtent+" "+(i.targetY-n)+"L"+i.targetX+" "+(i.targetY-n)+"Z":"M "+i.targetX+" "+(i.targetY-n)+" L"+i.rightInnerExtent+" "+(i.targetY-n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n)+" "+(i.targetY+i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+i.rightInnerExtent+" "+(i.verticalFullExtent+n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.leftInnerExtent+" "+(i.sourceY+n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"L"+i.rightInnerExtent+" "+(i.verticalFullExtent-n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n)+" "+(i.targetY+i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+i.rightInnerExtent+" "+(i.targetY+n)+"L"+i.targetX+" "+(i.targetY+n)+"Z";var r,n,i,a=e.link.source.x1,o=e.link.target.x0,s=v(a,o),l=s(t),c=s(1-t),u=e.link.y0-e.link.width/2,h=e.link.y0+e.link.width/2,f=e.link.y1-e.link.width/2,p=e.link.y1+e.link.width/2;return"M"+a+","+u+"C"+l+","+u+" "+c+","+f+" "+o+","+f+"L"+o+","+p+"C"+c+","+p+" "+l+","+h+" "+a+","+h+"Z"}}function x(t){t.attr("transform",function(t){return"translate("+t.node.x0.toFixed(3)+", "+t.node.y0.toFixed(3)+")"})}function b(t){t.call(x)}function _(t,e){t.call(b),e.attr("d",y())}function w(t){t.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function k(t){return t.link.width>1||t.linkLineWidth>0}function T(t){return"translate("+t.translateX+","+t.translateY+")"+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function A(t){return"translate("+(t.horizontal?0:t.labelY)+" "+(t.horizontal?t.labelY:0)+")"}function M(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function S(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function E(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function C(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function L(t){return t.horizontal&&t.left?"100%":"0%"}function P(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 O(t,e,r,a){var o=i.behavior.drag().origin(function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}}).on("dragstart",function(i){if("fixed"!==i.arrangement&&(h.ensureSingle(a._fullLayout._infolayer,"g","dragcover",function(t){a._fullLayout._dragCover=t}),h.raiseToTop(this),i.interactionState.dragInProgress=i.node,I(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),"snap"===i.arrangement)){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&i.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,i),function(t,e,r,i,a){window.requestAnimationFrame(function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var c=r.node.originalX;r.node.x0=c-r.visibleWidth/2,r.node.x1=c+r.visibleWidth/2,z(r,a)}})}(t,e,i,o,a)}}).on("drag",function(r){if("fixed"!==r.arrangement){var n=i.event.x,a=i.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a)),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2),I(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),_(t.filter(D(r)),e))}}).on("dragend",function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e=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}(y=T.nodes)),i.update(T)}return{circular:b,key:r,trace:s,guid:h.randstr(),horizontal:f,width:v,height:m,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:v,dragPerpendicular:f?v:m,arrangement:s.arrangement,sankey:i,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,u)),_=e.selectAll("."+n.cn.sankey).data(b,p);_.exit().remove(),_.enter().append("g").classed(n.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",T),_.each(function(e,r){t._fullData[r]._sankey=e;var n="bgsankey-"+e.trace.uid+"-"+r;h.ensureSingle(t._fullLayout._draggers,"rect",n),t._fullData[r]._bgRect=i.select("."+n),t._fullData[r]._bgRect.style("pointer-events","all").attr("width",e.width).attr("height",e.height).attr("x",e.translateX).attr("y",e.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),_.transition().ease(n.ease).duration(n.duration).attr("transform",T);var z=_.selectAll("."+n.cn.sankeyLinks).data(d,p);z.enter().append("g").classed(n.cn.sankeyLinks,!0).style("fill","none");var I=z.selectAll("."+n.cn.sankeyLink).data(function(t){return t.graph.links.filter(function(t){return t.value}).map(function(t,e,r){var n=a(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:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:y,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}.bind(null,t))},p);I.enter().append("path").classed(n.cn.sankeyLink,!0).call(P,_,f.linkEvents),I.style("stroke",function(t){return k(t)?o.tinyRGB(a(t.linkLineColor)):t.tinyColorHue}).style("stroke-opacity",function(t){return k(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style("fill",function(t){return t.tinyColorHue}).style("fill-opacity",function(t){return t.tinyColorAlpha}).style("stroke-width",function(t){return k(t)?t.linkLineWidth:1}).attr("d",y()),I.style("opacity",function(){return t._context.staticPlot||v||m?1:0}).transition().ease(n.ease).duration(n.duration).style("opacity",1),I.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var D=_.selectAll("."+n.cn.sankeyNodeSet).data(d,p);D.enter().append("g").classed(n.cn.sankeyNodeSet,!0),D.style("cursor",function(t){switch(t.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=D.selectAll("."+n.cn.sankeyNode).data(function(t){var e=t.graph.nodes;return function(t){var e,r=[];for(e=0;e5?t.node.label:""}).attr("text-anchor",function(t){return t.horizontal&&t.left?"end":"start"}),V.transition().ease(n.ease).duration(n.duration).attr("startOffset",L).style("fill",C)}},{"../../components/color":593,"../../components/drawing":614,"../../lib":719,"../../lib/gup":717,"../../registry":847,"./constants":1105,"@plotly/d3-sankey":54,"@plotly/d3-sankey-circular":53,d3:163,"d3-force":156,"d3-interpolate":158,tinycolor2:537}],1110:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,i=n._sankey.graph.nodes,a=0;as&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;sM[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}}}}}},{}],1119:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./stack_defaults"),u=t("./marker_defaults"),h=t("./line_defaults"),f=t("./line_shape_defaults"),p=t("./text_defaults"),d=t("./fillcolor_defaults");e.exports=function(t,e,r,g){function v(r,i){return n.coerce(t,e,a,r,i)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&mG!=(F=O[L][1])>=G&&(I=O[L-1][0],D=O[L][0],F-R&&(z=I+(D-I)*(G-R)/(F-R),U=Math.min(U,z),V=Math.max(V,z)));U=Math.max(U,0),V=Math.min(V,f._length);var Y=s.defaultLine;return s.opacity(h.fillcolor)?Y=h.fillcolor:s.opacity((h.line||{}).color)&&(Y=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:U,x1:V,y0:G,y1:G,color:Y,hovertemplate:!1}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":593,"../../components/fx":632,"../../lib":719,"../../registry":847,"./get_trace_color":1121}],1123:[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"),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":778,"./arrays_to_calcdata":1111,"./attributes":1112,"./calc":1113,"./cross_trace_calc":1117,"./cross_trace_defaults":1118,"./defaults":1119,"./hover":1122,"./marker_colorbar":1129,"./plot":1131,"./select":1132,"./style":1134,"./subtypes":1135}],1124:[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":603,"../../components/colorscale/helpers":604,"../../lib":719}],1125:[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,h=t("./constants");e.exports=function(t,e){var r,n,a,f,p,d,g,v,m,y,x,b,_,w,k,T,A,M,S=e.xaxis,E=e.yaxis,C="log"===S.type,L="log"===E.type,P=S._length,O=E._length,z=e.connectGaps,I=e.baseTolerance,D=e.shape,R="linear"===D,F=e.fill&&"none"!==e.fill,B=[],N=h.minTolerance,j=t.length,U=new Array(j),V=0;function q(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),a=E.c2p(r.y);if(n===i){if(C&&(n=S.c2p(r.x,!0)),n===i)return!1;L&&a===i&&(n*=Math.abs(S._m*O*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),n*=1e3}if(a===i){if(L&&(a=E.c2p(r.y,!0)),a===i)return!1;a*=1e3}return[n,a]}function H(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 ht(t){if(A=t[0]/P,M=t[1]/O,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=Q(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else $=Q(U[V-1],t)[0],U[V++]=$;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(Q(K,t)[0]),U[V++]=t;var n,i,a,o}for("linear"===D||"spline"===D?Q=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,ft))break;a=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,f=d,g=!1):_=t.length||!d)break;ht(d),n=d}}else ht(f)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{"../../constants/numerical":695,"../../lib":719,"./constants":1116}],1126:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1127:[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,h=-1,f=0,p=-1;for(a=0;a=0?l=p:(l=p=f,f++),l0?Math.max(e,i):0}}},{"fast-isnumeric":225}],1129:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1130:[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),h=(t.line||{}).color;(c=c||{},h&&(r=h),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",h&&!Array.isArray(h)&&e.marker.color!==h?h: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":593,"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604,"./subtypes":1135}],1131:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../registry"),a=t("../../lib"),o=a.ensureSingle,s=a.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),h=t("./link_traces"),f=t("../../lib/polygon").tester;function p(t,e,r,h,p,d,g){var v;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),h=n.extent(a.simpleMap(l.range,l.r2c)),f=i[0].trace;if(!c.hasMarkers(f))return;var p=f.marker.maxdisplayed;if(0===p)return;var d=i.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),g=Math.ceil(d.length/p),v=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=h[0].trace,w=_.line,k=n.select(d),T=o(k,"g","errorbars"),A=o(k,"g","lines"),M=o(k,"g","points"),S=o(k,"g","text");if(i.getComponentMethod("errorbars","plot")(t,T,r,g),!0===_.visible){var E,C;y(k).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var P,O,z="",I=[],D=_._prevtrace;D&&(z=D._prevRevpath||"",C=D._nextFill,I=D._polygons);var R,F,B,N,j,U,V,q="",H="",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(h),-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(h,{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),v=0;v1){var r=n.select(this);if(r.datum(h),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(h,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(h),N&&U&&(L?("y"===L?N[1]=U[1]=b.c2p(0,!0):"x"===L&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr("d","M"+U+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(E).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&z?("tonext"===_.fill?y(C).attr("d",q+"Z"+z+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+z.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(I)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=V):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(h),S.datum(h),function(e,i,a){var o,u=a[0].trace,h=c.hasMarkers(u),f=c.hasText(u),p=tt(u),d=et,g=et;if(h||f){var v=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?K:J:_&&!w&&(v=$),h&&(d=v),f&&(g=v)}var k,T=(o=e.selectAll("path.point").data(d,p)).enter().append("path").classed("point",!0);m&&T.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),h&&(k=l.makePointStyleFns(u)),o.each(function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):a.remove()}),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=i.selectAll("g").data(g,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each(function(t){var e=n.select(this),i=y(e.select("text"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()}),o.selectAll("text").call(l.textPointStyle,u,t).each(function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each(function(){y(n.select(this)).attr({x:e,y:r})})}),o.exit().remove()}(M,S,h);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 $(t){return t.filter(function(t){return!t.gap})}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,f,d=!a,g=!!a&&a.duration>0,v=h(t,e,r);((u=i.selectAll("g.trace").data(v,function(t){return t[0].trace.uid})).enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each(function(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&&(f=c()),n.transition().duration(a.duration).ease(a.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()}).each(function(){i.selectAll("g.trace").each(function(r,n){p(t,n,e,r,v,this,a)})})):u.each(function(r,n){p(t,n,e,r,v,this,a)});d&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},{"../../components/drawing":614,"../../lib":719,"../../lib/polygon":731,"../../registry":847,"./line_points":1125,"./link_traces":1127,"./subtypes":1135,d3:163}],1132:[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=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}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 y(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function x(t,e){return e(4*t)}function b(t){return p[t]}function _(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&&h("surfacecolor",f||p);for(var d=["x","y","z"],g=0;g<3;++g){var v="projection."+d[g];h(v+".show")&&(h(v+".opacity"),h(v+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,f||p||r,{axis:"z"}),m(t,e,f||p||r,{axis:"y",inherit:"z"}),m(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":719,"../../registry":847,"../scatter/line_defaults":1124,"../scatter/marker_defaults":1130,"../scatter/subtypes":1135,"../scatter/text_defaults":1136,"./attributes":1138}],1143:[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"],meta:{}}},{"../../constants/gl3d_markers":693,"../../plots/gl3d":807,"./attributes":1138,"./calc":1139,"./convert":1141,"./defaults":1142}],1144:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/fx/hovertemplate_attributes"),o=t("../../components/colorscale/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,c=n.line,u=l.line;e.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:s({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({width:u.width,editType:"calc"},o("marker.line")),gradient:l.gradient,editType:"calc"},o("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a()}},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../scatter/attributes":1112}],1145:[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,h,f=e._length,p=new Array(f),d=!1;for(c=0;c")}return o}function k(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,_.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":719,"../scatter/hover":1122}],1149:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":778,"../scatter/marker_colorbar":1129,"../scatter/select":1132,"../scatter/style":1134,"./attributes":1144,"./calc":1145,"./defaults":1146,"./event_data":1147,"./hover":1148,"./plot":1150}],1150:[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,h={xaxis:i.getFromId(t,u.xaxis||"x"),yaxis:i.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,h,r,o),s=0;s")}(u,v,t,c[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/get_trace_color":1121,"./attributes":1151}],1156:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./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":797,"../scatter/marker_colorbar":1129,"../scatter/style":1134,"./attributes":1151,"./calc":1152,"./defaults":1153,"./event_data":1154,"./hover":1155,"./plot":1157,"./select":1158,"./style":1159}],1157:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../constants/numerical").BADNUM,o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("../../lib/geojson_utils"),c=t("../scatter/subtypes"),u=t("./style");function h(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l=g,k=2*_,T={},A=y.makeCalcdata(e,"x"),M=x.makeCalcdata(e,"y"),S=new Array(k);for(r=0;r<_;r++)o=A[r],s=M[r],S[2*r]=o===d?NaN:o,S[2*r+1]=s===d?NaN:s;if("log"===y.type)for(r=0;r1&&i.extendFlat(s.line,f.linePositions(t,r,n));if(s.errorX||s.errorY){var l=f.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},f.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,S,A,M),P=p(t,b);return u(m,e),w?L.marker&&(C=2*(L.marker.sizeAvg||Math.max(L.marker.size,3))):C=l(e,_),c(t,e,y,x,A,M,C),L.errorX&&v(e,y,L.errorX),L.errorY&&v(e,x,L.errorY),L.fill&&!P.fill2d&&(P.fill2d=!0),L.marker&&!P.scatter2d&&(P.scatter2d=!0),L.line&&!P.line2d&&(P.line2d=!0),!L.errorX&&!L.errorY||P.error2d||(P.error2d=!0),L.text&&!P.glText&&(P.glText=!0),L.marker&&(L.marker.snap=T.tree||g),P.lineOptions.push(L.line),P.errorXOptions.push(L.errorX),P.errorYOptions.push(L.errorY),P.fillOptions.push(L.fill),P.markerOptions.push(L.marker),P.markerSelectedOptions.push(L.markerSel),P.markerUnselectedOptions.push(L.markerUnsel),P.textOptions.push(L.text),P.textSelectedOptions.push(L.textSel),P.textUnselectedOptions.push(L.textUnsel),P.selectBatch.push([]),P.unselectBatch.push([]),T._scene=P,T.index=P.count,T.x=A,T.y=M,T.positions=S,P.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/autorange":766,"../../plots/cartesian/axis_ids":770,"../scatter/calc":1113,"../scatter/colorscale_calc":1115,"./constants":1162,"./convert":1163,"./scene_update":1169,"point-cluster":469}],1162:[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]}}},{}],1163:[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,h=t("../scatter/subtypes"),f=t("../scatter/make_bubble_size_func"),p=t("./constants"),d=t("../../constants/interactions").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1};function v(t){var e,r=t._length,i=t.textfont,a=t.textposition,o=Array.isArray(a)?a:[a],s=i.color,l=i.size,c=i.family,u={};for(u.text=t.text,u.opacity=t.opacity,u.font={},u.align=[],u.baseline=[],e=0;ep.TOO_MANY_POINTS?"rect":h.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var f=n[0],d=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,v=g[p],m=g[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[i]=[v*y/f,x/f]}}return o}}},{"../../components/drawing":614,"../../constants/interactions":694,"../../lib":719,"../../lib/gl_format_color":716,"../../plots/cartesian/axis_ids":770,"../../registry":847,"../scatter/make_bubble_size_func":1128,"../scatter/subtypes":1135,"./constants":1162,"color-normalize":120,"fast-isnumeric":225,"svg-path-sdf":535}],1164:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("../scatter/constants"),s=t("../scatter/subtypes"),l=t("../scatter/xy_defaults"),c=t("../scatter/marker_defaults"),u=t("../scatter/line_defaults"),h=t("../scatter/fillcolor_defaults"),f=t("../scatter/text_defaults");e.exports=function(t,e,r,p){function d(r,i){return n.coerce(t,e,a,r,i)}var g=!!t.marker&&/-open/.test(t.marker.symbol),v=s.isBubble(t),m=l(t,e,p,d);if(m){var y=m-1;c--)s=x[i[c]],l=b[i[c]],u=m.c2p(s)-_,h=y.c2p(l)-w,(f=Math.sqrt(u*u+h*h))g.glText.length){var b=y-g.glText.length;for(f=0;fr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),g.line2d.update(g.lineOptions)),g.error2d){var w=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(w)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=s.repeat(null,y),g.fill2d&&(g.fillOptions=g.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=g.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(g.fillOrder[e]=u);var h,f,p=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;hh&&isNaN(d[f+1]);)f-=2;0!==d[h+1]&&(p=[d[h],0]),p=p.concat(d.slice(h,f+2)),0!==d[f+1]&&(p=p.concat([d[f],0]))}else if("tozerox"===s.fill){for(h=0;hh&&isNaN(d[f]);)f-=2;0!==d[h]&&(p=[0,d[h+1]]),p=p.concat(d.slice(h,f+2)),0!==d[f]&&(p=p.concat([0,d[f+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],i=0,a=0;a-1;for(f=0;f=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=f.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-h.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[i.modHalf(v[0],360)+p,v[1]],y=u.c2p(m),x=h.c2p(m),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=a(c,g),t.extraText=function(t,e,r){if(t.hovertemplate)return;var n=(e.hi||t.hoverinfo).split("+"),i=-1!==n.indexOf("all"),a=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}i||a&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):a?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==n.indexOf("text"))&&o(e,t,c);return c.join("
")}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../scatter/get_trace_color":1121}],1176:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),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","scatterlike"],meta:{}}},{"../../plots/mapbox":822,"../scatter/marker_colorbar":1129,"../scattergeo/calc":1152,"./attributes":1171,"./defaults":1173,"./event_data":1174,"./hover":1175,"./plot":1177,"./select":1178}],1177:[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.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(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(e),l=i.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:o}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/hover":1122}],1183:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":831,"../scatter/marker_colorbar":1129,"../scatter/select":1132,"../scatter/style":1134,"./attributes":1179,"./calc":1180,"./defaults":1181,"./hover":1182,"./plot":1184}],1184:[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&&!f.fill2d&&(f.fill2d=!0),y.marker&&!f.scatter2d&&(f.scatter2d=!0),y.line&&!f.line2d&&(f.line2d=!0),y.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(y.line),f.fillOptions.push(y.fill),f.markerOptions.push(y.marker),f.markerSelectedOptions.push(y.markerSel),f.markerUnselectedOptions.push(y.markerUnsel),f.textOptions.push(y.text),f.textSelectedOptions.push(y.textSel),f.textUnselectedOptions.push(y.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=f,d.index=f.count,f.count++}}),a(t,e,r)}}},{"../../lib":719,"../scattergl/constants":1162,"../scattergl/convert":1163,"../scattergl/plot":1168,"../scattergl/scene_update":1169,"fast-isnumeric":225,"point-cluster":469}],1191:[function(t,e,r){"use strict";var n=t("../../components/fx/hovertemplate_attributes"),i=t("../scatter/attributes"),a=t("../../plots/attributes"),o=t("../../components/colorscale/attributes"),s=t("../../components/drawing/attributes").dash,l=t("../../lib/extend").extendFlat,c=i.marker,u=i.line,h=c.line;e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:l({},i.mode,{dflt:"markers"}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:l({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.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:h.width,editType:"calc"},o("marker.line")),gradient:c.gradient,editType:"calc"},o("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:l({},a.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":600,"../../components/drawing/attributes":613,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../scatter/attributes":1112}],1192:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc"),a=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,h,f,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r"),s.hovertemplate=d.hovertemplate,o}function y(t,e){v.push(t._hovertitle+": "+e)}}},{"../../plots/cartesian/axes":767,"../scatter/hover":1122}],1196:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":843,"../scatter/marker_colorbar":1129,"../scatter/select":1132,"../scatter/style":1134,"./attributes":1191,"./calc":1192,"./defaults":1193,"./event_data":1194,"./hover":1195,"./plot":1197}],1197:[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":1131}],1198:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/colorscale/attributes"),a=t("../../components/fx/hovertemplate_attributes"),o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,h=u.line,f=c(i("marker.line",{editTypeOverride:"calc"}),{width:c({},h.width,{editType:"calc"}),editType:"calc"}),p=c(i("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:f,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:l("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:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:a(),marker:p,xaxes:d("x"),yaxes:d("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:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../scatter/attributes":1112,"../scattergl/attributes":1160}],1199:[function(t,e,r){"use strict";var n=t("regl-line2d"),i=t("../../registry"),a=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine,u="splom";function h(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;of?2*(b.sizeAvg||Math.max(b.size,3)):a(e,x),p=0;pa&&l?r._splomSubplots[S]=1:i-1,A=!0;if("lasso"===y||"select"===y||!!f.selectedpoints||T){var M=f._length;if(f.selectedpoints){d.selectBatch=f.selectedpoints;var S=f.selectedpoints,E={};for(s=0;s2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function d(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function g(t,e){var r=t.fullSceneLayout,i=t.dataScale,u=e._len,h={};function g(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,function(t){return n.d2l(t)*o})}h.vectors=l(g(e.u,"xaxis"),g(e.v,"yaxis"),g(e.w,"zaxis"),u);var v=f(e.x.slice(0,u)),m=f(e.y.slice(0,u)),y=f(e.z.slice(0,u));if(v.length*m.length*y.length>u)return{positions:[],cells:[]};var x=g(v,"xaxis"),b=g(m,"yaxis"),_=g(y,"zaxis");if(h.meshgrid=[x,b,_],e.starts){var w=e._slen;h.startingPositions=l(g(e.starts.x.slice(0,w),"xaxis"),g(e.starts.y.slice(0,w),"yaxis"),g(e.starts.z.slice(0,w),"zaxis"))}else{for(var k=b[0],T=p(x),A=p(_),M=new Array(T.length*A.length),S=0,E=0;E=0};g?(r=Math.min(d.length,m.length),s=function(t){return k(d[t])&&T(t)},c=function(t){return String(d[t])}):(r=Math.min(v.length,m.length),s=function(t){return k(v[t])&&T(t)},c=function(t){return String(v[t])}),x&&(r=Math.min(r,y.length));for(var A=0;A1){for(var C=a.randstr(),L=0;L0,f=n.select(r).selectAll("g.slice"),p=e[0],m=p.trace,y=x(p.hierarchy,m.level),w=m.maxdepth>=0?m.maxdepth:1/0,M=o._size,S=m.domain,E=M.w*(S.x[1]-S.x[0]),C=M.h*(S.y[1]-S.y[0]),L=.5*Math.min(E,C),P=p.cx=M.l+M.w*(S.x[1]+S.x[0])/2,O=p.cy=M.t+M.h*(1-S.y[0])-C/2;if(!y)return f.remove();var z=null,I={};u&&f.each(function(t){I[k(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!z&&_(t)&&(z=t)});var D=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(y).descendants(),R=y.height+1,F=0,B=w;p.hasMultipleRoots&&b(y)&&(D=D.slice(1),R-=1,F=1,B+=1),D=D.filter(function(t){return t.y1<=B});var N=Math.min(R,w),j=function(t){return(t-F)/N*L},U=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},V=function(t){return c.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,P,O)},q=function(t){return P+t.pxmid[0]*t.transform.rCenter+(t.transform.x||0)},H=function(t){return O+t.pxmid[1]*t.transform.rCenter+(t.transform.y||0)};(f=f.data(D,function(t){return k(t)})).enter().append("g").classed("slice",!0),u?f.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=k(t),i=I[r],a=I[k(y)];if(a){var o=t.x1>a.x1?2*Math.PI:0;e=t.rpx1G?2*Math.PI:0;e={x0:a,x1:a}}else e={rpx0:L,rpx1:L},c.extendFlat(e,X(t));else e={rpx0:0,rpx1:0};else e={x0:0,x1:0};return n.interpolate(e,i)}(t);return function(t){return V(e(t))}}):a.attr("d",V),i.call(A,t,e).call(T,t,{isTransitioning:t._transitioning}),a.call(v,r,m);var f=c.ensureSingle(i,"g","slicetext"),y=c.ensureSingle(f,"text","",function(t){t.attr("data-notex",1)});y.text(function(t,e,r){var n=e.textinfo;if(!n||"none"===n)return"";var i=t.data.data,a=r.separators,o=n.split("+"),s=function(t){return-1!==o.indexOf(t)},l=[];s("label")&&i.label&&l.push(i.label);i.hasOwnProperty("v")&&s("value")&&l.push(g(i.v,a));if(s("text")){var u=c.castOption(e,i.i,"text");c.isValidTextValue(u)&&l.push(u)}return l.join("
")}(r,m,o)).classed("slicetext",!0).attr("text-anchor","middle").call(l.font,b(r)?function(t,e,r){var n=e.data.data.i,i=c.castOption(t,n,"outsidetextfont.color")||c.castOption(t,n,"textfont.color")||r.color,a=c.castOption(t,n,"outsidetextfont.family")||c.castOption(t,n,"textfont.family")||r.family,o=c.castOption(t,n,"outsidetextfont.size")||c.castOption(t,n,"textfont.size")||r.size;return{color:i,family:a,size:o}}(m,r,o.font):function(t,e,r){var n=e.data.data,i=n.i,a=c.castOption(t,i,"insidetextfont.color");!a&&t._input.textfont&&(a=c.castOption(t._input,i,"textfont.color"));var o=c.castOption(t,i,"insidetextfont.family")||c.castOption(t,i,"textfont.family")||r.family,l=c.castOption(t,i,"insidetextfont.size")||c.castOption(t,i,"textfont.size")||r.size;return{color:a||s.contrast(n.color),family:o,size:l}}(m,r,o.font)).call(h.convertToTspans,t);var x=l.bBox(y.node());r.transform=d(x,r,p),r.translateX=q(r),r.translateY=H(r);var _=function(t,e){return"translate("+t.translateX+","+t.translateY+")"+(t.transform.scale<1?"scale("+t.transform.scale+")":"")+(t.transform.rotate?"rotate("+t.transform.rotate+")":"")+"translate("+-(e.left+e.right)/2+","+-(e.top+e.bottom)/2+")"};u?y.transition().attrTween("transform",function(t){var e=function(t){var e,r=I[k(t)],i=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},z)if(t.parent)if(G){var a=t.x1>G?2*Math.PI:0;e.x0=e.x1=a}else c.extendFlat(e,X(t));else e.x0=e.x1=0;else e.x0=e.x1=0;var o=n.interpolate(e.rpx1,t.rpx1),s=n.interpolate(e.x0,t.x0),l=n.interpolate(e.x1,t.x1),u=n.interpolate(e.transform.scale,i.scale),h=n.interpolate(e.transform.rotate,i.rotate),f=0===i.rCenter?3:0===e.transform.rCenter?1/3:1,p=n.interpolate(e.transform.rCenter,i.rCenter);return function(t){var e=o(t),r=s(t),n=l(t),a=function(t){return p(Math.pow(t,f))}(t),c={pxmid:U(e,(r+n)/2),transform:{rCenter:a,x:i.x,y:i.y}},d={rpx1:o(t),translateX:q(c),translateY:H(c),transform:{scale:u(t),rotate:h(t),rCenter:a}};return d}}(t);return function(t){return _(e(t),x)}}):y.attr("transform",_(r,x))})}function x(t,e){var r;return e&&t.eachAfter(function(t){if(k(t)===e)return r=t.copy()}),r||t}function b(t){return""===t.data.data.pid}function _(t){return!t.parent}function w(t){return!t.children}function k(t){return t.data.data.id}function T(t,e,r){var n=t.datum(),i=(r||{}).isTransitioning;f(t,i||w(n)||b(n)?null:"pointer")}function A(t,e,r){var i=r[0],s=i.trace;"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1),t.on("mouseover",function(t){var r=e._fullLayout;if(!e._dragging&&!1!==r.hovermode){var a=e._fullData[s.index],l=t.data.data,u=l.i,h=function(t){return c.castOption(a,u,t)},f=h("hovertemplate"),p=o.castHoverinfo(a,r,u),d=r.separators;if(f||p&&"none"!==p&&"skip"!==p){var v=t.rInscribed,m=i.cx+t.pxmid[0]*(1-v),y=i.cy+t.pxmid[1]*(1-v),x={},b=[],_=[],w=function(t){return-1!==b.indexOf(t)};if(p&&(b="all"===p?a._module.attributes.hoverinfo.flags:p.split("+")),x.label=l.label,w("label")&&x.label&&_.push(x.label),l.hasOwnProperty("v")&&(x.value=l.v,x.valueLabel=g(x.value,d),w("value")&&_.push(x.valueLabel)),x.text=h("hovertext")||h("text"),w("text")){var k=x.text;c.isValidTextValue(k)&&_.push(k)}o.loneHover({trace:a,x0:m-v*t.rpx1,x1:m+v*t.rpx1,y:y,idealAlign:t.pxmid[0]<0?"left":"right",text:_.join("
"),name:f||w("name")?a.name:void 0,color:h("hoverlabel.bgcolor")||l.color,borderColor:h("hoverlabel.bordercolor"),fontFamily:h("hoverlabel.font.family"),fontSize:h("hoverlabel.font.size"),fontColor:h("hoverlabel.font.color"),nameLength:h("hoverlabel.namelength"),textAlign:h("hoverlabel.align"),hovertemplate:f,hovertemplateLabels:x,eventData:[M(t,a)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),s._hasHoverLabel=!0}s._hasHoverEvent=!0,e.emit("plotly_hover",{points:[M(t,a)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,i=e._fullData[s.index],a=n.select(this).datum();s._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[M(a,i)],event:n.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(o.loneUnhover(r._hoverlayer.node()),s._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,l=e._fullData[s.index];if(!1===u.triggerHandler(e,"plotly_sunburstclick",{points:[M(t,l)],event:n.event})||w(t)||b(t))r.hovermode&&(e._hoverdata=[M(t,l)],o.click(e,n.event));else if(!e._dragging&&!e._transitioning){a.call("_storeDirectGUIEdit",l,r._tracePreGUI[l.uid],{level:l.level});var c=i.hierarchy,h=k(t),f=_(t)?function(t,e){var r;return t.eachAfter(function(t){for(var n=t.children||[],i=0;i0;((a=s.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(),c)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){s.selectAll("g.trace").each(function(e){y(t,e,this,r)})})):a.each(function(e){y(t,e,this,r)});l&&a.exit().remove()}},{"../../components/color":593,"../../components/drawing":614,"../../components/fx":632,"../../components/fx/helpers":628,"../../lib":719,"../../lib/events":709,"../../lib/setcursor":739,"../../lib/svg_text_utils":743,"../../registry":847,"../pie/helpers":1091,"../pie/plot":1095,"./constants":1217,"./style":1223,d3:163,"d3-hierarchy":157}],1223:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/color"),a=t("../../lib");function o(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){t._fullLayout._sunburstlayer.selectAll(".trace").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(o,t,r)})})},styleOne:o}},{"../../components/color":593,"../../lib":719,d3:163}],1224:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/attributes"),a=t("../../components/fx/hovertemplate_attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},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 u=e.exports=l(s({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:a(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo)}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":593,"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764}],1225:[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":601}],1226:[function(t,e,r){"use strict";var n=t("gl-surface3d"),i=t("ndarray"),a=t("ndarray-homography"),o=t("ndarray-fill"),s=t("../../lib").isArrayOrTypedArray,l=t("../../lib/gl_format_color").parseColorScale,c=t("../../lib/str2rgbarray"),u=t("../../components/colorscale").extractOpts,h=t("../heatmap/interp2d"),f=t("../heatmap/find_empties");function p(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 d=p.prototype;d.getXat=function(t,e,r,n){var i=s(this.data.x)?s(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},d.getYat=function(t,e,r,n){var i=s(this.data.y)?s(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},d.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)},d.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 g=[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 v(t,e){if(t0){r=g[n];break}return r}function x(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;aw;)r--,r/=y(r),++r<_&&(r=w);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),c=1+n+1,u=1+o+1,h=i(new Float32Array(c*u),[c,u]),f=0;f0&&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"}}},{}],1233:[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)})),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=f(b,y-_+n.uplift),k=h(f(x,_),[]),T=h(w,k),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*m});var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:M,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map(function(t){return t[0]}),gdColumnsOriginalOrder:g.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+"__"+A[t],label:t,specIndex:e,xIndex:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}})};return L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{"../../lib/extend":710,"./constants":1232,"fast-isnumeric":225}],1234:[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":710}],1235:[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&&a.match(/[<&>]/);var c,u="string"==typeof(c=a)&&c.match(n.latexCheck);t.latex=u;var h,f,p=u?"":_(t.calcdata.cells.prefix,e,r)||"",d=u?"":_(t.calcdata.cells.suffix,e,r)||"",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(h=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===h?b(v):h),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(" "===n.wrapSplitCharacter?v.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){return"translate(0 "+(z(t.rowBlocks,t.page)-t.scrollY)+")"}),t&&(E(t,r,e,c,n.prevPages,n,0),E(t,r,e,c,n.prevPages,n,1),m(r,t))}}function S(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter(function(t){return s.key===t.key}),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var h=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return M(t,h,l),s.scrollY===u}}function E(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&&n[e]!==i[e]});y(t,e,a,r),i[o]=n[o]}))}function C(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(),x(o.select("."+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(O)}}function L(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,f=Math.max(h,u);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,t.selectAll("."+n.cn.columnCell).call(O),M(null,t.filter(k),0),m(r,a,!0)),s.attr("transform",function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return"translate("+P(o,i.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+a+")"}),o.settledY=!0}}}function P(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function O(t){t.attr("transform",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+I(e,1/0)},0);return"translate(0 "+(I(R(t),t.key)+e)+")"}).selectAll("."+n.cn.cellRect).attr("height",function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function z(t,e){for(var r=0,n=e-1;n>=0;n--)r+=D(t[n]);return r}function I(t,e){for(var r=0,n=0;n0){var y,x,b,_,w,k=t.xa,T=t.ya;"h"===f.orientation?(w=e,y="y",b=T,x="x",_=k):(w=r,y="x",b=k,x="y",_=T);var A=h[t.index];if(w>=A.span[0]&&w<=A.span[1]){var M=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,f,w),C=o.getPositionOnKdePath(A,f,S),L=b._offset,P=b._length;M[y+"0"]=C[0],M[y+"1"]=C[1],M[x+"0"]=M[x+"1"]=S,M[x+"Label"]=x+": "+i.hoverLabelText(_,w)+", "+h[0].t.labels.kde+" "+E.toFixed(3),M.spikeDistance=m[0].spikeDistance;var O=y+"Spike";M[O]=m[0][O],m[0].spikeDistance=void 0,m[0][O]=void 0,M.hovertemplate=!1,v.push(M),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+P),u[y+"2"]=n.constrain(L+C[1],L,L+P),u[x+"1"]=u[x+"2"]=_._offset+S}}d&&(v=v.concat(m))}-1!==p.indexOf("points")&&(c=a.hoverOnPoints(t,e,r));var z=l.selectAll(".violinline-"+f.uid).data(u?[0]:[]);return z.enter().append("line").classed("violinline-"+f.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":719,"../../plots/cartesian/axes":767,"../box/hover":885,"./helpers":1242}],1244:[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":778,"../box/defaults":883,"../box/select":890,"../scatter/style":1134,"./attributes":1238,"./calc":1239,"./cross_trace_calc":1240,"./defaults":1241,"./hover":1243,"./layout_attributes":1245,"./layout_defaults":1246,"./plot":1247,"./style":1248}],1245:[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":719,"../box/layout_attributes":887}],1246:[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":719,"../box/layout_defaults":888,"./layout_attributes":1245}],1247:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../box/plot"),s=t("../scatter/line_points"),l=t("./helpers");e.exports=function(t,e,r,c){var u=t._fullLayout,h=e.xaxis,f=e.yaxis;function p(t){var e=s(t,{xaxis:h,yaxis:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,"trace violins").each(function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+"axis"],m=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,h,f,_=n.select(this),w=t.density,k=w.length,T=t.pos+d,A=m.c2p(T);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(h=new Array(k),o=0;o")),c.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,d),[c]}function w(t){return n(p,t)}}},{"../../components/color":593,"../../constants/delta.js":689,"../../plots/cartesian/axes":767,"../bar/hover":863}],1260:[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":778,"../bar/select":868,"./attributes":1253,"./calc":1254,"./cross_trace_calc":1256,"./defaults":1257,"./event_data":1258,"./hover":1259,"./layout_attributes":1261,"./layout_defaults":1262,"./plot":1263,"./style":1264}],1261:[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"}}},{}],1262:[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&&(g+=h?"M"+u[0]+","+p[1]+"V"+p[0]:"M"+u[1]+","+p[0]+"H"+u[0]),"between"!==f&&(r.isSum||o path").each(function(t){if(!t.isBlank){var e=l[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",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".lines").each(function(){var t=l.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":593,"../../components/drawing":614,"../../constants/interactions":694,"../bar/style":870,d3:163}],1265:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),i=t("../lib"),a=t("../plot_api/plot_schema"),o=t("./helpers").pointsAccessorFunction,s=t("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var l=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,i=e.c2d;switch(r){case"count":return h;case"first":return f;case"last":return p;case"sum":return function(t,e){for(var r=0,a=0;aa&&(a=u,o=c)}}return a?i(o):s};case"rms":return function(t,e){for(var r=0,a=0,o=0;o":return function(t){return f(t)>s};case">=":return function(t){return f(t)>=s};case"[]":return function(t){var e=f(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=f(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=f(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=f(t);return es[1]};case"](":return function(t){var e=f(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=f(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(f(t))};case"}{":return function(t){return-1===s.indexOf(f(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),f),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(a=0;a:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},{"../src/lib":719}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1279}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":865}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":877}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":887}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":592}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":896}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":915}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":929}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":936}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":942}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":957}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":968}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":697}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":976}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1280}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":986}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":995}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1281}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1008}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1017}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1029}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1035}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1039}],25:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./pie"),t("./sunburst"),t("./treemap"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./indicator":26,"./isosurface":27,"./mesh3d":28,"./ohlc":29,"./parcats":30,"./parcoords":31,"./pie":32,"./pointcloud":33,"./sankey":34,"./scatter3d":35,"./scattercarpet":36,"./scattergeo":37,"./scattergl":38,"./scattermapbox":39,"./scatterpolar":40,"./scatterpolargl":41,"./scatterternary":42,"./sort":43,"./splom":44,"./streamtube":45,"./sunburst":46,"./surface":47,"./table":48,"./treemap":49,"./violin":50,"./volume":51,"./waterfall":52}],26:[function(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1045}],27:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1051}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1056}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1061}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1070}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1080}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1091}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1100}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1106}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1142}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1148}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1155}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1166}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1175}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1182}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1188}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1195}],43:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1283}],44:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1204}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1212}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1220}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1229}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1237}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/treemap")},{"../src/traces/treemap":1246}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1258}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1266}],52:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1274}],53:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),h=a(),f=i();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),new o({turntable:u,orbit:h,matrix:f},c)};var n=t("turntable-camera-controller"),a=t("orbit-camera-controller"),i=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n1||a>1)}function E(t,e,r){return t.sort(L),t.forEach(function(n,a){var i,o,s=0;if(Y(n,r)&&S(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}}),t}function C(t,r,a,i){var o=e.min(t.links,function(t){return t.source.y0});t.links.forEach(function(t){t.circular&&(t.circularPathData={})}),E(t.links.filter(function(t){return"top"==t.circularLinkType}),r,i),E(t.links.filter(function(t){return"bottom"==t.circularLinkType}),r,i),t.links.forEach(function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+w,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,Y(e,i)&&S(e))e.circularPathData.leftSmallArcRadius=w+e.width/2,e.circularPathData.leftLargeArcRadius=w+e.width/2,e.circularPathData.rightSmallArcRadius=w+e.width/2,e.circularPathData.rightLargeArcRadius=w+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter(function(t){return t.source.column==s&&t.circularLinkType==l});"bottom"==e.circularLinkType?c.sort(O):c.sort(P);var u=0;c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=w+e.width/2+u,e.circularPathData.leftLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),s=e.target.column,c=t.links.filter(function(t){return t.target.column==s&&t.circularLinkType==l}),"bottom"==e.circularLinkType?c.sort(z):c.sort(I),u=0,c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=w+e.width/2+u,e.circularPathData.rightLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(a,e.source.y1,e.target.y1)+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){var e="";e="top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY;return e}(e);else{var h=n.linkHorizontal().source(function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]}).target(function(t){return[t.target.x0,t.y1]});e.path=h(e)}})}function L(t,e){return D(t)==D(e)?"bottom"==t.circularLinkType?O(t,e):P(t,e):D(e)-D(t)}function P(t,e){return t.y0-e.y0}function O(t,e){return e.y0-t.y0}function I(t,e){return t.y1-e.y1}function z(t,e){return e.y1-t.y1}function D(t){return t.target.column-t.source.column}function R(t){return t.target.x0-t.source.x1}function F(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1+n:t.y1-n}function B(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1-n:t.y1+n}function N(t,e,r,n){t.links.forEach(function(a){if(!a.circular&&a.target.column-a.source.column>1){var i=a.source.column+1,o=a.target.column-1,s=1,l=o-i+1;for(s=1;i<=o;i++,s++)t.nodes.forEach(function(o){if(o.column==i){var c,u=s/(l+1),h=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=h*a.y0+f*a.y0+p*a.y1+d*a.y1,v=g-a.width/2,m=g+a.width/2;v>o.y0&&vo.y0&&mo.y1&&V(t,c,e,r)})):vo.y1&&(c=m-o.y0+10,o=V(o,c,e,r),t.nodes.forEach(function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&V(t,c,e,r)}))}})}})}function j(t,e){return t.y0>e.y0&&t.y0e.y0&&t.y1e.y1)}function V(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach(function(t){t.y1=t.y1+e}),t.sourceLinks.forEach(function(t){t.y0=t.y0+e})),t}function U(t,e,r,n){t.nodes.forEach(function(a){n&&a.y+(a.y1-a.y0)>e&&(a.y=a.y-(a.y+(a.y1-a.y0)-e));var i=t.links.filter(function(t){return b(t.source,r)==b(a,r)}),o=i.length;o>1&&i.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!H(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=B(e,t);return t.y1-r}if(e.target.column>t.target.column)return B(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0});var s=a.y0;i.forEach(function(t){t.y0=s+t.width/2,s+=t.width}),i.forEach(function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!H(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function Y(t,e){return b(t.source,e)==b(t.target,e)}t.sankeyCircular=function(){var t,n,i=0,b=0,A=1,S=1,E=24,L=v,P=o,O=m,I=y,z=32,D=2,R=null;function F(){var o={nodes:O.apply(null,arguments),links:I.apply(null,arguments)};!function(t){t.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var e=r.map(t.nodes,L);t.links.forEach(function(t,r){t.index=r;var n=t.source,a=t.target;"object"!==("undefined"==typeof n?"undefined":l(n))&&(n=t.source=x(e,n)),"object"!==("undefined"==typeof a?"undefined":l(a))&&(a=t.target=x(e,a)),n.sourceLinks.push(t),a.targetLinks.push(t)})}(o),function(t,e,r){var n=0;if(null===r){for(var i=[],o=0;o0?r+_+w:r,bottom:n=n>0?n+_+w:n,left:i=i>0?i+_+w:i,right:a=a>0?a+_+w:a}}(a),u=function(t,r){var n=e.max(t.nodes,function(t){return t.column}),a=A-i,o=S-b,s=a+r.right+r.left,l=o+r.top+r.bottom,c=a/s,u=o/l;return i=i*c+r.left,A=0==r.right?A:A*c,b=b*u+r.top,S*=u,t.nodes.forEach(function(t){t.x0=i+t.column*((A-i-E)/n),t.x1=t.x0+E}),u}(a,c);s*=u,a.links.forEach(function(t){t.width=t.value*s}),l.forEach(function(t){var e=t.length;t.forEach(function(t,n){t.depth==l.length-1&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):0==t.depth&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):t.partOfCycle?0==M(t,r)?(t.y0=S/2+n,t.y1=t.y0+t.value*s):"top"==t.circularLinkType?(t.y0=b+n,t.y1=t.y0+t.value*s):(t.y0=S-t.value*s-n,t.y1=t.y0+t.value*s):0==c.top||0==c.bottom?(t.y0=(S-b)/e*n,t.y1=t.y0+t.value*s):(t.y0=(S-b)/2-e/2+n,t.y1=t.y0+t.value*s)})})})(s),m();for(var c=1,u=o;u>0;--u)v(c*=.99,s),m();function v(t,r){var n=l.length;l.forEach(function(a){var i=a.length,o=a[0].depth;a.forEach(function(a){var s;if(a.sourceLinks.length||a.targetLinks.length)if(a.partOfCycle&&M(a,r)>0);else if(0==o&&1==i)s=a.y1-a.y0,a.y0=S/2-s/2,a.y1=S/2+s/2;else if(o==n-1&&1==i)s=a.y1-a.y0,a.y0=S/2-s/2,a.y1=S/2+s/2;else{var l=e.mean(a.sourceLinks,g),c=e.mean(a.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(a))*t;a.y0+=u,a.y1+=u}})})}function m(){l.forEach(function(e){var r,n,a,i=b,o=e.length;for(e.sort(h),a=0;a0&&(r.y0+=n,r.y1+=n),i=r.y1+t;if((n=i-t-S)>0)for(i=r.y0-=n,r.y1-=n,a=o-2;a>=0;--a)r=e[a],(n=r.y1+t-i)>0&&(r.y0-=n,r.y1-=n),i=r.y0})}}(o,z,L),B(o);for(var s=0;s<4;s++)U(o,S,L),q(o,0,L),N(o,b,S,L),U(o,S,L),q(o,0,L);return function(t,r,n){var a=t.nodes,i=t.links,o=!1,s=!1;if(i.forEach(function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)}),0==o||0==s){var l=e.min(a,function(t){return t.y0}),c=e.max(a,function(t){return t.y1}),u=c-l,h=n-r,f=h/u;a.forEach(function(t){var e=(t.y1-t.y0)*f;t.y0=(t.y0-l)*f,t.y1=t.y0+e}),i.forEach(function(t){t.y0=(t.y0-l)*f,t.y1=(t.y1-l)*f,t.width=t.width*f})}}(o,b,S),C(o,D,S,L),o}function B(t){t.nodes.forEach(function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)}),t.nodes.forEach(function(t){var e=t.y0,r=e,n=t.y1,a=n;t.sourceLinks.forEach(function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=a-t.width/2,a-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}return F.nodeId=function(t){return arguments.length?(L="function"==typeof t?t:s(t),F):L},F.nodeAlign=function(t){return arguments.length?(P="function"==typeof t?t:s(t),F):P},F.nodeWidth=function(t){return arguments.length?(E=+t,F):E},F.nodePadding=function(e){return arguments.length?(t=+e,F):t},F.nodes=function(t){return arguments.length?(O="function"==typeof t?t:s(t),F):O},F.links=function(t){return arguments.length?(I="function"==typeof t?t:s(t),F):I},F.size=function(t){return arguments.length?(i=b=0,A=+t[0],S=+t[1],F):[A-i,S-b]},F.extent=function(t){return arguments.length?(i=+t[0][0],A=+t[1][0],b=+t[0][1],S=+t[1][1],F):[[i,b],[A,S]]},F.iterations=function(t){return arguments.length?(z=+t,F):z},F.circularLinkGap=function(t){return arguments.length?(D=+t,F):D},F.nodePaddingRatio=function(t){return arguments.length?(n=+t,F):n},F.sortNodes=function(t){return arguments.length?(R=t,F):R},F.update=function(t){return T(t,L),B(t),t.links.forEach(function(t){t.circular&&(t.circularLinkType=t.y0+t.y1i&&(b=i);var o=e.min(a,function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)});a.forEach(function(t){t.forEach(function(t,e){t.y1=(t.y0=e)+t.value*o})}),t.links.forEach(function(t){t.width=t.value*o})})(),d();for(var i=1,o=A;o>0;--o)l(i*=.99),d(),s(i),d();function s(t){a.forEach(function(r){r.forEach(function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,f)/e.sum(r.targetLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function l(t){a.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function d(){a.forEach(function(t){var e,r,a,i=n,o=t.length;for(t.sort(c),a=0;a0&&(e.y0+=r,e.y1+=r),i=e.y1+b;if((r=i-b-y)>0)for(i=e.y0-=r,e.y1-=r,a=o-2;a>=0;--a)e=t[a],(r=e.y1+b-i)>0&&(e.y0-=r,e.y1-=r),i=e.y0})}}(i),E(i),i}function E(t){t.nodes.forEach(function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)}),t.nodes.forEach(function(t){var e=t.y0,r=e;t.sourceLinks.forEach(function(t){t.y0=e+t.width/2,e+=t.width}),t.targetLinks.forEach(function(t){t.y1=r+t.width/2,r+=t.width})})}return S.update=function(t){return E(t),t},S.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),S):_},S.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),S):w},S.nodeWidth=function(t){return arguments.length?(x=+t,S):x},S.nodePadding=function(t){return arguments.length?(b=+t,S):b},S.nodes=function(t){return arguments.length?(k="function"==typeof t?t:o(t),S):k},S.links=function(t){return arguments.length?(T="function"==typeof t?t:o(t),S):T},S.size=function(e){return arguments.length?(t=n=0,a=+e[0],y=+e[1],S):[a-t,y-n]},S.extent=function(e){return arguments.length?(t=+e[0][0],a=+e[1][0],n=+e[0][1],y=+e[1][1],S):[[t,n],[a,y]]},S.iterations=function(t){return arguments.length?(A=+t,S):A},S},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,a)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=i,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?a(r,t("d3-array"),t("d3-collection"),t("d3-shape")):a(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{"d3-array":153,"d3-collection":154,"d3-shape":162}],56:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/meta"),a=6378137;function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=h,r.lengthToRadians=f,r.lengthToDegrees=function(t,e){return p(f(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return h(f(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var a=r.areaFactors[e];if(!a)throw new Error("invalid original units");var i=r.areaFactors[n];if(!i)throw new Error("invalid final units");return t/a*i},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!d(t))throw new Error("bbox must only contain numbers")})},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],59:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function a(t,e,r){if(null!==t)for(var n,i,o,s,l,c,u,h,f=0,p=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;yc||p>u||d>h)return l=a,c=r,u=p,h=d,void(o=0);var g=n.lineString([l,a],t.properties);if(!1===e(g,r,i,d,o))return!1;o++,l=a})&&void 0}}})}function u(t,e){if(!t)throw new Error("geojson is required");l(t,function(t,r,a){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,r,a,0,0))return!1;break;case"Polygon":for(var s=0;sa&&(a=t[o]),t[o]=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!x(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var a;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),a=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!a&&m(a,r,"Missing expected exception"+n);var i="string"==typeof n,s=!t&&a&&!r;if((!t&&o.isError(a)&&i&&_(a,r)||s)&&m(a,r,"Got unwanted exception"+n),t&&a&&r&&!_(a,r)||!t&&a)throw a}f.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(v((e=this).actual),128)+" "+e.operator+" "+g(v(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var a=n.stack,i=d(r),o=a.indexOf("\n"+i);if(o>=0){var s=a.indexOf("\n",o+1);a=a.substring(s+1)}this.stack=a}}},o.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(t,e,r){t!=e&&m(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){x(t,e,!1)||m(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){x(t,e,!0)||m(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){x(t,e,!1)&&m(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){w(!0,t,e,r)},f.doesNotThrow=function(t,e,r){w(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n(function t(e,r){e||m(e,!0,r,"==",t)},f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":455,"util/":72}],70:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],71:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],72:[function(t,e,r){(function(e,n){var a=/%[sdj%]/g;r.format=function(t){if(!m(t)){for(var e=[],r=0;r=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var a=e.inspect(n,t);return m(a)||(a=u(t,a,n)),a}var i=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(e);if(0===o.length){if(k(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return h(e)}var c,b="",T=!1,A=["{","}"];(p(e)&&(T=!0,A=["[","]"]),k(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return x(e)&&(b=" "+RegExp.prototype.toString.call(e)),_(e)&&(b=" "+Date.prototype.toUTCString.call(e)),w(e)&&(b=" "+h(e)),0!==o.length||T&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=T?function(t,e,r,n,a){for(var i=[],o=0,s=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,A)):A[0]+b+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,a,i){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),S(n,a)||(o="["+a+"]"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function _(t){return b(t)&&"[object Date]"===T(t)}function w(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function k(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(i)&&(i=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(i)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=v,r.isString=m,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t},r.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":71,_process:483,inherits:70}],73:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],74:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=e.length,i=new Array(r+1),o=0;o0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[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,a=r%3,i=[],o=0,s=r-a;os?s:o+16383));1===a?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===a&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="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 a,i,o=[],s=e;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],76:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{"./lib/rationalize":86}],77:[function(t,e,r){"use strict";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],78:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{"./lib/rationalize":86}],79:[function(t,e,r){"use strict";var n=t("./is-rat"),a=t("./lib/is-bn"),i=t("./lib/num-to-bn"),o=t("./lib/str-to-bn"),s=t("./lib/rationalize"),l=t("./div");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,h;if(a(e))u=e.clone();else if("string"==typeof e)u=o(e);else{if(0===e)return[i(0),i(1)];if(e===Math.floor(e))u=i(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=i(e)}}if(n(r))u.mul(r[1]),h=r[0].clone();else if(a(r))h=r.clone();else if("string"==typeof r)h=o(r);else if(r)if(r===Math.floor(r))h=i(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;h=i(r)}else h=i(1);c>0?u=u.ushln(c):c<0&&(h=h.ushln(-c));return s(u,h)}},{"./div":78,"./is-rat":80,"./lib/is-bn":84,"./lib/num-to-bn":85,"./lib/rationalize":86,"./lib/str-to-bn":87}],80:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":84}],81:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":95}],82:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,a=0;if(1===e)a=r[0];else if(2===e)a=r[0]+67108864*r[1];else for(var i=0;i20)return 52;return r+32}},{"bit-twiddle":93,"double-bits":168}],84:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":95}],85:[function(t,e,r){"use strict";var n=t("bn.js"),a=t("double-bits");e.exports=function(t){var e=a.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":95,"double-bits":168}],86:[function(t,e,r){"use strict";var n=t("./num-to-bn"),a=t("./bn-sign");e.exports=function(t,e){var r=a(t),i=a(e);if(0===r)return[n(0),n(1)];if(0===i)return[n(0),n(0)];i<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{"./bn-sign":81,"./num-to-bn":85}],87:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":95}],88:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":86}],89:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":81}],90:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":86}],91:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var i=e.abs().divmod(r.abs()),o=i.div,s=n(o),l=i.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=a(s)+4,h=n(l.ushln(u).divRound(r));return c*(s+h*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{"./lib/bn-to-num":82,"./lib/ctz":83}],92:[function(t,e,r){"use strict";function n(t,e,r,n,a,i){var o=["function ",t,"(a,l,h,",n.join(","),"){",i?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",a?".get(m)":"[m]"];return i?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),i?o.push("return -1};"):o.push("return i};"),o.join("")}function a(t,e,r,a){return new Function([n("A","x"+t+"y",e,["y"],!1,a),n("B","x"+t+"y",e,["y"],!0,a),n("P","c(x,y)"+t+"0",e,["y","c"],!1,a),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,a),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],93:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var a=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--a;t[e]=n<>>8&255]<<16|a[t>>>16&255]<<8|a[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],94:[function(t,e,r){"use strict";var n=t("clamp");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,h,f,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(h=(f=t).getContext("2d"),r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t.canvas,h=t,r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var a=0,i=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return a}i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var a=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&a++,16===e?this._parseHex(t,a):this._parseBase(t,e,a),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},i.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},i.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var a=0;a=0;a-=3)o=t[a]|t[a-1]<<8|t[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)a=s(t,r,r+6),this.words[n]|=a<>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);r+6!==e&&(a=s(t,e,r+6),this.words[n]|=a<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=e)n++;n--,a=a/e|0;for(var i=t.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var a=0|t.words[0],i=0|e.words[0],o=a*i,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;u+=(o=(a=0|t.words[d])*(i=0|e.words[p])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}i.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=u[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(t,e){return n("undefined"!=typeof o),this.toArrayLike(o,t,e)},i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},i.prototype.toArrayLike=function(t,e,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(i),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,a=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;it.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,a=this.cmp(t);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,T=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],O=8191&P,I=P>>>13,z=0|o[8],D=8191&z,R=z>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],V=8191&j,U=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,at=0|s[6],it=8191&at,ot=at>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ht=8191&ut,ft=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(h,V))|0)+((8191&(a=(a=Math.imul(h,U))+Math.imul(f,V)|0))<<13)|0;c=((i=Math.imul(f,U))+(a>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,V),a=(a=Math.imul(d,U))+Math.imul(g,V)|0,i=Math.imul(g,U);var mt=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(a=(a=a+Math.imul(h,G)|0)+Math.imul(f,H)|0))<<13)|0;c=((i=i+Math.imul(f,G)|0)+(a>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,V),a=(a=Math.imul(m,U))+Math.imul(y,V)|0,i=Math.imul(y,U),n=n+Math.imul(d,H)|0,a=(a=a+Math.imul(d,G)|0)+Math.imul(g,H)|0,i=i+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(a=(a=a+Math.imul(h,X)|0)+Math.imul(f,W)|0))<<13)|0;c=((i=i+Math.imul(f,X)|0)+(a>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,V),a=(a=Math.imul(b,U))+Math.imul(_,V)|0,i=Math.imul(_,U),n=n+Math.imul(m,H)|0,a=(a=a+Math.imul(m,G)|0)+Math.imul(y,H)|0,i=i+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,a=(a=a+Math.imul(d,X)|0)+Math.imul(g,W)|0,i=i+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(a=(a=a+Math.imul(h,K)|0)+Math.imul(f,J)|0))<<13)|0;c=((i=i+Math.imul(f,K)|0)+(a>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,V),a=(a=Math.imul(k,U))+Math.imul(T,V)|0,i=Math.imul(T,U),n=n+Math.imul(b,H)|0,a=(a=a+Math.imul(b,G)|0)+Math.imul(_,H)|0,i=i+Math.imul(_,G)|0,n=n+Math.imul(m,W)|0,a=(a=a+Math.imul(m,X)|0)+Math.imul(y,W)|0,i=i+Math.imul(y,X)|0,n=n+Math.imul(d,J)|0,a=(a=a+Math.imul(d,K)|0)+Math.imul(g,J)|0,i=i+Math.imul(g,K)|0;var bt=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(a=(a=a+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;c=((i=i+Math.imul(f,tt)|0)+(a>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,V),a=(a=Math.imul(M,U))+Math.imul(S,V)|0,i=Math.imul(S,U),n=n+Math.imul(k,H)|0,a=(a=a+Math.imul(k,G)|0)+Math.imul(T,H)|0,i=i+Math.imul(T,G)|0,n=n+Math.imul(b,W)|0,a=(a=a+Math.imul(b,X)|0)+Math.imul(_,W)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(m,J)|0,a=(a=a+Math.imul(m,K)|0)+Math.imul(y,J)|0,i=i+Math.imul(y,K)|0,n=n+Math.imul(d,$)|0,a=(a=a+Math.imul(d,tt)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(a=(a=a+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((i=i+Math.imul(f,nt)|0)+(a>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,V),a=(a=Math.imul(C,U))+Math.imul(L,V)|0,i=Math.imul(L,U),n=n+Math.imul(M,H)|0,a=(a=a+Math.imul(M,G)|0)+Math.imul(S,H)|0,i=i+Math.imul(S,G)|0,n=n+Math.imul(k,W)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(T,W)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(b,J)|0,a=(a=a+Math.imul(b,K)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,K)|0,n=n+Math.imul(m,$)|0,a=(a=a+Math.imul(m,tt)|0)+Math.imul(y,$)|0,i=i+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,a=(a=a+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,i=i+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(h,it)|0)|0)+((8191&(a=(a=a+Math.imul(h,ot)|0)+Math.imul(f,it)|0))<<13)|0;c=((i=i+Math.imul(f,ot)|0)+(a>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,V),a=(a=Math.imul(O,U))+Math.imul(I,V)|0,i=Math.imul(I,U),n=n+Math.imul(C,H)|0,a=(a=a+Math.imul(C,G)|0)+Math.imul(L,H)|0,i=i+Math.imul(L,G)|0,n=n+Math.imul(M,W)|0,a=(a=a+Math.imul(M,X)|0)+Math.imul(S,W)|0,i=i+Math.imul(S,X)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,K)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,K)|0,n=n+Math.imul(b,$)|0,a=(a=a+Math.imul(b,tt)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,a=(a=a+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,i=i+Math.imul(y,nt)|0,n=n+Math.imul(d,it)|0,a=(a=a+Math.imul(d,ot)|0)+Math.imul(g,it)|0,i=i+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(h,lt)|0)|0)+((8191&(a=(a=a+Math.imul(h,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((i=i+Math.imul(f,ct)|0)+(a>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,V),a=(a=Math.imul(D,U))+Math.imul(R,V)|0,i=Math.imul(R,U),n=n+Math.imul(O,H)|0,a=(a=a+Math.imul(O,G)|0)+Math.imul(I,H)|0,i=i+Math.imul(I,G)|0,n=n+Math.imul(C,W)|0,a=(a=a+Math.imul(C,X)|0)+Math.imul(L,W)|0,i=i+Math.imul(L,X)|0,n=n+Math.imul(M,J)|0,a=(a=a+Math.imul(M,K)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,K)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,tt)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,n=n+Math.imul(b,rt)|0,a=(a=a+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,i=i+Math.imul(_,nt)|0,n=n+Math.imul(m,it)|0,a=(a=a+Math.imul(m,ot)|0)+Math.imul(y,it)|0,i=i+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,a=(a=a+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,i=i+Math.imul(g,ct)|0;var Tt=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(a=(a=a+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((i=i+Math.imul(f,ft)|0)+(a>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(B,V),a=(a=Math.imul(B,U))+Math.imul(N,V)|0,i=Math.imul(N,U),n=n+Math.imul(D,H)|0,a=(a=a+Math.imul(D,G)|0)+Math.imul(R,H)|0,i=i+Math.imul(R,G)|0,n=n+Math.imul(O,W)|0,a=(a=a+Math.imul(O,X)|0)+Math.imul(I,W)|0,i=i+Math.imul(I,X)|0,n=n+Math.imul(C,J)|0,a=(a=a+Math.imul(C,K)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,K)|0,n=n+Math.imul(M,$)|0,a=(a=a+Math.imul(M,tt)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,a=(a=a+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,n=n+Math.imul(b,it)|0,a=(a=a+Math.imul(b,ot)|0)+Math.imul(_,it)|0,i=i+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,a=(a=a+Math.imul(m,ct)|0)+Math.imul(y,lt)|0,i=i+Math.imul(y,ct)|0,n=n+Math.imul(d,ht)|0,a=(a=a+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,i=i+Math.imul(g,ft)|0;var At=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(a=(a=a+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((i=i+Math.imul(f,gt)|0)+(a>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,H),a=(a=Math.imul(B,G))+Math.imul(N,H)|0,i=Math.imul(N,G),n=n+Math.imul(D,W)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(R,W)|0,i=i+Math.imul(R,X)|0,n=n+Math.imul(O,J)|0,a=(a=a+Math.imul(O,K)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,K)|0,n=n+Math.imul(C,$)|0,a=(a=a+Math.imul(C,tt)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,a=(a=a+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,n=n+Math.imul(k,it)|0,a=(a=a+Math.imul(k,ot)|0)+Math.imul(T,it)|0,i=i+Math.imul(T,ot)|0,n=n+Math.imul(b,lt)|0,a=(a=a+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,i=i+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,a=(a=a+Math.imul(m,ft)|0)+Math.imul(y,ht)|0,i=i+Math.imul(y,ft)|0;var Mt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(a=(a=a+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((i=i+Math.imul(g,gt)|0)+(a>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,W),a=(a=Math.imul(B,X))+Math.imul(N,W)|0,i=Math.imul(N,X),n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,K)|0)+Math.imul(R,J)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(O,$)|0,a=(a=a+Math.imul(O,tt)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,a=(a=a+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,n=n+Math.imul(M,it)|0,a=(a=a+Math.imul(M,ot)|0)+Math.imul(S,it)|0,i=i+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,a=(a=a+Math.imul(k,ct)|0)+Math.imul(T,lt)|0,i=i+Math.imul(T,ct)|0,n=n+Math.imul(b,ht)|0,a=(a=a+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,i=i+Math.imul(_,ft)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(a=(a=a+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((i=i+Math.imul(y,gt)|0)+(a>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),a=(a=Math.imul(B,K))+Math.imul(N,J)|0,i=Math.imul(N,K),n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,tt)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,a=(a=a+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,i=i+Math.imul(I,nt)|0,n=n+Math.imul(C,it)|0,a=(a=a+Math.imul(C,ot)|0)+Math.imul(L,it)|0,i=i+Math.imul(L,ot)|0,n=n+Math.imul(M,lt)|0,a=(a=a+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,i=i+Math.imul(S,ct)|0,n=n+Math.imul(k,ht)|0,a=(a=a+Math.imul(k,ft)|0)+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(a=(a=a+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((i=i+Math.imul(_,gt)|0)+(a>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,$),a=(a=Math.imul(B,tt))+Math.imul(N,$)|0,i=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,a=(a=a+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,i=i+Math.imul(R,nt)|0,n=n+Math.imul(O,it)|0,a=(a=a+Math.imul(O,ot)|0)+Math.imul(I,it)|0,i=i+Math.imul(I,ot)|0,n=n+Math.imul(C,lt)|0,a=(a=a+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,i=i+Math.imul(L,ct)|0,n=n+Math.imul(M,ht)|0,a=(a=a+Math.imul(M,ft)|0)+Math.imul(S,ht)|0,i=i+Math.imul(S,ft)|0;var Ct=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(a=(a=a+Math.imul(k,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((i=i+Math.imul(T,gt)|0)+(a>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,rt),a=(a=Math.imul(B,nt))+Math.imul(N,rt)|0,i=Math.imul(N,nt),n=n+Math.imul(D,it)|0,a=(a=a+Math.imul(D,ot)|0)+Math.imul(R,it)|0,i=i+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,a=(a=a+Math.imul(O,ct)|0)+Math.imul(I,lt)|0,i=i+Math.imul(I,ct)|0,n=n+Math.imul(C,ht)|0,a=(a=a+Math.imul(C,ft)|0)+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0;var Lt=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(a=(a=a+Math.imul(M,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((i=i+Math.imul(S,gt)|0)+(a>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,it),a=(a=Math.imul(B,ot))+Math.imul(N,it)|0,i=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,a=(a=a+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,i=i+Math.imul(R,ct)|0,n=n+Math.imul(O,ht)|0,a=(a=a+Math.imul(O,ft)|0)+Math.imul(I,ht)|0,i=i+Math.imul(I,ft)|0;var Pt=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(a=(a=a+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((i=i+Math.imul(L,gt)|0)+(a>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,lt),a=(a=Math.imul(B,ct))+Math.imul(N,lt)|0,i=Math.imul(N,ct),n=n+Math.imul(D,ht)|0,a=(a=a+Math.imul(D,ft)|0)+Math.imul(R,ht)|0,i=i+Math.imul(R,ft)|0;var Ot=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(a=(a=a+Math.imul(O,gt)|0)+Math.imul(I,dt)|0))<<13)|0;c=((i=i+Math.imul(I,gt)|0)+(a>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ht),a=(a=Math.imul(B,ft))+Math.imul(N,ht)|0,i=Math.imul(N,ft);var It=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(a=(a=a+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((i=i+Math.imul(R,gt)|0)+(a>>>13)|0)+(It>>>26)|0,It&=67108863;var zt=(c+(n=Math.imul(B,dt))|0)+((8191&(a=(a=Math.imul(B,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((i=Math.imul(N,gt))+(a>>>13)|0)+(zt>>>26)|0,zt&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Tt,l[9]=At,l[10]=Mt,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=Pt,l[16]=Ot,l[17]=It,l[18]=zt,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),i.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=i.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=a/67108864|0,e+=i>>>26,this.words[r]=67108863&i}return 0!==e&&(this.words[r]=e,this.length++),this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>a}return e}(t);if(0===e.length)return new i(1);for(var r=this,n=0;n=0);var e,r=t%26,a=(t-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==a){for(e=this.length-1;e>=0;e--)this.words[e+a]=this.words[e];for(e=0;e=0),a=e?(e-e%26)/26:0;var i=t%26,o=Math.min((t-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=a);c--){var h=0|this.words[c];this.words[c]=u<<26-i|h>>>i,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,a=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var a=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),a=t,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,l=n.length-a.length;if("mod"!==e){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[a.length+h])+(0|n.words[a.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(a,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(a,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(a=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:a,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e);var a,o,s},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),a=t.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,a=this.length-1;a>=0;a--)r=(e*r+(0|this.words[a]))%t;return r},i.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*e;this.words[r]=a/t|0,e=a%t}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var a=new i(1),o=new i(0),s=new i(0),l=new i(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(h)),a.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s),o.isub(l)):(r.isub(e),s.isub(a),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var a,o=new i(1),s=new i(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(a=0===e.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(t),a},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=e.cmp(r);if(a<0){var i=e;e=r,r=i}else if(0===a||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var a=0|this.words[0];e=a===t?0:at.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|t.words[r];if(n!==a){na&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return-1===this.cmpn(t)},i.prototype.lt=function(t){return-1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new w(t)},i.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},a(y,m),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,a=i}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=a,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return v[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new i(1)).iushrn(2);return this.pow(t,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,a),f=this.pow(t,a.addn(1).iushrn(1)),p=this.pow(t,a),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var h=c>>u&1;a!==r[0]&&(a=this.sqr(a)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===u)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}l=26}return a},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new k(t)},a(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof e||e,this)},{buffer:104}],96:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,a=t.length,i=0;for(e=0;e>>1;if(!(u<=0)){var h,f=a.mallocDouble(2*u*s),p=a.mallocInt32(s);if((s=l(t,u,f,p))>0){if(1===u&&n)i.init(s),h=i.sweepComplete(u,r,0,s,f,p,0,s,f,p);else{var d=a.mallocDouble(2*u*c),g=a.mallocInt32(c);(c=l(e,u,d,g))>0&&(i.init(s+c),h=1===u?i.sweepBipartite(u,r,0,s,f,p,0,c,d,g):o(u,r,n,s,f,p,c,d,g),a.free(d),a.free(g))}a.free(f),a.free(p)}return h}}}function u(t,e){n.push([t,e])}},{"./lib/intersect":99,"./lib/sweep":103,"typedarray-pool":546}],98:[function(t,e,r){"use strict";var n="d",a="ax",i="vv",o="fp",s="es",l="rs",c="re",u="rb",h="ri",f="rp",p="bs",d="be",g="bb",v="bi",m="bp",y="rv",x="Q",b=[n,a,i,l,c,u,h,p,d,g,v];function _(t){var e="bruteForce"+(t?"Full":"Partial"),r=[],_=b.slice();t||_.splice(3,0,o);var w=["function "+e+"("+_.join()+"){"];function k(e,o){var _=function(t,e,r){var o="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),_=["function ",o,"(",b.join(),"){","var ",s,"=2*",n,";"],w="for(var i="+l+","+f+"="+s+"*"+l+";i<"+c+";++i,"+f+"+="+s+"){var x0="+u+"["+a+"+"+f+"],x1="+u+"["+a+"+"+f+"+"+n+"],xi="+h+"[i];",k="for(var j="+p+","+m+"="+s+"*"+p+";j<"+d+";++j,"+m+"+="+s+"){var y0="+g+"["+a+"+"+m+"],"+(r?"y1="+g+"["+a+"+"+m+"+"+n+"],":"")+"yi="+v+"[j];";return t?_.push(w,x,":",k):_.push(k,x,":",w),r?_.push("if(y1"+d+"-"+p+"){"),t?(k(!0,!1),w.push("}else{"),k(!1,!1)):(w.push("if("+o+"){"),k(!0,!0),w.push("}else{"),k(!0,!1),w.push("}}else{if("+o+"){"),k(!1,!0),w.push("}else{"),k(!1,!1),w.push("}")),w.push("}}return "+e);var T=r.join("")+w.join("");return new Function(T)()}r.partial=_(!1),r.full=_(!0)},{}],99:[function(t,e,r){"use strict";e.exports=function(t,e,r,i,u,S,E,C,L){!function(t,e){var r=8*a.log2(e+1)*(t+1)|0,i=a.nextPow2(b*r);w.length0;){var z=(O-=1)*b,D=w[z],R=w[z+1],F=w[z+2],B=w[z+3],N=w[z+4],j=w[z+5],V=O*_,U=k[V],q=k[V+1],H=1&j,G=!!(16&j),Y=u,W=S,X=C,Z=L;if(H&&(Y=C,W=L,X=u,Z=S),!(2&j&&(F=v(t,D,R,F,Y,W,q),R>=F)||4&j&&(R=m(t,D,R,F,Y,W,U))>=F)){var J=F-R,K=N-B;if(G){if(t*J*(J+K)=p0)&&!(p1>=hi)",["p0","p1"]),g=u("lo===p0",["p0"]),v=u("lo>>1,f=2*t,p=h,d=s[f*h+e];for(;c=x?(p=y,d=x):m>=_?(p=v,d=m):(p=b,d=_):x>=_?(p=y,d=x):_>=m?(p=v,d=m):(p=b,d=_);for(var w=f*(u-1),k=f*p,T=0;Tr&&a[h+e]>c;--u,h-=o){for(var f=h,p=h+o,d=0;d=0&&a.push("lo=e[k+n]");t.indexOf("hi")>=0&&a.push("hi=e[k+o]");return r.push(n.replace("_",a.join()).replace("$",t)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],102:[function(t,e,r){"use strict";e.exports=function(t,e){e<=4*n?a(0,e-1,t):function t(e,r,h){var f=(r-e+1)/6|0,p=e+f,d=r-f,g=e+r>>1,v=g-f,m=g+f,y=p,x=v,b=g,_=m,w=d,k=e+1,T=r-1,A=0;c(y,x,h)&&(A=y,y=x,x=A);c(_,w,h)&&(A=_,_=w,w=A);c(y,b,h)&&(A=y,y=b,b=A);c(x,b,h)&&(A=x,x=b,b=A);c(y,_,h)&&(A=y,y=_,_=A);c(b,_,h)&&(A=b,b=_,_=A);c(x,w,h)&&(A=x,x=w,w=A);c(x,b,h)&&(A=x,x=b,b=A);c(_,w,h)&&(A=_,_=w,w=A);var M=h[2*x];var S=h[2*x+1];var E=h[2*_];var C=h[2*_+1];var L=2*y;var P=2*b;var O=2*w;var I=2*p;var z=2*g;var D=2*d;for(var R=0;R<2;++R){var F=h[L+R],B=h[P+R],N=h[O+R];h[I+R]=F,h[z+R]=B,h[D+R]=N}o(v,e,h);o(m,r,h);for(var j=k;j<=T;++j)if(u(j,M,S,h))j!==k&&i(j,k,h),++k;else if(!u(j,E,C,h))for(;;){if(u(T,E,C,h)){u(T,M,S,h)?(s(j,k,T,h),++k,--T):(i(j,T,h),--T);break}if(--Tt;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function u(t,e,r,n){var a=n[t*=2];return a>>1;i(p,S);for(var E=0,C=0,k=0;k=o)d(c,u,C--,L=L-o|0);else if(L>=0)d(s,l,E--,L);else if(L<=-o){L=-L-o|0;for(var P=0;P>>1;i(p,E);for(var C=0,L=0,P=0,T=0;T>1==p[2*T+3]>>1&&(I=2,T+=1),O<0){for(var z=-(O>>1)-1,D=0;D>1)-1;0===I?d(s,l,C--,z):1===I?d(c,u,L--,z):2===I&&d(h,f,P--,z)}}},scanBipartite:function(t,e,r,n,a,c,u,h,f,v,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,T=1;n?T=o:k=o;for(var A=a;A>>1;i(p,C);for(var L=0,A=0;A=o?(O=!n,M-=o):(O=!!n,M-=1),O)g(s,l,L++,M);else{var I=y[M],z=b*M,D=m[z+e+1],R=m[z+e+1+t];t:for(var F=0;F>>1;i(p,k);for(var T=0,x=0;x=o)s[T++]=b-o;else{var M=d[b-=1],S=v*b,E=f[S+e+1],C=f[S+e+1+t];t:for(var L=0;L=0;--L)if(s[L]===b){for(var z=L+1;z0&&s.length>i){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled "error" event. ('+e+")");throw l.context=e,l}if(!(r=o[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,a=v(t,n),i=0;i=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(var r=e,n=r+1,a=t.length;n=0;i--)this.removeListener(t,e[i]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],106:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),a=t("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,e.prototype),r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|p(t,r),a=s(n),i=a.write(t,r);i!==n&&(a=a.slice(0,i));return a}(t,r);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(i)return a?-1:F(t).length;r=(""+r).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,r,n,a,i){if(0===t.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=e.from(r,a)),e.isBuffer(r))return 0===r.length?-1:v(t,r,n,a,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):v(t,[r],n,a,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,a){var i,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(a){var u=-1;for(i=r;is&&(r=s-l),i=r;i>=0;i--){for(var h=!0,f=0;fa&&(n=a):n=a;var i=e.length;n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],a=e;a239?4:c>223?3:c>191?2:1;if(a+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(i=t[a+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=t[a+1],o=t[a+2],128==(192&i)&&128==(192&o)&&(l=(15&c)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=t[a+1],o=t[a+2],s=t[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=h}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.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 E(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},i&&(e.prototype[i]=e.prototype.inspect),e.prototype.compare=function(t,r,n,a,i){if(j(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),r<0||n>t.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(a>>>=0),s=(n>>>=0)-(r>>>=0),l=Math.min(o,s),c=this.slice(a,i),u=t.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-e;if((void 0===r||r>a)&&(r=a),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function M(t,e,r){var n="";r=Math.min(t.length,r);for(var a=e;an)&&(r=n);for(var a="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function P(t,r,n,a,i,o){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function O(t,e,r,n,a,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,0,r,4),a.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,0,r,8),a.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],a=1,i=0;++i>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],a=1;e>0&&(a*=256);)n+=this[t+--e]*a;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,a=1,i=this[t+--n];n>0&&(a*=256);)i+=this[t+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*e)),i},e.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),a.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),a.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),a.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),a.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[e]=255&t;++i>>=0,r>>>=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[e+a]=255&t;--a>=0&&(i*=256);)this[e+a]=t/i&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var a=Math.pow(2,8*r-1);P(this,t,e,r,a-1,-a)}var i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var a=Math.pow(2,8*r-1);P(this,t,e,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,a){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),r>=t.length&&(r=t.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-r=0;--o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,a),r);return i},e.prototype.fill=function(t,r,n,a){if("string"==typeof t){if("string"==typeof r?(a=r,r=0,n=this.length):"string"==typeof n&&(a=n,n=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!e.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===t.length){var i=t.charCodeAt(0);("utf8"===a&&i<128||"latin1"===a)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&r<57344){if(!a){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(e-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function B(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function N(t,e,r,n){for(var a=0;a=e.length||a>=t.length);++a)e[a+r]=t[a];return a}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":75,buffer:106,ieee754:413}],107:[function(t,e,r){"use strict";var n=t("./lib/monotone"),a=t("./lib/triangulation"),i=t("./lib/delaunay"),o=t("./lib/filter");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,"delaunay",!0),h=!!c(r,"interior",!0),f=!!c(r,"exterior",!0),p=!!c(r,"infinity",!1);if(!h&&!f||0===t.length)return[];var d=n(t,e);if(u||h!==f||p){for(var g=a(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v0;){for(var u=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],d=1;d=0||(e.flip(s,u),a(t,e,r,h,s,f),a(t,e,r,s,f,h),a(t,e,r,f,u,h),a(t,e,r,u,h,f)))}}},{"binary-search-bounds":112,"robust-in-sphere":509}],109:[function(t,e,r){"use strict";var n,a=t("binary-search-bounds");function i(t,e,r,n,a,i,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=a,this.next=i,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,a=0;a0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-a){c[p]=a;u[p];for(var d=0;d<3;++d){var g=f[3*p+d];g>=0&&0===c[g]&&(h[3*p+d]?l.push(g):(s.push(g),c[g]=a))}}}var v=l;l=s,s=v,l.length=0,a=-a}var m=function(t,e,r){for(var n=0,a=0;a1&&a(r[f[p-2]],r[f[p-1]],i)>0;)t.push([f[p-1],f[p-2],o]),p-=1;f.length=p,f.push(o);var d=u.upperIds;for(p=d.length;p>1&&a(r[d[p-2]],r[d[p-1]],i)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]m[0]&&a.push(new c(m,v,s,h),new c(v,m,o,h))}a.sort(u);for(var y=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],h=0,_=a.length;h<_;++h){var w=a[h],k=w.type;k===i?f(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{"binary-search-bounds":112,"robust-orientation":511}],111:[function(t,e,r){"use strict";var n=t("binary-search-bounds");function a(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n=0}}(),i.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},i.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},i.opposite=function(t,e){for(var r=this.stars[e],n=1,a=r.length;n>>1,x=a[m]"];return a?e.indexOf("c")<0?i.push(";if(x===y){return m}else if(x<=y){"):i.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):i.push(";if(",e,"){i=m;"),r?i.push("l=m+1}else{h=m-1}"):i.push("h=m-1}else{l=m+1}"),i.push("}"),a?i.push("return -1};"):i.push("return i};"),i.join("")}function a(t,e,r,a){return new Function([n("A","x"+t+"y",e,["y"],a),n("P","c(x,y)"+t+"0",e,["y","c"],a),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],113:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1,r=1;rr?r:t:te?e:t}},{}],117:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n;if(r){n=e;for(var a=new Array(e.length),i=0;ie[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--i){var x=e[u=(S=n[i])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var T=b;b=_,_=T}x[0]=b;var A,M=x[1]=S[1];for(a&&(A=x[2]);i>0&&n[i-1][0]===u;){var S,E=(S=n[--i])[1];a?e.push([M,E,A]):e.push([M,E]),M=E}a?e.push([M,_,A]):e.push([M,_])}return f}(t,e,f,v,r));return m(e,y,r),!!y||(f.length>0||v.length>0)}},{"./lib/rat-seg-intersect":118,"big-rat":79,"big-rat/cmp":77,"big-rat/to-float":91,"box-intersect":97,nextafter:452,"rat-vec":487,"robust-segment-intersect":514,"union-find":547}],118:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=s(e,t),h=s(n,r),f=u(i,h);if(0===o(f))return null;var p=s(t,r),d=u(h,p),g=a(d,f),v=c(i,g);return l(t,v)};var n=t("big-rat/mul"),a=t("big-rat/div"),i=t("big-rat/sub"),o=t("big-rat/sign"),s=t("rat-vec/sub"),l=t("rat-vec/add"),c=t("rat-vec/muls");function u(t,e){return i(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":78,"big-rat/mul":88,"big-rat/sign":89,"big-rat/sub":90,"rat-vec/add":486,"rat-vec/muls":488,"rat-vec/sub":489}],119:[function(t,e,r){"use strict";var n=t("clamp");function a(t,e){null==e&&(e=!0);var r=t[0],a=t[1],i=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,a*=255,i*=255,o*=255),16777216*(r=255&n(r,0,255))+((a=255&n(a,0,255))<<16)+((i=255&n(i,0,255))<<8)+(o=255&n(o,0,255))}e.exports=a,e.exports.to=a,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,a=(65280&t)>>>8,i=255&t;return!1===e?[r,n,a,i]:[r/255,n/255,a/255,i/255]}},{clamp:116}],120:[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]}},{}],121:[function(t,e,r){"use strict";var n=t("color-rgba"),a=t("clamp"),i=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(i(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]=a(Math.floor(255*t[0]),0,255),r[1]=a(Math.floor(255*t[1]),0,255),r[2]=a(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:a(Math.floor(255*t[3]),0,255)),r)}},{clamp:116,"color-rgba":123,dtype:170}],122:[function(t,e,r){(function(r){"use strict";var n=t("color-name"),a=t("is-plain-obj"),i=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),h=u.length,f=h<=4;c=1,f?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var p=e[1],d="rgb"===p,u=p.replace(/a$/,"");s=u;var h="cmyk"===u?4:"gray"===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:"rgb"===u?255*parseFloat(t)/100:parseFloat(t);if("h"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&&l.push(1),c=d?1:void 0===l[h]?1:l[h],l=l.slice(0,h)}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(a(t)){var g=i(t.r,t.red,t.R,null);null!==g?(s="rgb",l=[g,i(t.g,t.green,t.G),i(t.b,t.blue,t.B)]):(s="hsl",l=[i(t.h,t.hue,t.H),i(t.s,t.saturation,t.S),i(t.l,t.lightness,t.L,t.b,t.brightness)]),c=i(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":120,defined:165,"is-plain-obj":423}],123:[function(t,e,r){"use strict";var n=t("color-parse"),a=t("color-space/hsl"),i=t("clamp");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=i(r.values[0],0,255),e[1]=i(r.values[1],0,255),e[2]=i(r.values[2],0,255),"h"===r.space[0]&&(e=a.rgb(e)),e.push(i(r.alpha,0,1)),e):[]}},{clamp:116,"color-parse":122,"color-space/hsl":124}],124:[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,a,i,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[i=255*l,i,i];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,i=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,a[c]=255*i;return a}},n.hsl=function(t){var e,r,n=t[0]/255,a=t[1]/255,i=t[2]/255,o=Math.min(n,a,i),s=Math.max(n,a,i),l=s-o;return s===o?e=0:n===s?e=(a-i)/l:a===s?e=2+(i-n)/l:i===s&&(e=4+(n-a)/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":125}],125:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],126:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],127:[function(t,e,r){"use strict";var n=t("./colorScale"),a=t("lerp");function i(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,l,c,u,h,f,p,d,g;t||(t={});p=(t.nshades||72)-1,f=t.format||"hex",(h=t.colormap)||(h="jet");if("string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>p+1)throw new Error(h+" map requires nshades to be at least size "+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),m=[];for(g=0;g0?-1:l(t,e,i)?-1:1:0===s?c>0?1:l(t,e,r)?1:-1:a(c-s)}var f=n(t,e,r);if(f>0)return o>0&&n(t,e,i)>0?1:-1;if(f<0)return o>0||n(t,e,i)>0?1:-1;var p=n(t,e,i);return p>0?1:l(t,e,r)?1:-1};var n=t("robust-orientation"),a=t("signum"),i=t("two-sum"),o=t("robust-product"),s=t("robust-sum");function l(t,e,r){var n=i(t[0],-e[0]),a=i(t[1],-e[1]),l=i(r[0],-e[0]),c=i(r[1],-e[1]),u=s(o(n,l),o(a,c));return u[u.length-1]>=0}},{"robust-orientation":511,"robust-product":512,"robust-sum":516,signum:517,"two-sum":545}],129:[function(t,e,r){e.exports=function(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],h=t[1],f=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return u+h+f+p-(d+g+v+m)||n(u,h,f,p)-n(d,g,v,m,d)||n(u+h,u+f,u+p,h+f,h+p,f+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(u+h+f,u+h+p,u+f+p,h+f+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(a),x=e.slice().sort(a),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],133:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var a=new Array(r),i=e[r-1],o=0;o=e[l]&&(s+=1);i[o]=s}}return t}(o,r)}};var n=t("incremental-convex-hull"),a=t("affine-hull")},{"affine-hull":63,"incremental-convex-hull":414}],135:[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"}},{}],136:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],137:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],138:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],139:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],140:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":142,"./stringify":143}],141:[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":136}],142:[function(t,e,r){"use strict";var n=t("unquote"),a=t("css-global-keywords"),i=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=f;var h=f.cache={};function f(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(h[t])return h[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==i.indexOf(t))return h[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=c(t,/\s+/);e=f.shift();){if(-1!==a.indexOf(e))return["style","variant","weight","stretch"].forEach(function(t){r[t]=e}),h[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]):"/"===f[0]&&(f.shift(),r.lineHeight=p(f.shift())),!f.length)throw new Error("Missing required font-family.");return r.family=c(f.join(" "),/\s*,\s*/).map(n),h[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":141,"css-font-stretch-keywords":137,"css-font-style-keywords":138,"css-font-weight-keywords":139,"css-global-keywords":144,"css-system-font-keywords":145,"string-split-by":530,unquote:549}],143:[function(t,e,r){"use strict";var n=t("pick-by-alias"),a=t("./lib/util").isSize,i=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},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},f="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!i[t])throw Error("Unknown keyword `"+t+"`");return t}function g(t){for(var e={},r=0;r=0;--p)i[p]=c*t[p]+u*e[p]+h*r[p]+f*n[p];return i}return c*t+u*e+h*r+f*n},e.exports.derivative=function(t,e,r,n,a,i){var o=6*a*a-6*a,s=3*a*a-4*a+1,l=-6*a*a+6*a,c=3*a*a-2*a;if(t.length){i||(i=new Array(t.length));for(var u=t.length-1;u>=0;--u)i[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return i}return o*t+s*e+l*r[u]+c*n}},{}],147:[function(t,e,r){"use strict";var n=t("./lib/thunk.js");function a(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new a;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,n(e)}},{"./lib/thunk.js":149}],148:[function(t,e,r){"use strict";var n=t("uniq");function a(t,e,r){var n,a,i=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,h=0;for(n=0;n0&&l.push("var "+c.join(",")),n=i-1;n>=0;--n)u=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r){for(var n=t.body,a=[],i=[],o=0;o0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l0&&m.push("var "+y.join(",")),l=0;l3&&m.push(i(t.pre,t,s));var k=i(t.body,t,s),T=function(t){for(var e=0,r=t[0].length;e0,c=[],u=0;u0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",e[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",e[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",e[u],"]=j",u].join(""));for(u=0;u3&&m.push(i(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+m.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",T,function(t){for(var e=new Array(t.length),r=!0,n=0;n0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}(s)].join("");return new Function(["function ",A,"(",v.join(","),"){",m.join("\n"),"} return ",A].join(""))()}},{uniq:548}],149:[function(t,e,r){"use strict";var n=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],a=t.funcName+"_cwise_thunk";e.push(["return function ",a,"(",t.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;ue?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,a){for(null==n&&(n=0),null==a&&(a=e.length);n>>1;t(e[i],r)<0?n=i+1:a=i}return n},right:function(e,r,n,a){for(null==n&&(n=0),null==a&&(a=e.length);n>>1;t(e[i],r)>0?a=i:n=i+1}return n}}}var n=r(e),a=n.right,i=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,a=t.length,i=0,o=-1,l=0,c=0;if(null==e)for(;++o1)return c/(i-1)}function c(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function u(t,e){var r,n,a,i=t.length,o=-1;if(null==e){for(;++o=r)for(n=a=r;++or&&(n=r),a=r)for(n=a=r;++or&&(n=r),a=0?(i>=m?10:i>=y?5:i>=x?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=m?10:i>=y?5:i>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),a=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/a;return i>=m?a*=10:i>=y?a*=5:i>=x&&(a*=2),e=1)return+r(t[n-1],n-1,t);var n,a=(n-1)*e,i=Math.floor(a),o=+r(t[i],i,t);return o+(+r(t[i+1],i+1,t)-o)*(a-i)}}function T(t,e){var r,n,a=t.length,i=-1;if(null==e){for(;++i=r)for(n=r;++ir&&(n=r)}else for(;++i=r)for(n=r;++ir&&(n=r);return n}function A(t){if(!(a=t.length))return[];for(var e=-1,r=T(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 i,o,s=n.length,l=new Array(s);for(i=0;ih;)f.pop(),--p;var d,g=new Array(p+1);for(i=0;i<=p;++i)(d=g[i]=[]).x0=i>0?f[i-1]:u,d.x1=i=r)for(n=r;++in&&(n=r)}else for(;++i=r)for(n=r;++in&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,a=n,i=-1,o=0;if(null==e)for(;++i=0;)for(e=(n=t[a]).length;--e>=0;)r[--o]=n[e];return r},t.min=T,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),i=new Array(a=Math.ceil(e-t+1));++s=l.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,h,f=-1,p=n.length,d=l[a++],g=r(),v=i();++fl.length)return r;var a,i=c[n-1];return null!=e&&n>=l.length?a=r.entries():(a=[],r.each(function(e,r){a.push({key:r,values:t(e,n)})})),null!=i?a.sort(function(t,e){return i(t.key,e.key)}):a}(u(t,0,i,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],155:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var a="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),u=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,i]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,i]+"\\)$"),p=new RegExp("^hsl\\("+[i,o,o]+"\\)$"),d=new RegExp("^hsla\\("+[i,o,o,i]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var e;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?y(e[1],e[2],e[3],e[4]):(e=f.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?m(g[t]):"transparent"===t?new _(NaN,NaN,NaN,0):null}function m(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=v(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function k(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function T(t,e,r,a){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,a=t.b/255,i=Math.min(e,r,a),o=Math.max(e,r,a),s=NaN,l=o-i,c=(o+i)/2;return l?(s=e===o?(r-a)/l+6*(r0&&c<1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==a?1:a)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function M(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),e(A,T,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new _(M(t>=240?t-240:t+120,a,n),M(t,a,n),M(t<120?t+240:t-120,a,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,E=180/Math.PI,C=.96422,L=1,P=.82521,O=4/29,I=6/29,z=3*I*I,D=I*I*I;function R(t){if(t instanceof B)return new B(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new B(t.l,0,0,t.opacity);var e=t.h*S;return new B(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,a=U(t.r),i=U(t.g),o=U(t.b),s=N((.2225045*a+.7168786*i+.0606169*o)/L);return a===i&&i===o?r=n=s:(r=N((.4360747*a+.3850649*i+.1430804*o)/C),n=N((.0139322*a+.0971045*i+.7141733*o)/P)),new B(116*s-16,500*(r-s),200*(s-n),t.opacity)}function F(t,e,r,n){return 1===arguments.length?R(t):new B(t,e,r,null==n?1:n)}function B(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t>D?Math.pow(t,1/3):t/z+O}function j(t){return t>I?t*t*t:z*(t-O)}function V(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof B||(t=R(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E;return new G(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(B,F,r(n,{brighter:function(t){return new B(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new B(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(V(3.1338561*(e=C*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=P*j(r))),V(-.9787684*e+1.9161415*t+.033454*r),V(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var Y=-.14861,W=1.78277,X=-.29227,Z=-.90649,J=1.97294,K=J*Z,Q=J*W,$=W*X-Z*Y;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,a=($*n+K*e-Q*r)/($+K-Q),i=n-a,o=(J*(r-a)-X*i)/Z,s=Math.sqrt(o*o+i*i)/(J*a*(1-a)),l=s?Math.atan2(o,i)*E-120:NaN;return new et(l<0?l+360:l,s,a,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),a=Math.sin(t);return new _(255*(e+r*(Y*n+W*a)),255*(e+r*(X*n+Z*a)),255*(e+r*(J*n)),this.opacity)}})),t.color=v,t.rgb=b,t.hsl=T,t.lab=F,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new B(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],156:[function(t,e,r){var n;n=this,function(t){"use strict";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,a={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var r,n,a=new Array(r),i=0;if+c||np+c||iu.index){var h=f-s.x-s.vx,v=p-s.y-s.vy,m=h*h+v*v;mt.r&&(t.r=t[e].r)}function f(){if(r){var e,a,i=r.length;for(n=new Array(i),e=0;e=c)){(t.data!==r||t.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var a,i,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(t,r),e):f.on(t)}}},t.forceX=function(t){var e,r,n,a=i(.1);function o(t){for(var a,i=0,o=e.length;i=0;)e+=r[n].value;else e=1;t.value=e}function i(t,e){var r,n,a,i,s,u=new c(t),h=+t.value&&(u.value=t.value),f=[u];for(null==e&&(e=o);r=f.pop();)if(h&&(r.value=+r.data.value),(a=e(r.data))&&(s=a.length))for(r.children=new Array(s),i=s-1;i>=0;--i)f.push(n=r.children[i]=new c(a[i])),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=i.prototype={constructor:c,count:function(){return this.eachAfter(a)},each:function(t){var e,r,n,a,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(t(i),r=i.children)for(n=0,a=r.length;n=0;--r)a.push(e[r]);return this},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,a=n&&n.length;--a>=0;)r+=n[a].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(),a=null;for(t=r.pop(),e=n.pop();t===e;)a=t,t=r.pop(),e=n.pop();return a}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var a=n.length;t!==r;)n.splice(a,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 i(this).eachBefore(s)}};var u=Array.prototype.slice;function h(t){for(var e,r,n=0,a=(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,i=[];n0&&r*r>n*n+a*a}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-a)/(2*c),i=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-i*l,r.y=t.y-n*l+i*s):(n=(c+a-o)/(2*c),i=Math.sqrt(Math.max(0,a/c-n*n)),r.x=e.x+n*s-i*l,r.y=e.y+n*l+i*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,a=e.y-t.y;return r>0&&r*r>n*n+a*a}function _(t){var e=t._,r=t.next._,n=e.r+r.r,a=(e.x*r.r+r.x*e.r)/n,i=(e.y*r.r+r.y*e.r)/n;return a*a+i*i}function w(t){this._=t,this.next=null,this.previous=null}function k(t){if(!(a=t.length))return 0;var e,r,n,a,i,o,s,l,c,u,f;if((e=t[0]).x=0,e.y=0,!(a>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(a>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;sf&&(f=s),v=u*u*g,(p=Math.max(f/v,v/h))>d){u-=s;break}d=p}m.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,a,i){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,h=-1,f=o.length,p=t.value;++h1?e:1)},r}(G);t.cluster=function(){var t=e,a=1,i=1,o=!1;function s(e){var s,l=0;e.eachAfter(function(e){var a=e.children;a?(e.x=function(t){return t.reduce(r,0)/t.length}(a),e.y=function(t){return 1+t.reduce(n,0)}(a)):(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),h=c.x-t(c,u)/2,f=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*a,t.y=(e.y-t.y)*i}:function(t){t.x=(t.x-h)/(f-h)*a,t.y=(1-(e.y?t.y/e.y:1))*i})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,a=+t[0],i=+t[1],s):o?null:[a,i]},s.nodeSize=function(t){return arguments.length?(o=!0,a=+t[0],i=+t[1],s):o?[a,i]:null},s},t.hierarchy=i,t.pack=function(){var t=null,e=1,r=1,n=A;function a(a){return a.x=e/2,a.y=r/2,t?a.eachBefore(E(t)).eachAfter(C(n,.5)).eachBefore(L(1)):a.eachBefore(E(S)).eachAfter(C(A,1)).eachAfter(C(n,a.r/Math.min(e,r))).eachBefore(L(Math.min(e,r)/(2*a.r))),a}return a.radius=function(e){return arguments.length?(t=null==(r=e)?null:T(r),a):t;var r},a.size=function(t){return arguments.length?(e=+t[0],r=+t[1],a):[e,r]},a.padding=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),a):n},a},t.packSiblings=function(t){return k(t),t},t.packEnclose=h,t.partition=function(){var t=1,e=1,r=0,n=!1;function a(a){var i=a.height+1;return a.x0=a.y0=r,a.x1=t,a.y1=e/i,a.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 a=n.x0,i=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return i}return r.id=function(e){return arguments.length?(t=T(e),r):t},r.parentId=function(t){return arguments.length?(e=T(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function a(a){var l=function(t){for(var e,r,n,a,i,o=new q(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(i=n.length),a=i-1;a>=0;--a)s.push(r=e.children[a]=new q(n[a],a)),r.parent=e;return(o.parent=new q(null,0)).children=[o],o}(a);if(l.eachAfter(i),l.parent.m=-l.z,l.eachBefore(o),n)a.eachBefore(s);else{var c=a,u=a,h=a;a.eachBefore(function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)});var f=c===u?1:t(c,u)/2,p=f-c.x,d=e/(u.x+f+p),g=r/(h.depth||1);a.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*g})}return a}function i(e){var r=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,a=t.children,i=a.length;--i>=0;)(e=a[i]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var i=(r[0].z+r[r.length-1].z)/2;a?(e.z=a.z+t(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+t(e._,a._));e.parent.A=function(e,r,n){if(r){for(var a,i=e,o=e,s=r,l=i.parent.children[0],c=i.m,u=o.m,h=s.m,f=l.m;s=j(s),i=N(i),s&&i;)l=N(l),(o=j(o)).a=e,(a=s.z+h-i.z-c+t(s._,i._))>0&&(V(U(s,e,n),e,a),c+=a,u+=a),h+=s.m,c+=i.m,f+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=h-u),i&&!N(l)&&(l.t=i,l.m+=c-f,n=e)}return n}(e,a,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 a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],a):n?null:[e,r]},a.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],a):n?[e,r]:null},a},t.treemap=function(){var t=W,e=!1,r=1,n=1,a=[0],i=A,o=A,s=A,l=A,c=A;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(h),a=[0],e&&t.eachBefore(P),t}function h(e){var r=a[e.depth],n=e.x0+r,u=e.y0+r,h=e.x1-r,f=e.y1-r;h=r-1){var u=s[e];return u.x0=a,u.y0=i,u.x1=o,void(u.y1=l)}for(var h=c[e],f=n/2+h,p=e+1,d=r-1;p>>1;c[g]l-i){var y=(a*m+o*v)/n;t(e,p,v,a,i,y,l),t(p,r,m,y,i,o,l)}else{var x=(i*m+l*v)/n;t(e,p,v,a,i,o,x),t(p,r,m,a,x,o,l)}}(0,l,t.value,e,r,n,a)},t.treemapDice=O,t.treemapSlice=H,t.treemapSliceDice=function(t,e,r,n,a){(1&t.depth?H:O)(t,e,r,n,a)},t.treemapSquarify=W,t.treemapResquarify=X,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],159:[function(t,e,r){var n,a;n=this,a=function(t,e){"use strict";function r(t,e,r,n,a){var i=t*t,o=i*t;return((1-3*t+3*i-o)*e+(4-6*i+3*o)*r+(1+3*t+3*i-3*o)*n+o*a)/6}function n(t){var e=t.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[a],o=t[a+1],s=a>0?t[a-1]:2*i-o,l=a180||r<-180?r-360*Math.round(r/360):r):i(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):i(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):i(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function a(t,r){var a=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),i=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=a(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return a.gamma=t,a}(1);function h(t){return function(r){var n,a,i=r.length,o=new Array(i),s=new Array(i),l=new Array(i);for(n=0;ni&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:v(r,n)})),i=x.lastIndex;return i180?e+=360:e-t>180&&(t+=360),i.push({i:r.push(a(r)+"rotate(",null,n)-2,x:v(t,e)})):e&&r.push(a(r)+"rotate("+e+n)}(i.rotate,o.rotate,s,l),function(t,e,r,i){t!==e?i.push({i:r.push(a(r)+"skewX(",null,n)-2,x:v(t,e)}):e&&r.push(a(r)+"skewX("+e+n)}(i.skewX,o.skewX,s,l),function(t,e,r,n,i,o){if(t!==r||e!==n){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:v(t,r)},{i:s-2,x:v(e,n)})}else 1===r&&1===n||i.push(a(i)+"scale("+r+","+n+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(t){for(var e,r=-1,n=l.length;++r1e-6)if(Math.abs(h*l-c*u)>1e-6&&i){var p=n-o,d=a-s,g=l*l+c*c,v=p*p+d*d,m=Math.sqrt(g),y=Math.sqrt(f),x=i*Math.tan((e-Math.acos((g+f-v)/(2*m*y)))/2),b=x/y,_=x/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(r+b*h)),this._+="A"+i+","+i+",0,0,"+ +(h*p>u*d)+","+(this._x1=t+_*l)+","+(this._y1=r+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=r);else;},arc:function(t,a,i,o,s,l){t=+t,a=+a;var c=(i=+i)*Math.cos(o),u=i*Math.sin(o),h=t+c,f=a+u,p=1^l,d=l?o-s:s-o;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+h+","+f:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+h+","+f),i&&(d<0&&(d=d%r+r),d>n?this._+="A"+i+","+i+",0,1,"+p+","+(t-c)+","+(a-u)+"A"+i+","+i+",0,1,"+p+","+(this._x1=h)+","+(this._y1=f):d>1e-6&&(this._+="A"+i+","+i+",0,"+ +(d>=e)+","+p+","+(this._x1=t+i*Math.cos(s))+","+(this._y1=a+i*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=i,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],161:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var a,i,o,s,l,c,u,h,f,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(g+m)/2))?g=i:m=i,(u=r>=(o=(v+y)/2))?v=o:y=o,a=p,!(p=p[h=u<<1|c]))return a[h]=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,a?a[h]=d:t._root=d,t;do{a=a?a[h]=new Array(4):t._root=new Array(4),(c=e>=(i=(g+m)/2))?g=i:m=i,(u=r>=(o=(v+y)/2))?v=o:y=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=i));return a[f]=p,a[h]=d,t}var r=function(t,e,r,n,a){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=a};function n(t){return t[0]}function a(t){return t[1]}function i(t,e,r){var i=new o(null==e?n:e,null==r?a:r,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function o(t,e,r,n,a,i){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=a,this._y1=i,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=i.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 a=0;a<4;++a)(e=n.source[a])&&(e.length?t.push({source:e,target:n.target[a]=new Array(4)}):n.target[a]=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,a,i,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=a),if&&(f=i));for(ht||t>a||n>e||e>i))return this;var o,s,l=a-r,c=this._root;switch(s=(e<(n+i)/2)<<1|t<(r+a)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(i=n+(l*=2),t>(a=r+l)||e>i);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(i=n+(l*=2),(r=a-l)>t||e>i);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=i-(l*=2),t>(a=r+l)||n>e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=i-(l*=2),(r=a-l)>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=a,this._y1=i,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var a,i,o,s,l,c,u,h=this._x0,f=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,h,f,p,d)),null==n?n=1/0:(h=t-n,f=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(v=c.node)||(i=c.x0)>p||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=m)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_=(s=(d+v)/2))?d=s:v=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(r=e,f=h)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(a=p.next)&&delete p.next,n?(a?n.next=a:delete n.next,this):e?(a?e[h]=a:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[f]=p:this._root=p),this):(this._root=a,this)},l.removeAll=function(t){for(var e=0,r=t.length;e=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function v(t){return t.outerRadius}function m(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,a,i,s){var l=t-r,u=e-n,h=(s?i:-i)/c(l*l+u*u),f=h*u,p=-h*l,d=t+f,g=e+p,v=r+f,m=n+p,y=(d+v)/2,x=(g+m)/2,b=v-d,_=m-g,w=b*b+_*_,k=a-i,T=d*m-v*g,A=(_<0?-1:1)*c(o(0,k*k*w-T*T)),M=(T*_-b*A)/w,S=(-T*b-_*A)/w,E=(T*_+b*A)/w,C=(-T*b+_*A)/w,L=M-y,P=S-x,O=E-y,I=C-x;return L*L+P*P>O*O+I*I&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-p,x11:M*(a/k-1),y11:S*(a/k-1)}}function _(t){this._context=t}function w(t){return new _(t)}function k(t){return t[0]}function T(t){return t[1]}function A(){var t=k,n=T,a=r(!0),i=null,o=w,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==i&&(s=o(u=e.path())),l=0;l<=h;++l)!(l=h;--f)c.point(m[f],y[f]);c.lineEnd(),c.areaEnd()}v&&(m[u]=+t(p,u,r),y[u]=+a(p,u,r),c.point(n?+n(p,u,r):m[u],i?+i(p,u,r):y[u]))}if(d)return c=null,d+""||null}function h(){return A().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?(a="function"==typeof t?t:r(+t),i=null,u):a},u.y0=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),u):a},u.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:r(+t),u):i},u.lineX0=u.lineY0=function(){return h().x(t).y(a)},u.lineY1=function(){return h().x(t).y(i)},u.lineX1=function(){return h().x(n).y(a)},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 S(t,e){return et?1:e>=t?0:NaN}function E(t){return t}_.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=P(w);function L(t){this._curve=t}function P(t){function e(e){return new L(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(P(t)):e()._curve},t}function I(){return O(A().curve(C))}function z(){var t=M().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,a=t.lineY0,i=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(a())},delete t.lineY0,t.lineOuterRadius=function(){return O(i())},delete t.lineY1,t.curve=function(t){return arguments.length?e(P(t)):e()._curve},t}function D(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}L.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 R=Array.prototype.slice;function F(t){return t.source}function B(t){return t.target}function N(t){var n=F,a=B,i=k,o=T,s=null;function l(){var r,l=R.call(arguments),c=n.apply(this,l),u=a.apply(this,l);if(s||(s=r=e.path()),t(s,+i.apply(this,(l[0]=c,l)),+o.apply(this,l),+i.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?(a=t,l):a},l.x=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),l):i},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 j(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,a,n,a)}function V(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+a)/2,n,r,n,a)}function U(t,e,r,n,a){var i=D(e,r),o=D(e,r=(r+a)/2),s=D(n,r),l=D(n,a);t.moveTo(i[0],i[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/h);t.moveTo(r,0),t.arc(0,0,r,0,p)}},H={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()}},G=Math.sqrt(1/3),Y=2*G,W={draw:function(t,e){var r=Math.sqrt(e/Y),n=r*G;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},X=Math.sin(h/10)/Math.sin(7*h/10),Z=Math.sin(p/10)*X,J=-Math.cos(p/10)*X,K={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=Z*r,a=J*r;t.moveTo(0,-r),t.lineTo(n,a);for(var i=1;i<5;++i){var o=p*i/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*a,l*n+s*a)}t.closePath()}},Q={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},$=Math.sqrt(3),tt={draw:function(t,e){var r=-Math.sqrt(e/(3*$));t.moveTo(0,2*r),t.lineTo(-$*r,-r),t.lineTo($*r,-r),t.closePath()}},et=-.5,rt=Math.sqrt(3)/2,nt=1/Math.sqrt(12),at=3*(nt/2+1),it={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,a=r*nt,i=n,o=r*nt+r,s=-i,l=o;t.moveTo(n,a),t.lineTo(i,o),t.lineTo(s,l),t.lineTo(et*n-rt*a,rt*n+et*a),t.lineTo(et*i-rt*o,rt*i+et*o),t.lineTo(et*s-rt*l,rt*s+et*l),t.lineTo(et*n+rt*a,et*a-rt*n),t.lineTo(et*i+rt*o,et*o-rt*i),t.lineTo(et*s+rt*l,et*l-rt*s),t.closePath()}},ot=[q,H,W,Q,K,tt,it];function st(){}function lt(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 ct(t){this._context=t}function ut(t){this._context=t}function ht(t){this._context=t}function ft(t,e){this._basis=new ct(t),this._beta=e}ct.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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ut.prototype={areaStart:st,areaEnd:st,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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.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,a=t[0],i=e[0],o=t[r]-a,s=e[r]-i,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(a+n*o),this._beta*e[l]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var pt=function t(e){function r(t){return 1===e?new ct(t):new ft(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function dt(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 gt(t,e){this._context=t,this._k=(1-e)/6}gt.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:dt(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:dt(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 gt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:st,areaEnd:st,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:dt(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 yt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function xt(t,e){this._context=t,this._k=(1-e)/6}xt.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:dt(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 bt=function t(e){function r(t){return new xt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _t(t,e,r){var n=t._x1,a=t._y1,i=t._x2,o=t._y2;if(t._l01_a>u){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,a=(a*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>u){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,a,i,o,t._x2,t._y2)}function wt(t,e){this._context=t,this._alpha=e}wt.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:_t(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 wt(t,e):new gt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:st,areaEnd:st,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:_t(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 At=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 Mt(t,e){this._context=t,this._alpha=e}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._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:_t(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 St=function t(e){function r(t){return e?new Mt(t,e):new xt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Et(t){this._context=t}function Ct(t){return t<0?-1:1}function Lt(t,e,r){var n=t._x1-t._x0,a=e-t._x1,i=(t._y1-t._y0)/(n||a<0&&-0),o=(r-t._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Ct(i)+Ct(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Pt(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,a=t._y0,i=t._x1,o=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,a+s*e,i-s,o-s*r,i,o)}function It(t){this._context=t}function zt(t){this._context=new Dt(t)}function Dt(t){this._context=t}function Rt(t){this._context=t}function Ft(t){var e,r,n=t.length-1,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)a[e]=(o[e]-a[e+1])/i[e];for(i[n-1]=(t[n]+a[n-1])/2,e=0;e1)for(var r,n,a,i=1,o=t[e[0]],s=o.length;i=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ut(t){var e=t.map(qt);return jt(t).sort(function(t,r){return e[t]-e[r]})}function qt(t){for(var e,r=-1,n=0,a=t.length,i=-1/0;++ri&&(i=e,n=r);return n}function Ht(t){var e=t.map(Gt);return jt(t).sort(function(t,r){return e[t]-e[r]})}function Gt(t){for(var e,r=0,n=-1,a=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=v,_=r(0),w=null,k=m,T=y,A=x,M=null;function S(){var r,g,v,m=+t.apply(this,arguments),y=+o.apply(this,arguments),x=k.apply(this,arguments)-f,S=T.apply(this,arguments)-f,E=n(S-x),C=S>x;if(M||(M=r=e.path()),yu)if(E>p-u)M.moveTo(y*i(x),y*l(x)),M.arc(0,0,y,x,S,!C),m>u&&(M.moveTo(m*i(S),m*l(S)),M.arc(0,0,m,S,x,C));else{var L,P,O=x,I=S,z=x,D=S,R=E,F=E,B=A.apply(this,arguments)/2,N=B>u&&(w?+w.apply(this,arguments):c(m*m+y*y)),j=s(n(y-m)/2,+_.apply(this,arguments)),V=j,U=j;if(N>u){var q=d(N/m*l(B)),H=d(N/y*l(B));(R-=2*q)>u?(z+=q*=C?1:-1,D-=q):(R=0,z=D=(x+S)/2),(F-=2*H)>u?(O+=H*=C?1:-1,I-=H):(F=0,O=I=(x+S)/2)}var G=y*i(O),Y=y*l(O),W=m*i(D),X=m*l(D);if(j>u){var Z,J=y*i(I),K=y*l(I),Q=m*i(z),$=m*l(z);if(E1?0:v<-1?h:Math.acos(v))/2),it=c(Z[0]*Z[0]+Z[1]*Z[1]);V=s(j,(m-it)/(at-1)),U=s(j,(y-it)/(at+1))}}F>u?U>u?(L=b(Q,$,G,Y,y,U,C),P=b(J,K,W,X,y,U,C),M.moveTo(L.cx+L.x01,L.cy+L.y01),Uu&&R>u?V>u?(L=b(W,X,J,K,m,-V,C),P=b(G,Y,Q,$,m,-V,C),M.lineTo(L.cx+L.x01,L.cy+L.y01),V0&&(d+=h);for(null!=e?g.sort(function(t,r){return e(v[t],v[r])}):null!=n&&g.sort(function(t,e){return n(r[t],r[e])}),s=0,c=d?(y-f*b)/d:0;s0?h*c:0)+b,v[l]={data:r[l],index:s,value:h,startAngle:m,endAngle:u,padAngle:x};return v}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?(a="function"==typeof t?t:r(+t),s):a},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),s):o},s},t.areaRadial=z,t.radialArea=z,t.lineRadial=I,t.radialLine=I,t.pointRadial=D,t.linkHorizontal=function(){return N(j)},t.linkVertical=function(){return N(V)},t.linkRadial=function(){var t=N(U);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){var t=r(q),n=r(64),a=null;function i(){var r;if(a||(a=r=e.path()),t.apply(this,arguments).draw(a,+n.apply(this,arguments)),r)return a=null,r+""||null}return i.type=function(e){return arguments.length?(t="function"==typeof e?e:r(e),i):t},i.size=function(t){return arguments.length?(n="function"==typeof t?t:r(+t),i):n},i.context=function(t){return arguments.length?(a=null==t?null:t,i):a},i},t.symbols=ot,t.symbolCircle=q,t.symbolCross=H,t.symbolDiamond=W,t.symbolSquare=Q,t.symbolStar=K,t.symbolTriangle=tt,t.symbolWye=it,t.curveBasisClosed=function(t){return new ut(t)},t.curveBasisOpen=function(t){return new ht(t)},t.curveBasis=function(t){return new ct(t)},t.curveBundle=pt,t.curveCardinalClosed=yt,t.curveCardinalOpen=bt,t.curveCardinal=vt,t.curveCatmullRomClosed=At,t.curveCatmullRomOpen=St,t.curveCatmullRom=kt,t.curveLinearClosed=function(t){return new Et(t)},t.curveLinear=w,t.curveMonotoneX=function(t){return new It(t)},t.curveMonotoneY=function(t){return new zt(t)},t.curveNatural=function(t){return new Rt(t)},t.curveStep=function(t){return new Bt(t,.5)},t.curveStepAfter=function(t){return new Bt(t,1)},t.curveStepBefore=function(t){return new Bt(t,0)},t.stack=function(){var t=r([]),e=jt,n=Nt,a=Vt;function i(r){var i,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(i=0;i0){for(var r,n,a,i=0,o=t[0].length;i1)for(var r,n,a,i,o,s,l=0,c=t[e[0]].length;l=0?(n[0]=i,n[1]=i+=a):a<0?(n[1]=o,n[0]=o+=a):n[0]=i},t.stackOffsetNone=Nt,t.stackOffsetSilhouette=function(t,e){if((r=t.length)>0){for(var r,n=0,a=t[e[0]],i=a.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,a,i=0,o=1;o=0&&r._call.call(null,t),r=r._next;--n}function m(){l=(s=u.now())+c,n=a=0;try{v()}finally{n=0,function(){var t,n,a=e,i=1/0;for(;a;)a._call?(i>a._time&&(i=a._time),t=a,a=a._next):(n=a._next,a._next=null,a=t?t._next=n:e=n);r=t,x(i)}(),l=0}}function y(){var t=u.now(),e=t-s;e>o&&(c-=e,s=t)}function x(t){n||(a&&(a=clearTimeout(a)),t-l>24?(t<1/0&&(a=setTimeout(m,t-u.now()-c)),i&&(i=clearInterval(i))):(i||(s=u.now(),i=setInterval(y,o)),n=1,h(m)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,a){if("function"!=typeof t)throw new TypeError("callback is not a function");a=(null==a?f():+a)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=a,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=f,t.timer=g,t.timerFlush=v,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,a=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart(function i(o){o+=a,n.restart(i,a+=e,r),t(o)},e,r),n)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],164:[function(t,e,r){!function(){var t={version:"3.5.17"},r=[].slice,n=function(t){return r.call(t)},a=this.document;function i(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(a)try{n(a.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+"")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+"")},u.setProperty=function(t,e,r){h.call(this,t,e+"",r)}}function f(t,e){return te?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[i],r)<0?n=i+1:a=i}return n},right:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[i],r)>0?a=i:n=i+1}return n}}}t.ascending=f,t.descending=function(t,e){return et?1:e>=t?0:NaN},t.min=function(t,e){var r,n,a=-1,i=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},t.max=function(t,e){var r,n,a=-1,i=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},t.extent=function(t,e){var r,n,a,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(f);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return f(t(e),r)}:t)},t.shuffle=function(t,e,r){(i=arguments.length)<3&&(r=t.length,i<2&&(e=0));for(var n,a,i=r-e;i;)a=Math.random()*i--|0,n=t[i+e],t[i+e]=t[a+e],t[a+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],a=new Array(r<0?0:r);e=0;)for(e=(n=t[a]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,a=[],i=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=i,e*=i,(r*=i)<0)for(;(n=t+r*++o)>e;)a.push(n/i);else for(;(n=t+r*++o)=a.length)return r?r.call(n,i):e?i.sort(e):i;for(var l,c,u,h,f=-1,p=i.length,d=a[s++],g=new b;++f=a.length)return e;var n=[],o=i[r++];return e.forEach(function(e,a){n.push({key:e,values:t(a,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return a.push(t),n},n.sortKeys=function(t){return i[a.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return U(t,W),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var r=t.matches||t[I(t,"matchesSelector")];return(Y=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,Y=Sizzle.matchesSelector),t.selection=function(){return t.select(a.documentElement)};var W=t.selection.prototype=[];function X(t){return"function"==typeof t?t:function(){return H(t,this)}}function Z(t){return"function"==typeof t?t:function(){return G(t,this)}}W.select=function(t){var e,r,n,a,i=[];t=X(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),K.hasOwnProperty(r)?{space:K[r],local:t}:t}},W.attr=function(e,r){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(Q(r,e[r]));return this}return this.each(Q(e,r))},W.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=et(t)).length,a=-1;if(e=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},W.sort=function(t){t=function(t){arguments.length||(t=f);return function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[i];t&&(this.removeEventListener(e,t,t.$),delete this[i])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[i]=t,t.$=a),t._=r}:c:r?D:function(){var r,n=new RegExp("^__on([^.]+)"+t.requote(e)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}t.selection.enter=ht,t.selection.enter.prototype=ft,ft.append=W.append,ft.empty=W.empty,ft.node=W.node,ft.call=W.call,ft.size=W.size,ft.select=function(t){for(var e,r,n,a,i,o=[],s=-1,l=this.length;++s=n&&(n=e+1);!(o=s[n])&&++n0?1:t<0?-1:0}function Ot(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function It(t){return t>1?0:t<-1?At:Math.acos(t)}function zt(t){return t>1?Et:t<-1?-Et:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Ft=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,a=t[0],i=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-a,h=l-i,f=u*u+h*h;if(f0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map(function(t){return(t-f.x)/f.k}).map(l.invert)),h&&h.domain(u.range().map(function(t){return(t-f.y)/f.k}).map(u.invert))}function E(t){v++||t({type:"zoomstart"})}function C(t){S(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(t){--v||(t({type:"zoomend"}),r=null)}function P(){var e=this,r=_.of(e,arguments),n=0,a=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),i),C(r)}).on(x,function(){a.on(y,null).on(x,null),s(n),L(r)}),i=k(t.mouse(e)),s=xt(e);hs.call(e),E(r)}function O(){var e,r=this,n=_.of(r,arguments),a={},i=0,o=".zoom-"+t.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=f.k,n.forEach(function(t){t.identifier in a&&(a[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,h=n.length;o1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];i=b*b+_*_}}function v(){var o,l,c,u,h=t.touches(r);hs.call(r);for(var f=0,p=h.length;f360?t-=360:t<0&&(t+=360),t<60?n+(a-n)*t/60:t<180?a:t<240?n+(a-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+e):r+e-r*e),new ie(i(t+120),i(t),i(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=fe((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Yt=Gt.prototype=new Vt;function Wt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Wt(t.h,t.c,t.l):fe((t=ie(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Yt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Yt.rgb=function(){return Wt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,Jt=.95047,Kt=1,Qt=1.08883,$t=Xt.prototype=new Vt;function te(t,e,r){var n=(t+16)/116,a=n+e/500,i=n-r/200;return new ie(ae(3.2404542*(a=re(a)*Jt)-1.5371385*(n=re(n)*Kt)-.4985314*(i=re(i)*Qt)),ae(-.969266*a+1.8760108*n+.041556*i),ae(.0556434*a-.2040259*n+1.0572252*i))}function ee(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ae(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ie(t,e,r){return this instanceof ie?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ie?new ie(t.r,t.g,t.b):ue(""+t,ie,Ht):new ie(t,e,r)}function oe(t){return new ie(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+""}$t.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},$t.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},$t.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ie;var le=ie.prototype=new Vt;function ce(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,a,i,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(de(a[0]),de(a[1]),de(a[2]))}return(i=ge.get(t))?e(i.r,i.g,i.b):(null==t||"#"!==t.charAt(0)||isNaN(i=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&i)>>4,o|=o>>4,s=240&i,s|=s>>4,l=15&i,l|=l<<4):7===t.length&&(o=(16711680&i)>>16,s=(65280&i)>>8,l=255&i)),e(o,s,l))}function he(t,e,r){var n,a,i=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-i,l=(o+i)/2;return s?(a=l<.5?s/(o+i):s/(2-o-i),n=t==o?(e-r)/s+(e0&&l<1?0:n),new Ut(n,a,l)}function fe(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/Jt),a=ne((.2126729*t+.7151522*e+.072175*r)/Kt);return Xt(116*a-16,500*(n-a),200*(a-ne((.0193339*t+.119192*e+.9503041*r)/Qt)))}function pe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,a=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=a.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+"",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return a=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),c.open(t,e,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var i in l)c.setRequestHeader(i,l[i]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",function(t){a(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,"on"),null==i?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(i))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=ve,t.xhr=me(P),t.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function a(t,r,n){arguments.length<3&&(n=r,r=null);var a=ye(t,e,null==r?i:o(r),n);return a.row=function(t){return arguments.length?a.response(null==(r=t)?i:o(t)):r},a}function i(t){return a.parse(t.responseText)}function o(t){return function(e){return a.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return a.parse=function(t,e){var r;return a.parseRows(t,function(t,n){if(r)return r(t,n-1);var a=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,r){return e(a(t),r)}:a})},a.parseRows=function(t,e){var r,a,i={},o={},s=[],l=t.length,c=0,u=0;function h(){if(c>=l)return o;if(a)return a=!1,i;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Me(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ee(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ce[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Pe=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ee(e,r))).toFixed(Math.max(0,Math.min(20,Ee(e*(1+1e-15),r))))}});function Oe(t){return t+""}var Ie=t.time={},ze=Date;function De(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Fe(t,e,r){function n(e){var r=t(e),n=i(r,1);return e-r1)for(;o68?1900:2e3),r+a[0].length):-1}function Je(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function $e(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ar(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=y(e)/60|0,a=y(e)%60;return r+Ue(n,"0",2)+Ue(a,"0",2)}function ir(t,e,r){Ve.lastIndex=0;var n=Ve.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),i.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=a[o=(o+1)%a.length];return i.reverse().join(n)}:P;return function(e){var n=Le.exec(e),a=n[1]||" ",s=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],h=+n[6],f=n[7],p=n[8],d=n[9],g=1,v="",m="",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||"0"===a&&"="===s)&&(u=a="0",s="="),d){case"n":f=!0,d="g";break;case"%":g=100,m="%",d="f";break;case"p":g=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+d.toLowerCase());case"c":x=!1;case"d":y=!0,p=0;break;case"s":g=-1,d="r"}"$"===c&&(v=i[0],m=i[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Pe.get(d)||Oe;var b=u&&f;return function(e){var n=m;if(y&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+m}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(".");if(k<0){var T=x?e.lastIndexOf("e"):-1;T<0?(_=e,w=""):(_=e.substring(0,T),w=e.substring(T))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&&f&&(_=o(_,1/0));var A=v.length+_.length+w.length+(b?0:i.length),M=A"===s?M+i+e:"^"===s?M.substring(0,A>>=1)+i+e+M.substring(A):i+(b?e:M+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,a=e.time,i=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,a,i,o=[],s=-1,l=0;++s=c)return-1;if(37===(a=e.charCodeAt(s++))){if(o=e.charAt(s++),!(i=w[o in Ne?e.charAt(s++):o])||(n=i(t,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(ze=De);return r._=t,e(r)}finally{ze=Date}}return r.parse=function(t){try{ze=De;var r=e.parse(t);return r&&r._}finally{ze=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var f=t.map(),p=qe(o),d=He(o),g=qe(s),v=He(s),m=qe(l),y=He(l),x=qe(c),b=He(c);i.forEach(function(t,e){f.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Ie.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Ie.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Ie.mondayOfYear(t),e,2)},x:u(n),X:u(a),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:ar,"%":function(){return"%"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=v.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){m.lastIndex=0;var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return h(t,_.c.toString(),e,r)},d:Qe,e:Qe,H:tr,I:tr,j:$e,L:nr,m:Ke,M:er,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:Ye,w:Ge,W:We,x:function(t,e,r){return h(t,_.x.toString(),e,r)},X:function(t,e,r){return h(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:Je,"%":ir};return u}(e)}};var sr=t.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,a=n-t,i=n-a;r.t=t-i+(e-a)}function hr(t,e){t&&pr.hasOwnProperty(t.type)&&pr[t.type](t,e)}t.geo.stream=function(t,e){t&&fr.hasOwnProperty(t.type)?fr[t.type](t,e):hr(t,e)};var fr={Feature:function(t,e){hr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,a=r.length;++n=0?1:-1,s=o*i,l=Math.cos(e),c=Math.sin(e),u=a*c,h=n*l+u*Math.cos(s),f=u*o*Math.sin(s);Er.add(Math.atan2(f,h)),r=t,n=l,a=c}Cr.point=function(o,s){Cr.point=i,r=(t=o)*Ct,n=Math.cos(s=(e=s)*Ct/2+At/4),a=Math.sin(s)},Cr.lineEnd=function(){i(t,e)}}function Pr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ir(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zr(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Fr(t){return[Math.atan2(t[1],t[0]),zt(t[2])]}function Br(t,e){return y(t[0]-e[0])kt?a=90:c<-kt&&(r=-90),h[0]=e,h[1]=n}};function p(t,i){u.push(h=[e=t,n=t]),ia&&(a=i)}function d(t,o){var s=Pr([t*Ct,o*Ct]);if(l){var c=Ir(l,s),u=Ir([c[1],-c[0],0],c);Rr(u),u=Fr(u);var h=t-i,f=h>0?1:-1,d=u[0]*Lt*f,g=y(h)>180;if(g^(f*ia&&(a=v);else if(g^(f*i<(d=(d+360)%360-180)&&da&&(a=o);g?t_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(tn&&(n=t)):t>i?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,i=t}function g(){f.point=d}function v(){h[0]=e,h[1]=n,f.point=p,l=null}function m(t,e){if(l){var r=t-i;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){m(o,s),Cr.lineEnd(),y(c)>kt&&(e=-(n=180)),h[0]=e,h[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=h=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,a]]}}(),t.geo.centroid=function(e){mr=yr=xr=br=_r=wr=kr=Tr=Ar=Mr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Mr,a=Sr,i=r*r+n*n+a*a;return i=0;--s)a.point((h=u[s])[0],h[1]);else n(p.x,p.p.x,-1,a);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);a.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,a=t[0];++n=0?1:-1,k=w*_,T=k>At,A=d*x;if(Er.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),i+=T?_+w*Mt:_,T^f>=r^m>=r){var M=Ir(Pr(h),Pr(t));Rr(M);var S=Ir(a,M);Rr(S);var E=(T^_>=0?-1:1)*zt(S[2]);(n>E||n===E&&(M[0]||M[1]))&&(o+=T^_>=0?1:-1)}if(!v++)break;f=m,d=x,g=b,h=t}}return(i<-kt||i0){for(x||(o.polygonStart(),x=!0),o.lineStart();++i1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Kr))}return u}}function Kr(t){return t.length>1}function Qr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function $r(t,e){return((t=t.x)[0]<0?t[1]-Et-kt:Et-t[1])-((e=e.x)[0]<0?e[1]-Et-kt:Et-e[1])}var tn=Jr(Yr,function(t){var e,r=NaN,n=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,o){var s=i>0?At:-At,l=y(i-r);y(l-At)0?Et:-Et),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(i,n),e=0):a!==s&&l>=At&&(y(r-a)kt?Math.atan((Math.sin(e)*(i=Math.cos(n))*Math.sin(r)-Math.sin(n)*(a=Math.cos(e))*Math.sin(t))/(a*i*o)):(e+n)/2}(r,n,i,o),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=i,n=o),a=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var a;if(null==t)a=r*Et,n.point(-At,a),n.point(0,a),n.point(At,a),n.point(At,0),n.point(At,-a),n.point(0,-a),n.point(-At,-a),n.point(-At,0),n.point(-At,a);else if(y(t[0]-e[0])>kt){var i=t[0]0)){if(i/=f,f<0){if(i0){if(i>h)return;i>u&&(u=i)}if(i=r-l,f||!(i<0)){if(i/=f,f<0){if(i>h)return;i>u&&(u=i)}else if(f>0){if(i0)){if(i/=p,p<0){if(i0){if(i>h)return;i>u&&(u=i)}if(i=n-c,p||!(i<0)){if(i/=p,p<0){if(i>h)return;i>u&&(u=i)}else if(p>0){if(i0&&(a.a={x:l+u*f,y:c+u*p}),h<1&&(a.b={x:l+h*f,y:c+h*p}),a}}}}}}var rn=1e9;function nn(e,r,n,a){return function(l){var c,u,h,f,p,d,g,v,m,y,x,b=l,_=Qr(),w=en(e,r,n,a),k={point:M,lineStart:function(){k.point=S,u&&u.push(h=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){c&&(S(f,p),d&&m&&_.rejoin(),c.push(_.buffer()));k.point=M,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],a=0;an&&Ot(c,i,t)>0&&++e:i[1]<=n&&Ot(c,i,t)<0&&--e,c=i;return 0!==e}([e,a]),n=x&&r,i=c.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),T(null,null,1,l),l.lineEnd()),i&&Wr(c,o,r,T,l),l.polygonEnd()),c=u=h=null}};function T(t,o,l,c){var u=0,h=0;if(null==t||(u=i(t,l))!==(h=i(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?a:r)}while((u=(u+l+4)%4)!==h);else c.point(o[0],o[1])}function A(t,i){return e<=t&&t<=n&&r<=i&&i<=a}function M(t,e){A(t,e)&&l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&&h.push([t,e]),y)f=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&m)l.point(t,e);else{var n={a:{x:g,y:v},b:{x:t,y:e}};w(n)?(m||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,v=e,m=r}return k};function i(t,a){return y(t[0]-e)0?0:3:y(t[0]-n)0?2:1:y(t[1]-r)0?1:0:a>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Cn(t),a=n(e,r);return a.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},a}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,a=1+r*(2*n-r),i=Math.sqrt(a)/n;function o(t,e){var r=Math.sqrt(a-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),i-r*Math.cos(t)]}return o.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/n,zt((a-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,a,i,o={stream:function(t){return a&&(a.valid=!1),(a=i(t)).valid=!0,a},extent:function(s){return arguments.length?(i=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),a&&(a.valid=!1,a=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,a,i=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var i=t[0],o=t[1];return e=null,r(i,o),e||(n(i,o),e)||a(i,o),e}return c.invert=function(t){var e=i.scale(),r=i.translate(),n=(t[0]-r[0])/e,a=(t[1]-r[1])/e;return(a>=.12&&a<.234&&n>=-.425&&n<-.214?o:a>=.166&&a<.234&&n>=-.214&&n<-.115?s:i).invert(t)},c.stream=function(t){var e=i.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,a){e.point(t,a),r.point(t,a),n.point(t,a)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),s.precision(t),c):i.precision()},c.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),s.scale(t),c.translate(i.translate())):i.scale()},c.translate=function(t){if(!arguments.length)return i.translate();var e=i.scale(),u=+t[0],h=+t[1];return r=i.translate(t).clipExtent([[u-.455*e,h-.238*e],[u+.455*e,h+.238*e]]).stream(l).point,n=o.translate([u-.307*e,h+.201*e]).clipExtent([[u-.425*e+kt,h+.12*e+kt],[u-.214*e-kt,h+.234*e-kt]]).stream(l).point,a=s.translate([u-.205*e,h+.212*e]).clipExtent([[u-.214*e+kt,h+.166*e+kt],[u-.115*e-kt,h+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,hn,fn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function a(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(i,o){pn.point=a,t=r=i,e=n=o},pn.lineEnd=function(){a(t,e)}}var gn={point:function(t,e){thn&&(hn=t);efn&&(fn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function vn(){var t=mn(4.5),e=[],r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=mn(e),r},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function n(r,n){e.push("M",r,",",n,t)}function a(t,n){e.push("M",t,",",n),r.point=i}function i(t,r){e.push("L",t,",",r)}function o(){r.point=n}function s(){e.push("Z")}return r}function mn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var a=r-t,i=n-e,o=Math.sqrt(a*a+i*i);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Tr+=o,bn(t=r,e=n)}xn.point=function(n,a){xn.point=r,bn(t=n,e=a)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function a(t,e){var a=t-r,i=e-n,o=Math.sqrt(a*a+i*i);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Tr+=o,Ar+=(o=n*t-r*e)*(r+t),Mr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(i,o){xn.point=a,bn(t=r=i,e=n=o)},xn.lineEnd=function(){a(t,e)}}function Tn(t){var e=4.5,r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Mt)}function a(e,n){t.moveTo(e,n),r.point=i}function i(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Ct),n=16;function a(e){return(n?function(e){var r,a,o,s,l,c,u,h,f,p,d,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){h=NaN,v.point=x,e.lineStart()}function x(r,a){var o=Pr([r,a]),s=t(r,a);i(h,f,u,p,d,g,h=s[0],f=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(h,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=k}function w(t,e){x(r=t,e),a=h,o=f,s=p,l=d,c=g,v.point=x}function k(){i(h,f,u,p,d,g,a,o,r,s,l,c,n,e),v.lineEnd=b,b()}return v}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function i(n,a,o,s,l,c,u,h,f,p,d,g,v,m){var x=u-n,b=h-a,_=x*x+b*b;if(_>4*e&&v--){var w=s+p,k=l+d,T=c+g,A=Math.sqrt(w*w+k*k+T*T),M=Math.asin(T/=A),S=y(y(T)-1)e||y((x*P+b*O)/_-.5)>.3||s*p+l*d+c*g0&&16,a):Math.sqrt(e)},a}function Mn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function En(t){return Cn(function(){return t})()}function Cn(e){var r,n,a,i,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+i,o-t[1]*c]}),c=150,u=480,h=250,f=0,p=0,d=0,g=0,v=0,m=tn,x=P,b=null,_=null;function w(t){return[(t=a(t[0]*Ct,t[1]*Ct))[0]*c+i,o-t[1]*c]}function k(t){return(t=a.invert((t[0]-i)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function T(){a=Gr(n=In(d,g,v),r);var t=r(f,p);return i=u-t[0]*c,o=h+t[1]*c,A()}function A(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Ln(m(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(m=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e>0,n=y(e)>kt;return Jr(a,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var p,d=[h,f],g=a(h,f),v=r?g?0:o(h,f):g?o(h+(h<0?At:-At),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=i(e,d),(Br(e,p)||Br(d,p))&&(d[0]+=kt,d[1]+=kt,g=a(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=i(d,e),t.point(p[0],p[1])):(p=i(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var m;v&s||!(m=i(d,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&Br(e,d)||t.point(d[0],d[1]),e=d,l=g,s=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}},Fn(t,6*Ct),r?[0,-t]:[-At,t-At]);function a(t,r){return Math.cos(t)*Math.cos(r)>e}function i(t,r,n){var a=[1,0,0],i=Ir(Pr(t),Pr(r)),o=Or(i,i),s=i[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,h=Ir(a,i),f=Dr(a,c);zr(f,Dr(i,u));var p=h,d=Or(f,p),g=Or(p,p),v=d*d-g*(Or(f,f)-1);if(!(v<0)){var m=Math.sqrt(v),x=Dr(p,(-d-m)/g);if(zr(x,f),x=Fr(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],T=r[1];w<_&&(b=_,_=w,w=b);var A=w-_,M=y(A-At)0^x[1]<(y(x[0]-_)At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+m)/g);return zr(S,f),[x,Fr(S)]}}}function o(e,n){var a=r?t:At-t,i=0;return e<-a?i|=1:e>a&&(i|=2),n<-a?i|=4:n>a&&(i|=8),i}}((b=+t)*Ct),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):P,A()):_},w.scale=function(t){return arguments.length?(c=+t,T()):c},w.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],T()):[u,h]},w.center=function(t){return arguments.length?(f=t[0]%360*Ct,p=t[1]%360*Ct,T()):[f*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Ct,g=t[1]%360*Ct,v=t.length>2?t[2]%360*Ct:0,T()):[d*Lt,g*Lt,v*Lt]},t.rebind(w,l,"precision"),function(){return r=e.apply(this,arguments),w.invert=r.invert&&k,T()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Ct,r*Ct)})}function Pn(t,e){return[t,e]}function On(t,e){return[t>At?t-Mt:t<-At?t+Mt:t,e]}function In(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):On}function zn(t){return function(e,r){return[(e+=t)>At?e-Mt:e<-At?e+Mt:e,r]}}function Dn(t){var e=zn(t);return e.invert=zn(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),a=Math.cos(e),i=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*a-u*i,s*r-c*n),zt(u*a+l*i)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*a-l*i;return[Math.atan2(l*a+c*i,s*r+u*n),zt(u*r-s*n)]},o}function Fn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(a,i,o,s){var l=o*e;null!=a?(a=Bn(r,a),i=Bn(r,i),(o>0?ai)&&(a+=o*Mt)):(a=t+o*Mt,i=t-.5*l);for(var c,u=a;o>0?u>i:u2?t[2]*Ct:0),e.invert=function(e){return(e=t.invert(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e},e},On.invert=Pn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function a(){var t="function"==typeof r?r.apply(this,arguments):r,n=In(-t[0]*Ct,-t[1]*Ct,0).invert,a=[];return e(null,null,1,{point:function(t,e){a.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:"Polygon",coordinates:[a]}}return a.origin=function(t){return arguments.length?(r=t,a):r},a.angle=function(r){return arguments.length?(e=Fn((t=+r)*Ct,n*Ct),a):t},a.precision=function(r){return arguments.length?(e=Fn(t*Ct,(n=+r)*Ct),a):n},a.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ct,a=t[1]*Ct,i=e[1]*Ct,o=Math.sin(n),s=Math.cos(n),l=Math.sin(a),c=Math.cos(a),u=Math.sin(i),h=Math.cos(i);return Math.atan2(Math.sqrt((r=h*o)*r+(r=c*u-l*h*s)*r),l*u+c*h*s)},t.geo.graticule=function(){var e,r,n,a,i,o,s,l,c,u,h,f,p=10,d=p,g=90,v=360,m=2.5;function x(){return{type:"MultiLineString",coordinates:b()}}function b(){return t.range(Math.ceil(a/g)*g,n,g).map(h).concat(t.range(Math.ceil(l/v)*v,s,v).map(f)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)>kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,i,d).filter(function(t){return y(t%v)>kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},x.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(f(s).slice(1),h(n).reverse().slice(1),f(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(a=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],a>n&&(t=a,a=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(m)):[[a,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],i=+t[1][1],r>e&&(t=r,r=e,e=t),o>i&&(t=o,o=i,i=t),x.precision(m)):[[r,o],[e,i]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],x):[g,v]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(m=+t,c=Nn(o,i,90),u=jn(r,e,m),h=Nn(l,s,90),f=jn(a,n,m),x):m},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,a=Un;function i(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||a.apply(this,arguments)]}}return i.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||a.apply(this,arguments))},i.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,i):n},i.target=function(t){return arguments.length?(a=t,r="function"==typeof t?null:t,i):a},i.precision=function(){return arguments.length?i:0},i},t.geo.interpolate=function(t,e){return r=t[0]*Ct,n=t[1]*Ct,a=e[0]*Ct,i=e[1]*Ct,o=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=o*Math.cos(r),h=o*Math.sin(r),f=l*Math.cos(a),p=l*Math.sin(a),d=2*Math.asin(Math.sqrt(Rt(i-n)+o*l*Rt(a-r))),g=1/Math.sin(d),(v=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*f,a=r*h+e*p,i=r*s+e*c;return[Math.atan2(a,n)*Lt,Math.atan2(i,Math.sqrt(n*n+a*a))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,v;var r,n,a,i,o,s,l,c,u,h,f,p,d,g,v},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,a){var i=Math.sin(a*=Ct),o=Math.cos(a),s=y((n*=Ct)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*i-e*o*l)*s),e*i+r*o*l),t=n,e=i,r=o}qn.point=function(a,i){t=a*Ct,e=Math.sin(i*=Ct),r=Math.cos(i),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),a=Math.cos(r),i=t(n*a);return[i*a*Math.sin(e),i*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),a=e(n),i=Math.sin(a),o=Math.cos(a);return[Math.atan2(t*i,n*o),Math.asin(n&&r*i/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return En(Gn)}).raw=Gn;var Yn=Hn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},P);function Wn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},a=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),i=r*Math.pow(n(t),a)/a;if(!a)return Jn;function o(t,e){i>0?e<-Et+kt&&(e=-Et+kt):e>Et-kt&&(e=Et-kt);var r=i/Math.pow(n(e),a);return[r*Math.sin(a*t),i-r*Math.cos(a*t)]}return o.invert=function(t,e){var r=i-e,n=Pt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(i/n,1/a))-Et]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),a=r/n+t;if(y(n)1&&Ot(t[r[n-2]],t[r[n-1]],t[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function aa(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return En($n)}).raw=$n,ta.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Et]},(t.geo.transverseMercator=function(){var t=Kn(ta),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ta,t.geom={},t.geom.hull=function(t){var e=ea,r=ra;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,a=ve(e),i=ve(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+h;nkt)s=s.L;else{if(!((a=i-wa(s,o))>kt)){n>-kt?(e=s.P,r=s):a>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=ma(t);if(ha.insert(e,l),e||r){if(e===r)return Sa(e),r=ma(e.site),ha.insert(l,r),l.edge=r.edge=La(e.site,l.site),Ma(e),void Ma(r);if(r){Sa(e),Sa(r);var c=e.site,u=c.x,h=c.y,f=t.x-u,p=t.y-h,d=r.site,g=d.x-u,v=d.y-h,m=2*(f*v-p*g),y=f*f+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+u,y:(f*x-g*y)/m+h};Pa(r.edge,c,d,b),l.edge=La(c,t,null,b),r.edge=La(t,d,null,b),Ma(e),Ma(r)}else l.edge=La(e.site,l.site)}}function _a(t,e){var r=t.site,n=r.x,a=r.y,i=a-e;if(!i)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,h=1/i-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+a-i/2)))/h+n:(n+s)/2}function wa(t,e){var r=t.N;if(r)return _a(r,e);var n=t.site;return n.y===e?n.x:1/0}function ka(t){this.site=t,this.edges=[]}function Ta(t,e){return e.angle-t.angle}function Aa(){za(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ma(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,a=t.site,i=r.site;if(n!==i){var o=a.x,s=a.y,l=n.x-o,c=n.y-s,u=i.x-o,h=2*(l*(v=i.y-s)-c*u);if(!(h>=-Tt)){var f=l*l+c*c,p=u*u+v*v,d=(v*f-c*p)/h,g=(l*p-u*f)/h,v=g+s,m=ga.pop()||new Aa;m.arc=t,m.site=a,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=pa._;x;)if(m.y=s)return;if(f>d){if(i){if(i.y>=c)return}else i={x:v,y:l};r={x:v,y:c}}else{if(i){if(i.y1)if(f>d){if(i){if(i.y>=c)return}else i={x:(l-a)/n,y:l};r={x:(c-a)/n,y:c}}else{if(i){if(i.y=s)return}else i={x:o,y:n*o+a};r={x:s,y:n*s+a}}else{if(i){if(i.xkt||y(a-r)>kt)&&(s.splice(o,0,new Oa((m=i.site,x=u,b=y(n-h)kt?{x:h,y:y(e-h)kt?{x:y(r-d)kt?{x:f,y:y(e-f)kt?{x:y(r-p)=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(a(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Ba(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Ba(s(t)).cells.forEach(function(r,n){for(var a,i,o,s,l=r.site,c=r.edges.sort(Ta),u=-1,h=c.length,f=c[h-1].edge,p=f.l===l?f.r:f.l;++ui&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Ga(r,n)})),i=Xa.lastIndex;return ig&&(g=l.x),l.y>v&&(v=l.y),c.push(l.x),u.push(l.y);else for(h=0;hg&&(g=b),_>v&&(v=_),c.push(b),u.push(_)}var w=g-p,k=v-d;function T(t,e,r,n,a,i,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,a,i,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,a,i,o,s),A(t,e,r,n,a,i,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,a,i,o,s)}function A(t,e,r,n,a,i,o,s){var l=.5*(a+o),c=.5*(i+s),u=r>=l,h=n>=c,f=h<<1|u;t.leaf=!1,u?a=l:o=l,h?i=c:s=c,T(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}}),e,r,n,a,i,o,s)}w>k?v=d+w:g=p+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}};if(M.visit=function(t){!function t(e,r,n,a,i,o){if(!e(r,n,a,i,o)){var s=.5*(n+i),l=.5*(a+o),c=r.nodes;c[0]&&t(e,c[0],n,a,s,l),c[1]&&t(e,c[1],s,a,i,l),c[2]&&t(e,c[2],n,l,s,o),c[3]&&t(e,c[3],s,l,i,o)}}(t,M,p,d,g,v)},M.find=function(t){return function(t,e,r,n,a,i,o){var s,l=1/0;return function t(c,u,h,f,p){if(!(u>i||h>o||f=_)<<1|e>=b,k=w+4;w=0&&!(n=t.interpolators[a](e,r)););return n}function Ja(t,e){var r,n=[],a=[],i=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function ii(t){return 1-Math.cos(t*Et)}function oi(t){return Math.pow(2,10*(t-1))}function si(t){return 1-Math.sqrt(1-t*t)}function li(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ci(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ui(t){var e,r,n,a=[t.a,t.b],i=[t.c,t.d],o=fi(a),s=hi(a,i),l=fi(((e=i)[0]+=(n=-s)*(r=a)[0],e[1]+=n*r[1],e))||0;a[0]*i[1]=0?t.slice(0,n):t,i=n>=0?t.slice(n+1):"in";return a=Qa.get(a)||Ka,i=$a.get(i)||P,e=i(a.apply(null,r.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,a=e.c,i=e.l,o=r.h-n,s=r.c-a,l=r.l-i;isNaN(s)&&(s=0,a=isNaN(a)?r.c:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Wt(n+o*t,a+s*t,i+l*t)+""}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,a=e.s,i=e.l,o=r.h-n,s=r.s-a,l=r.l-i;isNaN(s)&&(s=0,a=isNaN(a)?r.s:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,a+s*t,i+l*t)+""}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,a=e.a,i=e.b,o=r.l-n,s=r.a-a,l=r.b-i;return function(t){return te(n+o*t,a+s*t,i+l*t)+""}},t.interpolateRound=ci,t.transform=function(e){var r=a.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(t){if(null!=t){r.setAttribute("transform",t);var e=r.transform.baseVal.consolidate()}return new ui(e?e.matrix:pi)})(e)},ui.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pi={a:1,b:0,c:0,d:1,e:0,f:0};function di(t){return t.length?t.pop()+",":""}function gi(e,r){var n=[],a=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:Ga(t[0],e[0])},{i:a-2,x:Ga(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(e.translate,r.translate,n,a),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(di(r)+"rotate(",null,")")-2,x:Ga(t,e)})):e&&r.push(di(r)+"rotate("+e+")")}(e.rotate,r.rotate,n,a),function(t,e,r,n){t!==e?n.push({i:r.push(di(r)+"skewX(",null,")")-2,x:Ga(t,e)}):e&&r.push(di(r)+"skewX("+e+")")}(e.skew,r.skew,n,a),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var a=r.push(di(r)+"scale(",null,",",null,")");n.push({i:a-4,x:Ga(t[0],e[0])},{i:a-2,x:Ga(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(di(r)+"scale("+e+")")}(e.scale,r.scale,n,a),e=r=null,function(t){for(var e,r=-1,i=a.length;++r0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Te(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,u=c[0],d=c[1];for(t=0;t=0;)r.push(a[n])}function Ci(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(i=t.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(u=c[l]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Ci(a,function(e){var n,a;t&&(n=e.children)&&n.sort(t),r&&(a=e.parent)&&(a.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ei(t,function(t){t.children&&(t.value=0)}),Ci(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var a=e.call(this,t,n);return function t(e,r,n,a){var i=e.children;if(e.x=r,e.y=e.depth*a,e.dx=n,e.dy=a,i&&(o=i.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ra&&(n=r,a=e);return n}function qi(t){return t.reduce(Hi,0)}function Hi(t,e){return t+e[1]}function Gi(t,e){return Yi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Yi(t,e){for(var r=-1,n=+t[0],a=(t[1]-n)/e,i=[];++r<=e;)i[r]=a*r+n;return i}function Wi(e){return[t.min(e),t.max(e)]}function Xi(t,e){return t.value-e.value}function Zi(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ji(t,e){t._pack_next=e,e._pack_prev=t}function Ki(t,e){var r=e.x-t.x,n=e.y-t.y,a=t.r+e.r;return.999*a*a>r*r+n*n}function Qi(t){if((e=t.children)&&(l=e.length)){var e,r,n,a,i,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(e.forEach($i),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(eo(r,n,a=e[2]),x(a),Zi(r,a),r._pack_prev=a,Zi(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=h[0]&&l<=h[1]&&((s=c[t.bisect(f,l,1,d)-1]).y+=g,s.push(i[o]));return c}return i.value=function(t){return arguments.length?(r=t,i):r},i.range=function(t){return arguments.length?(n=ve(t),i):n},i.bins=function(t){return arguments.length?(a="number"==typeof t?function(e){return Yi(e,t)}:ve(t),i):a},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xi),n=0,a=[1,1];function i(t,i){var o=r.call(this,t,i),s=o[0],l=a[0],c=a[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Ci(s,function(t){t.r=+u(t.value)}),Ci(s,Qi),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ci(s,function(t){t.r+=h}),Ci(s,Qi),Ci(s,function(t){t.r-=h})}return function t(e,r,n,a){var i=e.children;e.x=r+=a*e.x;e.y=n+=a*e.y;e.r*=a;if(i)for(var o=-1,s=i.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)});var g=r(f,p)/2-f.x,v=n[0]/(p.x+r(p,f)/2+g),m=n[1]/(d.depth||1);Ei(u,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return c}function o(t){var e=t.children,n=t.parent.children,a=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,a=t.children,i=a.length;for(;--i>=0;)(e=a[i]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var i=(e[0].z+e[e.length-1].z)/2;a?(t.z=a.z+r(t._,a._),t.m=t.z-i):t.z=i}else a&&(t.z=a.z+r(t._,a._));t.parent.A=function(t,e,n){if(e){for(var a,i=t,o=t,s=e,l=i.parent.children[0],c=i.m,u=o.m,h=s.m,f=l.m;s=ao(s),i=no(i),s&&i;)l=no(l),(o=ao(o)).a=t,(a=s.z+h-i.z-c+r(s._,i._))>0&&(io(oo(s,t,n),t,a),c+=a,u+=a),h+=s.m,c+=i.m,f+=l.m,u+=o.m;s&&!ao(o)&&(o.t=s,o.m+=h-u),i&&!no(l)&&(l.t=i,l.m+=c-f,n=t)}return n}(t,a,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return i.separation=function(t){return arguments.length?(r=t,i):r},i.size=function(t){return arguments.length?(a=null==(n=t)?l:null,i):a?null:n},i.nodeSize=function(t){return arguments.length?(a=null==(n=t)?null:l,i):a?n:null},Si(i,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],a=!1;function i(i,o){var s,l=e.call(this,i,o),c=l[0],u=0;Ci(c,function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var h=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),f=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=h.x-r(h,f)/2,d=f.x+r(f,h)/2;return Ci(c,a?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return i.separation=function(t){return arguments.length?(r=t,i):r},i.size=function(t){return arguments.length?(a=null==(n=t),i):a?null:n},i.nodeSize=function(t){return arguments.length?(a=null!=(n=t),i):a?n:null},Si(i,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=so,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,a=-1,i=t.length;++a0;)s.push(r=c[a-1]),s.area+=r.area,"squarify"!==l||(n=p(s,g))<=f?(c.pop(),f=n):(s.area-=s.pop().area,d(s,g,i,!1),g=Math.min(i.dx,i.dy),s.length=s.area=0,f=1/0);s.length&&(d(s,g,i,!0),s.length=s.area=0),e.forEach(h)}}function f(t){var e=t.children;if(e&&e.length){var r,n=o(t),a=e.slice(),i=[];for(u(a,n.dx*n.dy/t.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(d(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);e.forEach(f)}}function p(t,e){for(var r,n=t.area,a=0,i=1/0,o=-1,s=t.length;++oa&&(a=r));return e*=e,(n*=n)?Math.max(e*a*c/n,n/(e*i*c)):1/0}function d(t,e,r,a){var i,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((a||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?vo:ho,s=a?mi:vi;return i=t(e,r,s,n),o=t(r,e,s,Za),l}function l(t){return i(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ci)};l.clamp=function(t){return arguments.length?(a=t,s()):a};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,a)};return s()}([0,1],[0,1],Za,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,a,i){function o(t){return(a?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return a?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(a=t[0]>=0,r.domain((i=t.map(Number)).map(o)),l):i};l.base=function(t){return arguments.length?(n=+t,r.domain(i.map(o)),l):n};l.nice=function(){var t=fo(i.map(o),a?Math:Ao);return r.domain(t),i=t.map(s),l};l.ticks=function(){var t=co(i),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),h=n%1?2:n;if(isFinite(u-c)){if(a){for(;c0;f--)e.push(s(c)*f);for(c=0;e[c]l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return To;arguments.length<2?r=To:"function"!=typeof r&&(r=t.format(r));var a=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n0?a[t-1]:r[0],th?0:1;if(c=St)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,g,v,m,y,x,b,_,w,k,T,A,M=0,S=0,E=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===Oo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=zt(v/c*Math.sin(m))),s&&(M=zt(v/s*Math.sin(m)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(h-S),_=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=At?0:1;if(S&&Bo(y,x,b,_)===p^C){var L=(u+h)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(h-M),k=s*Math.sin(h-M),T=s*Math.cos(u+M),A=s*Math.sin(u+M);var P=Math.abs(u-h+2*M)<=At?0:1;if(M&&Bo(w,k,T,A)===1-p^P){var O=(u+h)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=A=null}}else w=k=0;if(f>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s0?0:1}function No(t,e,r,n,a){var i=t[0]-e[0],o=t[1]-e[1],s=(a?n:-n)/Math.sqrt(i*i+o*o),l=s*o,c=-s*i,u=t[0]+l,h=t[1]+c,f=e[0]+l,p=e[1]+c,d=(u+f)/2,g=(h+p)/2,v=f-u,m=p-h,y=v*v+m*m,x=r-n,b=u*p-f*h,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,T=(b*m+v*_)/y,A=(-b*v+m*_)/y,M=w-d,S=k-g,E=T-d,C=A-g;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ea,r=ra,n=Yr,a=Uo,i=a.key,o=.7;function s(i){var s,l=[],c=[],u=-1,h=i.length,f=ve(e),p=ve(r);function d(){l.push("M",a(t(c),o))}for(;++u1&&a.push("H",n[0]);return a.join("")},"step-before":Ho,"step-after":Go,basis:Xo,"basis-open":function(t){if(t.length<4)return Uo(t);var e,r=[],n=-1,a=t.length,i=[0],o=[0];for(;++n<3;)e=t[n],i.push(e[0]),o.push(e[1]);r.push(Zo(Qo,i)+","+Zo(Qo,o)),--n;for(;++n9&&(a=3*e/Math.sqrt(a),o[s]=a*r,o[s+1]=a*n));s=-1;for(;++s<=l;)a=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),i.push([a||0,o[s]*a||0]);return i}(t))}});function Uo(t){return t.length>1?t.join("L"):t+"Z"}function qo(t){return t.join("L")+"Z"}function Ho(t){for(var e=0,r=t.length,n=t[0],a=[n[0],",",n[1]];++e1){s=e[1],i=t[l],l++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1];for(var c=2;cAt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return i.radius=function(t){return arguments.length?(r=ve(t),i):r},i.source=function(e){return arguments.length?(t=ve(e),i):t},i.target=function(t){return arguments.length?(e=ve(t),i):e},i.startAngle=function(t){return arguments.length?(n=ve(t),i):n},i.endAngle=function(t){return arguments.length?(a=ve(t),i):a},i},t.svg.diagonal=function(){var t=Vn,e=Un,r=as;function n(n,a){var i=t.call(this,n,a),o=e.call(this,n,a),s=(i.y+o.y)/2,l=[i,{x:i.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=as,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=is;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Ct);W.transition=function(t){for(var e,r,n=ds||++ms,a=bs(t),i=[],o=gs||{time:Date.now(),ease:ai,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(t,o);if(i>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}h||(i=a.time,o=Te(function(t){var e=h.delay;if(o.t=e+i,e<=t)return f(t-e);o.c=f},0,i),h=u[n]={tween:new b,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++u.count)}vs.call=W.call,vs.empty=W.empty,vs.node=W.node,vs.size=W.size,t.transition=function(e,r){return e&&e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=vs,vs.select=function(t){var e,r,n,a=this.id,i=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function g(t){t.select(".extent").attr("y",l[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function v(){var h,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&a,k=!/^(e|w)$/.test(_)&&i,T=y.classed("extent"),A=xt(m),M=t.mouse(m),S=t.select(o(m)).on("keydown.brush",function(){32==t.event.keyCode&&(T||(h=null,M[0]-=s[1],M[1]-=l[1],T=2),B())}).on("keyup.brush",function(){32==t.event.keyCode&&2==T&&(M[0]+=s[1],M[1]+=l[1],T=0,B())});if(t.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);v=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else t.event.altKey&&(h=M.slice());function L(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),T||(t.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(e[0]1?{floor:function(e){for(;s(e=t.floor(e));)e=Is(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Is(+e+1);return e}}:t))},a.ticks=function(t,e){var r=co(a.domain()),n=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],Is(+r[1]+1),e<1?1:e)},a.tickFormat=function(){return n},a.copy=function(){return Os(e.copy(),r,n)},mo(a,e)}function Is(t){return new Date(t)}Es.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ps:Ls,Ps.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ps.toString=Ls.toString,Ie.second=Fe(function(t){return new ze(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ie.seconds=Ie.second.range,Ie.seconds.utc=Ie.second.utc.range,Ie.minute=Fe(function(t){return new ze(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ie.minutes=Ie.minute.range,Ie.minutes.utc=Ie.minute.utc.range,Ie.hour=Fe(function(t){var e=t.getTimezoneOffset()/60;return new ze(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ie.hours=Ie.hour.range,Ie.hours.utc=Ie.hour.utc.range,Ie.month=Fe(function(t){return(t=Ie.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ie.months=Ie.month.range,Ie.months.utc=Ie.month.utc.range;var zs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[Ie.second,1],[Ie.second,5],[Ie.second,15],[Ie.second,30],[Ie.minute,1],[Ie.minute,5],[Ie.minute,15],[Ie.minute,30],[Ie.hour,1],[Ie.hour,3],[Ie.hour,6],[Ie.hour,12],[Ie.day,1],[Ie.day,2],[Ie.week,1],[Ie.month,1],[Ie.month,3],[Ie.year,1]],Rs=Es.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Yr]]),Fs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Is)},floor:P,ceil:P};Ds.year=Ie.year,Ie.scale=function(){return Os(t.scale.linear(),Ds,Rs)};var Bs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Cs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Yr]]);function js(t){return JSON.parse(t.responseText)}function Vs(t){var e=a.createRange();return e.selectNode(a.body),e.createContextualFragment(t.responseText)}Bs.year=Ie.year.utc,Ie.scale.utc=function(){return Os(t.scale.linear(),Bs,Ns)},t.text=me(function(t){return t.responseText}),t.json=function(t,e){return ye(t,"application/json",js,e)},t.html=function(t,e){return ye(t,"text/html",Vs,e)},t.xml=me(function(t){return t.responseXML}),"object"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],165:[function(t,e,r){e.exports=function(){for(var t=0;t=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0});if(1&s)for(var u=0;u<_.length;++u){var b=_[u],f=b[0];b[0]=b[1],b[1]=f}return _}},{"incremental-convex-hull":414,uniq:548}],167:[function(t,e,r){"use strict";e.exports=i;var n=(i.canvas=document.createElement("canvas")).getContext("2d"),a=o([32,126]);function i(t,e){Array.isArray(t)&&(t=t.join(", "));var r,i={},s=16,l=.05;e&&(2===e.length&&"number"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=a),n.font=s+"px "+t;for(var c=0;cs*l){var p=(f-h)/s;i[u]=1e3*p}}return i}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),a=t[0];a>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),a=1048575&n;return 2146435072&n&&(a+=1<<20),[r,a]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:106}],169:[function(t,e,r){var n=t("abs-svg-path"),a=t("normalize-svg-path"),i={M:"moveTo",C:"bezierCurveTo"};e.exports=function(t,e){t.beginPath(),a(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[i[r]].apply(t,n)}),t.closePath()}},{"abs-svg-path":61,"normalize-svg-path":453}],170:[function(t,e,r){e.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],171:[function(t,e,r){"use strict";e.exports=function(t,e){switch("undefined"==typeof e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=e})}(e);for(var r,a=n(t).components.filter(function(t){return t.length>1}),i=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=k?f.call(k,T,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r0?1:-1}},{}],184:[function(t,e,r){"use strict";var n=t("../math/sign"),a=Math.abs,i=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*i(a(t)):t}},{"../math/sign":181}],185:[function(t,e,r){"use strict";var n=t("./to-integer"),a=Math.max;e.exports=function(t){return a(0,n(t))}},{"./to-integer":184}],186:[function(t,e,r){"use strict";var n=t("./valid-callable"),a=t("./valid-value"),i=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,h=arguments[2],f=arguments[3];return r=Object(a(r)),n(c),u=s(r),f&&u.sort("function"==typeof f?i.call(f,r):void 0),"function"!=typeof t&&(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,h,r[t],t,r,n):e})}}},{"./valid-callable":204,"./valid-value":206}],187:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":188,"./shim":189}],188:[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")}},{}],189:[function(t,e,r){"use strict";var n=t("../keys"),a=t("../valid-value"),i=Math.max;e.exports=function(t,e){var r,o,s,l=i(arguments.length,2);for(t=Object(a(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o-1}},{}],210:[function(t,e,r){"use strict";var n=Object.prototype.toString,a=n.call("");e.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||n.call(t)===a)||!1}},{}],211:[function(t,e,r){"use strict";var n=Object.create(null),a=Math.random;e.exports=function(){var t;do{t=a().toString(36).slice(2)}while(n[t]);return t}},{}],212:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/set-prototype-of"),i=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?i.call(e,"key+value")?"key+value":i.call(e,"key")?"key":"value":"value",c(this,"__kind__",o("",e))},a&&a(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"))},{"./":215,d:152,"es5-ext/object/set-prototype-of":201,"es5-ext/string/#/contains":207,"es6-symbol":220}],213:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),a=t("es5-ext/object/valid-callable"),i=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,h,f,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r="array":i(t)?r="string":t=o(t),a(e),h=function(){f=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,m,u.value,h),f)return;u=t.next()}else for(d=t.length,p=0;p=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,h),!f);++p);else c.call(t,function(t){return l.call(e,m,t,h),f})}},{"./get":214,"es5-ext/function/is-arguments":178,"es5-ext/object/valid-callable":204,"es5-ext/string/is-string":210}],214:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),a=t("es5-ext/string/is-string"),i=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 i(t):a(t)?new o(t):new i(t)}},{"./array":212,"./string":217,"./valid-iterable":218,"es5-ext/function/is-arguments":178,"es5-ext/string/is-string":210,"es6-symbol":220}],215:[function(t,e,r){"use strict";var n,a=t("es5-ext/array/#/clear"),i=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"),h=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(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,f(n.prototype,i({_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)):h(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__&&a.call(this.__redo__),this.__nextIndex__=0})}))),h(n.prototype,u.iterator,l(function(){return this}))},{d:152,"d/auto-bind":151,"es5-ext/array/#/clear":174,"es5-ext/object/assign":187,"es5-ext/object/valid-callable":204,"es5-ext/object/valid-value":206,"es6-symbol":220}],216:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),a=t("es5-ext/object/is-value"),i=t("es5-ext/string/is-string"),o=t("es6-symbol").iterator,s=Array.isArray;e.exports=function(t){return!!a(t)&&(!!s(t)||(!!i(t)||(!!n(t)||"function"==typeof t[o])))}},{"es5-ext/function/is-arguments":178,"es5-ext/object/is-value":195,"es5-ext/string/is-string":210,"es6-symbol":220}],217:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/set-prototype-of"),i=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__",i("",t.length))},a&&a(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:i(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,i("c","String Iterator"))},{"./":215,d:152,"es5-ext/object/set-prototype-of":201,"es6-symbol":220}],218:[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":216}],219:[function(t,e,r){(function(n,a){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){"use strict";function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,o=void 0,s=void 0,l=function(t,e){g[i]=t,g[i+1]=e,2===(i+=2)&&(s?s(v):_())};var c="undefined"!=typeof window?window:void 0,u=c||{},h=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof n&&"[object process]"==={}.toString.call(n),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var g=new Array(1e3);function v(){for(var t=0;t=r-1){f=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var u=s.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)n.push(i(l[h-1],c[h-1],arguments[h])),a.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var p=i(c[f-1],u[f-1],arguments[f]);n.push(p),a.push((p-n[o++])*h)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(i(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,a=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,h=u>1e-6?1/u:0;this._time.push(t);for(var f=r;f>0;--f){var p=arguments[f];n.push(i(l[f-1],c[f-1],n[o++]+p)),a.push(p*h)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--h)n.push(i(l[h],c[h],n[o]+u*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":92,"cubic-hermite":146}],228:[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 a,i,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(a=0,o=r;ae[0]-o[0]/2&&(f=o[0]/2,p+=o[1]);return r}},{"css-font/stringify":143}],230:[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 a(n.cache[r],c);var u=e.canvas||n.canvas,h=u.getContext("2d"),f={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,h.font=t;var d={top:0};h.clearRect(0,0,p,p),h.textBaseline="top",h.fillStyle="black",h.fillText("H",0,0);var g=i(h.getImageData(0,0,p,p));h.clearRect(0,0,p,p),h.textBaseline="bottom",h.fillText("H",0,p);var v=i(h.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-v+g,h.clearRect(0,0,p,p),h.textBaseline="alphabetic",h.fillText("H",0,p);var m=p-i(h.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=m,h.clearRect(0,0,p,p),h.textBaseline="middle",h.fillText("H",0,.5*p);var y=i(h.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="hanging",h.fillText("H",0,.5*p);var x=i(h.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="ideographic",h.fillText("H",0,p);var b=i(h.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,f.upper&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.upper,0,0),d.upper=i(h.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),f.lower&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.lower,0,0),d.lower=i(h.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),f.tittle&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.tittle,0,0),d.tittle=i(h.getImageData(0,0,p,p))),f.ascent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.ascent,0,0),d.ascent=i(h.getImageData(0,0,p,p))),f.descent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.descent,0,0),d.descent=o(h.getImageData(0,0,p,p))),f.overshoot){h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.overshoot,0,0);var _=o(h.getImageData(0,0,p,p));d.overshoot=_-m}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,a(d,c)}function a(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 i(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={}},{}],231:[function(t,e,r){"use strict";e.exports=function(t){return new c(t||d,null)};var n=0,a=1;function i(t,e,r,n,a,i){this._color=t,this.key=e,this.value=r,this.left=n,this.right=a,this._count=i}function o(t){return new i(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new i(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],h=[];o;){var f=r(t,o.key);u.push(o),h.push(f),o=f<=0?o.left:o.right}u.push(new i(n,t,e,null,null,1));for(var p=u.length-2;p>=0;--p){o=u[p];h[p]<=0?u[p]=new i(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new i(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p>1;--p){var d=u[p-1];o=u[p];if(d._color===a||o._color===a)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(v=g.right)||v._color!==n){if(g._color=n,g.left=d.right,d._color=a,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).left===g?m.left=d:m.right=d;break}d._color=a,g.right=s(a,v),g._color=n,p-=1}else{if(!(v=g.right)||v._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=a,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).left===g?m.left=o:m.right=o;break}d._color=a,g.right=s(a,v),g._color=n,p-=1}else if(d.right===o){if(!(v=g.left)||v._color!==n){if(g._color=n,g.right=d.left,d._color=a,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).right===g?m.right=d:m.left=d;break}d._color=a,g.left=s(a,v),g._color=n,p-=1}else{var v;if(!(v=g.left)||v._color!==n){var m;if(d.left=o.right,g._color=n,g.right=o.left,o._color=a,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).right===g?m.right=o:m.left=o;break}d._color=a,g.left=s(a,v),g._color=n,p-=1}}return u[0]._color=a,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&&(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,a){if(r(e,a.key)<=0){var i;if(a.left&&(i=t(e,r,n,a.left)))return i;if(i=n(a.key,a.value))return i}if(a.right)return t(e,r,n,a.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,a,i){var o,s=n(e,i.key),l=n(r,i.key);if(s<=0){if(i.left&&(o=t(e,r,n,a,i.left)))return o;if(l>0&&(o=a(i.key,i.value)))return o}if(l>0&&i.right)return t(e,r,n,a,i.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(u,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),u.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i<=0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new h(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i<0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new h(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i>0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new h(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i>=0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new h(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var a=e(t,r.key);if(n.push(r),0===a)return new h(this,n);r=a<=0?r.left:r.right}return new h(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=h.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return te?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new h(this.tree,this._stack.slice())},f.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new i(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u>=0;--u){(r=t[u]).left===t[u+1]?e[u]=new i(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new i(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&&r.right){var h=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var f=e[h-1];e.push(new i(r._color,f.key,f.value,r.left,r.right,r._count)),e[h-1].key=r.key,e[h-1].value=r.value;for(u=e.length-2;u>=h;--u)r=e[u],e[u]=new i(r._color,r.key,r.value,r.left,e[u+1],r._count);e[h-1].left=e[h]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&&(d.right=null),e.pop();for(u=0;u=0;--u){if(e=t[u],0===u)return void(e._color=a);if((r=t[u-1]).left===e){if((i=r.right).right&&i.right._color===n)return c=(i=r.right=o(i)).right=o(i.right),r.right=i.left,i.left=r,i.right=c,i._color=r._color,e._color=a,r._color=a,c._color=a,l(r),l(i),u>1&&((h=t[u-2]).left===r?h.left=i:h.right=i),void(t[u-1]=i);if(i.left&&i.left._color===n)return c=(i=r.right=o(i)).left=o(i.left),r.right=c.left,i.left=c.right,c.left=r,c.right=i,c._color=r._color,r._color=a,i._color=a,e._color=a,l(r),l(i),l(c),u>1&&((h=t[u-2]).left===r?h.left=c:h.right=c),void(t[u-1]=c);if(i._color===a){if(r._color===n)return r._color=a,void(r.right=s(n,i));r.right=s(n,i);continue}i=o(i),r.right=i.left,i.left=r,i._color=r._color,r._color=n,l(r),l(i),u>1&&((h=t[u-2]).left===r?h.left=i:h.right=i),t[u-1]=i,t[u]=r,u+11&&((h=t[u-2]).right===r?h.right=i:h.left=i),void(t[u-1]=i);if(i.right&&i.right._color===n)return c=(i=r.left=o(i)).right=o(i.right),r.left=c.right,i.right=c.left,c.right=r,c.left=i,c._color=r._color,r._color=a,i._color=a,e._color=a,l(r),l(i),l(c),u>1&&((h=t[u-2]).right===r?h.right=c:h.left=c),void(t[u-1]=c);if(i._color===a){if(r._color===n)return r._color=a,void(r.left=s(n,i));r.left=s(n,i);continue}var h;i=o(i),r.left=i.right,i.right=r,i._color=r._color,r._color=n,l(r),l(i),u>1&&((h=t[u-2]).right===r?h.right=i:h.left=i),t[u-1]=i,t[u]=r,u+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),f.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),f.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new i(n._color,n.key,t,n.left,n.right,n._count);for(var a=e.length-2;a>=0;--a)(n=e[a]).left===e[a+1]?r[a]=new i(n._color,n.key,n.value,r[a+1],n.right,n._count):r[a]=new i(n._color,n.key,n.value,n.left,r[a+1],n._count);return new c(this.tree._compare,r[0])},f.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],232:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number("0/0");for(var e=i[0],r=i.length-1;r>0;--r)e+=i[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],a=1;a<9;a++)r+=n[a]/(e+a);var i=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(i,e+.5)*Math.exp(-i)*r},e.exports.log=o},{}],233:[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,a=e;try{var i=[t];0===t.indexOf("webgl")&&i.push("experimental-"+t);for(var o=0;o0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};h.isOpaque=function(){return!0},h.isTransparent=function(){return!1},h.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];h.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,a=t.projection||l,i=this.bounds,s=t._ortho||!1,u=o(r,n,a,i,s),h=u.cubeEdges,f=u.axis,b=n[12],_=n[13],w=n[14],k=n[15],T=(s?2:1)*this.pixelRatio*(a[3]*b+a[7]*_+a[11]*w+a[15]*k)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=h[A],this.lastCubeProps.axis[A]=f[A];var M=p;for(A=0;A<3;++A)d(p[A],A,this.bounds,h,f);e=this.gl;var S,E=g;for(A=0;A<3;++A)this.backgroundEnable[A]?E[A]=f[A]:E[A]=0;this._background.draw(r,n,a,i,E,this.backgroundColor),this._lines.bind(r,n,a,this);for(A=0;A<3;++A){var C=[0,0,0];f[A]>0?C[A]=i[1][A]:C[A]=i[0][A];for(var L=0;L<2;++L){var P=(A+1+L)%3,O=(A+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,O,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(L=0;L<2;++L){P=(A+1+L)%3,O=(A+1+(1^L))%3;this.zeroEnable[O]&&Math.min(i[0][O],i[1][O])<=0&&Math.max(i[0][O],i[1][O])>=0&&this._lines.drawZero(P,O,this.bounds,C,this.zeroLineColor[O],this.zeroLineWidth[O]*this.pixelRatio)}}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var I=c(m,M[A].primalMinor),z=c(y,M[A].mirrorMinor),D=this.lineTickLength;for(L=0;L<3;++L){var R=T/r[5*L];I[L]*=D[L]*R,z[L]*=D[L]*R}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,I,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,a,this.pixelRatio);var F,B;function N(t){(B=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,a=(t+2)%3,i=e[n],o=e[a],s=r[n],l=r[a];i>0&&l>0?N(n):i>0&&l<0?N(n):i<0&&l>0?N(n):i<0&&l<0?N(n):o>0&&s>0?N(a):o>0&&s<0?N(a):o<0&&s>0?N(a):o<0&&s<0&&N(a)}for(A=0;A<3;++A){var V=M[A].primalMinor,U=M[A].mirrorMinor,q=c(x,M[A].primalOffset);for(L=0;L<3;++L)this.lineTickEnable[A]&&(q[L]+=T*V[L]*Math.max(this.lineTickLength[L],0)/r[5*L]);var H=[0,0,0];if(H[A]=1,this.tickEnable[A]){-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,F=1,"auto"===(S=[this.tickAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]),B=[0,0,0],j(A,V,U);for(L=0;L<3;++L)q[L]+=T*V[L]*this.tickPad[L]/r[5*L];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],q,this.tickColor[A],H,B,S)}if(this.labelEnable[A]){F=0,B=[0,0,0],this.labels[A].length>4&&(N(A),F=1),"auto"===(S=[this.labelAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]);for(L=0;L<3;++L)q[L]+=T*V[L]*this.labelPad[L]/r[5*L];q[A]+=.5*(i[0][A]+i[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],q,this.labelColor[A],[0,0,0],B,S)}}this._text.unbind()},h.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":235,"./lib/cube.js":236,"./lib/lines.js":237,"./lib/text.js":239,"./lib/ticks.js":240}],235:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],f=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=p,f[l]=p;for(var d=-1;d<=1;d+=2){h[c]=d;for(var g=-1;g<=1;g+=2)h[u]=g,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),s+=1}var v=c;c=u,u=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=a(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=i(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t("gl-buffer"),a=t("gl-vao"),i=t("./shaders").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,a,i){for(var o=!1,s=0;s<3;++s)o=o||a[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:a,colors:i},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":238,"gl-buffer":242,"gl-vao":328}],236:[function(t,e,r){"use strict";e.exports=function(t,e,r,i,p){a(s,e,t),a(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=i[x][2];for(var b=0;b<2;++b){u[1]=i[b][1];for(var _=0;_<2;++_)u[0]=i[_][0],f(l[y],u,s),y+=1}}for(var w=-1,x=0;x<8;++x){for(var k=l[x][3],T=0;T<3;++T)c[x][T]=l[x][T]/k;p&&(c[x][2]*=-1),k<0&&(w<0?w=x:c[x][2]E&&(w|=1<E&&(w|=1<c[x][1]&&(R=x));for(var F=-1,x=0;x<3;++x){var B=R^1<c[N][0]&&(N=B)}}var j=g;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^N)]=R&N;var V=7^N;V===w||V===D?(V=7^F,j[n.log2(N^V)]=V&N):j[n.log2(F^V)]=V&F;for(var U=v,q=w,A=0;A<3;++A)U[A]=q&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(t){return a(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(t){return a(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":302,glslify:410}],239:[function(t,e,r){(function(r){"use strict";e.exports=function(t,e,r,i,s,l){var u=n(t),h=a(t,[{buffer:u,size:3}]),f=o(t);f.attributes.position.location=0;var p=new c(t,f,u,h);return p.update(e,r,i,s,l),p};var n=t("gl-buffer"),a=t("gl-vao"),i=t("vectorize-text"),o=t("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,h=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var a=this.shader.uniforms;a.model=t,a.view=e,a.projection=r,a.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,a){var o=[];function s(t,e,r,n,a,s){var c=l[r];c||(c=l[r]={});var u=c[e];u||(u=c[e]=function(t,e){try{return i(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:a,styletags:s}));for(var h=(n||12)/12,f=u.positions,p=u.cells,d=0,g=p.length;d=0;--m){var y=f[v[m]];o.push(h*y[0],-h*y[1],t)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){h[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),f[d]=(o.length/3|0)-h[d],c[d]=o.length/3|0;for(var g=0;g=0&&(a=r.length-n-1);var i=Math.pow(10,a),o=Math.round(t*e*i),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/i,c=o%i;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),a){for(var h=""+c;h.length=t[0][a];--o)i.push({x:o*e[a],text:n(e[a],o)});r.push(i)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,i,a),r}function u(t,e){for(var r=n.malloc(t.length,e),a=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=i(s,t.shape);a.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?h:h.subarray(0,t.length),e),n.free(h)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),i=new s(t,r,a,0,n);return i.update(e),i}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":546}],243:[function(t,e,r){"use strict";var n=t("gl-vec3"),a=function(t,e){for(var r=0;r=e)return r-1;return r},i=n.create(),o=n.create(),s=function(t,e,r){return tr?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],h=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=a(r[0],c),v=a(r[1],u),m=a(r[2],h),y=g+1,x=v+1,b=m+1;if(l&&(g=s(g,0,f-1),y=s(y,0,f-1),v=s(v,0,p-1),x=s(x,0,p-1),m=s(m,0,d-1),b=s(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][v])/(r[1][x]-r[1][v]),k=(h-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],I=e[S+T+C],z=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(i,O,I,_),n.lerp(B,B,i,w),n.lerp(i,z,D,_),n.lerp(o,R,F,_),n.lerp(i,i,o,w),n.lerp(B,B,i,k),B};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],a=[],i=0;is&&(s=n.length(b)),x&&(y=Math.min(y,2*n.distance(g,_)/(n.length(v)+n.length(b)))),g=_,v=b,m.push(b)}var w=[c,h,p],k=[u,f,d];e&&(e[0]=w,e[1]=k),0===s&&(s=1);var T=1/s;isFinite(y)&&!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var a=n.create();return void 0!==t&&n.set(a,t,e,r),a}(0,1,0),M=t.coneSize||.5;t.absoluteConeSize&&(M=t.absoluteConeSize*T),o.coneScale=M;x=0;for(var S=0;x=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,a=e.vertexWeights,i=r.length,o=p.mallocFloat32(6*i),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,a=t.projection||m,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:a,clipBounds:i,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=a(t),h=a(t),f=a(t),p=a(t),d=a(t),v=a(t),m=i(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:3}]),x=a(t),_=a(t),w=a(t),k=a(t),T=i(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=a(t),M=a(t),S=a(t),E=a(t),C=a(t),L=i(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=a(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,i(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":245,colormap:127,"gl-buffer":242,"gl-mat4/invert":266,"gl-mat4/multiply":268,"gl-shader":302,"gl-texture2d":323,"gl-vao":328,ndarray:451,normals:454,"simplicial-complex-contour":519,"typedarray-pool":546}],245:[function(t,e,r){var n=t("glslify"),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float coneScale;\n\nuniform float coneOffset;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nuniform float vectorScale;\nuniform float coneScale;\nuniform float coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:410}],246:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34000:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],247:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":246}],248:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=n(e),o=a(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=i(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t("gl-buffer"),a=t("gl-vao"),i=t("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,a=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var i=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho||!1?2:1)*this.pixelRatio*(a[3]*i+a[7]*s+a[11]*l+a[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var a=-1;a<=1;a+=2){var i=[0,0,0];i[(n+e)%3]=a,r.push(i)}t[e]=r}return t}();function h(t,e,r,n){for(var a=u[n],i=0;i0)(g=u.slice())[s]+=p[1][s],a.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+h(a,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(a)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":249,"gl-buffer":242,"gl-vao":328}],249:[function(t,e,r){"use strict";var n=t("glslify"),a=t("gl-shader"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(t){return a(t,i,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":302,glslify:410}],250:[function(t,e,r){"use strict";var n=t("gl-texture2d");e.exports=function(t,e,r,n){a||(a=t.FRAMEBUFFER_UNSUPPORTED,i=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var a=new Array(r),i=0;iu||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var f=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&h>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");f=t.FLOAT}else n.preferFloat&&h>0&&p&&(f=t.FLOAT);var g=!0;"depth"in n&&(g=!!n.depth);var v=!1;"stencil"in n&&(v=!!n.stencil);return new d(t,e,r,f,h,g,v,c)};var a,i,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function h(t){switch(t){case a:throw new Error("gl-fbo: Framebuffer unsupported");case i:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(t,e,r,a,i,o){if(!a)return null;var s=n(t,e,r,i,a);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,a){var i=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,i),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,a,t.RENDERBUFFER,i),i}function d(t,e,r,n,a,i,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(a);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?d?t.depth=f(r,a,i,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=f(r,a,i,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,a,i,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,a,i,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,a,i,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;ma||r<0||r>a)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var i=c(n),o=0;o>8*p&255;this.pickOffset=r,a.bind();var d=a.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=a.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,a=this.shape[0]*this.shape[1];if(r=n+a)return null;var i=r-n,o=this.xData,s=this.yData;return{object:this,pointId:i,dataCoord:[o[i%this.shape[0]],s[i/this.shape[0]|0]]}},h.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||a(e[0]),o=t.y||a(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,h=this.bounds,p=h[0]=r[0],d=h[1]=o[0],g=1/((h[2]=r[r.length-1])-p),v=1/((h[3]=o[o.length-1])-d),m=e[0],y=e[1];this.shape=[m,y];var x=(m-1)*(y-1)*(f.length>>>1);this.numVertices=x;for(var b=i.mallocUint8(4*x),_=i.mallocFloat32(2*x),w=i.mallocUint8(2*x),k=i.mallocUint32(x),T=0,A=0;A max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\nlowp vec4 encode_float_1604150559(highp float v) {\n highp float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, encode_float_1604150559(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(t){return a(t,i,o,null,l)},r.createPickShader=function(t){return a(t,i,s,null,l)}},{"gl-shader":302,glslify:410}],256:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=a(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),f=l(new Array(1024),[256,1,4]),p=0;p<1024;++p)f.data[p]=255;var d=i(e,f);d.wrap=e.REPEAT;var g=new v(e,r,o,s,c,d);return g.update(t),g};var n=t("gl-buffer"),a=t("gl-vao"),i=t("gl-texture2d"),o=t("glsl-read-float"),s=t("binary-search-bounds"),l=t("ndarray"),c=t("./lib/shaders"),u=c.createShader,h=c.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var a=t[n]-e[n];r+=a*a}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,a,i){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=a,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=i,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var m=v.prototype;m.isTransparent=function(){return this.hasAlpha},m.isOpaque=function(){return!this.hasAlpha},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var a=[],i=[],o=[],c=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=t.position||t.positions;if(f){var d=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e0){for(var w=0;w<24;++w)a.push(a[a.length-12]);u+=2,v=!0}continue t}h[0][r]=Math.min(h[0][r],b[r],_[r]),h[1][r]=Math.max(h[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=c;if(c+=p(b,_),v){for(r=0;r<2;++r)a.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);u+=2,v=!1}a.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],c,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],c,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(a),i.push(c),o.push(f[f.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=o,this.arcLength=i,"dashes"in t){var T=t.dashes.slice();for(T.unshift(0),e=1;e1.0001)return null;v+=g[u]}if(Math.abs(v-1)>.001)return null;return[h,function(t,e){for(var r=[0,0,0],n=0;n max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},{glslify:410}],281:[function(t,e,r){"use strict";var n=t("gl-shader"),a=t("gl-buffer"),i=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./lib/shaders"),g=t("./lib/closest-point"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_,k,T,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=a,this.pickShader=i,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=T,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=k.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function E(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(t){this.pickId=t},T.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,a=e.vertexWeights,i=r.length,o=p.mallocFloat32(6*i),s=0,l=0;l0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,a=t.projection||w,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:a,clipBounds:i,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,a=new Array(r.length),i=0;ia[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t],r.uniforms.angle=m[t],i.drawArrays(i.TRIANGLES,a[T],a[A]-a[T]))),y[t]&&k&&(u[1^t]-=M*p*x[t],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],i.drawArrays(i.TRIANGLES,w,k)),u[1^t]=M*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=M*p*g[t+2],Ta[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],i.drawArrays(i.TRIANGLES,a[T],a[A]-a[T]))),y[t+2]&&k&&(u[1^t]+=M*p*x[t+2],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],i.drawArrays(i.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,a=r.gl,i=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-i[u])/(i[2+u]-i[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,a.drawArrays(a.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(f=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,a=t.screenBox,i=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],h=i[o],g=i[o+2]-h,v=a[o],m=a[o+2]-v;p[o]=2*l/u*g/m,f[o]=2*(s-c)/u*g/m}d[1]=2*t.pixelRatio/(a[3]-a[1]),d[0]=d[1]*(a[3]-a[1])/(a[2]-a[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=f,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,a,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],h=[-1/0],f=l[o];for(e=0;e=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],f[d]):o.drawLine(e[0],g,e[2],g,p[d],f[d])}}for(d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(i,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*a*e/window.innerHeight*(i-c.lastT())/20;c.pan(i,0,0,h*(Math.exp(o)-1))}}},!0)},d.enableMouseListeners(),d};var n=t("right-now"),a=t("3d-view"),i=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset"),l=t("has-passive-events")},{"3d-view":53,"has-passive-events":412,"mouse-change":436,"mouse-event-offset":437,"mouse-wheel":439,"right-now":505}],290:[function(t,e,r){var n=t("glslify"),a=t("gl-shader"),i=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(t){return a(t,i,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":302,glslify:410}],291:[function(t,e,r){"use strict";var n=t("./camera.js"),a=t("gl-axes3d"),i=t("gl-axes3d/properties"),o=t("gl-spikes3d"),s=t("gl-select-static"),l=t("gl-fbo"),c=t("a-big-triangle"),u=t("mouse-change"),h=t("mouse-wheel"),f=t("gl-mat4/perspective"),p=t("gl-mat4/ortho"),d=t("./lib/shader"),g=t("is-mobile")({tablet:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function y(t){return"boolean"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;if(!e)if(e=document.createElement("canvas"),t.container){var r=t.container;r.appendChild(e)}else document.body.appendChild(e);var x=t.gl;x||(x=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:g}));if(!x)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],_=new v,w=l(x,[x.drawingBufferWidth,x.drawingBufferHeight],{preferFloat:!g}),k=d(x),T=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,A={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:T},M=t.axes||{},S=a(x,M);S.enable=!M.disable;var E=t.spikes||{},C=o(x,E),L=[],P=[],O=[],I=[],z=!0,D=!0,R=new Array(16),F=new Array(16),B={view:null,projection:R,model:F,_ortho:!1},D=!0,N=[x.drawingBufferWidth,x.drawingBufferHeight],j=t.cameraObject||n(e,A),V={gl:x,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:_,camera:j,axes:S,axesPixels:null,spikes:C,bounds:b,objects:L,shape:N,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:y(t.autoResize),autoBounds:y(t.autoBounds),autoScale:!!t.autoScale,autoCenter:y(t.autoCenter),clipToBounds:y(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:B,oncontextloss:null,mouseListener:null,_stopped:!1},U=[x.drawingBufferWidth/V.pixelRatio|0,x.drawingBufferHeight/V.pixelRatio|0];function q(){if(!V._stopped&&V.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var a=0|Math.ceil(r*V.pixelRatio),i=0|Math.ceil(n*V.pixelRatio);if(a!==e.width||i!==e.height){e.width=a,e.height=i;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",z=!0}}}V.autoResize&&q();function H(){for(var t=L.length,e=I.length,r=0;r0&&0===O[e-1];)O.pop(),I.pop().dispose()}function G(){if(V.contextLost)return!0;x.isContextLost()&&(V.contextLost=!0,V.mouseListener.enabled=!1,V.selection.object=null,V.oncontextloss&&V.oncontextloss())}window.addEventListener("resize",q),V.update=function(t){V._stopped||(t=t||{},z=!0,D=!0)},V.add=function(t){V._stopped||(t.axes=S,L.push(t),P.push(-1),z=!0,D=!0,H())},V.remove=function(t){if(!V._stopped){var e=L.indexOf(t);e<0||(L.splice(e,1),P.pop(),z=!0,D=!0,H())}},V.dispose=function(){if(!V._stopped&&(V._stopped=!0,window.removeEventListener("resize",q),e.removeEventListener("webglcontextlost",G),V.mouseListener.enabled=!1,!V.contextLost)){S.dispose(),C.dispose();for(var t=0;te?1.1:1/1.1;V.aspect[0]*=r,V.aspect[1]*=r,V.aspect[2]*=r,V.redraw()}},!0),V._mouseRotating=!1,V._prevButtons=0,V.enableMouseListeners=function(){V.mouseListener=u(e,function(t,e,r){if(!V._stopped){var n=I.length,a=L.length,i=_.object;_.distance=1/0,_.mouse[0]=e,_.mouse[1]=r,_.object=null,_.screen=null,_.dataCoordinate=_.dataPosition=null;var o=!1;if(t&&V._prevButtons)V._mouseRotating=!0;else{V._mouseRotating&&(D=!0),V._mouseRotating=!1;for(var s=0;s_.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:410}],293:[function(t,e,r){"use strict";var n=t("gl-shader"),a=t("gl-buffer"),i=t("typedarray-pool"),o=t("./lib/shader");function s(t,e,r,n,a){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=a,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,i=a(r),l=a(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),h=new s(t,i,l,c,u);return h.update(e),t.addObject(h),h};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,a=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=a?s:i.mallocFloat32(s.length),c=o?t.idToIndex:i.mallocInt32(n);if(a||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&i<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,a),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/i,l[4]=2/o,l[6]=-2*a[0]/i-1,l[7]=-2*a[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var h=n.getParameter(n.BLEND),f=n.getParameter(n.DITHER);return h&&!this.blend&&n.disable(n.BLEND),f&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),h&&!this.blend&&n.enable(n.BLEND),f&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,a=this.pointCount;if(r=n+a)return null;var i=r-n,o=this.points;return{object:this,pointId:i,dataCoord:[o[2*i],o[2*i+1]]}}},{"./lib/shader":292,"gl-buffer":242,"gl-shader":302,"typedarray-pool":546}],294:[function(t,e,r){e.exports=function(t,e,r,n){var a,i,o,s,l,c=e[0],u=e[1],h=e[2],f=e[3],p=r[0],d=r[1],g=r[2],v=r[3];(i=c*p+u*d+h*g+f*v)<0&&(i=-i,p=-p,d=-d,g=-g,v=-v);1-i>1e-6?(a=Math.acos(i),o=Math.sin(a),s=Math.sin((1-n)*a)/o,l=Math.sin(n*a)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*h+l*g,t[3]=s*f+l*v,t}},{}],295:[function(t,e,r){"use strict";e.exports=function(t){return t||0===t?t.toString():""}},{}],296:[function(t,e,r){"use strict";var n=t("vectorize-text");e.exports=function(t,e,r){var i=a[e];i||(i=a[e]={});if(t in i)return i[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,c,u=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:i,fragment:l,attributes:u},f={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:i,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},v={vertex:s,fragment:c,attributes:u};function m(t,e){var r=n(t,e),a=r.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,r}r.createPerspective=function(t){return m(t,h)},r.createOrtho=function(t){return m(t,f)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{"gl-shader":302,glslify:410}],298:[function(t,e,r){"use strict";var n=t("is-string-blank"),a=t("gl-buffer"),i=t("gl-vao"),o=t("typedarray-pool"),s=t("gl-mat4/multiply"),l=t("./lib/shaders"),c=t("./lib/glyphs"),u=t("./lib/get-simple-string"),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(t,e){var r=t[0],n=t[1],a=t[2],i=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*n+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*n+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*n+e[11]*a+e[15]*i,t}function p(t,e,r,n){return f(n,n),f(n,n),f(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t){return!0===t?1:t>1?1:t}function v(t,e,r,n,a,i,o,s,l,c,u,h){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=a,this.colorBuffer=i,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),h=a(e),f=a(e),p=a(e),d=a(e),g=i(e,[{buffer:h,size:3,type:e.FLOAT},{buffer:f,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),m=new v(e,r,n,o,h,f,p,d,g,s,c,u);return m.update(t),m};var m=v.prototype;m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],k=h.slice(),T=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n){var a,i=e.axesProject,o=e.gl,l=t.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,d=e.axesBounds,g=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);a=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=u,l.projection=f,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=g,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var v=0;v<3;++v)if(i[v]){l.scale=e.projectScale[v],l.opacity=e.projectOpacity[v];for(var m=k,C=0;C<16;++C)m[C]=0;for(C=0;C<4;++C)m[5*C]=1;m[5*v]=0,a[v]<0?m[12+v]=d[0][v]:m[12+v]=d[1][v],s(m,c,m),l.model=m;var L=(v+1)%3,P=(v+2)%3,O=M(x),I=M(b);O[L]=1,I[P]=1;var z=p(0,0,0,S(_,O)),D=p(0,0,0,S(w,I));if(Math.abs(z[1])>Math.abs(D[1])){var R=z;z=D,D=R,R=O,O=I,I=R;var F=L;L=P,P=F}z[0]<0&&(O[L]=-1),D[1]>0&&(I[P]=-1);var B=0,N=0;for(C=0;C<4;++C)B+=Math.pow(c[4*L+C],2),N+=Math.pow(c[4*P+C],2);O[L]/=Math.sqrt(B),I[P]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=I,l.fragClipBounds[0]=E(T,g[0],v,-1e8),l.fragClipBounds[1]=E(T,g[1],v,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function P(t,e,r,n,a,i,o){var s=r.gl;if((i===r.projectHasAlpha||o)&&C(e,r,n,a),i===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||h,l.view=n.view||h,l.projection=n.projection||h,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=L,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=a,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*a),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(t,e,r,a){var i;i=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var a=0;a<3;++a)n.position[a]=n.dataCoordinate[a]=r[a];return n},m.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,a=e>>16&255;this.highlightId=[r/255,n/255,a/255,0]}else this.highlightId=[1,1,1,1]},m.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=g(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=g(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var a,i,s=t.position,l=t.font||"normal",c=t.alignment||[0,0];if(2===c.length)a=c[0],i=c[1];else{a=[],i=[];for(n=0;n0){var I=0,z=x,D=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(m)&&Array.isArray(m[0]);t:for(n=0;n<_;++n){y+=1;for(w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue t;h[k]=Math.max(h[k],w[k]),u[k]=Math.min(u[k],w[k])}T=(N=O(f,n,l,this.pixelRatio)).mesh,A=N.lines,M=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(V=F?n0?1-M[0][0]:Y<0?1+M[1][0]:1,W*=W>0?1-M[0][1]:W<0?1+M[1][1]:1],Z=T.cells||[],J=T.positions||[];for(k=0;k0){var m=r*u;o.drawBox(h-m,f-m,p+m,f+m,i),o.drawBox(h-m,d-m,p+m,d+m,i),o.drawBox(h-m,f-m,h+m,d+m,i),o.drawBox(p-m,f-m,p+m,d+m,i)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":299,"gl-buffer":242,"gl-shader":302}],301:[function(t,e,r){"use strict";e.exports=function(t,e){var r=n(t,e),i=a.mallocUint8(e[0]*e[1]*4);return new c(t,r,i)};var n=t("gl-fbo"),a=t("typedarray-pool"),i=t("ndarray"),o=t("bit-twiddle").nextPow2,s=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_fthis.buffer.length){a.free(this.buffer);for(var n=this.buffer=a.mallocUint8(o(r*e*4)),i=0;ir)for(t=r;te)for(t=e;t=0){for(var k=0|w.type.charAt(w.type.length-1),T=new Array(k),A=0;A=0;)M+=1;_[y]=M}var S=new Array(r.length);function E(){f.program=o.program(p,f._vref,f._fref,b,_);for(var t=0;t=0){var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);o(t,e,p[0],a,d,i,h)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+f);var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);s(t,e,p,a,d,i,h)}}}return i};var n=t("./GLError");function a(t,e,r,n,a,i){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=a,this._constFunc=i}var i=a.prototype;function o(t,e,r,n,i,o,s){for(var l=["gl","v"],c=[],u=0;u4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new a("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new a("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new a("","Unrecognized data type for vector "+name+": "+r)}}}function c(e){for(var n=["return function updateProperty(obj){"],a=function t(e,r){if("object"!=typeof r)return[[e,r]];var n=[];for(var a in r){var i=r[a],o=e;parseInt(a)+""===a?o+="["+a+"]":o+="."+a,"object"==typeof i?n.push.apply(n,t(o,i)):n.push([o,i])}return n}("",e),i=0;i4)throw new a("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new a("","Unknown uniform data type for "+name+": "+t)}}(r[u].type);var p}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float tubeScale;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:410}],313:[function(t,e,r){"use strict";var n=t("gl-shader"),a=t("gl-buffer"),i=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./shaders"),g=d.meshShader,v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,y,x,b,_,w,k,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=a,this.triangleVectors=i,this.triangleColors=s,this.triangleNormals=c,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=u,this.triangleCount=0,this.lineWidth=1,this.edgePositions=h,this.edgeColors=p,this.edgeUVs=d,this.edgeIds=f,this.edgeVAO=g,this.edgeCount=0,this.pointPositions=v,this.pointColors=x,this.pointUVs=b,this.pointSizes=_,this.pointIds=y,this.pointVAO=w,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1],this.pixelRatio=1}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,a=e.vertexWeights,i=r.length,o=p.mallocFloat32(6*i),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,a=t.projection||m,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:a,clipBounds:i,tubeScale:this.tubeScale,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=a(t),h=a(t),f=a(t),p=a(t),d=a(t),v=a(t),m=i(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:4}]),x=a(t),_=a(t),w=a(t),k=a(t),T=i(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=a(t),M=a(t),S=a(t),E=a(t),C=a(t),L=i(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=a(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,i(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":312,colormap:127,"gl-buffer":242,"gl-mat4/invert":266,"gl-mat4/multiply":268,"gl-shader":302,"gl-texture2d":323,"gl-vao":328,ndarray:451,normals:454,"simplicial-complex-contour":519,"typedarray-pool":546}],314:[function(t,e,r){"use strict";var n=t("gl-vec3"),a=t("gl-vec4"),i=function(t,e,r,i){for(var o=0,s=0;so&&(o=u)}var h=t.map(function(t){return function(t,e,r,i){var o,s,l,c=t.points,u=t.velocities,h=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var f=[],p=[],d=[],g=[],v=[],m=[],y=0,x=0,b=a.create(),_=a.create(),w=0;w0)for(k=0;k<8;k++){var T=(k+1)%8;f.push(g[k],v[k],v[T],v[T],g[T],g[k]),d.push(_,b,b,b,_,_),m.push(y,x,x,x,y,y),p.push([f.length-6,f.length-5,f.length-4],[f.length-3,f.length-2,f.length-1])}var A=g;g=v,v=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:f,cells:p,vectors:d,vertexIntensity:m}}(t,r,i,o)}),f=[],p=[],d=[],g=[];for(s=0;se)return r-1}return r},c=n.create(),u=n.create(),h=function(t,e,r){return tr?r:t},f=function(t,e,r,a){var i=t[0],o=t[1],s=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],i),v=l(r[1],o),m=l(r[2],s),y=g+1,x=v+1,b=m+1;if(r[0][g]===i&&(y=g),r[1][v]===o&&(x=v),r[2][m]===s&&(b=m),a&&(g=h(g,0,f-1),y=h(y,0,f-1),v=h(v,0,p-1),x=h(x,0,p-1),m=h(m,0,d-1),b=h(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(i-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][v])/(r[1][x]-r[1][v]),k=(s-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],I=e[S+T+C],z=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(c,O,I,_),n.lerp(B,B,c,w),n.lerp(c,z,D,_),n.lerp(u,R,F,_),n.lerp(c,c,u,w),n.lerp(B,B,c,k),B},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r=h&&r<=g&&n>=f&&n<=v&&a>=d&&a<=m},x=10*n.distance(e[0],e[1])/a,b=x*x,_=1,w=0;n.create();r.length>=2&&(_=function(t){for(var e=[],r=[],n=[],a={},i={},o={},s=0;sw&&!isNaN(z)&&isFinite(z)&&(w=z),C.push(z),u.push({points:A,velocities:M,divergences:C});for(var P=0;P<100*a&&A.lengthb&&n.scale(O,O,x/Math.sqrt(I)),n.add(O,O,T),S=t.getVelocity(O),n.squaredDistance(E,O)-b>-1e-4*b){A.push(O),E=O,M.push(S);L=t.getDivergence(O,S);(z=n.length(L))>w&&!isNaN(z)&&isFinite(z)&&(w=z),C.push(z)}T=O}}for(k=0;k max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(t){var e=n(t,i,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":302,glslify:410}],316:[function(t,e,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],317:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=a(e),u=i(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=a(e),f=i(e,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),p=a(e),d=i(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,h,f,p,d,[0,0,0]),m={levels:[[],[],[]]};for(var k in t)m[k]=t[k];return m.colormap=m.colormap||"jet",v.update(m),v};var n=t("bit-twiddle"),a=t("gl-buffer"),i=t("gl-vao"),o=t("gl-texture2d"),s=t("typedarray-pool"),l=t("colormap"),c=t("ndarray-ops"),u=t("ndarray-pack"),h=t("ndarray"),f=t("surface-nets"),p=t("gl-mat4/multiply"),d=t("gl-mat4/invert"),g=t("binary-search-bounds"),v=t("ndarray-gradient"),m=t("./lib/shaders"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,a){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=a}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(t,e,r,n,a,i,o,l,c,u,f,p,d,g,v){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=v,this.intensityBounds=[],this._shader=n,this._pickShader=a,this._coordinateBuffer=i,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.isTransparent=function(){return this.opacity<1},C.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},C.pickSlots=1,C.setPickBase=function(t){this.pickId=t};var L=[0,0,0],P={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,a,i=e.axes&&e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=P.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(i[r]>0)][r],p(l,t.model,l);var c=P.clipBounds[r];for(a=0;a<2;++a)for(n=0;n<3;++n)c[a][n]=t.clipBounds[a][n];c[0][r]=-1e8,c[1][r]=1e8}return P.showSurface=o,P.showContour=s,P}var I={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},z=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var a=0;a<2;++a)for(var i=n.clipBounds[a],o=0;o<3;++o)i[o]=Math.min(Math.max(this.clipBounds[a][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=z;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),a=0;a<3;++a)n.eyePosition[a]=s[12+a]/s[15];var l=s[15];for(a=0;a<3;++a)l+=this.lightPosition[a]*s[4*a+3];for(a=0;a<3;++a){var c=s[12+a];for(o=0;o<3;++o)c+=s[4*o+a]*this.lightPosition[o];n.lightPosition[a]=c/l}var u=O(n,this);if(u.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[a],this._shader.uniforms.clipBounds=u.clipBounds[a],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!e){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var f=this._contourVAO;for(f.bind(),a=0;a<3;++a)for(h.uniforms.permutation=A[a],r.lineWidth(this.contourWidth[a]*this.pixelRatio),o=0;o>4)/16)/255,a=Math.floor(n),i=n-a,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;a+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?i:1-i,f=0;f<2;++f)for(var p=a+u,d=s+f,v=h*(f?l:1-l),m=0;m<3;++m)c[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=i<.5?a:a+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},C.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},C.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=B(t.contourWidth,Number)),"showContour"in t&&(this.showContour=B(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=B(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=j(t.contourColor)),"contourProject"in t&&(this.contourProject=B(t.contourProject,function(t){return B(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=j(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=B(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=B(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var a=(e.shape[0]+2)*(e.shape[1]+2);a>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(a))),this._field[2]=h(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var i=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[i[0]+2,i[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var d=p[o];for(b=0;b<2;++b)if(d.shape[b]!==i[b])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var m=g[o];if((Array.isArray(m)||m.length)&&(m=h(m)),m.shape[0]!==i[o])throw new Error("gl-surface: invalid tick length");var y=h(m.data,i);y.stride[o]=m.stride[0],y.stride[1^o]=0,this.padField(this._field[o],y)}}else{for(o=0;o<2;++o){var x=[0,0];x[o]=1,this._field[o]=h(this._field[o].data,[i[0]+2,i[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b0){for(var kt=0;kt<5;++kt)rt.pop();G-=1}continue t}rt.push(st[0],st[1],ut[0],ut[1],st[2]),G+=1}}ot.push(G)}this._contourOffsets[nt]=it,this._contourCounts[nt]=ot}var Tt=s.mallocFloat(rt.length);for(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:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=a(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=h(t.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,i=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var a=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&a==e.font[r].baseString||(i=!0,e.font[r]=k.fonts[a],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:a,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[a]=e.font[r]}}),(i||o)&&this.font.forEach(function(r,a){var i=n.stringify({size:e.fontSize[a],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[a]=e.shader.atlas[i],!e.fontAtlas[a]){var o=r.metrics;e.shader.atlas[i]=e.fontAtlas[a]={fontString:i,step:2*Math.ceil(e.fontSize[a]*o.bottom*.5),em:e.fontSize[a],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),f=0;f2){for(var w=!t.position[0].length,T=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,a=0;return a+=.5*n.bottom,a+="number"==typeof t?t-n.baseline:-n[t],k.normalViewport||(a*=-1),a})),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var 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=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{"bit-twiddle":93,"color-normalize":121,"css-font":140,"detect-kerning":167,"es6-weak-map":319,"flatten-vertex-data":228,"font-atlas":229,"font-measure":230,"gl-util/context":324,"is-plain-obj":423,"object-assign":455,"parse-rect":460,"parse-unit":462,"pick-by-alias":466,regl:503,"to-px":540,"typedarray-pool":546}],319:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?WeakMap:t("./polyfill")},{"./is-implemented":320,"./polyfill":322}],320:[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)))))}},{}],321:[function(t,e,r){"use strict";e.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],322:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/is-value"),i=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"),h=t("es6-iterator/for-of"),f=t("es6-symbol").toStringTag,p=t("./is-native-implemented"),d=Array.isArray,g=Object.defineProperty,v=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=p&&i&&WeakMap!==n?i(new WeakMap,m(this)):this,a(e)&&(d(e)||(e=u(e))),g(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(h(e,function(e){s(e),t.set(e[0],e[1])}),t):t},p&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c(function(t){return!!v.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:c(function(t){if(v.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:c(function(t){return v.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,f,c("c","WeakMap"))},{"./is-native-implemented":321,d:152,"es5-ext/object/is-value":195,"es5-ext/object/set-prototype-of":201,"es5-ext/object/valid-object":205,"es5-ext/object/valid-value":206,"es5-ext/string/random-uniq":211,"es6-iterator/for-of":213,"es6-iterator/get":214,"es6-symbol":220}],323:[function(t,e,r){"use strict";var n=t("ndarray"),a=t("ndarray-ops"),i=t("typedarray-pool");e.exports=function(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if("number"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,a,i){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,a,a,i,e),new f(t,o,r,n,a,i)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=d(o,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var h,p,v=0;if(2===o.length)v=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])v=t.ALPHA;else if(2===o[2])v=t.LUMINANCE_ALPHA;else if(3===o[2])v=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)h=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];p=i.malloc(m,r);var x=n(p,o,y,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?a.assign(x,e):u(x,e),h=p.subarray(0,m)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,v,o[0],o[1],0,v,c,h),l||i.free(p);return new f(t,b,o[0],o[1],v,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){a.muls(t,e,255)};function h(t,e,r){var n=t.gl,a=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function f(t,e,r,n,a,i){this.gl=t,this.handle=e,this.format=a,this.type=i,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=f.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,a){var i=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture shape");if(a===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,a,null),new f(t,o,e,r,n,a)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,c,h){var f=h.dtype,p=h.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var g=0,v=0,m=d(p,h.stride.slice());"float32"===f?g=t.FLOAT:"float64"===f?(g=t.FLOAT,m=!1,f="float32"):"uint8"===f?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,m=!1,f="uint8");if(2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],h=n(h.data,p,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}p[2]}v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s);if(v!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=h.size,x=c.indexOf(o)<0;x&&c.push(o);if(g===l&&m)0===h.offset&&h.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data.subarray(h.offset,h.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data.subarray(h.offset,h.offset+y));else{var b;b=l===t.FLOAT?i.mallocFloat32(y):i.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,h):a.assign(_,h),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?i.freeFloat32(b):i.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":546}],324:[function(t,e,r){(function(r){"use strict";var n=t("pick-by-alias");function a(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 i(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={},i(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}i(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),a(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),a(t)}if(!t.gl)try{t.gl=t.canvas.getContext("webgl",t.attrs)}catch(e){try{t.gl=t.canvas.getContext("experimental-webgl",t.attrs)}catch(e){t.gl=t.canvas.getContext("webgl-experimental",t.attrs)}}return t.gl}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":466}],325:[function(t,e,r){"use strict";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var a=0;a1?0:Math.acos(s)};var n=t("./fromValues"),a=t("./normalize"),i=t("./dot")},{"./dot":340,"./fromValues":346,"./normalize":357}],331:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],332:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],333:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],334:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],335:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[0],s=r[1],l=r[2];return t[0]=a*l-i*s,t[1]=i*o-n*l,t[2]=n*s-a*o,t}},{}],336:[function(t,e,r){e.exports=t("./distance")},{"./distance":337}],337:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return Math.sqrt(r*r+n*n+a*a)}},{}],338:[function(t,e,r){e.exports=t("./divide")},{"./divide":339}],339:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],340:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],341:[function(t,e,r){e.exports=1e-6},{}],342:[function(t,e,r){e.exports=function(t,e){var r=t[0],a=t[1],i=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(a-s)<=n*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-l)<=n*Math.max(1,Math.abs(i),Math.abs(l))};var n=t("./epsilon")},{"./epsilon":341}],343:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],344:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],345:[function(t,e,r){e.exports=function(t,e,r,a,i,o){var s,l;e||(e=3);r||(r=0);l=a?Math.min(a*e+r,t.length):t.length;for(s=r;s0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i);return t}},{}],358:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=n*e,t}},{}],359:[function(t,e,r){e.exports=function(t,e,r,n){var a=r[1],i=r[2],o=e[1]-a,s=e[2]-i,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=a+o*c-s*l,t[2]=i+o*l+s*c,t}},{}],360:[function(t,e,r){e.exports=function(t,e,r,n){var a=r[0],i=r[2],o=e[0]-a,s=e[2]-i,l=Math.sin(n),c=Math.cos(n);return t[0]=a+s*l+o*c,t[1]=e[1],t[2]=i+s*c-o*l,t}},{}],361:[function(t,e,r){e.exports=function(t,e,r,n){var a=r[0],i=r[1],o=e[0]-a,s=e[1]-i,l=Math.sin(n),c=Math.cos(n);return t[0]=a+o*c-s*l,t[1]=i+o*l+s*c,t[2]=e[2],t}},{}],362:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],363:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],364:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],365:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],366:[function(t,e,r){e.exports=t("./squaredDistance")},{"./squaredDistance":368}],367:[function(t,e,r){e.exports=t("./squaredLength")},{"./squaredLength":369}],368:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return r*r+n*n+a*a}},{}],369:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],370:[function(t,e,r){e.exports=t("./subtract")},{"./subtract":371}],371:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],372:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2];return t[0]=n*r[0]+a*r[3]+i*r[6],t[1]=n*r[1]+a*r[4]+i*r[7],t[2]=n*r[2]+a*r[5]+i*r[8],t}},{}],373:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[3]*n+r[7]*a+r[11]*i+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])/o,t[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])/o,t[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])/o,t}},{}],374:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*i-l*a,h=c*a+l*n-o*i,f=c*i+o*a-s*n,p=-o*n-s*a-l*i;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t}},{}],375:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],376:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],377:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],378:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],379:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2],i=e[3]-t[3];return Math.sqrt(r*r+n*n+a*a+i*i)}},{}],380:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],381:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],382:[function(t,e,r){e.exports=function(t,e,r,n){var a=new Float32Array(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=n,a}},{}],383:[function(t,e,r){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),inverse:t("./inverse"),normalize:t("./normalize"),dot:t("./dot"),lerp:t("./lerp"),random:t("./random"),transformMat4:t("./transformMat4"),transformQuat:t("./transformQuat")}},{"./add":375,"./clone":376,"./copy":377,"./create":378,"./distance":379,"./divide":380,"./dot":381,"./fromValues":382,"./inverse":384,"./length":385,"./lerp":386,"./max":387,"./min":388,"./multiply":389,"./negate":390,"./normalize":391,"./random":392,"./scale":393,"./scaleAndAdd":394,"./set":395,"./squaredDistance":396,"./squaredLength":397,"./subtract":398,"./transformMat4":399,"./transformQuat":400}],384:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],385:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],a=t[3];return Math.sqrt(e*e+r*r+n*n+a*a)}},{}],386:[function(t,e,r){e.exports=function(t,e,r,n){var a=e[0],i=e[1],o=e[2],s=e[3];return t[0]=a+n*(r[0]-a),t[1]=i+n*(r[1]-i),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],387:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],388:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],389:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],390:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],391:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],a=e[2],i=e[3],o=r*r+n*n+a*a+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=a*o,t[3]=i*o);return t}},{}],392:[function(t,e,r){var n=t("./normalize"),a=t("./scale");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),a(t,t,e),t}},{"./normalize":391,"./scale":393}],393:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],394:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],395:[function(t,e,r){e.exports=function(t,e,r,n,a){return t[0]=e,t[1]=r,t[2]=n,t[3]=a,t}},{}],396:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2],i=e[3]-t[3];return r*r+n*n+a*a+i*i}},{}],397:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],a=t[3];return e*e+r*r+n*n+a*a}},{}],398:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],399:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,t}},{}],400:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*i-l*a,h=c*a+l*n-o*i,f=c*i+o*a-s*n,p=-o*n-s*a-l*i;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t[3]=e[3],t}},{}],401:[function(t,e,r){e.exports=function(t,e,r,i){return n[0]=i,n[1]=r,n[2]=e,n[3]=t,a[0]};var n=new Uint8Array(4),a=new Float32Array(n.buffer)},{}],402:[function(t,e,r){var n=t("glsl-tokenizer"),a=t("atob-lite");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return F(r),P+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function G(){return"."===e?(S.push(e),M=g,r=e,T+1):/[eE]/.test(e)?(S.push(e),M=g,r=e,T+1):"x"===e&&1===S.length&&"0"===S[0]?(M=_,S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function Y(){return"f"===e&&(S.push(e),r=e,T+=1),/[eE]/.test(e)?(S.push(e),r=e,T+1):"-"===e&&/[eE]/.test(r)?(S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function W(){if(/[^\d\w_]/.test(e)){var t=S.join("");return M=R.indexOf(t)>-1?y:D.indexOf(t)>-1?m:v,F(S.join("")),M=l,T}return S.push(e),r=e,T+1}};var n=t("./lib/literals"),a=t("./lib/operators"),i=t("./lib/builtins"),o=t("./lib/literals-300es"),s=t("./lib/builtins-300es"),l=999,c=9999,u=0,h=1,f=2,p=3,d=4,g=5,v=6,m=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":405,"./lib/builtins-300es":404,"./lib/literals":407,"./lib/literals-300es":406,"./lib/operators":408}],404:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":405}],405:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],406:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":407}],407:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],408:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],409:[function(t,e,r){var n=t("./index");e.exports=function(t,e){var r=n(e),a=[];return a=(a=a.concat(r(t))).concat(r(null))}},{"./index":403}],410:[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,h=r?a-1:0,f=r?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+t[e+h],h+=f,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=c}return(p?-1:1)*o*Math.pow(2,i-n)},r.write=function(t,e,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<>1,f=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,a),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,a),o=0));a>=8;t[r+p]=255&s,p+=d,s/=256,a-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],414:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var a=t[0].length;if(r<=a)throw new Error("Must input at least d+1 points");var o=t.slice(0,a+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(a+1),u=0;u<=a;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new i(l,new Array(a+1),!1),f=h.adjacent,p=new Array(a+2),u=0;u<=a;++u){for(var d=l.slice(),g=0;g<=a;++g)g===u&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new i(d,new Array(a+1),!0);f[u]=m,p[u]=m}p[a+1]=h;for(var u=0;u<=a;++u)for(var d=f[u].vertices,y=f[u].adjacent,g=0;g<=a;++g){var x=d[g];if(x<0)y[g]=h;else for(var b=0;b<=a;++b)f[b].vertices.indexOf(x)<0&&(y[g]=f[b])}for(var _=new c(a,o,p),w=!!e,u=a+1;u0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var a=new Function("test",e.join("")),i=n[t+1];return i||(i=n),a(i)}(t)),this.orient=i}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,a=this.tuple,i=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var f=u[h];a[h]=f<0?e:i[f]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,i=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)i[u]=a[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=i[u];i[u]=t;var p=this.orient();if(i[u]=f,p<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var f=[];h.length>0;){var p=(e=h.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=a[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,c.push(m),h.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),T=new i(w,k,!0);u.push(T);var A=_.indexOf(e);if(!(A<0)){_[A]=T,k[g]=m,w[v]=-1,k[v]=e,d[v]=T,T.flip();for(b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}f.push(new o(S,T,b))}}}}}}f.sort(s);for(v=0;v+1=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":511,"simplicial-complex":521}],415:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),a=0,i=1;function o(t,e,r,n,a){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=a,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function h(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?a:(r.splice(n,1),c(t,r),i)}function f(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var a=r(t[n]);if(a)return a}}function d(t,e){for(var r=0;r>1],a=[],i=[],s=[];for(r=0;r3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,v),a=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(a,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?h(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,i):(c===i&&(this.count-=1),c):a;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?h(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,i):(c===i&&(this.count-=1),c):a;if(1===this.count)return this.leftPoints[0]===t?2:a;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return i}for(s=n.ge(this.leftPoints,t,v);sthis.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return ethis.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==a}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":92}],416:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r13)&&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}},{}],425:[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))}},{}],426:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],427:[function(t,e,r){var n,a;n=this,a=function(){"use strict";var t,e,r;function n(n,a){if(t)if(e){var i="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",o={};t(o),(r=a(o)).workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"}))}else e=a;else t=a}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,a,i,o;for(void 0===e&&(e=1e-6),a=t,o=0;o<8;o++){if(i=this.sampleCurveX(a)-t,Math.abs(i)(n=1))return n;for(;ri?r=a:n=a,a=.5*(n-r)+r}return a},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var a=i;function i(t,e){this.x=t,this.y=e}function o(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r0;)e[r]=arguments[r+1];for(var n=0,a=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function g(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 v(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 y(t,e,r){var n={};for(var a in t)n[a]=e.call(r||this,t[a],a,t);return n}function x(t,e,r){var n={};for(var a in t)e.call(r||this,t[a],a,t)&&(n[a]=t[a]);return n}function b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?y(t,b):t}var _={};function w(t){_[t]||("undefined"!=typeof console&&console.warn(t),_[t]=!0)}function k(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,a=n-1,i=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,r,n,a){var i=n||a;return e[r]=!i||i.toLowerCase(),""}),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}function M(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var S,E,C,L,P=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),O=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,I=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,z={now:P,frame:function(t){var e=O(t);return{cancel:function(){return I(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){return S||(S=self.document.createElement("a")),S.href=t,S.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==E&&(E=self.matchMedia("(prefers-reduced-motion: reduce)")),E.matches)}},D={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},R={supported:!1,testSupport:function(t){!F&&L&&(B?N(t):C=t)}},F=!1,B=!1;function N(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,L),t.isContextLost())return;R.supported=!0}catch(t){}t.deleteTexture(e),F=!0}self.document&&((L=self.document.createElement("img")).onload=function(){C&&N(C),C=null,B=!0},L.onerror=function(){F=!0,C=null},L.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var j="01",V=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function U(t){return 0===t.indexOf("mapbox:")}V.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",j,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},V.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},V.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},V.prototype.normalizeStyleURL=function(t,e){if(!U(t))return t;var r=Y(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},V.prototype.normalizeGlyphsURL=function(t,e){if(!U(t))return t;var r=Y(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},V.prototype.normalizeSourceURL=function(t,e){if(!U(t))return t;var r=Y(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},V.prototype.normalizeSpriteURL=function(t,e,r,n){var a=Y(t);return U(t)?(a.path="/styles/v1"+a.path+"/sprite"+e+r,this._makeAPIURL(a,this._customAccessToken||n)):(a.path+=""+e+r,W(a))},V.prototype.normalizeTileURL=function(t,e,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),!e||!U(e))return t;var n=Y(t),a=z.devicePixelRatio>=2||512===r?"@2x":"",i=R.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+a+i),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,D.REQUIRE_ACCESS_TOKEN&&(D.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},V.prototype.canonicalizeTileURL=function(t){var e=Y(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match(/\.[\w]+$/))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var n=e.params.filter(function(t){return!t.match(/^access_token=/)});return n.length&&(r+="?"+n.join("&")),r},V.prototype.canonicalizeTileset=function(t,e){if(!U(e))return t.tiles||[];for(var r=[],n=0,a=t.tiles;n=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Z.prototype.processRequests=function(t){},Z.prototype.postEvent=function(t,e,r,n){var a=this;if(D.EVENTS_URL){var i=Y(D.EVENTS_URL);i.params.push("access_token="+(n||D.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.3.2",skuId:j,userId:this.anonId},s=e?h(o,e):o,l={url:W(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=mt(l,function(t){a.pendingRequest=null,r(t),a.saveEventData(),a.processRequests(n)})}},Z.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var J,K=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,(D.EVENTS_URL&&n||D.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return U(t)||H(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,a=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=d()),this.postEvent(a,{skuToken:this.skuToken},function(t){t||n&&(e.success[n]=!0)},t))}},e}(Z),Q=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){D.EVENTS_URL&&D.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return U(t)||H(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=X(D.ACCESS_TOKEN),n=r?r.u:D.ACCESS_TOKEN,a=n!==this.eventData.tokenU;g(this.anonId)||(this.anonId=d(),a=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(i),l=(i-this.eventData.lastSuccess)/864e5;a=a||l>=1||l<-1||o.getDate()!==s.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},function(t){t||(e.eventData.lastSuccess=i,e.eventData.tokenU=n)},t)}},e}(Z)),$=Q.postTurnstileEvent.bind(Q),tt=new K,et=tt.postMapLoadEvent.bind(tt),rt="mapbox-tiles",nt=500,at=50,it=42e4;function ot(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var st=1/0,lt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(lt);var ct=function(t){function e(e,r,n){401===r&&H(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);function ut(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var ht=ut()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function ft(t,e){var r,n=new self.AbortController,a=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:ht(),signal:n.signal}),i=!1,o=!1,s=(r=a.url).indexOf("sku=")>0&&H(r);"json"===t.type&&a.headers.set("Accept","application/json");var l=function(r,n,i){if(!o){if(r&&"SecurityError"!==r.message&&w(r),n&&i)return c(n);var l=Date.now();self.fetch(a).then(function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new ct(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&&function(t,e,r){if(self.caches){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 a=A(e.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&n.headers.set("Expires",new Date(r+1e3*a["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-rDate.now()&&!r["no-cache"]}(n);t.delete(r),a&&t.put(r,n.clone()),e(null,n,a)}).catch(e)}).catch(e)}(a,l):l(null,null),{cancel:function(){o=!0,i||n.abort()}}}var pt,dt,gt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(ht())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return ft(t,e);if(ut()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}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 ct(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},vt=function(t,e){return gt(h(t,{type:"arrayBuffer"}),e)},mt=function(t,e){return gt(h(t,{method:"POST"}),e)};pt=[],dt=0;var yt=function(t,e){if(dt>=D.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return pt.push(r),r}dt++;var n=!1,a=function(){if(!n)for(n=!0,dt--;pt.length&&dt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},kt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Tt={$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"},"*":{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}},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:"string",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"},{"!":"text-variable-anchor"}],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":{}}},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:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"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"},"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"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"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:"string",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:"string",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:"string",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:"string",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"}}},At=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Mt(t){var e=t.key,r=t.value;return r?[new At(e,r,"constants have been deprecated as of v8")]:[]}function St(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,a=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Ht=[It,zt,Dt,Rt,Ft,Vt,Bt,Ut(Nt)];function Gt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Gt(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=Ht;r255?255:t}function a(t){return t<0?0:t>1?1:t}function i(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?a(parseFloat(t)/100):a(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,a=t.replace(/ /g,"").toLowerCase();if(a in r)return r[a].slice();if("#"===a[0])return 4===a.length?(e=parseInt(a.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===a.length&&(e=parseInt(a.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=a.indexOf("("),c=a.indexOf(")");if(-1!==l&&c+1===a.length){var u=a.substr(0,l),h=a.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[i(h[0]),i(h[1]),i(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),g=o(h[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),f];default:return null}}return null}}catch(t){}}).parseCSSColor,Wt=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};Wt.parse=function(t){if(t){if(t instanceof Wt)return t;if("string"==typeof t){var e=Yt(t);if(e)return new Wt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Wt.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],a=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+a+")"},Wt.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]},Wt.black=new Wt(0,0,0,1),Wt.white=new Wt(1,1,1,1),Wt.transparent=new Wt(0,0,0,0),Wt.red=new Wt(1,0,0,1);var Xt=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"})};Xt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Xt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Zt=function(t,e,r,n){this.text=t,this.scale=e,this.fontStack=r,this.textColor=n},Jt=function(t){this.sections=t};function Kt(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Qt(t){if(null===t)return It;if("string"==typeof t)return Dt;if("boolean"==typeof t)return Rt;if("number"==typeof t)return zt;if(t instanceof Wt)return Ft;if(t instanceof Xt)return jt;if(t instanceof Jt)return Vt;if(Array.isArray(t)){for(var e,r=t.length,n=0,a=t;n2){var s=t[1];if("string"!=typeof s||!(s in re)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=re[s],n++}else i=Nt;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=Ut(i,o)}else r=re[a];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var ae=function(t){this.type=Vt,this.sections=t};ae.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],n=1;n4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":Kt(e[0],e[1],e[2],e[3])))return new Wt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ee(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=0)return!1;var r=!0;return t.eachChild(function(t){r&&!pe(t,e)&&(r=!1)}),r}ue.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Rt);if(!n)return null;var a=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Rt);if(!a)return null;var i=null;return r.locale&&!(i=e.parse(r.locale,1,Dt))?null:new ue(n,a,i)},ue.prototype.evaluate=function(t){return new Xt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ue.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ue.prototype.possibleOutputs=function(){return[void 0]},ue.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var de=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};de.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new de(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},de.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},de.prototype.eachChild=function(){},de.prototype.possibleOutputs=function(){return[void 0]},de.prototype.serialize=function(){return["var",this.name]};var ge=function(t,e,r,n,a){void 0===e&&(e=[]),void 0===n&&(n=new Ot),void 0===a&&(a=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=n,this.errors=a,this.expectedType=r};function ve(t,e){for(var r,n,a=t.length-1,i=0,o=a,s=0;i<=o;)if(r=t[s=Math.floor((i+o)/2)],n=t[s+1],r<=e){if(s===a||ee))throw new ee("Input is not a number.");o=s-1}return 0}ge.prototype.parse=function(t,e,r,n,a){return void 0===a&&(a={}),e?this.concat(e,r,n)._parse(t,a):this._parse(t,a)},ge.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ne(e,[t]):"coerce"===r?new oe(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 a=this.registry[n];if(a){var i=a.parse(t,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.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||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=r(i,o,e.typeAnnotation||"coerce");else i=r(i,o,e.typeAnnotation||"assert")}if(!(i instanceof te)&&function t(e){if(e instanceof de)return t(e.boundExpression);if(e instanceof ce&&"error"===e.name)return!1;if(e instanceof ue)return!1;var r=e instanceof oe||e instanceof ne,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof te}),!!n&&(he(e)&&pe(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]))}(i)){var l=new le;try{i=new te(i.type,i.evaluate(l))}catch(t){return this.error(t.message),null}}return i}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.")},ge.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,a=r?this.scope.concat(r):this.scope;return new ge(this.registry,n,e||null,a,this.errors)},ge.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 Pt(n,t))},ge.prototype.checkSubtype=function(t,e){var r=Gt(t,e);return r&&this.error(r),r};var me=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,a=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,a);if(!u)return null;a=a||u.type,n.push([o,u])}return new me(a,r,n)},me.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 a=e.length;return n>=e[a-1]?r[a-1].evaluate(t):r[ve(e,n)].evaluate(t)},me.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 xe=Object.freeze({number:ye,color:function(t,e,r){return new Wt(ye(t.r,e.r,r),ye(t.g,e.g,r),ye(t.b,e.b,r),ye(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return ye(t,e[n],r)})}}),be=.95047,_e=1,we=1.08883,ke=4/29,Te=6/29,Ae=3*Te*Te,Me=Te*Te*Te,Se=Math.PI/180,Ee=180/Math.PI;function Ce(t){return t>Me?Math.pow(t,1/3):t/Ae+ke}function Le(t){return t>Te?t*t*t:Ae*(t-ke)}function Pe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ie(t){var e=Oe(t.r),r=Oe(t.g),n=Oe(t.b),a=Ce((.4124564*e+.3575761*r+.1804375*n)/be),i=Ce((.2126729*e+.7151522*r+.072175*n)/_e);return{l:116*i-16,a:500*(a-i),b:200*(i-Ce((.0193339*e+.119192*r+.9503041*n)/we)),alpha:t.a}}function ze(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=_e*Le(e),r=be*Le(r),n=we*Le(n),new Wt(Pe(3.2404542*r-1.5371385*e-.4985314*n),Pe(-.969266*r+1.8760108*e+.041556*n),Pe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var De={forward:Ie,reverse:ze,interpolate:function(t,e,r){return{l:ye(t.l,e.l,r),a:ye(t.a,e.a,r),b:ye(t.b,e.b,r),alpha:ye(t.alpha,e.alpha,r)}}},Re={forward:function(t){var e=Ie(t),r=e.l,n=e.a,a=e.b,i=Math.atan2(a,n)*Ee;return{h:i<0?i+360:i,c:Math.sqrt(n*n+a*a),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Se,r=t.c;return ze({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:ye(t.c,e.c,r),l:ye(t.l,e.l,r),alpha:ye(t.alpha,e.alpha,r)}}},Fe=Object.freeze({lab:De,hcl:Re}),Be=function(t,e,r,n,a){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=a;i1}))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(!(a=e.parse(a,2,zt)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Ft:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(f,d,c);if(!g)return null;c=c||g.type,l.push([h,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new Be(c,r,n,a,l):e.error("Type "+qt(c)+" is not interpolatable.")},Be.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 a=e.length;if(n>=e[a-1])return r[a-1].evaluate(t);var i=ve(e,n),o=e[i],s=e[i+1],l=Be.interpolationFactor(this.interpolation,n,o,s),c=r[i].evaluate(t),u=r[i+1].evaluate(t);return"interpolate"===this.operator?xe[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?Re.reverse(Re.interpolate(Re.forward(c),Re.forward(u),l)):De.reverse(De.interpolate(De.forward(c),De.forward(u),l))},Be.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ee("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ee("Array index must be an integer, but found "+e+" instead.");return r[e]},Ue.prototype.eachChild=function(t){t(this.index),t(this.input)},Ue.prototype.possibleOutputs=function(){return[void 0]},Ue.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var qe=function(t,e,r,n,a,i){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=a,this.otherwise=i};qe.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 a={},i=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,Qt(f)))return null}else r=Qt(f);if(void 0!==a[String(f)])return c.error("Branch labels must be unique.");a[String(f)]=i.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,i.push(p)}var d=e.parse(t[1],1,Nt);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 qe(r,n,d,a,i,g):null},qe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(Qt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},qe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},qe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},qe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},a=0,i=Object.keys(this.cases).sort();a",function(t,e,r){return e>r},function(t,e,r,n){return n.compare(e,r)>0}),Qe=We("<=",function(t,e,r){return e<=r},function(t,e,r,n){return n.compare(e,r)<=0}),$e=We(">=",function(t,e,r){return e>=r},function(t,e,r,n){return n.compare(e,r)>=0}),tr=function(t,e,r,n,a){this.type=Dt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=a};tr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,zt);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 a=null;if(n.locale&&!(a=e.parse(n.locale,1,Dt)))return null;var i=null;if(n.currency&&!(i=e.parse(n.currency,1,Dt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,zt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,zt))?null:new tr(r,a,i,o,s)},tr.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))},tr.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)},tr.prototype.possibleOutputs=function(){return[void 0]},tr.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 er=function(t){this.type=zt,this.input=t};er.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 "+qt(r.type)+" instead."):new er(r):null},er.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 ee("Expected value to be of type string or array, but found "+qt(Qt(e))+" instead.")},er.prototype.eachChild=function(t){t(this.input)},er.prototype.possibleOutputs=function(){return[void 0]},er.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var rr={"==":Xe,"!=":Ze,">":Ke,"<":Je,">=":$e,"<=":Qe,array:ne,at:Ue,boolean:ne,case:He,coalesce:je,collator:ue,format:ae,interpolate:Be,"interpolate-hcl":Be,"interpolate-lab":Be,length:er,let:Ve,literal:te,match:qe,number:ne,"number-format":tr,object:ne,step:me,string:ne,"to-boolean":oe,"to-color":oe,"to-number":oe,"to-string":oe,var:de};function nr(t,e){var r=e[0],n=e[1],a=e[2],i=e[3];r=r.evaluate(t),n=n.evaluate(t),a=a.evaluate(t);var o=i?i.evaluate(t):1,s=Kt(r,n,a,o);if(s)throw new ee(s);return new Wt(r/255*o,n/255*o,a/255*o,o)}function ar(t,e){return t in e}function ir(t,e){var r=e[t];return void 0===r?null:r}function or(t){return{type:t}}function sr(t){return{result:"success",value:t}}function lr(t){return{result:"error",value:t}}function cr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ur(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function hr(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 pr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function dr(t){return t}function gr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function vr(t,e,r,n,a){return gr(typeof r===a?n[r]:void 0,t.default,e.default)}function mr(t,e,r){if("number"!==fr(r))return gr(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 a=ve(t.stops.map(function(t){return t[0]}),r);return t.stops[a][1]}function yr(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==fr(r))return gr(t.default,e.default);var a=t.stops.length;if(1===a)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[a-1][0])return t.stops[a-1][1];var i=ve(t.stops.map(function(t){return t[0]}),r),o=function(t,e,r,n){var a=n-r,i=t-r;return 0===a?0:1===e?i/a:(Math.pow(e,i)-1)/(Math.pow(e,a)-1)}(r,n,t.stops[i][0],t.stops[i+1][0]),s=t.stops[i][1],l=t.stops[i+1][1],c=xe[e.type]||dr;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=Fe[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 xr(t,e,r){return"color"===e.type?r=Wt.parse(r):"formatted"===e.type?r=Jt.fromString(r.toString()):fr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),gr(r,t.default,e.default)}ce.register(rr,{error:[{kind:"error"},[Dt],function(t,e){var r=e[0];throw new ee(r.evaluate(t))}],typeof:[Dt,[Nt],function(t,e){return qt(Qt(e[0].evaluate(t)))}],"to-rgba":[Ut(zt,4),[Ft],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ft,[zt,zt,zt],nr],rgba:[Ft,[zt,zt,zt,zt],nr],has:{type:Rt,overloads:[[[Dt],function(t,e){return ar(e[0].evaluate(t),t.properties())}],[[Dt,Bt],function(t,e){var r=e[0],n=e[1];return ar(r.evaluate(t),n.evaluate(t))}]]},get:{type:Nt,overloads:[[[Dt],function(t,e){return ir(e[0].evaluate(t),t.properties())}],[[Dt,Bt],function(t,e){var r=e[0],n=e[1];return ir(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Nt,[Dt],function(t,e){return ir(e[0].evaluate(t),t.featureState||{})}],properties:[Bt,[],function(t){return t.properties()}],"geometry-type":[Dt,[],function(t){return t.geometryType()}],id:[Nt,[],function(t){return t.id()}],zoom:[zt,[],function(t){return t.globals.zoom}],"heatmap-density":[zt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[zt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Nt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[zt,or(zt),function(t,e){for(var r=0,n=0,a=e;n":[Rt,[Dt,Nt],function(t,e){var r=e[0],n=e[1],a=t.properties()[r.value],i=n.value;return typeof a==typeof i&&a>i}],"filter-id->":[Rt,[Nt],function(t,e){var r=e[0],n=t.id(),a=r.value;return typeof n==typeof a&&n>a}],"filter-<=":[Rt,[Dt,Nt],function(t,e){var r=e[0],n=e[1],a=t.properties()[r.value],i=n.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[Rt,[Nt],function(t,e){var r=e[0],n=t.id(),a=r.value;return typeof n==typeof a&&n<=a}],"filter->=":[Rt,[Dt,Nt],function(t,e){var r=e[0],n=e[1],a=t.properties()[r.value],i=n.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[Rt,[Nt],function(t,e){var r=e[0],n=t.id(),a=r.value;return typeof n==typeof a&&n>=a}],"filter-has":[Rt,[Nt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Rt,[],function(t){return null!==t.id()}],"filter-type-in":[Rt,[Ut(Dt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Rt,[Ut(Nt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Rt,[Dt,Ut(Nt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Rt,[Dt,Ut(Nt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var a=r+n>>1;if(e[a]===t)return!0;e[a]>t?n=a-1:r=a+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Rt,overloads:[[[Rt,Rt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[or(Rt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in rr}function wr(t,e){var r=new ge(rr,[],e?function(t){var e={color:Ft,string:Dt,number:zt,enum:Dt,boolean:Rt,formatted:Vt};return"array"===t.type?Ut(e[t.value]||Nt,t.length):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?sr(new br(n,e)):lr(r.errors)}br.prototype.evaluateWithoutErrorHandling=function(t,e,r,n){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)},br.prototype.evaluate=function(t,e,r,n){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.formattedSection=n||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new ee("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var kr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!fe(e.expression)};kr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n)},kr.prototype.evaluate=function(t,e,r,n){return this._styleExpression.evaluate(t,e,r,n)};var Tr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!fe(e.expression),this.interpolationType=n};function Ar(t,e){if("error"===(t=wr(t,e)).result)return t;var r=t.value.expression,n=he(r);if(!n&&!cr(e))return lr([new Pt("","data expressions not supported")]);var a=pe(r,["zoom"]);if(!a&&!ur(e))return lr([new Pt("","zoom expressions not supported")]);var i=function t(e){var r=null;if(e instanceof Ve)r=t(e.result);else if(e instanceof je)for(var n=0,a=e.args;nn.maximum?[new At(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Lr(t){var e,r,n,a=t.valueSpec,i=Ct(t.value.type),o={},s="categorical"!==i&&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=Sr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===i)return[new At(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Er({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===fr(r)&&0===r.length&&e.push(new At(t.key,r,"array must have at least one stop")),e},default:function(t){return Kr({key:t.key,value:t.value,valueSpec:a,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===i&&s&&u.push(new At(t.key,t.value,'missing required property "property"')),"identity"===i||t.value.stops||u.push(new At(t.key,t.value,'missing required property "stops"')),"exponential"===i&&t.valueSpec.expression&&!hr(t.valueSpec)&&u.push(new At(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!cr(t.valueSpec)?u.push(new At(t.key,t.value,"property functions not supported")):s&&!ur(t.valueSpec)&&u.push(new At(t.key,t.value,"zoom functions not supported"))),"categorical"!==i&&!c||void 0!==t.value.property||u.push(new At(t.key,t.value,'"property" property is required')),u;function h(t){var e=[],i=t.value,s=t.key;if("array"!==fr(i))return[new At(s,i,"array expected, "+fr(i)+" found")];if(2!==i.length)return[new At(s,i,"array length 2 expected, length "+i.length+" found")];if(c){if("object"!==fr(i[0]))return[new At(s,i,"object expected, "+fr(i[0])+" found")];if(void 0===i[0].zoom)return[new At(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new At(s,i,"object stop key must have value")];if(n&&n>Ct(i[0].zoom))return[new At(s,i[0].zoom,"stop zoom values must appear in ascending order")];Ct(i[0].zoom)!==n&&(n=Ct(i[0].zoom),r=void 0,o={}),e=e.concat(Sr({key:s+"[0]",value:i[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Cr,value:f}}))}else e=e.concat(f({key:s+"[0]",value:i[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},i));return _r(Lt(i[1]))?e.concat([new At(s+"[1]",i[1],"expressions are not allowed in function stops.")]):e.concat(Kr({key:s+"[1]",value:i[1],valueSpec:a,style:t.style,styleSpec:t.styleSpec}))}function f(t,n){var s=fr(t.value),l=Ct(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new At(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 At(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==i){var u="number expected, "+s+" found";return cr(a)&&void 0===i&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(t.key,c,u)]}return"categorical"!==i||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==i&&"number"===s&&void 0!==r&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);ee?1:0}function Fr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Br(t[1],t[2],"=="):"!="===r?Vr(Br(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Br(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Fr))):"all"===r?["all"].concat(t.slice(1).map(Fr)):"none"===r?["all"].concat(t.slice(1).map(Fr).map(Vr)):"in"===r?Nr(t[1],t.slice(2)):"!in"===r?Vr(Nr(t[1],t.slice(2))):"has"===r?jr(t[1]):"!has"!==r||Vr(jr(t[1]))}function Br(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 Nr(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(Rr)]]:["filter-in-small",t,["literal",e]]}}function jr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Vr(t){return["!",t]}function Ur(t){return Ir(Lt(t.value))?Pr(St({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==fr(r))return[new At(n,r,"array expected, "+fr(r)+" found")];var a,i=e.styleSpec,o=[];if(r.length<1)return[new At(n,r,"filter array must have at least 1 element")];switch(o=o.concat(Or({key:n+"[0]",value:r[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ct(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ct(r[1])&&o.push(new At(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new At(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(a=fr(r[1]))&&o.push(new At(n+"[1]",r[1],"string expected, "+a+" found"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[f]=!0,i.push(c[f])):o[f]=!1}}},un.prototype._forEachCell=function(t,e,r,n,a,i,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=h;p++){var d=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&a.call(this,t,e,r,n,d,i,o,s))return}},un.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},un.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},un.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=cn+this.cells.length+1+1,r=0,n=0;n=0)){var h=t[u];c[u]=fn[l].shallow.indexOf(u)>=0?h:gn(h,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 vn(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof hn)return t;if(Array.isArray(t))return t.map(vn);if("object"==typeof t){var e=t.$name||"Object",r=fn[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),a=0,i=Object.keys(t);a=0?s:vn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var mn=function(){this.first=!0};mn.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 xn(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 wn(t){return!(_n(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,e){return!(!e&&(t>=1424&&t<=2303||yn["Arabic Presentation Forms-A"](t)||yn["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||yn.Khmer(t))}var Tn,An=!1,Mn=null,Sn=!1,En=new kt,Cn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Sn||null!=Cn.applyArabicShaping}},Ln=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 mn,this.transition={})};Ln.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 Pn=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(pr(t))return new Mr(t,e);if(_r(t)){var r=Ar(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=Wt.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Pn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Pn.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var On=function(t){this.property=t,this.value=new Pn(t,void 0)};On.prototype.transitioned=function(t,e){return new zn(this.property,this.value,e,h({},t.transition,this.transition),t.now)},On.prototype.untransitioned=function(){return new zn(this.property,this.value,null,{},0)};var In=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};In.prototype.getValue=function(t){return b(this._values[t].value.value)},In.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new On(this._values[t].property)),this._values[t].value=new Pn(this._values[t].property,null===e?void 0:b(e))},In.prototype.getTransition=function(t){return b(this._values[t].transition)},In.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new On(this._values[t].property)),this._values[t].transition=b(e)||void 0},In.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e=1)return 1;var e=a*a,r=e*a;return 4*(a<.5?r:3*(a-e)+r-.75)}())}return r};var Dn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Dn.prototype.possiblyEvaluate=function(t){for(var e=new Bn(this._properties),r=0,n=Object.keys(this._values);rn.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(jn),Un=function(t){this.specification=t};Un.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Ln(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ln(Math.floor(e.zoom),e)),t.expression.evaluate(new Ln(Math.floor(e.zoom+1),e)),e)}},Un.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Un.prototype.interpolate=function(t){return t};var qn=function(t){this.specification=t};qn.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},qn.prototype.interpolate=function(){return!1};var Hn=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 Pn(r,void 0),a=this.defaultTransitionablePropertyValues[e]=new On(r);this.defaultTransitioningPropertyValues[e]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};pn("DataDrivenProperty",jn),pn("DataConstantProperty",Nn),pn("CrossFadedDataDrivenProperty",Vn),pn("CrossFadedProperty",Un),pn("ColorRampProperty",qn);var Gn=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter=function(){return!0},"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 Rn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new In(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var a in e.layout)this.setLayoutProperty(a,e.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.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(on,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(an,n,t,e,r))return!1}if(m(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var a=this._transitionablePaint._values[t],i="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),s=a.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||i||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){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(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,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&sn(this,t.call(rn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Tt,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 Fn&&cr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(kt),Yn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Wn=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},Xn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Zn(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var a,i=(a=t.type,Yn[a].BYTES_PER_ELEMENT),o=r=Jn(r,Math.max(e,i)),s=t.components||1;return n=Math.max(n,i),r+=i*s,{name:t.name,type:t.type,components:s,offset:o}}),size:Jn(r,Math.max(n,e)),alignment:e}}function Jn(t,e){return Math.ceil(t/e)*e}Xn.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Xn.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},Xn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Xn.prototype.clear=function(){this.length=0},Xn.prototype.resize=function(t){this.reserve(t),this.length=t},Xn.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)}},Xn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Kn=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}(Xn);Kn.prototype.bytesPerElement=4,pn("StructArrayLayout2i4",Kn);var Qn=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 a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,a){var i=4*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,this.int16[i+3]=a,t},e}(Xn);Qn.prototype.bytesPerElement=8,pn("StructArrayLayout4i8",Qn);var $n=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,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,a,i)},e.prototype.emplace=function(t,e,r,n,a,i,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]=a,this.int16[s+4]=i,this.int16[s+5]=o,t},e}(Xn);$n.prototype.bytesPerElement=12,pn("StructArrayLayout2i4i12",$n);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.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,a,i)},e.prototype.emplace=function(t,e,r,n,a,i,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]=a,this.uint8[l+6]=i,this.uint8[l+7]=o,t},e}(Xn);ta.prototype.bytesPerElement=8,pn("StructArrayLayout2i4ub8",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.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,a,i,o,s)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l){var c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=n,this.uint16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(Xn);ea.prototype.bytesPerElement=16,pn("StructArrayLayout8ui16",ea);var ra=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,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,a,i,o,s)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l){var c=8*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(Xn);ra.prototype.bytesPerElement=16,pn("StructArrayLayout4i4ui16",ra);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._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 a=3*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,t},e}(Xn);na.prototype.bytesPerElement=12,pn("StructArrayLayout3f12",na);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._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}(Xn);aa.prototype.bytesPerElement=4,pn("StructArrayLayout1ul4",aa);var ia=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,a,i,o,s,l,c,u){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,a,i,o,s,l,c,u)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l,c,u,h){var f=12*t,p=6*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=a,this.int16[f+4]=i,this.int16[f+5]=o,this.uint32[p+3]=s,this.uint16[f+8]=l,this.uint16[f+9]=c,this.int16[f+10]=u,this.int16[f+11]=h,t},e}(Xn);ia.prototype.bytesPerElement=24,pn("StructArrayLayout6i1ul2ui2i24",ia);var oa=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,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,a,i)},e.prototype.emplace=function(t,e,r,n,a,i,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]=a,this.int16[s+4]=i,this.int16[s+5]=o,t},e}(Xn);oa.prototype.bytesPerElement=12,pn("StructArrayLayout2i2i2i12",oa);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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,a){var i=12*t,o=3*t;return this.uint8[i+0]=e,this.uint8[i+1]=r,this.float32[o+1]=n,this.float32[o+2]=a,t},e}(Xn);sa.prototype.bytesPerElement=12,pn("StructArrayLayout2ub2f12",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._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,a,i,o,s,l,c,u,h,f,p,d,g){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v){var m=22*t,y=11*t,x=44*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=n,this.uint16[m+3]=a,this.uint32[y+2]=i,this.uint32[y+3]=o,this.uint32[y+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=c,this.uint16[m+12]=u,this.float32[y+7]=h,this.float32[y+8]=f,this.uint8[x+36]=p,this.uint8[x+37]=d,this.uint8[x+38]=g,this.uint32[y+10]=v,t},e}(Xn);la.prototype.bytesPerElement=44,pn("StructArrayLayout2i2ui3ul3ui2f3ub1ul44",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._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,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x){var b=this.length;return this.resize(b+1),this.emplace(b,t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b){var _=24*t,w=12*t;return this.int16[_+0]=e,this.int16[_+1]=r,this.int16[_+2]=n,this.int16[_+3]=a,this.int16[_+4]=i,this.int16[_+5]=o,this.uint16[_+6]=s,this.uint16[_+7]=l,this.uint16[_+8]=c,this.uint16[_+9]=u,this.uint16[_+10]=h,this.uint16[_+11]=f,this.uint16[_+12]=p,this.uint16[_+13]=d,this.uint16[_+14]=g,this.uint16[_+15]=v,this.uint16[_+16]=m,this.uint32[w+9]=y,this.float32[w+10]=x,this.float32[w+11]=b,t},e}(Xn);ca.prototype.bytesPerElement=48,pn("StructArrayLayout6i11ui1ul2f48",ca);var ua=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}(Xn);ua.prototype.bytesPerElement=4,pn("StructArrayLayout1f4",ua);var ha=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 a=3*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,t},e}(Xn);ha.prototype.bytesPerElement=6,pn("StructArrayLayout3i6",ha);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._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 a=2*t,i=4*t;return this.uint32[a+0]=e,this.uint16[i+2]=r,this.uint16[i+3]=n,t},e}(Xn);fa.prototype.bytesPerElement=8,pn("StructArrayLayout1ul2ui8",fa);var pa=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 a=3*t;return this.uint16[a+0]=e,this.uint16[a+1]=r,this.uint16[a+2]=n,t},e}(Xn);pa.prototype.bytesPerElement=6,pn("StructArrayLayout3ui6",pa);var da=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}(Xn);da.prototype.bytesPerElement=4,pn("StructArrayLayout2ui4",da);var ga=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}(Xn);ga.prototype.bytesPerElement=2,pn("StructArrayLayout1ui2",ga);var va=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}(Xn);va.prototype.bytesPerElement=8,pn("StructArrayLayout2f8",va);var ma=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 a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,a){var i=4*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,this.float32[i+3]=a,t},e}(Xn);ma.prototype.bytesPerElement=16,pn("StructArrayLayout4f16",ma);var ya=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Wn);ya.prototype.size=24;var xa=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 ya(this,t)},e}(ia);pn("CollisionBoxArray",xa);var ba=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}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.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},Object.defineProperties(e.prototype,r),e}(Wn);ba.prototype.size=44;var _a=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 ba(this,t)},e}(la);pn("PlacedSymbolArray",_a);var wa=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},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+4]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+5]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.verticalTextBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+13]=t},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numHorizontalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+14]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+15]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+15]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+16]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+16]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+9]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+9]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+10]},r.textBoxScale.set=function(t){this._structArray.float32[this._pos4+10]=t},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+11]},r.radialTextOffset.set=function(t){this._structArray.float32[this._pos4+11]=t},Object.defineProperties(e.prototype,r),e}(Wn);wa.prototype.size=48;var ka=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 wa(this,t)},e}(ca);pn("SymbolInstanceArray",ka);var Ta=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Wn);Ta.prototype.size=4;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.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new Ta(this,t)},e}(ua);pn("GlyphOffsetArray",Aa);var Ma=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Wn);Ma.prototype.size=6;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.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new Ma(this,t)},e}(ha);pn("SymbolLineVertexArray",Sa);var Ea=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Wn);Ea.prototype.size=8;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.get=function(t){return new Ea(this,t)},e}(fa);pn("FeatureIndexArray",Ca);var La=Zn([{name:"a_pos",components:2,type:"Int16"}],4).members,Pa=function(t){void 0===t&&(t=[]),this.segments=t};function Oa(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}Pa.prototype.prepareSegment=function(t,e,r,n){var a=this.segments[this.segments.length-1];return t>Pa.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Pa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!a||a.vertexLength+t>Pa.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n)&&(a={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(a.sortKey=n),this.segments.push(a)),a},Pa.prototype.get=function(){return this.segments},Pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>1;this.ids[n]>=t?r=n:e=n+1}for(var a=[];this.ids[e]===t;){var i=this.positions[3*e],o=this.positions[3*e+1],s=this.positions[3*e+2];a.push({index:i,start:o,end:s}),e++}return a},Ia.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,a){if(!(n>=a)){for(var i=e[n+a>>1],o=n-1,s=a+1;;){do{o++}while(e[o]i);if(o>=s)break;za(e,o,s),za(r,3*o,3*s),za(r,3*o+1,3*s+1),za(r,3*o+2,3*s+2)}t(e,r,n,s),t(e,r,s+1,a)}}(r,n,0,r.length-1),e.push(r.buffer,n.buffer),{ids:r,positions:n}},Ia.deserialize=function(t){var e=new Ia;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},pn("FeaturePositionMap",Ia);var Da=function(t,e){this.gl=t.gl,this.location=e},Ra=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Da),Fa=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Da),Ba=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Da),Na=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Da),ja=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Da),Va=function(t){function e(e,r){t.call(this,e,r),this.current=Wt.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Da),Ua=new Float32Array(16),qa=function(t){function e(e,r){t.call(this,e,r),this.current=Ua}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Da);function Ha(t){return[Oa(255*t.r,255*t.g),Oa(255*t.b,255*t.a)]}var Ga=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0};Ga.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ga.prototype.setConstantPatternPositions=function(){},Ga.prototype.populatePaintArray=function(){},Ga.prototype.updatePaintArray=function(){},Ga.prototype.upload=function(){},Ga.prototype.destroy=function(){},Ga.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},Ga.prototype.getBinding=function(t,e){return"color"===this.type?new Va(t,e):new Fa(t,e)},Ga.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:gn(e),names:r,type:n}},Ga.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new Ga(vn(e),r,n)};var Ya=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Ya.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ya.prototype.populatePaintArray=function(){},Ya.prototype.updatePaintArray=function(){},Ya.prototype.upload=function(){},Ya.prototype.destroy=function(){},Ya.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},Ya.prototype.setUniforms=function(t,e,r,n,a){var i=this.patternPositions;"u_pattern_to"===a&&i.patternTo&&e.set(i.patternTo),"u_pattern_from"===a&&i.patternFrom&&e.set(i.patternFrom)},Ya.prototype.getBinding=function(t,e){return new ja(t,e)};var Wa=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new n};Wa.prototype.defines=function(){return[]},Wa.prototype.setConstantPatternPositions=function(){},Wa.prototype.populatePaintArray=function(t,e,r,n){var a=this.paintVertexArray,i=a.length;a.reserve(t);var o=this.expression.evaluate(new Ln(0),e,{},n);if("color"===this.type)for(var s=Ha(o),l=i;lei.max||o.yei.max)&&(w("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=c(o.x,ei.min,ei.max),o.y=c(o.y,ei.min,ei.max))}return r}function ni(t,e,r,n,a){t.emplaceBack(2*e+(n+1)/2,2*r+(a+1)/2)}var ai=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 Kn,this.indexArray=new pa,this.segments=new Pa,this.programConfigurations=new Ka(La,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function ii(t,e){for(var r=0;r1){if(ci(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(a)._add(e))}function pi(t,e){for(var r,n,a,i=!1,o=0;oe.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(i=!i);return i}function di(t,e){for(var r=!1,n=0,a=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-i.x)*(e.y-i.y)/(o.y-i.y)+i.x&&(r=!r)}return r}function gi(t,e,r){var n=r[0],a=r[2];if(t.xa.x&&e.x>a.x||t.ya.y&&e.y>a.y)return!1;var i=k(t,e,r[0]);return i!==k(t,e,r[1])||i!==k(t,e,r[2])||i!==k(t,e,r[3])}function vi(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].maxValue}function mi(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function yi(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=a.convert(e)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=ti||c<0||c>=ti)){var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=u.vertexLength;ni(this.layoutVertexArray,l,c,-1,-1),ni(this.layoutVertexArray,l,c,1,-1),ni(this.layoutVertexArray,l,c,1,1),ni(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),u.vertexLength+=4,u.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},pn("CircleBucket",ai,{omit:["layers"]});var xi,bi=new Hn({"circle-sort-key":new jn(Tt.layout_circle["circle-sort-key"])}),_i={paint:new Hn({"circle-radius":new jn(Tt.paint_circle["circle-radius"]),"circle-color":new jn(Tt.paint_circle["circle-color"]),"circle-blur":new jn(Tt.paint_circle["circle-blur"]),"circle-opacity":new jn(Tt.paint_circle["circle-opacity"]),"circle-translate":new Nn(Tt.paint_circle["circle-translate"]),"circle-translate-anchor":new Nn(Tt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Nn(Tt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Nn(Tt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new jn(Tt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new jn(Tt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new jn(Tt.paint_circle["circle-stroke-opacity"])}),layout:bi},wi="undefined"!=typeof Float32Array?Float32Array:Array;function ki(t,e,r){var n=e[0],a=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,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)}),xi=new wi(3),wi!=Float32Array&&(xi[0]=0,xi[1]=0,xi[2]=0),function(){var t=new wi(4);wi!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var Ti=function(t){function e(e){t.call(this,e,_i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ai(t)},e.prototype.queryRadius=function(t){var e=t;return vi("circle-radius",this,e)+vi("circle-stroke-width",this,e)+mi(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,i,o,s){for(var l=yi(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.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"),h=u?l:function(t,e){return l.map(function(t){return Ai(t,e)})}(0,s),f=u?c*o:c,p=0,d=n;pt.width||a.height>t.height||r.x>t.width-a.width||r.y>t.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>e.width||a.height>e.height||n.x>e.width-a.width||n.y>e.height-a.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=i=t[0],a=o=t[1];for(var d=r;di&&(i=s),l>o&&(o=l);c=0!==(c=Math.max(i-n,o-a))?1/c:0}return qi(f,p,r,n,a,c),p}function Vi(t,e,r,n,a){var i,o;if(a===ho(t,e,r,n)>0)for(i=e;i=e;i-=n)o=lo(i,t[i],t[i+1],o);return o&&ro(o,o.next)&&(co(o),o=o.next),o}function Ui(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!ro(n,n.next)&&0!==eo(n.prev,n,n.next))n=n.next;else{if(co(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function qi(t,e,r,n,a,i,o){if(t){!o&&i&&function(t,e,r,n){var a=t;do{null===a.z&&(a.z=Ki(a.x,a.y,e,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==t);a.prevZ.nextZ=null,a.prevZ=null,function(t){var e,r,n,a,i,o,s,l,c=1;do{for(r=t,t=null,i=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)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:t=a,a.prevZ=i,i=a;r=n}i.nextZ=null,c*=2}while(o>1)}(a)}(t,n,a,i);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,i?Gi(t,n,a,i):Hi(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),co(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?qi(t=Yi(Ui(t),e,r),e,r,n,a,i,2):2===o&&Wi(t,e,r,n,a,i):qi(Ui(t),e,r,n,a,i,1);break}}}function Hi(t){var e=t.prev,r=t,n=t.next;if(eo(e,r,n)>=0)return!1;for(var a=t.next.next;a!==t.prev;){if($i(e.x,e.y,r.x,r.y,n.x,n.y,a.x,a.y)&&eo(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function Gi(t,e,r,n){var a=t.prev,i=t,o=t.next;if(eo(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,u=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,h=Ki(s,l,e,r,n),f=Ki(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,p.x,p.y)&&eo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&eo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,p.x,p.y)&&eo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&eo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Yi(t,e,r){var n=t;do{var a=n.prev,i=n.next.next;!ro(a,i)&&no(a,n,n.next,i)&&oo(a,i)&&oo(i,a)&&(e.push(a.i/r),e.push(n.i/r),e.push(i.i/r),co(n),co(n.next),n=t=i),n=n.next}while(n!==t);return Ui(n)}function Wi(t,e,r,n,a,i){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&to(o,s)){var l=so(o,s);return o=Ui(o,o.next),l=Ui(l,l.next),qi(o,e,r,n,a,i),void qi(l,e,r,n,a,i)}s=s.next}o=o.next}while(o!==t)}function Xi(t,e){return t.x-e.x}function Zi(t,e){if(e=function(t,e){var r,n=e,a=t.x,i=t.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&a!==n.x&&$i(ir.x||n.x===r.x&&Ji(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(t,e)){var r=so(e,t);Ui(r,r.next)}}function Ji(t,e){return eo(t.prev,t,e.prev)<0&&eo(e.next,t,t.next)<0}function Ki(t,e,r,n,a){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*a)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Qi(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function to(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&&no(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(oo(t,e)&&oo(e,t)&&function(t,e){var r=t,n=!1,a=(t.x+e.x)/2,i=(t.y+e.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(eo(t.prev,t,e.prev)||eo(t,e.prev,e))||ro(t,e)&&eo(t.prev,t,t.next)>0&&eo(e.prev,e,e.next)>0)}function eo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function ro(t,e){return t.x===e.x&&t.y===e.y}function no(t,e,r,n){var a=io(eo(t,e,r)),i=io(eo(t,e,n)),o=io(eo(r,n,t)),s=io(eo(r,n,e));return a!==i&&o!==s||!(0!==a||!ao(t,r,e))||!(0!==i||!ao(t,n,e))||!(0!==o||!ao(r,t,n))||!(0!==s||!ao(r,e,n))}function ao(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 io(t){return t>0?1:t<0?-1:0}function oo(t,e){return eo(t.prev,t,t.next)<0?eo(t,e,t.next)>=0&&eo(t,t.prev,e)>=0:eo(t,e,t.prev)<0||eo(t,t.next,e)<0}function so(t,e){var r=new uo(t.i,t.x,t.y),n=new uo(e.i,e.x,e.y),a=t.next,i=e.prev;return t.next=e,e.prev=t,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function lo(t,e,r,n){var a=new uo(t,e,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function co(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 uo(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 ho(t,e,r,n){for(var a=0,i=e,o=r-n;in;){if(a-n>600){var o=a-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(a,Math.floor(r+(o-s)*c/o+u)),i)}var h=e[r],f=n,p=a;for(po(e,n,r),i(e[a],h)>0&&po(e,n,a);f0;)p--}0===i(e[n],h)?po(e,n,p):po(e,++p,a),p<=r&&(n=p+1),r<=p&&(a=p-1)}}(t,e,r||0,n||t.length-1,a||go)}function po(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function go(t,e){return te?1:0}function vo(t,e){var r=t.length;if(r<=1)return[t];for(var n,a,i=[],o=0;o1)for(var l=0;l0&&(n+=t[a-1].length,r.holes.push(n))}return r},Bi.default=Ni;var bo=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 Kn,this.indexArray=new pa,this.indexArray2=new da,this.programConfigurations=new Ka(Fi,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})};bo.prototype.populate=function(t,e){this.hasPattern=yo("fill",this.layers,e);for(var r=this.layers[0].layout.get("fill-sort-key"),n=[],a=0,i=t;a>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Mo.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,a=0,i=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos>3}if(n--,1===r||2===r)(a+=t.readSVarint())s&&(s=a),(i+=t.readSVarint())c&&(c=i);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},Mo.prototype.toGeoJSON=function(t,e,r){var n,a,i=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=Mo.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 Oo(t,e,r){if(3===t){var n=new Co(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Lo.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 Ao(this._pbf,e,this.extent,this._keys,this._values)};var Io={VectorTile:function(t,e){this.layers=t.readFields(Oo,{},e)},VectorTileFeature:Ao,VectorTileLayer:Co},zo=Io.VectorTileFeature.types,Do=Math.pow(2,13);function Ro(t,e,r,n,a,i,o,s){t.emplaceBack(e,r,2*Math.floor(n*Do)+o,a*Do*2,i*Do*2,Math.round(s))}var Fo=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 $n,this.indexArray=new pa,this.programConfigurations=new Ka(To,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 Bo(t,e){return t.x===e.x&&(t.x<0||t.x>ti)||t.y===e.y&&(t.y<0||t.y>ti)}function No(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>ti})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>ti})}Fo.prototype.populate=function(t,e){this.features=[],this.hasPattern=yo("fill-extrusion",this.layers,e);for(var r=0,n=t;r=1){var m=p[g-1];if(!Bo(v,m)){u.vertexLength+4>Pa.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=v.sub(m)._perp()._unit(),x=m.dist(v);d+x>32768&&(d=0),Ro(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,0,d),Ro(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,1,d),d+=x,Ro(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,d),Ro(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,d);var b=u.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),u.vertexLength+=4,u.primitiveLength+=2}}}}if(u.vertexLength+s>Pa.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===zo[t.type]){for(var _=[],w=[],k=u.vertexLength,T=0,A=o;T=2&&t[u-1].equals(t[u-2]);)u--;for(var h=0;h0;if(A&&x>h){var S=f.dist(g);if(S>2*p){var E=f.sub(f.sub(g)._mult(p/S)._round());this.updateDistance(g,E),this.addCurrentVertex(E,m,0,0,d),g=E}}var C=g&&v,L=C?r:c?"butt":n;if(C&&"round"===L&&(ka&&(L="bevel"),"bevel"===L&&(k>2&&(L="flipbevel"),k100)b=y.mult(-1);else{var P=k*m.add(y).mag()/m.sub(y).mag();b._perp()._mult(P*(M?-1:1))}this.addCurrentVertex(f,b,0,0,d),this.addCurrentVertex(f,b.mult(-1),0,0,d)}else if("bevel"===L||"fakeround"===L){var O=-Math.sqrt(k*k-1),I=M?O:0,z=M?0:O;if(g&&this.addCurrentVertex(f,m,I,z,d),"fakeround"===L)for(var D=Math.round(180*T/Math.PI/20),R=1;R2*p){var U=f.add(v.sub(f)._mult(p/V)._round());this.updateDistance(f,U),this.addCurrentVertex(U,y,0,0,d),f=U}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,s)}},Xo.prototype.addCurrentVertex=function(t,e,r,n,a,i){void 0===i&&(i=!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,i,!1,r,a),this.addHalfVertex(t,l,c,i,!0,-n,a),this.distance>Wo/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,a,i))},Xo.prototype.addHalfVertex=function(t,e,r,n,a,i,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(a?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===i?0:i<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++),a?this.e2=u:this.e1=u},Xo.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Wo-1):this.distance},pn("LineBucket",Xo,{omit:["layers","patternFeatures"]});var Zo=new Hn({"line-cap":new Nn(Tt.layout_line["line-cap"]),"line-join":new jn(Tt.layout_line["line-join"]),"line-miter-limit":new Nn(Tt.layout_line["line-miter-limit"]),"line-round-limit":new Nn(Tt.layout_line["line-round-limit"]),"line-sort-key":new jn(Tt.layout_line["line-sort-key"])}),Jo={paint:new Hn({"line-opacity":new jn(Tt.paint_line["line-opacity"]),"line-color":new jn(Tt.paint_line["line-color"]),"line-translate":new Nn(Tt.paint_line["line-translate"]),"line-translate-anchor":new Nn(Tt.paint_line["line-translate-anchor"]),"line-width":new jn(Tt.paint_line["line-width"]),"line-gap-width":new jn(Tt.paint_line["line-gap-width"]),"line-offset":new jn(Tt.paint_line["line-offset"]),"line-blur":new jn(Tt.paint_line["line-blur"]),"line-dasharray":new Un(Tt.paint_line["line-dasharray"]),"line-pattern":new Vn(Tt.paint_line["line-pattern"]),"line-gradient":new qn(Tt.paint_line["line-gradient"])}),layout:Zo},Ko=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 Ln(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,a){return r=h({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,a)},e}(jn))(Jo.paint.properties["line-width"].specification);Ko.useIntegerZoom=!0;var Qo=function(t){function e(e){t.call(this,e,Jo)}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=Ii(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=Ko.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Xo(t)},e.prototype.queryRadius=function(t){var e=t,r=$o(vi("line-width",this,e),vi("line-gap-width",this,e)),n=vi("line-offset",this,e);return r/2+Math.abs(n)+mi(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s){var l=yi(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*$o(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 a(0,0),i=0;i=3)for(var i=0;i0?e+2*t:t}var ts=Zn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),es=Zn([{name:"a_projected_pos",components:3,type:"Float32"}],4),rs=(Zn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Zn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),ns=(Zn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),as=Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function is(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()),Cn.applyArabicShaping&&(t=Cn.applyArabicShaping(t)),t}(t.text,e,r)}),t}Zn([{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"}]),Zn([{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:"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:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),Zn([{type:"Float32",name:"offsetX"}]),Zn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var os={"!":"\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"},ss=24,ls={horizontal:1,vertical:2,horizontalOnly:3},cs=function(){this.text="",this.sectionIndex=[],this.sections=[]};function us(t,e,r,n,a,i,o,s,l,c,u){var h,f=cs.fromFeature(t,r);c===ls.vertical&&f.verticalizePunctuation();var p=Cn.processBidirectionalText,d=Cn.processStyledBidirectionalText;if(p&&1===f.sections.length){h=[];for(var g=0,v=p(f.toString(),vs(f,s,n,e));g=0&&n>=t&&hs[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},cs.prototype.substring=function(t,e){var r=new cs;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},cs.prototype.toString=function(){return this.text},cs.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)};var hs={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},fs={};function ps(t,e,r,n){var a=Math.pow(t-e,2);return n?t=0,l=0,c=0;c0)&&("constant"!==a.value.kind||a.value.value.length>0),l="constant"!==o.value.kind||o.value.value&&o.value.value.length>0,c=n.get("symbol-sort-key");if(this.features=[],s||l){for(var u=e.iconDependencies,h=e.glyphDependencies,f=new Ln(this.zoom),p=0,d=t;p=0;for(var M=0,S=x.sections;M=0;s--)i[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:a},s>0&&(a+=e[s-1].dist(e[s]));for(var l=0;l0;this.addCollisionDebugVertices(i,o,s,l,c?this.collisionCircle:this.collisionBox,a.anchorPoint,r,c)}},Ps.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t0},Ps.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ps.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Ps.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Ps.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,n=e.vertexStartIndex;n1||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.addIndicesForPlacedTextSymbol(t)}),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(i.verticalPlacedTextSymbolIndex);var o=this.icon.placedSymbolArray.get(a);if(o.numGlyphs){var s=o.vertexStartIndex;this.icon.indexArray.emplaceBack(s,s+1,s+2),this.icon.indexArray.emplaceBack(s+1,s+2,s+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},pn("SymbolBucket",Ps,{omit:["layers","collisionBoxArray","features","compareText"]}),Ps.MAX_GLYPHS=65535,Ps.addDynamicAttributes=Es;var Os=new Hn({"symbol-placement":new Nn(Tt.layout_symbol["symbol-placement"]),"symbol-spacing":new Nn(Tt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Nn(Tt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new jn(Tt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Nn(Tt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Nn(Tt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Nn(Tt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Nn(Tt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Nn(Tt.layout_symbol["icon-rotation-alignment"]),"icon-size":new jn(Tt.layout_symbol["icon-size"]),"icon-text-fit":new Nn(Tt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Nn(Tt.layout_symbol["icon-text-fit-padding"]),"icon-image":new jn(Tt.layout_symbol["icon-image"]),"icon-rotate":new jn(Tt.layout_symbol["icon-rotate"]),"icon-padding":new Nn(Tt.layout_symbol["icon-padding"]),"icon-keep-upright":new Nn(Tt.layout_symbol["icon-keep-upright"]),"icon-offset":new jn(Tt.layout_symbol["icon-offset"]),"icon-anchor":new jn(Tt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Nn(Tt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Nn(Tt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Nn(Tt.layout_symbol["text-rotation-alignment"]),"text-field":new jn(Tt.layout_symbol["text-field"]),"text-font":new jn(Tt.layout_symbol["text-font"]),"text-size":new jn(Tt.layout_symbol["text-size"]),"text-max-width":new jn(Tt.layout_symbol["text-max-width"]),"text-line-height":new Nn(Tt.layout_symbol["text-line-height"]),"text-letter-spacing":new jn(Tt.layout_symbol["text-letter-spacing"]),"text-justify":new jn(Tt.layout_symbol["text-justify"]),"text-radial-offset":new jn(Tt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Nn(Tt.layout_symbol["text-variable-anchor"]),"text-anchor":new jn(Tt.layout_symbol["text-anchor"]),"text-max-angle":new Nn(Tt.layout_symbol["text-max-angle"]),"text-writing-mode":new Nn(Tt.layout_symbol["text-writing-mode"]),"text-rotate":new jn(Tt.layout_symbol["text-rotate"]),"text-padding":new Nn(Tt.layout_symbol["text-padding"]),"text-keep-upright":new Nn(Tt.layout_symbol["text-keep-upright"]),"text-transform":new jn(Tt.layout_symbol["text-transform"]),"text-offset":new jn(Tt.layout_symbol["text-offset"]),"text-allow-overlap":new Nn(Tt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Nn(Tt.layout_symbol["text-ignore-placement"]),"text-optional":new Nn(Tt.layout_symbol["text-optional"])}),Is={paint:new Hn({"icon-opacity":new jn(Tt.paint_symbol["icon-opacity"]),"icon-color":new jn(Tt.paint_symbol["icon-color"]),"icon-halo-color":new jn(Tt.paint_symbol["icon-halo-color"]),"icon-halo-width":new jn(Tt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new jn(Tt.paint_symbol["icon-halo-blur"]),"icon-translate":new Nn(Tt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Nn(Tt.paint_symbol["icon-translate-anchor"]),"text-opacity":new jn(Tt.paint_symbol["text-opacity"]),"text-color":new jn(Tt.paint_symbol["text-color"],{runtimeType:Ft,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new jn(Tt.paint_symbol["text-halo-color"]),"text-halo-width":new jn(Tt.paint_symbol["text-halo-width"]),"text-halo-blur":new jn(Tt.paint_symbol["text-halo-blur"]),"text-translate":new Nn(Tt.paint_symbol["text-translate"]),"text-translate-anchor":new Nn(Tt.paint_symbol["text-translate-anchor"])}),layout:Os},zs=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:It,this.defaultValue=t};zs.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},zs.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},zs.prototype.possibleOutputs=function(){return[void 0]},zs.prototype.serialize=function(){return null},pn("FormatSectionOverride",zs,{omit:["defaultValue"]});var Ds=function(t){function e(e){t.call(this,e,Is)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){if(t.prototype.recalculate.call(this,e),"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 r=this.layout.get("text-writing-mode");if(r){for(var n=[],a=0,i=r;a=0;f--){var p=o[f];if(!(h.w>p.w||h.h>p.h)){if(h.x=p.x,h.y=p.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===p.w&&h.h===p.h){var d=o.pop();f>1,u=-7,h=r?a-1:0,f=r?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+t[e+h],h+=f,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=c}return(p?-1:1)*o*Math.pow(2,i-n)},Qs=function(t,e,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<>1,f=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,a),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,a),o=0));a>=8;t[r+p]=255&s,p+=d,s/=256,a-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},$s=tl;function tl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function el(t){return t.type===tl.Bytes?t.readVarint()+t.pos:t.pos+1}function rl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function nl(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 a=r.pos-1;a>=t;a--)r.buf[a+n]=r.buf[a]}function al(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function gl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}tl.Varint=0,tl.Fixed64=1,tl.Bytes=2,tl.Fixed32=5,tl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,t(a,e,this),this.pos===i&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=pl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=gl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*pl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*gl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ks(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ks(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,a,i=r.buf;if(n=(112&(a=i[r.pos++]))>>4,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<3,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<10,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<17,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<24,a<128)return rl(t,n,e);if(n|=(1&(a=i[r.pos++]))<<31,a<128)return rl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n="",a=e;a239?4:l>223?3:l>191?2:1;if(a+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(i=t[a+1]))&&(c=(31&l)<<6|63&i)<=127&&(c=null):3===u?(i=t[a+1],o=t[a+2],128==(192&i)&&128==(192&o)&&((c=(15&l)<<12|(63&i)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(i=t[a+1],o=t[a+2],s=t[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&i)<<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),a+=u}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==tl.Bytes)return t.push(this.readVarint(e));var r=el(this);for(t=t||[];this.pos127;);else if(e===tl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===tl.Fixed32)this.pos+=4;else{if(e!==tl.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;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,a,i=0;i55295&&n<57344){if(!a){n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else a&&(t[r++]=239,t[r++]=191,t[r++]=189,a=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&&nl(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Qs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Qs(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&&nl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,tl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,al,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ll,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,sl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,cl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ul,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,fl,e)},writeBytesField:function(t,e){this.writeTag(t,tl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,tl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,tl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var vl=3;function ml(t,e,r){1===t&&r.readMessage(yl,e)}function yl(t,e,r){if(3===t){var n=r.readMessage(xl,{}),a=n.id,i=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:a,bitmap:new Li({width:o+2*vl,height:s+2*vl},i),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function xl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var bl=vl,_l=function(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};_l.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){t._triggered=!1,t._callback()},0))};var wl=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},v(["receive","process"],this),this.invoker=new _l(this.process),this.target.addEventListener("message",this.receive,!1)};function kl(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}wl.prototype.send=function(t,e,r,n){var a=this,i=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[i]=r);var o=[];return this.target.postMessage({id:i,type:t,hasCallback:!!r,targetMapId:n,sourceMapId:this.mapId,data:gn(e,o)},o),{cancel:function(){r&&delete a.callbacks[i],a.target.postMessage({id:i,type:"",targetMapId:n,sourceMapId:a.mapId})}}},wl.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 this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()},wl.prototype.process=function(){var t=this;if(this.taskQueue.length){var e=this.taskQueue.shift(),r=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),r)if(""===r.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(r.error?n(vn(r.error)):n(null,vn(r.data)))}else{var a=!1,i=r.hasCallback?function(r,n){a=!0,delete t.cancelCallbacks[e];var i=[];t.target.postMessage({id:e,type:"",sourceMapId:t.mapId,error:r?gn(r):null,data:gn(n,i)},i)}:function(t){a=!0},o=null,s=vn(r.data);if(this.parent[r.type])o=this.parent[r.type](r.sourceMapId,s,i);else if(this.parent.getWorkerSource){var l=r.type.split(".");o=this.parent.getWorkerSource(r.sourceMapId,l[0],s.source)[l[1]](s,i)}else i(new Error("Could not find function "+r.type));!a&&o&&o.cancel&&(this.cancelCallbacks[e]=o.cancel)}}},wl.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var Tl=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]))};Tl.prototype.setNorthEast=function(t){return this._ne=t instanceof Al?new Al(t.lng,t.lat):Al.convert(t),this},Tl.prototype.setSouthWest=function(t){return this._sw=t instanceof Al?new Al(t.lng,t.lat):Al.convert(t),this},Tl.prototype.extend=function(t){var e,r,n=this._sw,a=this._ne;if(t instanceof Al)e=t,r=t;else{if(!(t instanceof Tl))return Array.isArray(t)?t.every(Array.isArray)?this.extend(Tl.convert(t)):this.extend(Al.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||a?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new Al(e.lng,e.lat),this._ne=new Al(r.lng,r.lat)),this},Tl.prototype.getCenter=function(){return new Al((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tl.prototype.getSouthWest=function(){return this._sw},Tl.prototype.getNorthEast=function(){return this._ne},Tl.prototype.getNorthWest=function(){return new Al(this.getWest(),this.getNorth())},Tl.prototype.getSouthEast=function(){return new Al(this.getEast(),this.getSouth())},Tl.prototype.getWest=function(){return this._sw.lng},Tl.prototype.getSouth=function(){return this._sw.lat},Tl.prototype.getEast=function(){return this._ne.lng},Tl.prototype.getNorth=function(){return this._ne.lat},Tl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tl.convert=function(t){return!t||t instanceof Tl?t:new Tl(t)};var Al=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")};Al.prototype.wrap=function(){return new Al(u(this.lng,-180,180),this.lat)},Al.prototype.toArray=function(){return[this.lng,this.lat]},Al.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Al.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 Tl(new Al(this.lng-r,this.lat-e),new Al(this.lng+r,this.lat+e))},Al.convert=function(t){if(t instanceof Al)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Al(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Al(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 Ml=2*Math.PI*6378137;function Sl(t){return Ml*Math.cos(t*Math.PI/180)}function El(t){return(180+t)/360}function Cl(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Ll(t,e){return t/Sl(e)}function Pl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var Ol=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Ol.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Al.convert(t);return new Ol(El(r.lng),Cl(r.lat),Ll(e,r.lat))},Ol.prototype.toLngLat=function(){return new Al(360*this.x-180,Pl(this.y))},Ol.prototype.toAltitude=function(){return this.z*Sl(Pl(this.y))},Ol.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ml*(t=Pl(this.y),1/Math.cos(t*Math.PI/180));var t};var Il=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Rl(0,t,e,r)};Il.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Il.prototype.url=function(t,e){var r,n,a,i,o,s=(r=this.x,n=this.y,a=this.z,i=kl(256*r,256*(n=Math.pow(2,a)-n-1),a),o=kl(256*(r+1),256*(n+1),a),i[0]+","+i[1]+","+o[0]+","+o[1]),l=function(t,e,r){for(var n,a="",i=t;i>0;i--)a+=(e&(n=1<this.canonical.z?new Dl(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Dl(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Dl.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},Dl.prototype.children=function(t){if(this.overscaledZ>=t)return[new Dl(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 Dl(e,this.wrap,e,r,n),new Dl(e,this.wrap,e,r+1,n),new Dl(e,this.wrap,e,r,n+1),new Dl(e,this.wrap,e,r+1,n+1)]},Dl.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)},Fl.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Fl.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Fl.prototype.getPixels=function(){return new Pi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Fl.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,a=e*this.dim+this.dim,i=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=a-1;break;case 1:a=n+1}switch(r){case-1:i=o-1;break;case 1:o=i+1}for(var s=-e*this.dim,l=-r*this.dim,c=i;c=0)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e&&e>=0)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},Ul.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},a=this.stateChanges[t]||{},i=h({},n[r],a[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var o=this.deletedStates[t][e];if(null===o)return{};for(var s in o)delete i[s]}return i},Ul.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Ul.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var a={};for(var i in this.stateChanges[n])this.state[n][i]||(this.state[n][i]={}),h(this.state[n][i],this.stateChanges[n][i]),a[i]=this.state[n][i];r[n]=a}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var c in this.deletedStates[o]){if(null===this.deletedStates[o][c])this.state[o][c]={};else for(var u=0,f=Object.keys(this.deletedStates[o][c]);u=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},ql.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Io.VectorTile(new $s(this.rawTileData)).layers,this.sourceLayerCoder=new Nl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ql.prototype.query=function(t,e,r){var n=this;this.loadVTLayers();for(var i=t.params||{},o=ti/t.tileSize/t.scale,s=Dr(i.filter),l=t.queryGeometry,c=t.queryPadding*o,u=Hl(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=Hl(t.cameraQueryGeometry),p=0,d=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,function(e,r,n,i){return function(t,e,r,n,i){for(var o=0,s=t;o=l.x&&i>=l.y)return!0}var c=[new a(e,r),new a(e,i),new a(n,i),new a(n,r)];if(t.length>2)for(var u=0,h=c;u=0)return!0;return!1}(i,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(a(new Ln(this.tileID.overscaledZ),u))for(var h=0;h-r/2;){if(--o<0)return!1;s-=t[o].dist(i),i=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>a)return!1;o++,s+=h.dist(f)}return!0}function Xl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=ye(h.x,f.x,d),v=ye(h.y,f.y,d),m=new xs(g,v,f.angleTo(h),u);return m._round(),!o||Wl(t,m,s,o,e)?m:void 0}l+=p}}function Ql(t,e,r,n,a,i,o,s,l){var c=Zl(n,i,o),u=Jl(n,a),h=u*o,f=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&_=0&&w=0&&p+u<=h){var k=new xs(_,w,x,g);k._round(),a&&!Wl(e,k,o,a,i)||d.push(k)}}f+=y}return l||d.length||s||(d=t(e,f/2,n,a,i,o,s,!0,c)),d}(t,f?e/2*s%e:(u/2+2*i)*o*s%e,e,c,r,h,f,!1,l)}Yl.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e>l.z,u=new a(l.x*c,l.y*c),h=new a(u.x+c,u.y+c),f=this.segments.prepareSegment(4,r,n);r.emplaceBack(u.x,u.y,u.x,u.y),r.emplaceBack(h.x,u.y,h.x,u.y),r.emplaceBack(u.x,h.y,u.x,h.y),r.emplaceBack(h.x,h.y,h.x,h.y);var p=f.vertexLength;n.emplaceBack(p,p+1,p+2),n.emplaceBack(p+1,p+2,p+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,Bl.members),this.maskedIndexBuffer=e.createIndexBuffer(n)}},Yl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Yl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Yl.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=A(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),a=!1;if(this.expirationTime>n)a=!1;else if(e)if(this.expirationTime0&&(m=Math.max(10*l,m),this._addLineCollisionCircles(t,e,r,r.segment,y,m,n,i,o,h))}else{if(f){var x=new a(g,p),b=new a(v,p),_=new a(g,d),w=new a(v,d),k=f*Math.PI/180;x._rotate(k),b._rotate(k),_._rotate(k),w._rotate(k),g=Math.min(x.x,b.x,_.x,w.x),v=Math.max(x.x,b.x,_.x,w.x),p=Math.min(x.y,b.y,_.y,w.y),d=Math.max(x.y,b.y,_.y,w.y)}t.emplaceBack(r.x,r.y,g,p,v,d,n,i,o,0,0)}this.boxEndIndex=t.length};$l.prototype._addLineCollisionCircles=function(t,e,r,n,a,i,o,s,l,c){var u=i/2,h=Math.floor(a/u)||1,f=1+.4*Math.log(c)/Math.LN2,p=Math.floor(h*f/2),d=-i/2,g=r,v=n+1,m=d,y=-a/2,x=y-a/4;do{if(--v<0){if(m>y)return;v=0;break}m-=e[v].dist(g),g=e[v]}while(m>x);for(var b=e[v].dist(e[v+1]),_=-p;_a&&(k+=w-a),!(k=e.length)return;b=e[v].dist(e[v+1])}var T=k-m,A=e[v],M=e[v+1].sub(A)._unit()._mult(T)._add(A)._round(),S=Math.abs(k-d)0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function ec(t,e){return te?1:0}function rc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,i=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 h=o-n,f=s-i,p=Math.min(h,f),d=p/2,g=new tc([],nc);if(0===p)return new a(n,i);for(var v=n;vy.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 ac(b.p.x-d,b.p.y-d,d,t)),g.push(new ac(b.p.x+d,b.p.y-d,d,t)),g.push(new ac(b.p.x-d,b.p.y+d,d,t)),g.push(new ac(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 nc(t,e){return e.max-t.max}function ac(t,e,r,n){this.p=new a(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,a=0;at.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,fi(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}tc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},tc.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}},tc.prototype.peek=function(){return this.data[0]},tc.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var a=t-1>>1,i=e[a];if(r(n,i)>=0)break;e[t]=i,t=a}e[t]=n},tc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,a=e[t];t=0)break;e[t]=o,t=i}e[t]=a};var ic=e(function(t){t.exports=function(t,e){var r,n,a,i,o,s,l,c;for(r=3&t.length,n=t.length-r,a=e,o=3432918353,s=461845907,c=0;c>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(i>>>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:a^=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 a^=t.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}}),oc=e(function(t){t.exports=function(t,e){for(var r,n=t.length,a=e^n,i=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24))+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:a^=(255&t.charCodeAt(i+2))<<16;case 2:a^=(255&t.charCodeAt(i+1))<<8;case 1:a=1540483477*(65535&(a^=255&t.charCodeAt(i)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}}),sc=ic,lc=ic,cc=oc;sc.murmur3=lc,sc.murmur2=cc;var uc=7;function hc(t,e){var r=0,n=0,a=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=a-uc;break;case"bottom-right":case"bottom-left":n=-a+uc;break;case"bottom":n=-e+uc;break;case"top":n=e-uc}switch(t){case"top-right":case"bottom-right":r=-a;break;case"top-left":case"bottom-left":r=a;break;case"left":r=e;break;case"right":r=-e}return[r,n]}function fc(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"}var pc=65535;function dc(t,e,r,n,i,o,s,l,c,u,h,f,p){var d=function(t,e,r,n,i,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=e.positionedGlyphs,h=[],f=0;fpc&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===g.kind&&((v=[bs*p.compositeTextSizes[0].evaluate(o,{}),bs*p.compositeTextSizes[1].evaluate(o,{})])[0]>pc||v[1]>pc)&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),t.addSymbols(t.text,d,v,s,i,o,c,e,l.lineStartIndex,l.lineLength);for(var m=0,y=u;m=0;o--)if(n.dist(i[o])at&&(t.getActor().send("enforceCacheSizeLimit",nt),st=0)},t.clamp=c,t.clearTileCache=function(t){var e=self.caches.delete(rt);t&&e.catch(t).then(function(){return t()})},t.clone=function(t){var e=new wi(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=b,t.config=D,t.create=function(){var t=new wi(16);return wi!=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 wi(9);return wi!=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 wi(4);return wi!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=wr,t.createLayout=Zn,t.createStyleLayer=function(t){return"custom"===t.type?new js(t):new Vs[t.type](t)},t.deepEqual=o,t.ease=l,t.emitValidationErrors=sn,t.endsWith=m,t.enforceCacheSizeLimit=function(t){self.caches&&self.caches.open(rt).then(function(e){e.keys().then(function(r){for(var n=0;n=ti||c.y<0||c.y>=ti||function(t,e,r,n,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_){var k,T,A,M=t.addToLineVertexArray(e,r),S=0,E=0,C=0,L={},P=sc(""),O=(o.layout.get("text-radial-offset").evaluate(x,{})||0)*ss;if(t.allowVerticalPlacement&&n.vertical){var I=o.layout.get("text-rotate").evaluate(x,{})+90,z=n.vertical;A=new $l(s,r,e,l,c,u,z,h,f,p,t.overscaling,I)}for(var D in n.horizontal){var R=n.horizontal[D];if(!k){P=sc(R.text);var F=o.layout.get("text-rotate").evaluate(x,{});k=new $l(s,r,e,l,c,u,R,h,f,p,t.overscaling,F)}var B=1===R.lineCount;if(E+=dc(t,e,R,o,p,x,d,M,n.vertical?ls.horizontal:ls.horizontalOnly,B?Object.keys(n.horizontal):[D],L,b,_),B)break}n.vertical&&(C+=dc(t,e,n.vertical,o,p,x,d,M,ls.vertical,["vertical"],L,b,_));var N=k?k.boxStartIndex:t.collisionBoxArray.length,j=k?k.boxEndIndex:t.collisionBoxArray.length,V=A?A.boxStartIndex:t.collisionBoxArray.length,U=A?A.boxEndIndex:t.collisionBoxArray.length;if(i){var q=function(t,e,r,n,i,o){var s,l,c,u,h=e.image,f=r.layout,p=e.top-1/h.pixelRatio,d=e.left-1/h.pixelRatio,g=e.bottom+1/h.pixelRatio,v=e.right+1/h.pixelRatio;if("none"!==f.get("icon-text-fit")&&i){var m=v-d,y=g-p,x=f.get("text-size").evaluate(o,{})/24,b=i.left*x,_=i.right*x,w=i.top*x,k=_-b,T=i.bottom*x-w,A=f.get("icon-text-fit-padding")[0],M=f.get("icon-text-fit-padding")[1],S=f.get("icon-text-fit-padding")[2],E=f.get("icon-text-fit-padding")[3],C="width"===f.get("icon-text-fit")?.5*(T-y):0,L="height"===f.get("icon-text-fit")?.5*(k-m):0,P="width"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?k:m,O="height"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?T:y;s=new a(b+L-E,w+C-A),l=new a(b+L+M+P,w+C-A),c=new a(b+L+M+P,w+C+S+O),u=new a(b+L-E,w+C+S+O)}else s=new a(d,p),l=new a(v,p),c=new a(v,g),u=new a(d,g);var I=r.layout.get("icon-rotate").evaluate(o,{})*Math.PI/180;if(I){var z=Math.sin(I),D=Math.cos(I),R=[D,-z,z,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:h.paddedRect,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0}]}(0,i,o,0,gc(n.horizontal),x),H=o.layout.get("icon-rotate").evaluate(x,{});T=new $l(s,r,e,l,c,u,i,g,v,!1,t.overscaling,H),S=4*q.length;var G=t.iconSizeData,Y=null;"source"===G.kind?(Y=[bs*o.layout.get("icon-size").evaluate(x,{})])[0]>pc&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===G.kind&&((Y=[bs*_.compositeIconSizes[0].evaluate(x,{}),bs*_.compositeIconSizes[1].evaluate(x,{})])[0]>pc||Y[1]>pc)&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),t.addSymbols(t.icon,q,Y,y,m,x,!1,e,M.lineStartIndex,M.lineLength)}var W=T?T.boxStartIndex:t.collisionBoxArray.length,X=T?T.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=Ps.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),t.symbolInstances.emplaceBack(e.x,e.y,L.right>=0?L.right:-1,L.center>=0?L.center:-1,L.left>=0?L.left:-1,L.vertical||-1,P,N,j,V,U,W,X,l,E,C,S,0,h,O)}(t,c,l,r,n,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,x,k,s,m,b,T,f,e,i,o)};if("line"===A)for(var E=0,C=function(t,e,r,n,i){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=i&&f.y>=i||(h.y>=i?h=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round():f.y>=i&&(f=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round()),c&&h.equals(c[c.length-1])||(c=[h],o.push(c)),c.push(f)))))}return o}(e.geometry,0,0,ti,ti);E1){var F=Kl(R,_,r.vertical||p,n,24,v);F&&S(R,F)}}else if("Polygon"===e.type)for(var B=0,N=vo(e.geometry,0);B=M.maxzoom||"none"!==M.visibility&&(o(A,this.zoom),(d[M.id]=M.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g),c.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send("getGlyphs",{uid:this.uid,stacks:S},function(t,e){u||(u=t,h=e,L.call(s))}):h={};var E=Object.keys(g.iconDependencies);E.length?n.send("getImages",{icons:E},function(t,e){u||(u=t,f=e,L.call(s))}):f={};var C=Object.keys(g.patternDependencies);function L(){if(u)return i(u);if(h&&f&&p){var e=new a(h),r=new t.ImageAtlas(f,p);for(var n in d){var s=d[n];s instanceof t.SymbolBucket?(o(s.layers,this.zoom),t.performSymbolLayout(s,h,e.positions,f,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof t.LineBucket||s instanceof t.FillBucket||s instanceof t.FillExtrusionBucket)&&(o(s.layers,this.zoom),s.addFeatures(g,r.patternPositions))}this.status="done",i(null,{buckets:t.values(d).filter(function(t){return!t.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}C.length?n.send("getImages",{icons:C},function(t,e){u||(u=t,p=e,L.call(s))}):p={},L.call(this)};var s="undefined"!=typeof performance,l={getEntriesByName:function(t){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(s&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(s&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},c=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},l.mark(this._marks.start)};function u(e,r){var n=t.getArrayBuffer(e.request,function(e,n,a,i){e?r(e):n&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(n)),rawData:n,cacheControl:a,expires:i})});return function(){n.cancel(),r()}}c.prototype.finish=function(){l.mark(this._marks.end);var t=l.getEntriesByName(this._marks.measure);return 0===t.length&&(l.measure(this._marks.measure,this._marks.start,this._marks.end),t=l.getEntriesByName(this._marks.measure),l.clearMarks(this._marks.start),l.clearMarks(this._marks.end),l.clearMeasures(this._marks.measure)),t},l.Performance=c;var h=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||u,this.loading={},this.loaded={}};h.prototype.loadTile=function(e,r){var n=this,a=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new l.Performance(e.request),s=this.loading[a]=new i(e);s.abort=this.loadVectorData(e,function(e,i){if(delete n.loading[a],e||!i)return s.status="done",n.loaded[a]=s,r(e);var l=i.rawData,c={};i.expires&&(c.expires=i.expires),i.cacheControl&&(c.cacheControl=i.cacheControl);var u={};if(o){var h=o.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=i.vectorTile,s.parse(i.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[a]=s})},h.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,a=this;if(r&&r[n]){var i=r[n];i.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=i.reloadCallback;n&&(delete i.reloadCallback,i.parse(i.vectorTile,a.layerIndex,a.actor,n)),e(t,r)};"parsing"===i.status?i.reloadCallback=o:"done"===i.status&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.actor,o):o())}},h.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()},h.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var f=function(){this.loaded={}};f.prototype.loadTile=function(e,r){var n=e.uid,a=e.encoding,i=e.rawImageData,o=new t.DEMData(n,i,a);this.loaded=this.loaded||{},this.loaded[n]=o,r(null,o)},f.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var p={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function d(t){var e=0;if(t&&t.length>0){e+=Math.abs(g(t[0]));for(var r=1;r2){for(o=0;o=0}(t)===e?t:t.reverse()}var _=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=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))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function F(t,e){for(var r=t.loadGeometry(),n=t.type,a=0,i=0,o=r.length,s=0;s>1;!function t(e,r,n,a,i,o){for(;i>a;){if(i-a>600){var s=i-a+1,l=n-a+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(a,Math.floor(n-l*u/s+h)),Math.min(i,Math.floor(n+(s-l)*u/s+h)),o)}var f=r[2*n+o],p=a,d=i;for(N(e,r,a,n),r[2*i+o]>f&&N(e,r,a,i);pf;)d--}r[2*a+o]===f?N(e,r,a,d):N(e,r,++d,i),d<=n&&(a=d+1),n<=d&&(i=d-1)}}(e,r,s,a,i,o%2),t(e,r,n,a,s-1,o+1),t(e,r,n,s+1,i,o+1)}}(o,s,n,0,o.length-1,0)};H.prototype.range=function(t,e,r,n){return function(t,e,r,n,a,i,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var h=c.pop(),f=c.pop(),p=c.pop();if(f-p<=o)for(var d=p;d<=f;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=a&&l>=n&&l<=i&&u.push(t[d]);else{var g=Math.floor((p+f)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=a&&l>=n&&l<=i&&u.push(t[g]);var v=(h+1)%2;(0===h?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(v)),(0===h?a>=s:i>=l)&&(c.push(g+1),c.push(f),c.push(v))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},H.prototype.within=function(t,e,r){return function(t,e,r,n,a,i){for(var o=[0,t.length-1,0],s=[],l=a*a;o.length;){var c=o.pop(),u=o.pop(),h=o.pop();if(u-h<=i)for(var f=h;f<=u;f++)V(e[2*f],e[2*f+1],r,n)<=l&&s.push(t[f]);else{var p=Math.floor((h+u)/2),d=e[2*p],g=e[2*p+1];V(d,g,r,n)<=l&&s.push(t[p]);var v=(c+1)%2;(0===c?r-a<=d:n-a<=g)&&(o.push(h),o.push(p-1),o.push(v)),(0===c?r+a>=d:n+a>=g)&&(o.push(p+1),o.push(u),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var G={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},Y=function(t){this.options=$(Object.create(G),t),this.trees=new Array(this.options.maxZoom+1)};function W(t,e,r,n,a){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:a}}function X(t,e){var r=t.geometry.coordinates,n=r[0],a=r[1];return{x:K(n),y:Q(a),zoom:1/0,index:e,parentId:-1}}function Z(t){return{type:"Feature",id:t.id,properties:J(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 J(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return $($({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function K(t){return t/360+.5}function Q(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 $(t,e){for(var r in e)t[r]=e[r];return t}function tt(t){return t.x}function et(t){return t.y}function rt(t,e,r,n,a,i){var o=a-r,s=i-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=a,n=i):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function nt(t,e,r,n){var a={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)at(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(a*c-l*i)/2:Math.sqrt(Math.pow(l-a,2)+Math.pow(c-i,2))),a=l,i=c}var u=e.length-3;e[2]=1,function t(e,r,n,a){for(var i,o=a,s=n-r>>1,l=n-r,c=e[r],u=e[r+1],h=e[n],f=e[n+1],p=r+3;po)i=p,o=d;else if(d===o){var g=Math.abs(p-s);ga&&(i-r>3&&t(e,r,i,a),e[i+2]=o,n-i>3&&t(e,i,n,a))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function lt(t,e,r,n){for(var a=0;a1?1:r}function ht(t,e,r,n,a,i,o,s){if(n/=e,i>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if("Point"===f||"MultiPoint"===f)ft(h,g,r,n,a);else if("LineString"===f)pt(h,g,r,n,a,!1,s.lineMetrics);else if("MultiLineString"===f)gt(h,g,r,n,a,!1);else if("Polygon"===f)gt(h,g,r,n,a,!0);else if("MultiPolygon"===f)for(var v=0;v=r&&o<=n&&(e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]))}}function pt(t,e,r,n,a,i,o){for(var s,l,c=dt(t),u=0===a?mt:yt,h=t.start,f=0;fr&&(l=u(c,p,d,v,m,r),o&&(c.start=h+s*l)):y>n?x=r&&(l=u(c,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,v,m,n),b=!0),!i&&b&&(o&&(c.end=h+s*l),e.push(c),c=dt(t)),o&&(h+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===a?p:d)>=r&&y<=n&&vt(c,p,d,g),_=c.length-3,i&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&vt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function dt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function gt(t,e,r,n,a,i){for(var o=0;oo.maxX&&(o.maxX=u),h>o.maxY&&(o.maxY=h)}return o}function Tt(t,e,r,n){var a=e.geometry,i=e.type,o=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s0&&e.size<(a?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++;a&&function(t,e){for(var r=0,n=0,a=t.length,i=a-2;n0===e)for(n=0,a=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 H(s,tt,et,i,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},Y.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),a=180===t[2]?180:((t[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,a=180;else if(r>a){var o=this.getClusters([r,n,180,i],e),s=this.getClusters([-180,n,a,i],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,h=l.range(K(r),Q(i),K(a),Q(n));u>5,r=t%32,n="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(n);var i=a.points[e];if(!i)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,c=a.within(i.x,i.y,o);l1?this._map(c,!0):null,v=(l<<5)+(e+1),m=0,y=h;m1&&console.time("creation"),f=this.tiles[h]=kt(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,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=t,a){if(e===l.maxZoom||e===a)continue;var d=1<1&&console.time("clipping");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,T=1+_;g=v=m=y=null,x=ht(t,u,r-_,r+k,0,f.minX,f.maxX,l),b=ht(t,u,r+w,r+T,0,f.minX,f.maxX,l),t=null,x&&(g=ht(x,u,n-_,n+k,1,f.minY,f.maxY,l),v=ht(x,u,n+w,n+T,1,f.minY,f.maxY,l),x=null),b&&(m=ht(b,u,n-_,n+k,1,f.minY,f.maxY,l),y=ht(b,u,n+w,n+T,1,f.minY,f.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},Mt.prototype.getTile=function(t,e,r){var n=this.options,a=n.extent,i=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,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[St(c,u,h)];return l&&l.source?(i>1&&console.log("found parent tile z%d-%d-%d",c,u,h),i>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,t,e,r),i>1&&console.timeEnd("drilling down"),this.tiles[s]?_t(this.tiles[s],a):null):null};var Ct=function(e){function r(t,r,n){e.call(this,t,r,Et),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(n&&n.request&&n.request.collectResourceTiming)&&new l.Performance(n.request);this.loadGeoJSON(n,function(i,o){if(i||!o)return r(i);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(y(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(y(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=x(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(y(x,e))),t}(e,r);default:return e}}(o,!0);try{e._geoJSONIndex=n.cluster?new Y(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var a={},i={},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 f=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 m(t,e,r,n,a,i,o){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else{var l=i.requests[s];l||(l=i.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,function(t,e){if(e)for(var r in e)n._doesCharSupportLocalGlyph(+r)||(i.glyphs[+r]=e[+r]);for(var a=0,o=l;athis.height)return t.warnOnce("LineAtlas out of space"),null;for(var i=0,o=0;o=n&&e.x=a&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,i,r.z,a,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),a=this._data;"string"==typeof a?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(a),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(a),this.actor.send(this.type+".loadData",n,function(t,a){r._removed||a&&a.abandoned||(r._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[r.id]&&(r._resourceTiming=a.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,a=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var i={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};e.request=this.actor.send(a,i,function(t,i){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(i,n.map.painter,"reloadTile"===a),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=function(e){function r(t,r,n,a){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(a),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(a,i){n._loaded=!0,a?n.fire(new t.ErrorEvent(a)):i&&(n.image=i,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,a=-1/0,i=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("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,t.rasterBoundsAttributes.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 a=this.tiles[n];"loaded"!==a.state&&(a.state="loaded",a.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}(P),I=function(e){function r(r,n,a,i){e.call(this,r,n,a,i),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 a in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.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 i=this.tiles[a];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];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.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),a=this.data[r][n];return this.data[r].splice(n,1),a.timeout&&clearTimeout(a.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(a.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};var j=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};j.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},j.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},j.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},U=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var a=t.gl;this.buffer=a.createBuffer(),t.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};U.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},U.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},U.prototype.enableAttributes=function(t,e){for(var r=0;r1||(Math.abs(r)>1&&(1===Math.abs(r+a)?r+=a:1===Math.abs(r-a)&&(r-=a)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[i]&&(t.neighboringTiles[i].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var a in this._tiles){var i=this._tiles[a];if(!(n[a]||!i.hasData()||i.tileID.overscaledZ<=e||i.tileID.overscaledZ>r)){for(var o=i.tileID;i&&i.tileID.overscaledZ>e+1;){var s=i.tileID.scaledTo(i.tileID.overscaledZ-1);(i=this._tiles[s.key])&&i.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){for(var r=t.overscaledZ-1;r>=e;r--){var n=t.scaledTo(r);if(!n)return;var a=String(n.key),i=this._tiles[a];if(i&&i.hasData())return i;if(this._cache.has(n))return this._cache.get(n)}},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 a in this._tiles){var i=this._tiles[a];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+r),n[i.tileID.key]=i}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 a;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=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)}):(a=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&&(a=a.filter(function(t){return n._source.hasTile(t)}))):a=[];var i=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),o=Math.max(i-r.maxOverzooming,this._source.minzoom),s=Math.max(i+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(a,i);if(Ot(this._source.type)){for(var c={},u={},h=0,f=Object.keys(l);hthis._source.maxzoom){var v=d.children(this._source.maxzoom)[0],m=this.getTile(v);if(m&&m.hasData()){n[v.key]=v;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>=i;--b){var _=d.scaledTo(b);if(a[_.key])break;if(a[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"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 a=this,i=[],o=this.transform;if(!o)return i;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(),h=1/0,f=1/0,p=-1/0,d=-1/0,g=0,v=c;g=0&&m[1].y+v>=0){var y=l.map(function(t){return s.getTilePoint(t)}),x=c.map(function(t){return s.getTilePoint(t)});i.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}(t.Evented);function Pt(t,e){return t%32-e%32||e-t}function Ot(t){return"raster"===t||"image"===t||"video"===t}function It(){return new t.window.Worker(Qn.workerUrl)}Lt.maxOverzooming=10,Lt.maxUnderzooming=3;var zt=function(){this.active={}};zt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function Qt(e,r,n,a,i,o,s,l){var c=a?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],f=a?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;f.clear();for(var p=e.lineVertexArray,d=a?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;mMath.abs(n.x-r.x)*a?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function ee(e,r,n,a,i,o,s,l,c,u,h,f,p,d){var g,v=r/24,m=e.lineOffsetX*v,y=e.lineOffsetY*v;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=$t(v,l,m,y,n,h,f,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=Jt(w.first.point,s).point,T=Jt(w.last.point,s).point;if(a&&!n){var A=te(e.writingMode,k,T,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?L.point:re(f,C,S,1,i),O=te(e.writingMode,S,P,d);if(O)return O}var I=ne(v*l.getoffsetX(e.glyphStartIndex),m,y,n,h,f,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!I)return{notEnoughRoom:!0};g=[I]}for(var z=0,D=g;z0?1:-1,v=0;a&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?l+s:l+s+1,y=m,x=i,b=i,_=0,w=0,k=Math.abs(d);_+w<=k;){if((m+=g)=c)return null;if(b=x,void 0===(x=f[m])){var T=new t.Point(u.getx(m),u.gety(m)),A=Jt(T,h);if(A.signedDistanceFromCamera>0)x=f[m]=A.point;else{var M=m-g;x=re(0===_?o:new t.Point(u.getx(M),u.gety(M)),T,b,k-_+1,h)}}_+=w,w=b.dist(x)}var S=(k-_)/w,E=x.sub(b),C=E.mult(S)._add(b);return C._add(E._unit()._perp()._mult(n*g)),{point:C,angle:v+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:m-g===y?0:u.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:k-_}:null}}Wt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Wt.prototype.insert=function(t,e,r,n,a){this._forEachCell(e,r,n,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(a)},Wt.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)},Wt.prototype._insertBoxCell=function(t,e,r,n,a,i){this.boxCells[a].push(i)},Wt.prototype._insertCircleCell=function(t,e,r,n,a,i){this.circleCells[a].push(i)},Wt.prototype._query=function(t,e,r,n,a,i){if(r<0||t>this.width||n<0||e>this.height)return!a&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(a)return!0;for(var s=0;s0:o},Wt.prototype._queryCircle=function(t,e,r,n,a){var i=t-r,o=t+r,s=e-r,l=e+r;if(o<0||i>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(i,s,o,l,this._queryCellCircle,c,u,a),n?c.length>0:c},Wt.prototype.query=function(t,e,r,n,a){return this._query(t,e,r,n,!1,a)},Wt.prototype.hitTest=function(t,e,r,n,a){return this._query(t,e,r,n,!0,a)},Wt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Wt.prototype._queryCell=function(t,e,r,n,a,i,o,s){var l=o.seenUids,c=this.boxCells[a];if(null!==c)for(var u=this.bboxes,h=0,f=c;h=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[a];if(null!==g)for(var v=this.circles,m=0,y=g;mo*o+s*s},Wt.prototype._circleAndRectCollide=function(t,e,r,n,a,i,o){var s=(i-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var c=(o-a)/2,u=Math.abs(e-(a+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var h=l-s,f=u-c;return h*h+f*f<=r*r};var ae=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ie(t,e){for(var r=0;rS)le(e,E,!1);else{var I=this.projectPoint(c,C,L),z=P*T;if(d.length>0){var D=I.x-d[d.length-4],R=I.y-d[d.length-3];if(z*z*2>D*D+R*R&&E+8-M&&F=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},se.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(v=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={radialOffset:i,width:n,height:a,anchor:e,textBoxScale:o,prevAnchor:v},this.markUsedJustification(d,e,p,g),d.allowVerticalPlacement&&(this.markUsedOrientation(d,g,p),this.placedOrientations[p.crossTileID]=g),y},ve.prototype.placeLayerBucket=function(e,r,n,a,i,o,s,l,c,u){var h=this,f=e.layers[0].layout,p=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom),d=f.get("text-optional"),g=f.get("icon-optional"),v=f.get("text-allow-overlap"),m=f.get("icon-allow-overlap"),y=v&&(m||!e.hasIconData()||g),x=m&&(v||!e.hasTextData()||d),b=this.collisionGroups.get(e.sourceID),_="map"===f.get("text-rotation-alignment"),w="map"===f.get("text-pitch-alignment"),k="viewport-y"===f.get("symbol-z-order");!e.collisionArrays&&u&&e.deserializeCollisionBoxes(u);var T=function(a,u){if(!c[a.crossTileID])if(l)h.placements[a.crossTileID]=new fe(!1,!1,!1);else{var m,k=!1,T=!1,A=!0,M={box:null,offscreen:null},S={box:null,offscreen:null},E=null,C=null,L=0,P=0,O=0;u.textFeatureIndex&&(L=u.textFeatureIndex),u.verticalTextFeatureIndex&&(P=u.verticalTextFeatureIndex);var I=u.textBox;if(I){var z=function(r){var n=t.WritingMode.horizontal;if(e.allowVerticalPlacement&&!r&&h.prevPlacement){var i=h.prevPlacement.placedOrientations[a.crossTileID];i&&(h.placedOrientations[a.crossTileID]=i,n=i,h.markUsedOrientation(e,n,a))}return n},D=function(r,n){if(e.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&u.verticalTextBox)for(var i=0,o=e.writingModes;i0&&(R=R.filter(function(t){return t!==F.anchor})).unshift(F.anchor)}var B=function(t,n){for(var i=t.x2-t.x1,s=t.y2-t.y1,l=a.textBoxScale,c={box:[],offscreen:!1},u=v?2*R.length:R.length,f=0;f=R.length;if((c=h.attemptAnchorPlacement(p,t,i,s,a.radialTextOffset,l,_,w,o,r,b,d,a,e,n))&&c.box&&c.box.length){k=!0;break}}return c};D(function(){return B(I,t.WritingMode.horizontal)},function(){var r=u.verticalTextBox,n=M&&M.box&&M.box.length;return e.allowVerticalPlacement&&!n&&a.numVerticalGlyphVertices>0&&r?B(r,t.WritingMode.vertical):{box:null,offscreen:null}}),M&&(k=M.box,A=M.offscreen);var N=z(M&&M.box);if(!k&&h.prevPlacement){var j=h.prevPlacement.variableOffsets[a.crossTileID];j&&(h.variableOffsets[a.crossTileID]=j,h.markUsedJustification(e,j.anchor,a,N))}}else{var V=function(t,n){var i=h.collisionIndex.placeCollisionBox(t,f.get("text-allow-overlap"),o,r,b.predicate);return i&&i.box&&i.box.length&&(h.markUsedOrientation(e,n,a),h.placedOrientations[a.crossTileID]=n),i};D(function(){return V(I,t.WritingMode.horizontal)},function(){var r=u.verticalTextBox;return e.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&r?V(r,t.WritingMode.vertical):{box:null,offscreen:null}}),z(M&&M.box&&M.box.length)}}k=(m=M)&&m.box&&m.box.length>0,A=m&&m.offscreen;var U=u.textCircles;if(U){var q=e.text.placedSymbolArray.get(a.centerJustifiedTextSymbolIndex),H=t.evaluateSizeForFeature(e.textSizeData,p,q);E=h.collisionIndex.placeCollisionCircles(U,f.get("text-allow-overlap"),i,o,q,e.lineVertexArray,e.glyphOffsetArray,H,r,n,s,w,b.predicate),k=f.get("text-allow-overlap")||E.circles.length>0,A=A&&E.offscreen}u.iconFeatureIndex&&(O=u.iconFeatureIndex),u.iconBox&&(T=(C=h.collisionIndex.placeCollisionBox(u.iconBox,f.get("icon-allow-overlap"),o,r,b.predicate)).box.length>0,A=A&&C.offscreen);var G=d||0===a.numHorizontalGlyphVertices&&0===a.numVerticalGlyphVertices,Y=g||0===a.numIconVertices;G||Y?Y?G||(T=T&&k):k=T&&k:T=k=T&&k,k&&m&&m.box&&(S&&S.box&&P?h.collisionIndex.insertCollisionBox(m.box,f.get("text-ignore-placement"),e.bucketInstanceId,P,b.ID):h.collisionIndex.insertCollisionBox(m.box,f.get("text-ignore-placement"),e.bucketInstanceId,L,b.ID)),T&&C&&h.collisionIndex.insertCollisionBox(C.box,f.get("icon-ignore-placement"),e.bucketInstanceId,O,b.ID),k&&E&&h.collisionIndex.insertCollisionCircles(E.circles,f.get("text-ignore-placement"),e.bucketInstanceId,L,b.ID),h.placements[a.crossTileID]=new fe(k||y,T||x,A||e.justReloaded),c[a.crossTileID]=!0}};if(k)for(var A=e.getSortedSymbolIndexes(this.transform.angle),M=A.length-1;M>=0;--M){var S=A[M];T(e.symbolInstances.get(S),e.collisionArrays[S])}else for(var E=0;E=0&&(e.text.placedSymbolArray.get(c).crossTileID=i>=0&&c!==i?0:n.crossTileID)}},ve.prototype.markUsedOrientation=function(e,r,n){for(var a=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,i=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||g>0,b=p.numIconVertices>0;if(x){for(var _=Ae(y.text),w=(d+g)/4,k=0;k=0&&(e.text.placedSymbolArray.get(t).hidden=T||S)}),p.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(p.verticalPlacedTextSymbolIndex).hidden=T||M);var E=this.variableOffsets[p.crossTileID];E&&this.markUsedJustification(e,E.anchor,p,A);var C=this.placedOrientations[p.crossTileID];C&&(this.markUsedJustification(e,"left",p,C),this.markUsedOrientation(e,C,p))}if(b){for(var L=Ae(y.icon),P=0;Pt},ve.prototype.setStale=function(){this.stale=!0};var ye=Math.pow(2,25),xe=Math.pow(2,24),be=Math.pow(2,17),_e=Math.pow(2,16),we=Math.pow(2,9),ke=Math.pow(2,8),Te=Math.pow(2,1);function Ae(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*ye+e*xe+r*be+e*_e+r*we+e*ke+r*Te+e}var Me=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Me.prototype.continuePlacement=function(t,e,r,n,a){for(;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 Me),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Se.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Ee=512/t.EXTENT/2,Ce=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,a)}else{var c=o[t.scaledTo(Number(i)).key];c&&c.findMatches(e.symbolInstances,t,a)}}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,a=e,u())}),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){c=null,o||(o=t,i=e,u())});function u(){if(o)n(o);else if(a&&i){var e=t.browser.getImageData(i),r={};for(var s in a){var l=a[s],c=l.width,u=l.height,h=l.x,f=l.y,p=l.sdf,d=l.pixelRatio,g=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,g,{x:h,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:g,pixelRatio:d,sdf:p}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e.sprite,this.map._requestManager,function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var a in r)n.imageManager.addImage(a,r[a]);n.imageManager.setLoaded(!0),n.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=Bt(this.stylesheet.layers);this._order=i.map(function(t){return t.id}),this._layers={};for(var o=0,s=i;o0)throw new Error("Unimplemented: "+a.map(function(t){return t.command}).join(", ")+".");return n.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.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.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 a=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 i=this.sourceCaches[e]=new Lt(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,function(){return{isSourceLoaded:a.loaded(),source:i.serialize(),sourceId:e}}),i.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 a=e.id;if(this.getLayer(a))this.fire(new t.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var i;if("custom"===e.type){if(Ie(this,t.validateCustomStyleLayer(e)))return;i=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(a,e.source),e=t.clone$1(e),e=t.extend(e,{source:a})),this._validate(t.validateStyle.layer,"layers."+a,e,{arrayIndex:-1},n))return;i=t.createStyleLayer(e),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}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,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){var s=this._removedLayers[a];delete this._removedLayers[a],s.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.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 a=r?this._order.indexOf(r):this._order.length;r&&-1===a?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(a,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],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.setLayerZoomRange=function(e,r,n){this._checkLoaded();var a=this.getLayer(e);a?a.minzoom===r&&a.maxzoom===n||(null!=r&&(a.minzoom=r),null!=n&&(a.maxzoom=n),this._updateLayer(a)):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 a=this.getLayer(e);if(a){if(!t.deepEqual(a.filter,r))return null==r?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(t.validateStyle.filter,"layers."+a.id+".filter",r,null,n)||(a.filter=t.clone$1(r),this._updateLayer(a)))}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,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(e);i?t.deepEqual(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n,a),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(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,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(e);i?t.deepEqual(i.getPaintProperty(r),n)||(i.setPaintProperty(r,n,a)&&this._updateLayer(i),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,a=e.sourceLayer,i=this.sourceCaches[n],o=parseInt(e.id,10);if(void 0!==i){var s=i.getSource().type;"geojson"===s&&a?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||a?isNaN(o)||o<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):i.setFeatureState(a,o,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,a=this.sourceCaches[n];if(void 0!==a){var i=a.getSource().type,o="vector"===i?e.sourceLayer:void 0,s=parseInt(e.id,10);"vector"!==i||o?void 0!==e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):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."))):a.removeFeatureState(o,s,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,a=this.sourceCaches[r],i=parseInt(e.id,10);if(void 0!==a)if("vector"!==a.getSource().type||n){if(!(isNaN(i)||i<0))return a.getFeatureState(n,i);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else 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]&&(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={},a=[],i=this._order.length-1;i>=0;i--){var o=this._order[i];if(r(o)){n[o]=i;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var v=a.length-1;v>=0;v--){var m=a[v].feature;if(n[m.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;}"),Ye=cr("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;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);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),We=cr("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Xe=cr("#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);}"),Ze=cr("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;}"),Je=cr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),Ke=cr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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);}"),Qe=cr("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;}"),$e=cr("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\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\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 vec4 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\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\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 pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),tr=cr("#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;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/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;}"),er=cr("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;}"),rr=cr("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);}"),nr=cr("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);}"),ar=cr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 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 pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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 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,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));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;\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 vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_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);}"),ir=cr("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);}"),or=cr("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;}"),sr=cr("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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),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));}"),lr=cr("#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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),0.0,1.0);float gamma_scale=gl_Position.w;vec2 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;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function cr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:t=t.replace(r,function(t,e,r,a,i){return n[i]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"}),vertexSource:e=e.replace(r,function(t,e,r,a,i){var o="float"===a?"vec2":"vec4",s=i.match(/color/)?"color":o;return n[i]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = a_"+i+";\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"})}}var ur=Object.freeze({prelude:Be,background:Ne,backgroundPattern:je,circle:Ve,clippingMask:Ue,heatmap:qe,heatmapTexture:He,collisionBox:Ge,collisionCircle:Ye,debug:We,fill:Xe,fillOutline:Ze,fillOutlinePattern:Je,fillPattern:Ke,fillExtrusion:Qe,fillExtrusionPattern:$e,hillshadePrepare:tr,hillshade:er,line:rr,lineGradient:nr,linePattern:ar,lineSDF:ir,raster:or,symbolIcon:sr,symbolSDF:lr}),hr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};hr.prototype.bind=function(t,e,r,n,a,i,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}fr.prototype.draw=function(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g){var v,m=t.gl;for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(a),t.setCullFace(i),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,h,{zoom:f});for(var x=(v={},v[m.LINES]=2,v[m.TRIANGLES]=3,v[m.LINE_STRIP]=1,v)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new hr)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),m.drawElements(e,w.primitiveLength*x,m.UNSIGNED_SHORT,w.primitiveOffset*x*2)}};var dr=function(e,r,n,a){var i=r.style.light,o=i.properties.get("position"),s=[o.x,o.y,o.z],l=t.create$1();"viewport"===i.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=i.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:i.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:a}},gr=function(e,r,n,a,i,o,s){return t.extend(dr(e,r,n,a),pr(o,r,s),{u_height_factor:-Math.pow(2,i.overscaledZ)/s.tileSize/8})},vr=function(t){return{u_matrix:t}},mr=function(e,r,n,a){return t.extend(vr(e),pr(n,r,a))},yr=function(t,e){return{u_matrix:t,u_world:e}},xr=function(e,r,n,a,i){return t.extend(mr(e,r,n,a),{u_world:i})},br=function(e,r,n,a){var i,o,s=e.transform;if("map"===a.paint.get("circle-pitch-alignment")){var l=ce(n,1,s.zoom);i=!0,o=[l,l]}else i=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===a.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+i,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},_r=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)}},wr=function(t,e,r){var n=ce(r,1,e.zoom),a=Math.pow(2,e.zoom-r.tileID.overscaledZ),i=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*a),e.pixelsToGLUnits[1]/(n*a)],u_overscale_factor:i}},kr=function(t,e){return{u_matrix:t,u_color:e}},Tr=function(t){return{u_matrix:t}},Ar=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:ce(e,1,r),u_intensity:n}},Mr=function(t,e,r){var n=r.paint.get("hillshade-shadow-color"),a=r.paint.get("hillshade-highlight-color"),i=r.paint.get("hillshade-accent-color"),o=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Er(t,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),o],u_shadow:n,u_highlight:a,u_accent:i}},Sr=function(e,r){var n=e.dem.stride,a=t.create();return t.ortho(a,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(a,a,[0,-t.EXTENT,0]),{u_matrix:a,u_image:1,u_dimension:[n,n],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function Er(e,r){var n=Math.pow(2,r.canonical.z),a=r.canonical.y;return[new t.MercatorCoordinate(0,a/n).toLngLat().lat,new t.MercatorCoordinate(0,(a+1)/n).toLngLat().lat]}var Cr=function(e,r,n){var a=e.transform;return{u_matrix:zr(e,r,n),u_ratio:1/ce(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Lr=function(e,r,n){return t.extend(Cr(e,r,n),{u_image:0})},Pr=function(e,r,n,a){var i=e.transform,o=Ir(r,i);return{u_matrix:zr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ce(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[t.browser.devicePixelRatio,o,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Or=function(e,r,n,a,i){var o=e.transform,s=e.lineAtlas,l=Ir(r,o),c="round"===n.layout.get("line-cap"),u=s.getDash(a.from,c),h=s.getDash(a.to,c),f=u.width*i.fromScale,p=h.width*i.toScale;return t.extend(Cr(e,r,n),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/p,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:i.t})};function Ir(t,e){return 1/ce(t,1,e.tileZoom)}function zr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Dr=function(t,e,r,n,a){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*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(o=a.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(i=a.paint.get("raster-contrast"),i>0?1/(1-i):1+i),u_spin_weights:function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(a.paint.get("raster-hue-rotate"))};var i,o};var Rr=function(t,e,r,n,a,i,o,s,l,c){var u=a.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:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:i,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Fr=function(e,r,n,a,i,o,s,l,c,u,h){var f=i.transform;return t.extend(Rr(e,r,n,a,i,o,s,l,c,u),{u_gamma_scale:a?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+h})},Br=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Nr=function(e,r,n,a,i,o){return t.extend(function(t,e,r,n){var a=r.imageManager.getPattern(t.from),i=r.imageManager.getPattern(t.to),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,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:i.tl,u_pattern_br_b:i.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:i.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ce(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,f>>16],u_pixel_coord_lower:[65535&h,65535&f]}}(a,o,n,i),{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.Uniform4f(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.Uniform4f(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.Uniform4f(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:_r,collisionCircle:_r,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},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)}},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.Uniform4f(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.Uniform1f(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.Uniform1f(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.Uniform1f(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 Vr(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),a=0;a0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),h=i.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),p=f&&e.refreshedUponExpiration?1:t.clamp(f?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}}function en(e,r,n){var a=e.context,i=a.gl,o=n.posMatrix,s=e.useProgram("debug"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass(),h="$debug";s.draw(a,i.LINE_STRIP,l,c,u,Et.disabled,kr(o,t.Color.red),h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var f=r.getTileByID(n.key).latestRawTileData,p=f&&f.byteLength||0,d=Math.floor(p/1024),g=r.getTile(n).tileSize,v=512/Math.min(g,512),m=function(t,e,r,n){n=n||1;var a,i,o,s,l,c,u,h,f=[];for(a=0,i=t.length;a":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},nn={symbol:function(t,e,r,n,a){if("translucent"===t.renderPass){var i=Mt.disabled,o=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Xr(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),i,o,a),0!==r.paint.get("text-opacity").constantOr(1)&&Xr(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),i,o,a),e.map.showCollisionBoxes&&function(t,e,r,n){qr(t,e,r,n,!1),qr(t,e,r,n,!0)}(t,e,r,n)}},circle:function(e,r,n,a){if("translucent"===e.renderPass){var i=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==s.constantOr(1)){for(var c=e.context,u=c.gl,h=e.depthModeForSublayer(0,At.ReadOnly),f=Mt.disabled,p=e.colorModeForRenderPass(),d=[],g=0;ge.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function sn(t,e,r,n,a){var i=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=i;fl.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&sn(c,s,n,a,i),l.dy&&sn(c,l,n,a,i)}an.prototype.resize=function(e,r){var n=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var a=0,i=this.style._order;a256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var i=0,o=e;i256&&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)},an.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)},an.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new St([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?St.unblended:St.alphaBlended},an.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return At.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new At(r||this.context.gl.LEQUAL,e,[n,n])},an.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var M=this.style._layers[n[this.currentLayer]],S=a[M.source],E=s[M.source];this._renderTileClippingMasks(M,E),this.renderLayer(this,S,M,E)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},an.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},an.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new fr(this.context,ur[t],e,jr[t],this._showOverdrawInspector)),this.cache[r]},an.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()},an.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)};var cn=function(e,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=e||0,this._maxZoom=r||22,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._posMatrixCache={},this._alignedPosMatrixCache={}},un={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};cn.prototype.clone=function(){var t=new cn(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},un.minZoom.get=function(){return this._minZoom},un.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},un.maxZoom.get=function(){return this._maxZoom},un.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},un.renderWorldCopies.get=function(){return this._renderWorldCopies},un.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},un.worldSize.get=function(){return this.tileSize*this.scale},un.centerPoint.get=function(){return this.size._div(2)},un.size.get=function(){return new t.Point(this.width,this.height)},un.bearing.get=function(){return-this.angle/Math.PI*180},un.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))},un.pitch.get=function(){return this._pitch/Math.PI*180},un.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},un.fov.get=function(){return this._fov/Math.PI*180},un.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())},un.zoom.get=function(){return this._zoom},un.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())},un.center.get=function(){return this._center},un.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},cn.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},cn.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),a=this.pointCoordinate(new t.Point(this.width,0)),i=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,a.x,i.x,o.x)),l=Math.floor(Math.max(n.x,a.x,i.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},cn.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var a=t.MercatorCoordinate.fromLngLat(this.center),i=Math.pow(2,r),o=new t.Point(i*a.x-.5,i*a.y-.5);return function(e,r,n,a){void 0===a&&(a=!0);var i=1<=0&&l<=i)for(c=r;co&&(a=o-v)}if(this.lngRange){var m=p.x,y=c.x/2;m-yl&&(n=l-y)}void 0===n&&void 0===a||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==a?a:p.y))),this._unmodified=u,this._constraining=!1}},cn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),a=this.point,i=a.x,o=a.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,l,s),t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-i,-o,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c;var u=this.width%2/2,h=this.height%2/2,f=Math.cos(this.angle),p=Math.sin(this.angle),d=i-Math.round(i)+f*u+p*h,g=o-Math.round(o)+f*h+p*u,v=new Float64Array(c);if(t.translate(v,v,[d>.5?d-1:d,g>.5?g-1:g,0]),this.alignedProjMatrix=v,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},cn.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},cn.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},cn.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,a=r.y,i=r.x,o=r.y,s=0,l=e;s=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},hn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var fn=function(e){function n(n,a,i,o){void 0===o&&(o={});var s=r.mousePos(a.getCanvasContainer(),i),l=a.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:i},o)),this._defaultPrevented=!1,this.target=a}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(t.Event),pn=function(e){function n(n,a,i){var o=r.touchPos(a.getCanvasContainer(),i),s=o.map(function(t){return a.unproject(t)}),l=o.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.Point(0,0)),c=a.unproject(l);e.call(this,n,{points:o,point:l,lngLats:s,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(t.Event),dn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),gn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};gn.prototype.setZoomRate=function(t){this._defaultZoomRate=t},gn.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},gn.prototype.isEnabled=function(){return!!this._enabled},gn.prototype.isActive=function(){return!!this._active},gn.prototype.isZooming=function(){return!!this._zooming},gn.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},gn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},gn.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),a=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":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},gn.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},gn.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var 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=this._map._requestRenderFrame(this._onScrollFrame))}},gn.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==a&&(a=1/a);var i="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(i*a))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&s&&l){var u=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=l(u);r.zoom=t.number(s,o,h),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else r.zoom=o,c=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},gn.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,a=(t.browser.now()-n.start)/n.duration,i=n.easing(a+.01)-n.easing(a),o=.27/Math.sqrt(i*i+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};var vn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};vn.prototype.isEnabled=function(){return!!this._enabled},vn.prototype.isActive=function(){return!!this._active},vn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},vn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},vn.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},vn.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)180&&(p=180);var d=p/180;c+=h*p*(d/2),Math.abs(r._normalizeBearing(c,0))0&&r-e[0][0]>160;)e.shift()};var xn=t.bezier(0,0,.3,1),bn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};bn.prototype.isEnabled=function(){return"disabled"!==this._state},bn.prototype.isActive=function(){return"active"===this._state},bn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},bn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},bn.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},bn.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},bn.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._prevPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},bn.prototype._onMove=function(e){e.preventDefault();var n=r.mousePos(this._el,e);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:xn,noMoveStart:!0},{originalEvent:t})}}},bn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},bn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var _n=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function wn(t){return t*(2-t)}_n.prototype.isEnabled=function(){return!!this._enabled},_n.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},_n.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_n.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,a=0,i=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),i=-1);break;case 40:t.shiftKey?n=-1:(i=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:wn,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-a,100*-i],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var kn=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};kn.prototype.isEnabled=function(){return!!this._enabled},kn.prototype.isActive=function(){return!!this._active},kn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},kn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kn.prototype.onTouchStart=function(t){var e=this;if(this.isEnabled()&&!(t.points.length>1))if(this._tapped){var r=t.points[0],n=this._tappedPoint;if(n&&n.dist(r)<=30){t.originalEvent.preventDefault();var a=function(){e._tapped&&e._zoom(t),e._map.off("touchcancel",i),e._resetTapped()},i=function(){e._map.off("touchend",a),e._resetTapped()};this._map.once("touchend",a),this._map.once("touchcancel",i)}else this._resetTapped()}else this._tappedPoint=t.points[0],this._tapped=setTimeout(function(){e._tapped=null,e._tappedPoint=null},300)},kn.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},kn.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},kn.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},kn.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Tn=t.bezier(0,0,.15,1),An=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};An.prototype.isEnabled=function(){return!!this._enabled},An.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},An.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},An.prototype.disableRotation=function(){this._rotationDisabled=!0},An.prototype.enableRotation=function(){this._rotationDisabled=!1},An.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var n=r.mousePos(this._el,e.touches[0]),a=r.mousePos(this._el,e.touches[1]),i=n.add(a).div(2);this._startVec=n.sub(a),this._startAround=this._map.transform.pointLocation(i),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},An.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),n=r.mousePos(this._el,t.touches[1]),a=e.sub(n);return{vec:a,center:e.add(n).div(2),scale:a.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI}},An.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,a=r.scale,i=r.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==a||Math.abs(1-a)>.15;Math.abs(i)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},An.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),a=n.center,i=n.bearing,o=n.scale,s=r.pointLocation(a),l=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+i),r.zoom=r.scaleZoom(this._startScale*o),r.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),o,a])}},An.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var n=this._gestureIntent,a=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new t.Event(n+"end",{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,o=this._map;if(i.length<2)o.snapToNorth({},{originalEvent:e});else{var s=i[i.length-1],l=i[0],c=o.transform.scaleZoom(a*s[1]),u=o.transform.scaleZoom(a*l[1]),h=c-u,f=(s[0]-l[0])/1e3,p=s[2];if(0!==f&&c!==u){var d=.15*h/f;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),v=c+d*g/2e3;v<0&&(v=0),o.easeTo({zoom:v,duration:g,easing:Tn,around:this._aroundCenter?o.getCenter():o.unproject(p),noMoveStart:!0},{originalEvent:e})}else o.snapToNorth({},{originalEvent:e})}}},An.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Mn={scrollZoom:gn,boxZoom:vn,dragRotate:yn,dragPan:bn,keyboard:_n,doubleClickZoom:kn,touchZoomRotate:An},Sn=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.resetNorthPitch=function(e,r){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())e?1:0}),["bottom","left","right","top"])){var o=this.transform,s=o.project(t.LngLat.convert(e)),l=o.project(t.LngLat.convert(r)),c=s.rotate(-n*Math.PI/180),u=l.rotate(-n*Math.PI/180),h=new t.Point(Math.max(c.x,u.x),Math.max(c.y,u.y)),f=new t.Point(Math.min(c.x,u.x),Math.min(c.y,u.y)),p=h.sub(f),d=(o.width-a.padding.left-a.padding.right)/p.x,g=(o.height-a.padding.top-a.padding.bottom)/p.y;if(!(g<0||d<0)){var v=Math.min(o.scaleZoom(o.scale*Math.min(d,g)),a.maxZoom),m=t.Point.convert(a.offset),y=(a.padding.left-a.padding.right)/2,x=(a.padding.top-a.padding.bottom)/2,b=new t.Point(m.x+y,m.y+x).mult(o.scale/o.zoomScale(v));return{center:o.unproject(s.add(l).div(2).sub(b)),zoom:v,bearing:n}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,a,i){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,a),a,i)},r.prototype._fitInternal=function(e,r,n){return e?(r=t.extend(e,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,a=!1,i=!1,o=!1;return"zoom"in e&&n.zoom!==+e.zoom&&(a=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),"bearing"in e&&n.bearing!==+e.bearing&&(i=!0,n.bearing=+e.bearing),"pitch"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),a&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),i&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),o&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||t.browser.prefersReducedMotion)&&(e.duration=0);var a=this.transform,i=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:i,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:s,h=a.centerPoint.add(t.Point.convert(e.offset)),f=a.pointLocation(h),p=t.LngLat.convert(e.center||f);this._normalizeCenter(p);var d,g,v=a.project(f),m=a.project(p).sub(v),y=a.zoomScale(l-i);return e.around&&(d=t.LngLat.convert(e.around),g=a.locationPoint(d)),this._zooming=l!==i,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(a.zoom=t.number(i,l,e)),n._rotating&&(a.bearing=t.number(o,c,e)),n._pitching&&(a.pitch=t.number(s,u,e)),d)a.setLocationAtPoint(d,g);else{var f=a.zoomScale(a.zoom-i),p=l>i?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=a.unproject(v.add(m.mult(e*x)).mult(f));a.setLocationAtPoint(a.renderWorldCopies?b.wrap():b,h)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),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(t.browser.prefersReducedMotion){var a=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c="zoom"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):o,u="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f=i.zoomScale(c-o),p=i.centerPoint.add(t.Point.convert(e.offset)),d=i.pointLocation(p),g=t.LngLat.convert(e.center||d);this._normalizeCenter(g);var v=i.project(d),m=i.project(g).sub(v),y=e.curve,x=Math.max(i.width,i.height),b=x/f,_=m.mag();if("minZoom"in e){var w=t.clamp(Math.min(e.minZoom,o,c),i.minZoom,i.maxZoom),k=x/i.zoomScale(w-o);y=Math.sqrt(k/_*2)}var T=y*y;function A(t){var e=(b*b-x*x+(t?-1:1)*T*T*_*_)/(2*(t?b:x)*T*_);return Math.log(Math.sqrt(e*e+1)-e)}function M(t){return(Math.exp(t)-Math.exp(-t))/2}function S(t){return(Math.exp(t)+Math.exp(-t))/2}var E=A(0),C=function(t){return S(E)/S(E+y*t)},L=function(t){return x*((S(E)*(M(e=E+y*t)/S(e))-M(E))/T)/_;var e},P=(A(1)-E)/y;if(Math.abs(_)<1e-6||!isFinite(P)){if(Math.abs(x-b)<1e-6)return this.easeTo(e,r);var O=be.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==u,this._pitching=h!==l,this._prepareEase(r,!1),this._ease(function(e){var a=e*P,f=1/C(a);i.zoom=1===e?c:o+i.scaleZoom(f),n._rotating&&(i.bearing=t.number(s,u,e)),n._pitching&&(i.pitch=t.number(l,h,e));var d=1===e?g:i.unproject(v.add(m.mult(L(a))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?d.wrap():d,p),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(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),En=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};En.prototype.getDefaultPosition=function(){return"bottom-right"},En.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},En.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},En.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)}},En.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Cn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Cn.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","Mapbox logo"),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},Cn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Cn.prototype.getDefaultPosition=function(){return"bottom-left"},Cn.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Cn.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}},Cn.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 Ln=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ln.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Ln.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 minZoom");var i=new cn(e.minZoom,e.maxZoom,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 Ln,this._controls=[],this._mapId=t.uniqueId(),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 On))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 a._update(!1)}),this.on("moveend",function(){return a._update(!1)}),this.on("zoom",function(){return a._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var n=t.getCanvasContainer(),a=null,i=!1,o=null;for(var s in Mn)t[s]=new Mn[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(n,"mouseout",function(e){t.fire(new fn("mouseout",t,e))}),r.addEventListener(n,"mousedown",function(a){i=!0,o=r.mousePos(n,a);var s=new fn("mousedown",t,a);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(a),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(a),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(a))}),r.addEventListener(n,"mouseup",function(e){var r=t.dragRotate.isActive();a&&!r&&t.fire(new fn("contextmenu",t,a)),a=null,i=!1,t.fire(new fn("mouseup",t,e))}),r.addEventListener(n,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new fn("mousemove",t,e))}}),r.addEventListener(n,"mouseover",function(e){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new fn("mouseover",t,e))}),r.addEventListener(n,"touchstart",function(r){var n=new pn("touchstart",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),r.addEventListener(n,"touchmove",function(e){t.fire(new pn("touchmove",t,e))},{passive:!1}),r.addEventListener(n,"touchend",function(e){t.fire(new pn("touchend",t,e))}),r.addEventListener(n,"touchcancel",function(e){t.fire(new pn("touchcancel",t,e))}),r.addEventListener(n,"click",function(a){var i=r.mousePos(n,a);(!o||i.equals(o)||i.dist(o)-1&&this._controls.splice(r,1),e.onRemove(this),this},a.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],a=r[1];return this._resizeCanvas(n,a),this.transform.resize(n,a),this.painter.resize(n,a),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},a.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&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")},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},a.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},a.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},a.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},a.prototype.on=function(t,e,r){var a=this;if(void 0===r)return n.prototype.on.call(this,t,e);var i=function(){var n;if("mouseenter"===t||"mouseover"===t){var i=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=a.getLayer(e)?a.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?i||(i=!0,r.call(a,new fn(t,a,n.originalEvent,{features:o}))):i=!1},mouseout:function(){i=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(a.getLayer(e)?a.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(a,new fn(t,a,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(a,new fn(t,a,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=a.getLayer(e)?a.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(a,t),delete t.features)},n)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(o,i.delegates[o]);return this},a.prototype.off=function(t,e,r){if(void 0===r)return n.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var a=this._delegatedListeners[t],i=0;i180;){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}Fn.prototype._updateZoomButtons=function(){var t=this._map.getZoom();t===this._map.getMaxZoom()?this._zoomInButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomInButton.classList.remove("mapboxgl-ctrl-icon-disabled"),t===this._map.getMinZoom()?this._zoomOutButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomOutButton.classList.remove("mapboxgl-ctrl-icon-disabled")},Fn.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Fn.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new yn(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.addEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.enable()),this._container},Fn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.removeEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.disable(),delete this._handler),delete this._map},Fn.prototype._createButton=function(t,e,n){var a=r.create("button",t,this._container);return a.type="button",a.title=e,a.setAttribute("aria-label",e),a.addEventListener("click",n),a};var Nn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function jn(t,e,r){var n=t.classList;for(var a in Nn)n.remove("mapboxgl-"+r+"-anchor-"+a);n.add("mapboxgl-"+r+"-anchor-"+e)}var Vn,Un=function(e){function n(n,a){if(e.call(this),(n instanceof t.window.HTMLElement||a)&&(n=t.extend({element:n},a)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var i=r.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var c=0,u=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c5280?Xn(e,c,f/5280,"mi"):Xn(e,c,f,"ft")}else r&&"nautical"===r.unit?Xn(e,c,h/1852,"nm"):Xn(e,c,h,"m")}function Xn(t,e,r,n){var a,i,o,s=(a=r,(i=Math.pow(10,(""+Math.floor(a)).length-1))*(o=(o=a/i)>=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))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),t.style.width=e*l+"px",t.innerHTML=s+n}Yn.prototype.getDefaultPosition=function(){return"bottom-left"},Yn.prototype._onMove=function(){Wn(this._map,this._container,this.options)},Yn.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},Yn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Yn.prototype.setUnit=function(t){this.options.unit=t,Wn(this._map,this._container,this.options)};var Zn=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"),this._className="mapboxgl-ctrl"};Zn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Zn.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zn.prototype._updateTitle=function(){var t=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Zn.prototype._isFullscreen=function(){return this._fullscreen},Zn.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(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Zn.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 Jn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Kn=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Jn),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){var r=this;return this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",function(t){r._update(t.point)}),this._map.on("mouseup",function(t){r._update(t.point)}),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("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),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._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){var t=this;return this._trackPointer=!0,this._pos=null,this._map&&(this._map.off("move",this._update),this._map.on("mousemove",function(e){t._update(e.point)}),this._map.on("drag",function(e){t._update(e.point)}),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(),a=t.window.document.createElement("body");for(a.innerHTML=e;r=a.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return 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._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._onClickClose))},n.prototype._update=function(e){var n=this,a=this._lngLat||this._trackPointer;if(this._map&&a&&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.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Bn(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=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 a=t.Point.convert(r);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}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=i.y+s.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-c/2&&l.push("right"),o=0===l.length?"bottom":l.join("-")}var h=i.add(s[o]).round();r.setTransform(this._container,Nn[o]+" translate("+h.x+"px,"+h.y+"px)"),jn(this._container,o,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(t.Evented),Qn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:zn,NavigationControl:Fn,GeolocateControl:Hn,AttributionControl:En,ScaleControl:Yn,FullscreenControl:Zn,Popup:Kn,Marker:Un,Style:Re,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,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 zt.workerCount},set workerCount(t){zt.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 Qn}),r},"object"==typeof r&&"undefined"!=typeof e?e.exports=a():(n=n||self).mapboxgl=a()},{}],428:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1<p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{"./normalize":430,"gl-mat4/clone":260,"gl-mat4/create":261,"gl-mat4/determinant":262,"gl-mat4/invert":266,"gl-mat4/transpose":277,"gl-vec3/cross":335,"gl-vec3/dot":340,"gl-vec3/length":350,"gl-vec3/normalize":357}],430:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,a=0;a<16;a++)t[a]=e[a]*n;return!0}},{}],431:[function(t,e,r){var n=t("gl-vec3/lerp"),a=t("mat4-recompose"),i=t("mat4-decompose"),o=t("gl-mat4/determinant"),s=t("quat-slerp"),l=h(),c=h(),u=h();function h(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,h){if(0===o(e)||0===o(r))return!1;var f=i(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=i(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!p||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),a(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{"gl-mat4/determinant":262,"gl-vec3/lerp":351,"mat4-decompose":429,"mat4-recompose":432,"quat-slerp":484}],432:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},a=(n.create(),n.create());e.exports=function(t,e,r,i,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(a),0!==i[2]&&(a[9]=i[2],n.multiply(t,t,a)),0!==i[1]&&(a[9]=0,a[8]=i[1],n.multiply(t,t,a)),0!==i[0]&&(a[8]=0,a[4]=i[0],n.multiply(t,t,a)),n.scale(t,t,r),t}},{"gl-mat4/create":261,"gl-mat4/fromRotationTranslation":264,"gl-mat4/identity":265,"gl-mat4/multiply":268,"gl-mat4/scale":275,"gl-mat4/translate":276}],433:[function(t,e,r){"use strict";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],434:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),a=t("mat4-interpolate"),i=t("gl-mat4/invert"),o=t("gl-mat4/rotateX"),s=t("gl-mat4/rotateY"),l=t("gl-mat4/rotateZ"),c=t("gl-mat4/lookAt"),u=t("gl-mat4/translate"),h=(t("gl-mat4/scale"),t("gl-vec3/normalize")),f=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],f=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)f[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&f[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=f[c];else a(o,f,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],h(g,g);var v=this.computedInverse;i(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=m[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,a=0,f=o.length;a0;--p)r[h++]=s[p];return r};var n=t("robust-orientation")[3]},{"robust-orientation":511}],436:[function(t,e,r){"use strict";e.exports=function(t,e){e||(e=t,t=window);var r=0,a=0,i=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!==a||u!==i||l(s))&&(r=0|t,a=c||0,i=u||0,e&&e(r,a,i,o))}function u(t){c(0,t)}function h(){(r||a||i||o.shift||o.alt||o.meta||o.control)&&(a=i=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function f(t){l(t)&&e&&e(r,a,i,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",g),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",h),t.addEventListener("keyup",f),t.addEventListener("keydown",f),t.addEventListener("keypress",f),t!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",g),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",h),t.removeEventListener("keyup",f),t.removeEventListener("keydown",f),t.removeEventListener("keypress",f),t!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return i},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t("mouse-event")},{"mouse-event":438}],437:[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 a=t.clientX||0,i=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=a-o.left,r[1]=i-o.top,r}},{}],438:[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< 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var E=t.getters||[],C=new Array(M),L=0;L=0?C[L]=!0:C[L]=!1;return function(t,e,r,M,S,E){var C=E.length,L=S.length;if(L<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var P="extractContour"+S.join("_"),O=[],I=[],z=[],D=0;D0&&N.push(l(D,S[R-1])+"*"+s(S[R-1])),I.push(d(D,S[R])+"=("+N.join("-")+")|0")}for(var D=0;D=0;--D)j.push(s(S[D]));I.push(w+"=("+j.join("*")+")|0",b+"=mallocUint32("+w+")",x+"=mallocUint32("+w+")",k+"=0"),I.push(g(0)+"=0");for(var R=1;R<1<0;T=T-1&d)w.push(x+"["+k+"+"+m(T)+"]");w.push(y(0));for(var T=0;T=0;--e)G(e,0);for(var r=[],e=0;e0){",p(S[e]),"=1;");t(e-1,r|1<=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),i.push("1"),o.push("s["+l+"]-2"));var c=".lo("+i.join()+").hi("+o.join()+")";if(0===i.length&&(c=""),a>0){n.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");n.push("){grad",a,"(src.pick(",s.join(),")",c);for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",c);n.push(");")}for(var l=0;l1){dst.set(",s.join(),",",u,",0.5*(src.get(",f.join(),")-src.get(",p.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>1){diff(",h,",src.pick(",f.join(),")",c,",src.pick(",p.join(),")",c,");}else{zero(",h,");};");break;case"mirror":0===a?n.push("dst.set(",s.join(),",",u,",0);"):n.push("zero(",h,");");break;case"wrap":var d=s.slice(),g=s.slice();e[l]<0?(d[u]="s["+u+"]-2",g[u]="0"):(d[u]="s["+u+"]-1",g[u]="1"),0===a?n.push("if(s[",u,"]>2){dst.set(",s.join(),",",u,",0.5*(src.get(",d.join(),")-src.get(",g.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>2){diff(",h,",src.pick(",d.join(),")",c,",src.pick(",g.join(),")",c,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}a>0&&n.push("};")}for(var s=0;s<1<>",rrshift:">>>"};!function(){for(var t in s){var e=s[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in l){var e=l[t];r[t]=o({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:a,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":147}],446:[function(t,e,r){"use strict";var n=t("ndarray"),a=t("./doConvert.js");e.exports=function(t,e){for(var r=[],i=t,o=1;Array.isArray(i);)r.push(i.length),o*=i.length,i=i[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),a(e,t),e)}},{"./doConvert.js":447,ndarray:451}],447:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":147}],448:[function(t,e,r){"use strict";var n=t("typedarray-pool"),a=32;function i(t){switch(t){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r0?s.push(["d",d,"=s",d,"-d",h,"*n",h].join("")):s.push(["d",d,"=s",d].join("")),h=d),0!=(p=t.length-1-l)&&(f>0?s.push(["e",p,"=s",p,"-e",f,"*n",f,",f",p,"=",c[p],"-f",f,"*n",f].join("")):s.push(["e",p,"=s",p,",f",p,"=",c[p]].join("")),f=p)}r.push("var "+s.join(","));var g=["0","n0-1","data","offset"].concat(o(t.length));r.push(["if(n0<=",a,"){","insertionSort(",g.join(","),")}else{","quickSort(",g.join(","),")}"].join("")),r.push("}return "+n);var v=new Function("insertionSort","quickSort",r.join("\n")),m=function(t,e){var r=["'use strict'"],n=["ndarrayInsertionSort",t.join("d"),e].join(""),a=["left","right","data","offset"].concat(o(t.length)),s=i(e),l=["i,j,cptr,ptr=left*s0+offset"];if(t.length>1){for(var c=[],u=1;u1){for(r.push("dptr=0;sptr=ptr"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"b){break __l}"].join("")),u=t.length-1;u>=1;--u)r.push("sptr+=e"+u,"dptr+=f"+u,"}");for(r.push("dptr=cptr;sptr=cptr-s0"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"scratch)){",f("cptr",h("cptr-s0")),"cptr-=s0","}",f("cptr","scratch"));return r.push("}"),t.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(t,e),y=function(t,e,r){var n=["'use strict'"],s=["ndarrayQuickSort",t.join("d"),e].join(""),l=["left","right","data","offset"].concat(o(t.length)),c=i(e),u=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var h=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var f=[],p=1;p=0;--i)0!==(o=t[i])&&n.push(["for(i",o,"=0;i",o,"1)for(i=0;i1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function y(e,r,a,i){if(1===r.length)n.push("ptr0="+d(r[0]));else{for(var o=0;o1)for(o=0;o=1;--o)a&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function x(){t.length>1&&c&&n.push("free(pivot1)","free(pivot2)")}function b(e,r){var a="el"+e,i="el"+r;if(t.length>1){var o="__l"+ ++u;y(o,[a,i],!1,["comp=",g("ptr0"),"-",g("ptr1"),"\n","if(comp>0){tmp0=",a,";",a,"=",i,";",i,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",g(d(a)),">",g(d(i)),"){tmp0=",a,";",a,"=",i,";",i,"=tmp0}"].join(""))}function _(e,r){t.length>1?m([e,r],!1,v("ptr0",g("ptr1"))):n.push(v(d(e),g(d(r))))}function w(e,r,a){if(t.length>1){var i="__l"+ ++u;y(i,[r],!0,[e,"=",g("ptr0"),"-pivot",a,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else n.push([e,"=",g(d(r)),"-pivot",a].join(""))}function k(e,r){t.length>1?m([e,r],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join("")):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join(""))}function T(e,r,a){t.length>1?(m([e,r,a],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join("")),n.push("++"+r,"--"+a)):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","ptr2=",d(a),"\n","++",r,"\n","--",a,"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join(""))}function A(t,e){k(t,e),n.push("--"+e)}function M(e,r,a){t.length>1?m([e,r],!0,[v("ptr0",g("ptr1")),"\n",v("ptr1",["pivot",a,"[pivot_ptr]"].join(""))].join("")):n.push(v(d(e),g(d(r))),v(d(r),"pivot"+a))}function S(e,r){n.push(["if((",r,"-",e,")<=",a,"){\n","insertionSort(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}else{\n",s,"(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}"].join(""))}function E(e,r,a){t.length>1?(n.push(["__l",++u,":while(true){"].join("")),m([e],!0,["if(",g("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",u,"}"].join("")),n.push(a,"}")):n.push(["while(",g(d(e)),"===pivot",r,"){",a,"}"].join(""))}return n.push("var "+h.join(",")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?m(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",g("ptr1"),"\n","pivot2[pivot_ptr]=",g("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",g("ptr0"),"\n","y=",g("ptr2"),"\n","z=",g("ptr4"),"\n",v("ptr5","x"),"\n",v("ptr6","y"),"\n",v("ptr7","z")].join("")):n.push(["pivot1=",g(d("el2")),"\n","pivot2=",g(d("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",g(d("el1")),"\n","y=",g(d("el3")),"\n","z=",g(d("el5")),"\n",v(d("index1"),"x"),"\n",v(d("index3"),"y"),"\n",v(d("index5"),"z")].join("")),_("index2","left"),_("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),T("k","less","great"),n.push("break"),n.push("}else{"),A("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--greatindex5){"),E("less",1,"++less"),E("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great1&&c?new Function("insertionSort","malloc","free",n.join("\n"))(r,c[0],c[1]):new Function("insertionSort",n.join("\n"))(r)}(t,e,m);return v(m,y)}},{"typedarray-pool":546}],449:[function(t,e,r){"use strict";var n=t("./lib/compile_sort.js"),a={};e.exports=function(t){var e=t.order,r=t.dtype,i=[e,r].join(":"),o=a[i];return o||(a[i]=o=n(e,r)),o(t),t}},{"./lib/compile_sort.js":448}],450:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_3_arg4_)}",args:[{name:"_inline_3_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_4_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_4_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:i(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:a(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":150,"ndarray-linear-interpolate":444}],451:[function(t,e,r){var n=t("iota-array"),a=t("is-buffer"),i="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),a?i.push("return this.data.set("+u+",v)}"):i.push("return this.data["+u+"]=v}"),i.push("proto.get=function "+r+"_get("+l.join(",")+"){"),a?i.push("return this.data.get("+u+")}"):i.push("return this.data["+u+"]}"),i.push("proto.index=function "+r+"_index(",l.join(),"){return "+u+"}"),i.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+o.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=o.map(function(t){return"a"+t+"=this.shape["+t+"]"}),d=o.map(function(t){return"c"+t+"=this.stride["+t+"]"});i.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");i.push("return new "+r+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"c"+t}).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+o.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");return i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map(function(t){return"shape["+t+"]"}).join(",")+","+o.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",i.join("\n"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-a:a;var r=n.hi(t),o=n.lo(t);e>t==t>0?o===i?(r+=1,o=0):o+=1:0===o?(o=i,r-=1):o-=1;return n.pack(o,r)}},{"double-bits":168}],453:[function(t,e,r){var n=Math.PI,a=c(120);function i(t,e,r,n){return["C",t,e,r,n,r,n]}function o(t,e,r,n,a,i){return["C",t/3+2/3*r,e/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}function s(t,e,r,i,o,c,u,h,f,p){if(p)k=p[0],T=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(h=(d=l(h,f,-o)).x))/2,v=(e-(f=d.y))/2,m=g*g/(r*r)+v*v/(i*i);m>1&&(r*=m=Math.sqrt(m),i*=m);var y=r*r,x=i*i,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/i+(t+h)/2,w=b*-i*g/r+(e+f)/2,k=Math.asin(((e-w)/i).toFixed(9)),T=Math.asin(((f-w)/i).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(T=h<_?n-T:T)<0&&(T=2*n+T),u&&k>T&&(k-=2*n),!u&&T>k&&(T-=2*n)}if(Math.abs(T-k)>a){var A=T,M=h,S=f;T=k+a*(u&&T>k?1:-1);var E=s(h=_+r*Math.cos(T),f=w+i*Math.sin(T),r,i,o,0,u,M,S,[T,A,_,w])}var C=Math.tan((T-k)/4),L=4/3*r*C,P=4/3*i*C,O=[2*t-(t+L*Math.sin(k)),2*e-(e-P*Math.cos(k)),h+L*Math.sin(T),f-P*Math.cos(T),h,f];if(p)return O;E&&(O=O.concat(E));for(var I=0;I7&&(r.push(m.splice(0,7)),m.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-n,b+=b-a),m=["C",x,b,m[1],m[2],m[3],m[4]];break;case"T":"Q"==e||"T"==e?(h=2*p-h,f=2*d-f):(h=p,f=d),m=o(p,d,h,f,m[1],m[2]);break;case"Q":h=m[1],f=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case"L":m=i(p,d,m[1],m[2]);break;case"H":m=i(p,d,m[1],d);break;case"V":m=i(p,d,p,m[1]);break;case"Z":m=i(p,d,l,u)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],a=m[m.length-3]):(n=p,a=d),r.push(m)}return r}},{}],454:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;oi){var b=a[c],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;oi)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return a},r.faceNormals=function(t,e,r){for(var n=t.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;oi?1/Math.sqrt(p):0;for(c=0;c<3;++c)f[c]*=p;a[o]=f}return a}},{}],455:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l0){var h=Math.sqrt(u+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-i)/h,t[3]=.5*h}else{var f=Math.max(e,i,c),h=Math.sqrt(2*f-u+1);e>=f?(t[0]=.5*h,t[1]=.5*(a+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):i>=f?(t[0]=.5*(r+a)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-a)/h)}return t}},{}],457:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var a=new h(r,e,Math.log(n));a.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&a.lookAt(0,t.eye,t.center,t.up);return a};var n=t("filtered-vector"),a=t("gl-mat4/lookAt"),i=t("gl-mat4/fromQuat"),o=t("gl-mat4/invert"),s=t("./lib/quatFromFrame");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],a=e[2],i=e[3],o=c(r,n,a,i);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=a/o,t[3]=i/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function h(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=h.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;i(r,e);var n=this.computedCenter,a=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);a[0]=n[0]+s*r[2],a[1]=n[1]+s*r[6],a[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*a[h];r[12+l]=-c}},f.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},f.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},f.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var a=this.computedMatrix,i=a[1],o=a[5],s=a[9],c=l(i,o,s);i/=c,o/=c,s/=c;var u=a[0],h=a[4],f=a[8],p=u*i+h*o+f*s,d=l(u-=i*p,h-=o*p,f-=s*p);u/=d,h/=d,f/=d;var g=a[2],v=a[6],m=a[10],y=g*i+v*o+m*s,x=g*u+v*h+m*f,b=l(g-=y*i+x*u,v-=y*o+x*h,m-=y*s+x*f);g/=b,v/=b,m/=b;var _=u*e+i*r,w=h*e+o*r,k=f*e+s*r;this.center.move(t,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(t,Math.log(T))},f.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var a=this.computedMatrix,i=a[0],o=a[4],s=a[8],u=a[1],h=a[5],f=a[9],p=a[2],d=a[6],g=a[10],v=e*i+r*u,m=e*o+r*h,y=e*s+r*f,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var T=this.computedRotation,A=T[0],M=T[1],S=T[2],E=T[3],C=A*w+E*x+M*_-S*b,L=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){x=p,b=d,_=g;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(e))-(C=C*w+O*x+L*_-P*b)*x-(L=L*w+O*b+P*x-C*_)*b-(P=P*w+O*_+C*b-L*x)*_}var z=c(C,L,P,O);z>1e-6?(C/=z,L/=z,P/=z,O/=z):(C=L=P=0,O=1),this.rotation.set(t,C,L,P,O)},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;a(i,e,r,n);var o=this.computedRotation;s(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var a=n[15];if(Math.abs(a)>1e-6){var i=n[12]/a,l=n[13]/a,c=n[14]/a;this.recalcMatrix(t);var h=Math.exp(this.computedRadius[0]);this.center.set(t,i-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.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},f.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var a=t.distance;a&&a>0&&this.radius.set(e,Math.log(a)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":456,"filtered-vector":227,"gl-mat4/fromQuat":263,"gl-mat4/invert":266,"gl-mat4/lookAt":267}],458:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return n(r="undefined"!=typeof r?r+"":" ",e)+t}},{"repeat-string":504}],459:[function(t,e,r){"use strict";function n(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],a=e.escape||"___",i=!!e.flat;n.forEach(function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function i(e,i,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),a+s+a}r.forEach(function(t,n){for(var a,o=0;t!=a;)if(a=t,t=t.replace(e,i),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp("(\\"+a+r+"\\"+a+")","g"),t[0]+"$1"+t[1])}),e})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);return i?r:function t(e,r,n){for(var a,i=[],s=0;a=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");i.push(e.slice(0,a.index)),i.push(t(r[a[1]],r)),e=e.slice(a.index+a[0].length)}return i.push(e),i}(r[0],r)}function a(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",a=t[0];if(!a)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;a!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=a,a=a.replace(i,s)}return a}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r},"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function i(t,e){return Array.isArray(t)?a(t,e):n(t,e)}i.parse=n,i.stringify=a,e.exports=i},{}],460:[function(t,e,r){"use strict";var n=t("pick-by-alias");e.exports=function(t){var e;arguments.length>1&&(t=arguments);"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]);t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{"pick-by-alias":466}],461:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(a,function(t,r,a){var o=r.toLowerCase();for(a=function(t){var e=t.match(i);return e?e.map(Number):[]}(a),"m"==o&&a.length>2&&(e.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==n[o])return a.unshift(r),e.push(a);if(a.length0;--o)i=l[o],r=s[o],s[o]=s[i],s[i]=r,l[o]=l[r],l[r]=i,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,a,i,o=1;for((r=r||new Array(t))[0]=0,i=1;i0;--i)e=e-(n=e/o|0)*o|0,o=o/i|0,a=0|r[i],r[i]=0|r[n],r[n]=0|a;return r}},{"invert-permutation":416,"typedarray-pool":546}],466:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n,i,o={};if("string"==typeof e&&(e=a(e)),Array.isArray(e)){var s={};for(i=0;i0){o=i[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var f=i[h][r],p=0;p0&&(o=d,s=g,l=h)}return a?s:(o&&c(o,l),s)}function h(t,r){var a=i[r][t][0],o=[t];c(a,r);for(var s=a[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(i[0][t].length+i[1][t].length===0)break;var l=o[o.length-1],h=t,f=o[1],p=u(l,h,!0);if(n(e[l],e[h],e[f],e[p])<0)break;o.push(t),s=u(l,h)}return o}function f(t,e){return e[1]===e[e.length-1]}for(var o=0;o0;){i[0][o].length;var g=h(o,p);f(d,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t("compare-angle")},{"compare-angle":128}],468:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=n(t,e.length),a=new Array(e.length),i=new Array(e.length),o=[],s=0;s0;){var c=o.pop();a[c]=!1;for(var u=r[c],s=0;s0})).length,v=new Array(g),m=new Array(g),p=0;p0;){var N=F.pop(),j=C[N];l(j,function(t,e){return t-e});var V,U=j.length,q=B[N];if(0===q){var k=d[N];V=[k]}for(var p=0;p=0)&&(B[H]=1^q,F.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),V.push(k))}}0===q&&r.push(V)}return r};var n=t("edges-to-adjacency-list"),a=t("planar-dual"),i=t("point-in-big-polygon"),o=t("two-product"),s=t("robust-sum"),l=t("uniq"),c=t("./lib/trim-leaves");function u(t,e){for(var r=new Array(t),n=0;n>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(h(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;mr){for(var f=0;fl||A>c||M=C||o===s)){var u=y[i];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=w&&P.push(f)}var b=x[i],_=b[4*o+0],k=b[4*o+1],E=b[4*o+2],L=b[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(b,o+1),I=.5*a,z=i+1;e(r,n,I,z,_,k||E||L||O),e(r,n+I,I,z,k,E||L||O),e(r+I,n,I,z,E,L||O),e(r+I,n+I,I,z,L,O)}}}(0,0,1,0,0,1),P},d;function E(t,e,r){for(var n=1,a=.5,i=.5,o=.5,s=0;s0&&e[a]===r[0]))return 1;i=t[a-1]}for(var s=1;i;){var l=i.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,i=i.right}else if(c>0)i=i.left;else{if(!(c<0))return 0;s=1,i=i.right}}return s}}(m.slabs,m.coordinates);return 0===i.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(i),y)};var n=t("robust-orientation")[3],a=t("slab-decomposition"),i=t("interval-tree-1d"),o=t("binary-search-bounds");function s(){return!0}function l(t){for(var e={},r=0;r=-t},pointBetween:function(e,r,n){var a=e[1]-r[1],i=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*i+a*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-a>t&&(i-c)*(a-u)/(o-u)+c-n>t&&(s=!s),i=c,o=u}return s}};return e}},{}],477:[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]),a=1;a0})}function u(t,n){var a=t.seg,i=n.seg,o=a.start,s=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var h=e.linesIntersect(o,s,c,u);if(!1===h){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var f=e.pointsSame(o,c),p=e.pointsSame(s,u);if(f&&p)return n;var d=!f&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(f)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===h.alongA&&(-1===h.alongB?l(t,c):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,u)),0===h.alongB&&(-1===h.alongA?l(n,o):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!i.isEmpty();){var f=i.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var p=c(f),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=u(f,d);if(t)return t}return!!g&&u(f,g)}r&&r.tempStatus(f.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x)t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,r&&r.segmentUpdate(x.seg),f.other.remove(),f.remove();if(i.getHead()!==f){r&&r.rewind(f.seg);continue}t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:a,f.seg.myFill.above=y?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(m=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:m,below:m}),r&&r.status(f.seg,!!d&&d.seg,!!g&&g.seg),f.other.status=p.insert(n.node({ev:f}))}else{var b=f.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(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}h.push(f.seg)}i.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,a,i,o=t[t.length-1],l=0;l=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d):(T=0,p>=0?(A=0,y=d):-p>=h?(A=1,y=h+2*p+d):y=p*(A=-p/h)+d);else if(A<0)A=0,f>=0?(T=0,y=d):-f>=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d;else{var M=1/k;y=(T*=M)*(c*T+u*(A*=M)+2*f)+A*(u*T+h*A+2*p)+d}else T<0?(b=h+p)>(x=u+f)?(_=b-x)>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d:(T=0,b<=0?(A=1,y=h+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/h)+d):A<0?(b=c+f)>(x=u+p)?(_=b-x)>=(w=c-2*u+h)?(A=1,T=0,y=h+2*p+d):y=(T=1-(A=_/w))*(c*T+u*A+2*f)+A*(u*T+h*A+2*p)+d:(A=0,b<=0?(T=1,y=c+2*f+d):f>=0?(T=0,y=d):y=f*(T=-f/c)+d):(_=h+p-u-f)<=0?(T=0,A=1,y=h+2*p+d):_>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d;var S=1-T-A;for(l=0;l1)for(var r=1;r0){var c=t[r-1];if(0===n(s,c)&&i(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{"cell-orientation":113,"compare-cell":129,"compare-oriented-cell":130}],491:[function(t,e,r){"use strict";var n=t("array-bounds"),a=t("color-normalize"),i=t("update-diff"),o=t("pick-by-alias"),s=t("object-assign"),l=t("flatten-vertex-data"),c=t("to-float32"),u=c.float32,h=c.fract32;e.exports=function(t,e){"function"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,p,d,g,v,m=t._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=t.buffer({usage:"static",type:"float",data:f}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:f.length}),s(b,{update:k,draw:_,destroy:T,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&T(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){"number"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),i(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 i=0;i 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=a}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:a,miter:e}},v.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold?t.shaders.rect(e):"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,h){var d=e.passes[h];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),d||(e.passes[h]=d={id:h,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=i({},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,h80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function a(t,e,r,n,a){var i,o;if(a===A(t,e,r,n)>0)for(i=e;i=e;i-=n)o=w(i,t[i],t[i+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,a,h,f){if(t){!f&&h&&function(t,e,r,n){var a=t;do{null===a.z&&(a.z=p(a.x,a.y,e,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==t);a.prevZ.nextZ=null,a.prevZ=null,function(t){var e,r,n,a,i,o,s,l,c=1;do{for(r=t,t=null,i=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)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:t=a,a.prevZ=i,i=a;r=n}i.nextZ=null,c*=2}while(o>1)}(a)}(t,n,a,h);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,h?l(t,n,a,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,v=g.next;else if((t=g)===v){f?1===f?o(t=c(t,e,r),e,r,n,a,h,2):2===f&&u(t,e,r,n,a,h):o(i(t),e,r,n,a,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(m(e,r,n)>=0)return!1;for(var a=t.next.next;a!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,a.x,a.y)&&m(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function l(t,e,r,n){var a=t.prev,i=t,o=t.next;if(m(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,u=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,h=p(s,l,e,r,n),f=p(c,u,e,r,n),d=t.prevZ,v=t.nextZ;d&&d.z>=h&&v&&v.z<=f;){if(d!==t.prev&&d!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function c(t,e,r){var n=t;do{var a=n.prev,i=n.next.next;!y(a,i)&&x(a,n,n.next,i)&&b(a,i)&&b(i,a)&&(e.push(a.i/r),e.push(n.i/r),e.push(i.i/r),k(n),k(n.next),n=t=i),n=n.next}while(n!==t);return n}function u(t,e,r,n,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=_(l,c);return l=i(l,l.next),u=i(u,u.next),o(l,e,r,n,a,s),void o(u,e,r,n,a,s)}c=c.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var r,n=e,a=t.x,i=t.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&a!==n.x&&g(ir.x)&&b(n,t)&&(r=n,f=l),n=n.next;return r}(t,e)){var r=_(e,t);i(r,r.next)}}function p(t,e,r,n,a){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*a)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,a=(t.x+e.x)/2,i=(t.y+e.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||m(t,e,r)>0!=m(t,e,n)>0&&m(r,n,t)>0!=m(r,n,e)>0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function _(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),a=t.next,i=e.prev;return t.next=e,e.prev=t,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function w(t,e,r,n){var a=new T(t,e,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var a=0,i=e,o=r-n;i0&&(n+=t[a-1].length,r.holes.push(n))}return r}},{}],494:[function(t,e,r){arguments[4][319][0].apply(r,arguments)},{"./is-implemented":495,"./polyfill":497,dup:319}],495:[function(t,e,r){arguments[4][320][0].apply(r,arguments)},{dup:320}],496:[function(t,e,r){arguments[4][321][0].apply(r,arguments)},{dup:321}],497:[function(t,e,r){arguments[4][322][0].apply(r,arguments)},{"./is-native-implemented":496,d:152,dup:322,"es5-ext/object/is-value":195,"es5-ext/object/set-prototype-of":201,"es5-ext/object/valid-object":205,"es5-ext/object/valid-value":206,"es5-ext/string/random-uniq":211,"es6-iterator/for-of":213,"es6-iterator/get":214,"es6-symbol":220}],498:[function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){a=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e 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=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(palette,\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) * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),d&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.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},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=l(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var f={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(f):e.elements=s.elements(f)}return a({data:g.float(t),usage:"dynamic"}),i({data:g.fract(t),usage:"dynamic"}),c({data:new Uint8Array(u),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var a=r.activation;if(a.forEach(function(t){return t&&t.destroy&&t.destroy()}),a.length=0,e&&"number"!=typeof e[0]){for(var i=[],o=0,l=Math.min(e.length,r.count);o=0)return i;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===a.length?a[0]:a},y.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 a=.25*(t=t.slice()).length%e;a>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?g=new(h(e.dtype))(m):e.dtype&&(g=e.dtype,Array.isArray(g)&&(g.length=m));for(var y=0;yr||s>p){for(var f=0;fl||A>c||M=E||o===s)){var u=x[i];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=y&&P.push(f)}var _=b[i],w=_[4*o+0],k=_[4*o+1],C=_[4*o+2],L=_[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(_,o+1),I=.5*a,z=i+1;e(r,n,I,z,w,k||C||L||O),e(r,n+I,I,z,k,C||L||O),e(r+I,n,I,z,C,L||O),e(r+I,n+I,I,z,L,O)}}}(0,0,1,0,0,1),P},g;function C(t,e,r){for(var n=1,a=.5,i=.5,o=.5,s=0;s2?(s[0],s[2],n=s[1],a=s[3]):s.length?(n=s[0],a=s[1]):(s.x,n=s.y,s.x+s.width,a=s.y+s.height),l.length>2?(i=l[0],o=l[2],l[1],l[3]):l.length?(i=l[0],o=l[1]):(i=l.x,l.y,o=l.x+l.width,l.y+l.height),[i,n,o,a]}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;nT))&&(s.lower||!(k>>=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=i(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,a,i){for(var o=0;o(a=s)&&(a=n.buffer.byteLength,5123===h?a>>=1:5125===h&&(a>>=2)),n.vertCount=a,a=o,0>o&&(a=4,1===(o=n.buffer.dimension)&&(a=0),2===o&&(a=1),3===o&&(a=4)),n.primType=a}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),a.prototype.bind=function(){this.buffer.bind()};var h=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),h.primType=4,h.vertCount=0|t,h.type=5121;else{var e=null,r=35044,n=-1,a=-1,o=0,f=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&&(a=0|t.count),"type"in t&&(f=u[t.type]),"length"in t?o=0|t.length:(o=a,5123===f||5122===f?o*=2:5125!==f&&5124!==f||(o*=4))),i(h,e,r,n,a,o,f)}else c(),h.primType=4,h.vertCount=0,h.type=5121;return s}var c=r.create(null,34963,!0),h=new a(c._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=h,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(h)},s},createStream:function(t){var e=h.pop();return e||(e=new a(r.create(null,34963,!0,!1)._buffer)),i(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){h.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof a?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,a=(i<<1>>>24)-127,i=i>>13&1023;e[r]=-24>a?n:-14>a?n+(i+1024>>-14-a):15>=a,r.height>>=a,p(r,n[a]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(i.getTotalTextureSize=function(){var t=0;return Object.keys(mt).forEach(function(e){t+=mt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=a.texInfo;P.call(r);var i=C();return"number"==typeof t?M(i,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(i,t)):M(i,1,1),r.genMipmaps&&(i.mipmask=(i.width<<1)-1),a.mipmask=i.mipmask,c(a,i),a.internalformat=i.internalformat,n.width=i.width,n.height=i.height,D(a),E(i,3553),I(r,3553),R(),L(i),o.profile&&(a.stats.size=k(a.internalformat,a.type,i.width,i.height,r.genMipmaps,!1)),n.format=tt[a.internalformat],n.type=et[a.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=at[r.wrapS],n.wrapT=at[r.wrapT],n}var a=new z(3553);return mt[a.id]=a,i.textureCount++,n(e,r),n.subimage=function(t,e,r,i){e|=0,r|=0,i|=0;var o=m();return c(o,a),o.width=0,o.height=0,p(o,t),o.width=o.width||(a.width>>i)-e,o.height=o.height||(a.height>>i)-r,D(a),d(o,3553,e,r,i),R(),T(o),n},n.resize=function(e,r){var i=0|e,s=0|r||i;if(i===a.width&&s===a.height)return n;n.width=a.width=i,n.height=a.height=s,D(a);for(var l,c=a.channels,u=a.type,h=0;a.mipmask>>h;++h){var f=i>>h,p=s>>h;if(!f||!p)break;l=G.zero.allocType(u,f*p*c),t.texImage2D(3553,h,a.format,f,p,0,a.format,a.type,l),l&&G.zero.freeType(l)}return R(),o.profile&&(a.stats.size=k(a.internalformat,a.type,i,s,!1,!1)),n},n._reglType="texture2d",n._texture=a,o.profile&&(n.stats=a.stats),n.destroy=function(){a.decRef()},n},createCube:function(e,r,n,a,s,l){function h(t,e,r,n,a,i){var s,l=f.texInfo;for(P.call(l),s=0;6>s;++s)g[s]=C();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],a),S(g[5],i);else if(O(l,t),u(f,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],f),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(f,g[0]),f.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,f.internalformat=g[0].internalformat,h.width=g[0].width,h.height=g[0].height,D(f),s=0;6>s;++s)E(g[s],34069+s);for(I(l,34067),R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,l.genMipmaps,!0)),h.format=tt[f.internalformat],h.type=et[f.type],h.mag=rt[l.magFilter],h.min=nt[l.minFilter],h.wrapS=at[l.wrapS],h.wrapT=at[l.wrapT],s=0;6>s;++s)L(g[s]);return h}var f=new z(34067);mt[f.id]=f,i.cubeCount++;var g=Array(6);return h(e,r,n,a,s,l),h.subimage=function(t,e,r,n,a){r|=0,n|=0,a|=0;var i=m();return c(i,f),i.width=0,i.height=0,p(i,e),i.width=i.width||(f.width>>a)-r,i.height=i.height||(f.height>>a)-n,D(f),d(i,34069+t,r,n,a),R(),T(i),h},h.resize=function(e){if((e|=0)!==f.width){h.width=f.width=e,h.height=f.height=e,D(f);for(var r=0;6>r;++r)for(var n=0;f.mipmask>>n;++n)t.texImage2D(34069+r,n,f.format,e>>n,e>>n,0,f.format,f.type,null);return R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=f,o.profile&&(h.stats=f.stats),h.destroy=function(){f.decRef()},h},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);I(e.texInfo,e.target)})}}}function A(t,e,r,n,a,i){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,a=t;return"object"==typeof t&&(a=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=a._reglType)?r=a:"textureCube"===t?r=a:"renderbuffer"===t&&(n=a,e=36161),new o(e,r,n)}function h(t,e,r,i,s){return r?((t=n.create2D({width:t,height:e,format:i,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=a.create({width:t,height:e,format:i}))._renderbuffer.refCount=0,new o(36161,null,t))}function f(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function d(){this.id=k++,T[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,i.framebufferCount--,delete T[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var a=e.colorAttachments;for(n=0;na;++a){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(T).forEach(v)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(T).forEach(function(e){e.framebuffer=t.createFramebuffer(),m(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){function a(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function i(t,e){for(var r=0;rt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return f.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={},f.forEach(function(e){t.deleteProgram(e.program)}),f.length=0,h={},r.shaderCount=0},program:function(t,e,n){var a=h[e];a||(a=h[e]={});var i=a[t];return i||(i=new s(e,t),r.shaderCount++,l(i),a[t]=i,f.push(i)),i},restore:function(){c={},u={};for(var t=0;t"+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",o,"(",a,".buffer)){",u,"=",s,".createStream(",34962,",",a,".buffer);","}else{",u,"=",s,".getBuffer(",a,".buffer);","}",h,'="type" in ',a,"?",i.glTypes,"[",a,".type]:",u,".dtype;",l.normalized,"=!!",a,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),o}function A(t,e,r,n,a){var o=_(t),s=function(t,e,r){function n(t){if(t in a){var r=a[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:t=!1,"height"in r?o=0|r.height:t=!1,new z(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var a=t.shared.context,i=n;"width"in r||(i=e.def(a,".","framebufferWidth","-",s));var c=o;return"height"in r||(c=e.def(a,".","framebufferHeight","-",l)),[s,l,i,c]})}if(t in i){var c=i[t];return t=F(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,a=e.def(r,".x|0"),i=e.def(r,".y|0");return[a,i,e.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",a,")"),r=e.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",i,")")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new z(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".","framebufferWidth"),e.def(r,".","framebufferHeight")]}):null}var a=t.static,i=t.dynamic;if(t=n("viewport")){var o=t;t=new z(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,".viewportWidth",r[2]),e.set(n,".viewportHeight",r[3]),r})}return{viewport:t,scissor_box:n("scissor.box")}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,a={};return nt.forEach(function(t){function e(e,i){if(t in r){var s=e(r[t]);a[o]=R(function(){return s})}else if(t in n){var l=n[t];a[o]=F(l,function(t,e){return i(t,e,t.invoke(e,l))})}}var o=m(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return e(function(t){return t},function(t,e,r){return r});case"depth.func":return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,"[",r,"]")});case"depth.range":return e(function(t){return t},function(t,e,r){return[e.def("+",r,"[0]"),e=e.def("+",r,"[1]")]});case"blend.func":return e(function(t){return[wt["srcRGB"in t?t.srcRGB:t.src],wt["dstRGB"in t?t.dstRGB:t.dst],wt["srcAlpha"in t?t.srcAlpha:t.src],wt["dstAlpha"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('"',t,n,'" in ',r,"?",r,".",t,n,":",r,".",t)}t=t.constants.blendFuncs;var a=n("src","RGB"),i=n("dst","RGB"),o=(a=e.def(t,"[",a,"]"),e.def(t,"[",n("src","Alpha"),"]"));return[a,i=e.def(t,"[",i,"]"),o,t=e.def(t,"[",n("dst","Alpha"),"]")]});case"blend.equation":return e(function(t){return"string"==typeof t?[J[t],J[t]]:"object"==typeof t?[J[t.rgb],J[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,a=e.def(),i=e.def();return(t=t.cond("typeof ",r,'==="string"')).then(a,"=",i,"=",n,"[",r,"];"),t.else(a,"=",n,"[",r,".rgb];",i,"=",n,"[",r,".alpha];"),e(t),[a,i]});case"blend.color":return e(function(t){return i(4,function(e){return+t[e]})},function(t,e,r){return i(4,function(t){return e.def("+",r,"[",t,"]")})});case"stencil.mask":return e(function(t){return 0|t},function(t,e,r){return e.def(r,"|0")});case"stencil.func":return e(function(t){return[kt[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]},function(t,e,r){return[t=e.def('"cmp" in ',r,"?",t.constants.compareFuncs,"[",r,".cmp]",":",7680),e.def(r,".ref|0"),e=e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return e(function(e){return["stencil.opBack"===t?1029:1028,Tt[e.fail||"keep"],Tt[e.zfail||"keep"],Tt[e.zpass||"keep"]]},function(e,r,n){function a(t){return r.def('"',t,'" in ',n,"?",i,"[",n,".",t,"]:",7680)}var i=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,a("fail"),a("zfail"),a("zpass")]});case"polygonOffset.offset":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,".factor|0"),e=e.def(r,".units|0")]});case"cull.face":return e(function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e},function(t,e,r){return e.def(r,'==="front"?',1028,":",1029)});case"lineWidth":return e(function(t){return t},function(t,e,r){return r});case"frontFace":return e(function(t){return At[t]},function(t,e,r){return e.def(r+'==="cw"?2304:2305')});case"colorMask":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return i(4,function(t){return"!!"+r+"["+t+"]"})});case"sample.coverage":return e(function(t){return["value"in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('"value" in ',r,"?+",r,".value:1"),e=e.def("!!",r,".invert")]})}}),a}(t),u=w(t),h=s.viewport;return h&&(c.viewport=h),(s=s[h=m("scissor.box")])&&(c[h]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,g,v,s],");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(u+".drawElements("+[d,v,m,g+"<<(("+m+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[d,g,v]+");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,h=c.draw,f=n.draw,p=function(){var a=f.elements,i=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(t,i)):a=i.def(h,".","elements"),a&&i("if("+a+")"+u+".bindBuffer(34963,"+a+".buffer.buffer);"),a}(),d=a("primitive"),g=a("offset"),v=function(){var a=f.count,i=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(t,i)):a=i.def(h,".","count"),a}();if("number"==typeof v){if(0===v)return}else r("if(",v,"){"),r.exit("}");Q&&(s=a("instances"),l=t.instancing);var m=p+".type",y=f.elements&&D(f.elements);Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),i(),r("}else if(",s,"<0){"),o(),r("}")):i():o()}function q(t,e,r,n,a){return a=(e=b()).proc("body",a),Q&&(e.instancing=a.def(e.shared.extensions,".angle_instanced_arrays")),t(e,a,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),V(t,e,e,r)}function G(t,e,r,n){function a(){return!0}t.batchId="a1",L(t,e),N(t,e,r,n.attributes,a),j(t,e,r,n.uniforms,a),V(t,e,e,r)}function Y(t,e,r,n){function a(t){return t.contextDep&&o||t.propDep}function i(t){return!a(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),C(t,u,r.state,a),r.profile&&a(r.profile)&&B(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,i),N(t,u,r,n.attributes,a),j(t,c,r,n.uniforms,i),j(t,u,r,n.uniforms,a),V(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link(function(e){return q(G,t,r,e,2)}),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function W(t,r){function n(e){var n=r.shader[e];n&&a.set(i.shader,"."+e,n.append(t,a))}var a=t.proc("scope",3);t.batchId="a2";var i=t.shared,o=i.current;M(t,a,r.context),r.framebuffer&&r.framebuffer.append(t,a),I(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,a);v(n)?n.forEach(function(r,n){a.set(t.next[e],"["+n+"]",r)}):a.set(i.next,"."+e,n)}),B(t,a,r,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(e){var n=r.draw[e];n&&a.set(i.draw,"."+e,""+n.append(t,a))}),Object.keys(r.uniforms).forEach(function(n){a.set(i.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,a))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,a),i=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){a.set(i,"."+t,n[t])})}),n("vert"),n("frag"),0=--this.refCount&&o(this)},a.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,i=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(i=e.shape)[0],i=0|i[1]):("radius"in e&&(n=i=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(i=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,i="number"==typeof r?0|r:n):e||(n=i=1),n!==c.width||i!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=i,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,i),a.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new i(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,i=0|r||n;return n===c.width&&i===c.height?o:(o.width=c.width=n,o.height=c.height=i,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,i),a.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o)},o._reglType="renderbuffer",o._renderbuffer=c,a.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=["x","y","z","w"],_t="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),wt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},kt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Tt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},At={cw:2304,ccw:2305},Mt=new z(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),$=null;else{$=q.next(e),h();for(var t=Z.length-1;0<=t;--t){var r=Z[t];r&&r(P,null,0)}v.flush(),w&&w.update()}}function r(){!$&&0=Z.length&&n()}}}}function u(){var t=W.viewport,e=W.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function h(){P.tick+=1,P.time=g(),u(),G.procs.poll()}function f(){u(),G.procs.refresh(),w&&w.update()}function g(){return(H()-k)/1e3}if(!(t=a(t)))return null;var v=t.gl,m=v.getContextAttributes();v.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},a=0;ae;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(t,l);else l(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:F.create,framebuffer:V.create,framebufferCube:V.createCube,attributes:m,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=J;break;case"restore":r=K;break;case"destroy":r=Q}return r.push(e),{cancel:function(){for(var t=0;t=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a=(a+=t).substr(0,r)}},{}],505:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],506:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,a=e-2;a>=0;--a){var i=r,o=t[a],s=(r=i+o)-i,l=o-s;l&&(t[--n]=r,r=l)}for(var c=0,a=n;a>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(function(t){for(var e=new Array(t),r=0;r>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return u(e,t)}function h(t){if(2===t.length)return[["diff(",u(t[0][0],t[1][1]),",",u(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var o=0;o0&&r.push(","),o===a?r.push("+b[",i,"]"):r.push("+A[",i,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(i<=0)return o;n=a+i}else{if(!(a<0))return o;if(i>=0)return o;n=-(a+i)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var a=t[0]-n[0],i=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],h=e[2]-n[2],f=r[2]-n[2],d=i*c,g=o*l,v=o*s,m=a*c,y=a*l,x=i*s,b=u*(d-g)+h*(v-m)+f*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(h)+(Math.abs(y)+Math.abs(x))*Math.abs(f));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;d.length<=s;)d.push(h(d.length));for(var t=[],r=["slow"],n=0;n<=s;++n)t.push("a"+n),r.push("o"+n);var a=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)a.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");a.push("}var s=new Array(arguments.length);for(var i=0;i0&&o>0||i<0&&o<0)return!1;var s=n(r,t,e),l=n(a,t,e);if(s>0&&l>0||s<0&&l<0)return!1;if(0===i&&0===o&&0===s&&0===l)return function(t,e,r,n){for(var a=0;a<2;++a){var i=t[a],o=e[a],s=Math.min(i,o),l=Math.max(i,o),c=r[a],u=n[a],h=Math.min(c,u),f=Math.max(c,u);if(f=n?(a=h,(l+=1)=n?(a=h,(l+=1)0?1:0}},{}],518:[function(t,e,r){"use strict";e.exports=function(t){return a(n(t))};var n=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":96,"reduce-simplicial-complex":490}],519:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){r=r||0,"undefined"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",a[0],"],c[",a[1],"])")}l.push("]")}l.push(");")}}for(var i=t+1;i>1;--i){i>1,s=i(t[o],e);s<=0?(0===s&&(a=o),r=o+1):s>0&&(n=o-1)}return a}function u(t,e){for(var r=new Array(t.length),a=0,o=r.length;a=t.length||0!==i(t[v],s)););}return r}function h(t,e){if(e<0)return[];for(var r=[],a=(1<>>u&1&&c.push(a[u]);e.push(c)}return s(e)},r.skeleton=h,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,a=2*(t+1),i=t;if(n0;){var r=y(t);if(r>=0){var n=m(r);if(e0){var t=T[0];return v(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=T[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}for(var T=[],A=new Array(i),h=0;h>1;h>=0;--h)x(h);for(;;){var E=_();if(E<0||c[E]>r)break;k(E)}for(var C=[],h=0;h=0&&r>=0&&e!==r){var n=A[e],a=A[r];n!==a&&P.push([n,a])}}),a.unique(a.normalize(P)),{positions:C,edges:P}};var n=t("robust-orientation"),a=t("simplicial-complex")},{"robust-orientation":511,"simplicial-complex":523}],526:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,o,s;if(e[0][0]e[1][0]))return a(e,t);r=e[1],i=e[0]}if(t[0][0]t[1][0]))return-a(t,e);o=t[1],s=t[0]}var l=n(r,i,s),c=n(r,i,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,i),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 i[0]-s[0]};var n=t("robust-orientation");function a(t,e){var r,a,i,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],a=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 h(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),a=-1;if(r&&(a=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,a=u.value):(a=u.value,s=u.key))}var h=this.horizontal[e];if(h.length>0){var f=n.ge(h,t[1],l);if(f=h.length)return a;p=h[f]}}if(p.start)if(s){var d=i(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(a=p.index)}else a=p.index;else p.y!==t[1]&&(a=p.index)}}}return a}},{"./lib/order-segments":526,"binary-search-bounds":92,"functional-red-black-tree":231,"robust-orientation":511}],528:[function(t,e,r){"use strict";var n=t("robust-dot-product"),a=t("robust-sum");function i(t,e){var r=a(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var a=-e/(n-e);a<0?a=0:a>1&&(a=1);for(var i=1-a,o=t.length,s=new Array(o),l=0;l0||a>0&&u<0){var h=o(s,u,l,a);r.push(h),n.push(h.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),a=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":508,"robust-sum":516}],529:[function(t,e,r){!function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(r){return function(r,n){var a,i,o,s,l,c,u,h,f,p=1,d=r.length,g="";for(i=0;i=0),s.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,s.width?parseInt(s.width):0);break;case"e":a=s.precision?parseFloat(a).toExponential(s.precision):parseFloat(a).toExponential();break;case"f":a=s.precision?parseFloat(a).toFixed(s.precision):parseFloat(a);break;case"g":a=s.precision?String(Number(a.toPrecision(s.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=s.precision?a.substring(0,s.precision):a;break;case"t":a=String(!!a),a=s.precision?a.substring(0,s.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=s.precision?a.substring(0,s.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=s.precision?a.substring(0,s.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase()}t.json.test(s.type)?g+=a:(!t.number.test(s.type)||h&&!s.sign?f="":(f=h?"+":"-",a=a.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+a).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?f+a+l:"0"===c?f+l+a:l+f+a)}return g}(function(e){if(a[e])return a[e];var r,n=e,i=[],o=0;for(;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}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var a=Object.create(null);"undefined"!=typeof r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],530:[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 a=n.parse(t,{flat:!0,brackets:r.ignore}),i=a[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=c[c.length-1];var p=t[e];if(i[e]=0&&s[e].push(o[g])}i[e]=d}else{if(n[e]===r[e]){for(var v=[],m=[],y=0,d=l.length-1;d>=0;--d){var x=l[d];if(a[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=h.length,x===e){l.length=d;break}}h.push(v);for(var b=new Array(y),d=0;d c)|0 },"),"generic"===e&&i.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){");for(var c=0;c<1<<(1<128&&c%128==0){h.length>0&&f.push("}}");var p="vExtra"+h.length;i.push("case ",c>>>7,":",p,"(m&0x7f,",l.join(),");break;"),f=["function ",p,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(A="+"+v[b]+"*c");var M=d[b].length/y*.5,S=.5+m[b]/y*.5;T.push("d"+b+"-"+S+"-"+M+"*("+d[b].join("+")+A+")/("+g[b].join("+")+")")}f.push("a.push([",T.join(),"]);","break;")}i.push("}},"),h.length>0&&f.push("}}");for(var E=[],c=0;c<1<1&&(i=1),i<-1&&(i=-1),a*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,h=t.ry,f=t.xAxisRotation,p=void 0===f?0:f,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===h)return[];var x=Math.sin(p*a/360),b=Math.cos(p*a/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),h=Math.abs(h);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(h,2);k>1&&(u*=Math.sqrt(k),h*=Math.sqrt(k));var T=function(t,e,r,n,i,o,l,c,u,h,f,p){var d=Math.pow(i,2),g=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*i/o*p,b=y*-o/i*f,_=h*x-u*b+(t+r)/2,w=u*x+h*b+(e+n)/2,k=(f-x)/i,T=(p-b)/o,A=(-f-x)/i,M=(-p-b)/o,S=s(1,0,k,T),E=s(k,T,A,M);return 0===c&&E>0&&(E-=a),1===c&&E<0&&(E+=a),[_,w,S,E]}(e,r,l,c,u,h,g,m,x,b,_,w),A=n(T,4),M=A[0],S=A[1],E=A[2],C=A[3],L=Math.abs(C)/(a/4);Math.abs(1-L)<1e-7&&(L=1);var P=Math.max(Math.ceil(L),1);C/=P;for(var O=0;Oe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":61,assert:69,"is-svg-path":425,"normalize-svg-path":535,"parse-svg-path":461}],535:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,h=null,f=0,p=0,d=0,g=t.length;d4?(o=v[v.length-4],s=v[v.length-3]):(o=f,s=p),r.push(v)}return r};var n=t("svg-arc-to-cubic-bezier");function a(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,a,i){return["C",t/3+2/3*r,e/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}},{"svg-arc-to-cubic-bezier":533}],536:[function(t,e,r){"use strict";var n,a=t("svg-path-bounds"),i=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,h;e.shape?(r=e.shape[0],h=e.shape[1]):(r=c.width=e.w||e.width||200,h=c.height=e.h||e.height||200);var f=Math.min(r,h),p=e.stroke||0,d=e.viewbox||e.viewBox||a(t),g=[r/(d[2]-d[0]),h/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,r,h),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*h),u.scale(v,v),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 m=new Path2D(t);u.fill(m),p&&u.stroke(m)}else{var y=i(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*f})}},{"bitmap-sdf":94,"draw-svg-path":169,"is-svg-path":425,"parse-svg-path":461,"svg-path-bounds":534}],537:[function(t,e,r){(function(r){"use strict";e.exports=function t(e,r,a){var a=a||{};var o=i[e];o||(o=i[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),a=0,i=0,o=0;o0&&(h+=.02);for(var p=new Float32Array(u),d=0,g=-.5*h,f=0;f1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=a=i=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),a=o(l,s,t),i=o(l,s,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,l,u),h=!0,f="hsl"),e.hasOwnProperty("a")&&(i=e.a));var p,d,g;return i=C(i),{ok:h,format:e.format||f,r:o(255,s(a.r,0)),g:o(255,s(a.g,0)),b:o(255,s(a.b,0)),a:i}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=a++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,i=s(t,e,r),l=o(t,e,r),c=(i+l)/2;if(i==l)n=a=0;else{var u=i-l;switch(a=c>.5?u/(2-i-l):u/(i+l),i){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(c(n));return i}function M(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:a,v:i})),i=(i+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,a=this.toRgb();return e=a.r/255,r=a.g/255,n=a.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=C(t),this._roundA=i(100*this._a)/100,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(this._r,this._g,this._b),e=i(360*t.h),r=i(100*t.s),n=i(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=i(360*t.h),r=i(100*t.s),n=i(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,a){var o=[I(i(t).toString(16)),I(i(e).toString(16)),I(i(r).toString(16)),I(D(n))];if(a&&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:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*L(this._r,255))+"%",g:i(100*L(this._g,255))+"%",b:i(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%)":"rgba("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[f(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 a=c(t);r="#"+p(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]: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(),a=c(e).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(e,r){var n=c(e),a=c(r);return(t.max(n.getLuminance(),a.getLuminance())+.05)/(t.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,a,i=c.readability(t,e);switch(a=!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":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},c.mostReadable=function(t,e,r){var n,a,i,o,s=null,l=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:i,size:o})||!a?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 C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function I(t){return 1==t.length?"0"+t:""+t}function z(t){return t<=1&&(t=100*t+"%"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var 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 V(t){return!!j.CSS_UNIT.exec(t)}"undefined"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],539:[function(t,e,r){"use strict";e.exports=a,e.exports.float32=e.exports.float=a,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=a(t),r=0,n=e.length;rh&&(h=l[0]),l[1]f&&(f=l[1])}function a(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(a);break;case"Point":n(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(n)}}if(!e){var i,o,s=r(t),l=new Array(2),c=1/0,u=c,h=-c,f=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=l[0]),l[1]f&&(f=l[1])}),t.objects)a(t.objects[o]);e=t.bbox=[c,u,h,f]}return e},a=function(t,e){for(var r,n=t.length,a=n-e;a<--n;)r=t[a],t[a++]=t[n],t[n]=r};function i(t,e){var r=e.id,n=e.bbox,a=null==e.properties?{}:e.properties,i=o(t,e);return null==r&&null==n?{type:"Feature",properties:a,geometry:i}:null==n?{type:"Feature",id:r,properties:a,geometry:i}:{type:"Feature",id:r,bbox:n,properties:a,geometry:i}}function o(t,e){var n=r(t),i=t.arcs;function o(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],o=0,s=r.length;o1)n=function(t,e,r){var n,a=[],i=[];function o(t){var e=t<0?~t:t;(i[e]||(i[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":e.arcs.forEach(l)}}(e),i.forEach(null==r?function(t){a.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&a.push(t[0].i)}),a}(0,e,r);else for(a=0,n=new Array(i=t.arcs.length);a1)for(var i,o,c=1,u=l(a[0]);cu&&(o=a[0],a[0]=a[c],a[c]=o,u=i);return a})}}var u=function(t,e){for(var r=0,n=t.length;r>>1;t[a]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var r,a=n(t),i=a[0],o=(a[2]-i)/(e-1)||1,s=a[1],l=(a[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-i)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":c(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,a=1,c=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-i)/o),p=h[1]=Math.round((h[1]-s)/l);aMath.max(r,n)?a[2]=1:r>Math.max(e,n)?a[0]=1:a[1]=1;for(var i=0,o=0,l=0;l<3;++l)i+=t[l]*t[l],o+=a[l]*t[l];for(l=0;l<3;++l)a[l]-=o/i*t[l];return s(a,a),a}function f(t,e,r,a,i,o,s,l){this.center=n(r),this.up=n(a),this.right=n(i),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=f.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,a=0,i=0;i<3;++i)a+=e[i]*r[i],n+=e[i]*e[i];var l=Math.sqrt(n),u=0;for(i=0;i<3;++i)r[i]-=e[i]*a/n,u+=r[i]*r[i],e[i]/=l;var h=Math.sqrt(u);for(i=0;i<3;++i)r[i]/=h;var f=this.computedToward;o(f,e,r),s(f,f);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,A=-m*x,M=y,S=this.computedEye,E=this.computedMatrix;for(i=0;i<3;++i){var C=_*r[i]+w*f[i]+k*e[i];E[4*i+1]=T*r[i]+A*f[i]+M*e[i],E[4*i+2]=C,E[4*i+3]=0}var L=E[1],P=E[5],O=E[9],I=E[2],z=E[6],D=E[10],R=P*D-O*z,F=O*I-L*D,B=L*z-P*I,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(i=0;i<3;++i)S[i]=b[i]+E[2+4*i]*p;for(i=0;i<3;++i){u=0;for(var j=0;j<3;++j)u+=E[i+4*j]*S[j];E[12+i]=-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 a=this.computedMatrix;d[0]=a[2],d[1]=a[6],d[2]=a[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)a[4*c]=o[c],a[4*c+1]=s[c],a[4*c+2]=l[c];i(a,a,n,d);for(c=0;c<3;++c)o[c]=a[4*c],s[c]=a[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 a=this.computedMatrix,i=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],s=a[9],l=c(i,o,s);i/=l,o/=l,s/=l;var u=a[0],h=a[4],f=a[8],p=u*i+h*o+f*s,d=c(u-=i*p,h-=o*p,f-=s*p),g=(u/=d)*e+i*r,v=(h/=d)*e+o*r,m=(f/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var i=1;"number"==typeof r&&(i=0|r),(i<0||i>3)&&(i=1);var o=(i+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[i],l=e[i+4],h=e[i+8];if(n){var f=Math.abs(s),p=Math.abs(l),d=Math.abs(h),g=Math.max(f,p,d);f===g?(s=s<0?-1:1,l=h=0):d===g?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var v=c(s,l,h);s/=v,l/=v,h/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*h,k=c(x-=s*w,b-=l*w,_-=h*w),T=l*(_/=k)-h*(b/=k),A=h*(x/=k)-s*_,M=s*b-l*x,S=c(T,A,M);if(T/=S,A/=S,M/=S,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,s,l,h),this.right.jump(t,x,b,_),2===i){var E=e[1],C=e[5],L=e[9],P=E*x+C*b+L*_,O=E*T+C*A+L*M;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,P)}else{var I=e[2],z=e[6],D=e[10],R=I*s+z*l+D*h,F=I*x+z*b+D*_,B=I*T+z*A+D*M;m=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;a(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,Y=U[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*W,G-j*W,Y-V*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 a=(n=n||this.computedUp)[0],i=n[1],o=n[2],s=c(a,i,o);if(!(s<1e-6)){a/=s,i/=s,o/=s;var l=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],p=c(l,h,f);if(!(p<1e-6)){l/=p,h/=p,f/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=a*g+i*v+o*m,x=c(g-=y*a,v-=y*i,m-=y*o);if(!(x<.01&&(x=c(g=i*f-o*h,v=o*l-a*f,m=a*h-i*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,a,i,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=i*m-o*v,_=o*g-a*m,w=a*v-i*g,k=c(b,_,w),T=a*l+i*h+o*f,A=g*l+v*h+m*f,M=(b/=k)*l+(_/=k)*h+(w/=k)*f,S=Math.asin(u(T)),E=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],P=C[C.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-E),I=Math.abs(L-E),z=Math.abs(L-2*Math.PI-E);O0?r.pop():new ArrayBuffer(t)}function f(t){return new Uint8Array(h(t),0,t)}function p(t){return new Uint16Array(h(2*t),0,t)}function d(t){return new Uint32Array(h(4*t),0,t)}function g(t){return new Int8Array(h(t),0,t)}function v(t){return new Int16Array(h(2*t),0,t)}function m(t){return new Int32Array(h(4*t),0,t)}function y(t){return new Float32Array(h(4*t),0,t)}function x(t){return new Float64Array(h(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(h(t),0,t):f(t)}function _(t){return new DataView(h(t),0,t)}function w(t){t=a.nextPow2(t);var e=a.log2(t),r=c[e];return r.length>0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[a.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|a.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[a.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return h(t);switch(e){case"uint8":return f(t);case"uint16":return p(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return y(t);case"double":case"float64":return x(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return _(t);default:return null}return null},r.mallocArrayBuffer=h,r.mallocUint8=f,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=v,r.mallocInt32=m,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":93,buffer:106,dup:171}],547:[function(t,e,r){"use strict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(i=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,i+"px",n.font].filter(function(t){return t}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(t,e,r,n,i,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(t[1+a]):0,l=i>-1?parseInt(r[1+i]):0;s!==l&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",F())),A+=.25*C*(l-s)}if(!0===o.superscripts){var c=t.indexOf(d),h=r.indexOf(d),p=c>-1?parseInt(t[1+c]):0,g=h>-1?parseInt(r[1+h]):0;p!==g&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,g-p),n=n.replace("?px ",F())),A-=.25*C*(g-p)}if(!0===o.bolds){var v=t.indexOf(u)>-1,y=r.indexOf(u)>-1;!v&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),v&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=t.indexOf(f)>-1,b=r.indexOf(f)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w",i="",o=a.length,s=i.length,l=e[0]===d||e[0]===m,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(a,c))&&-1!==(u=r.indexOf(i,c+o))&&!(u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var f=n[h].indexOf(e[0]);-1===f?n[h]+=e:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var p=c+o,g=r.substr(p,u-p).indexOf(a);c=-1!==g?g:u+s}return n}function b(t,e){var r=n(t,128);return e?i(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var a=b(t,n),i=function(t,e,r){for(var n=e.textAlign||"start",a=e.textBaseline||"alphabetic",i=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[i]:a})},has___:{value:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:x(function(n,a){var i,o=y(n);return o?o[r]=a:(i=t.indexOf(n))>=0?e[i]=a:(i=t.length,e[i]=a,t[i]=n),this})},delete___:{value:x(function(n){var a,i,o=y(n);return o?r in o&&delete o[r]:!((a=t.indexOf(n))<0||(i=t.length-1,t[a]=void 0,e[a]=e[i],t[a]=t[i],t.length=i,e.length=i,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,a=void 0,i=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(a||(a=new g),a.set(t,e)),this}:function(t,e){if(i)try{n.set(t,e)}catch(r){a||(a=new g),a.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return a?n.has(t)?n.get(t):a.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!a&&a.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return a&&a.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==v)throw new Error("bogus call to permitHostObjects___");i=!0})}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&"___"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],554:[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":555}],555:[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}},{}],556:[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":554}],557:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":233}],558:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),a=t.month(),i=""+this.toChineseMonth(n,a);return e&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var a=e[e.length-1];r="i"===a||"I"===a}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var a=this.intercalaryMonth(t);if(r&&e!==a||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&e<=a?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 a,o=this._validateYear(t,n.local.invalidyear),s=f[o-f[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(a=i.newDate(l,c,u)).add(4-(a.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-a.toJD();return 1+Math.floor(h/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=h[t-h[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 a=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(a.year()),e=a.month(),r=a.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,a){var i,o,s;if("object"==typeof t)o=t,i=e||{};else{var l="number"==typeof t&&t>=1888&&t<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var c="number"==typeof e&&e>=1&&e<=12;if(!c)throw new Error("Lunar month outside range 1 - 12");var u,p="number"==typeof r&&r>=1&&r<=30;if(!p)throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(u=!1,i=n):(u=!!n,i=a||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=h[o.year-h[0]],v=g>>13;d=v?o.month>v?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var m=0;m>9&4095,(x>>5&15)-1,(31&x)+s);return i.year=b.getFullYear(),i.month=1+b.getMonth(),i.day=b.getDate(),i}(t,s,r,o);return i.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=i.fromJD(t),r=function(t,e,r,n){var a,i;if("object"==typeof t)a=t,i=e||{};else{var o="number"==typeof t&&t>=1888&&t<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s="number"==typeof e&&e>=1&&e<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l="number"==typeof r&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:t,month:e,day:r},i=n||{}}var c=f[a.year-f[0]],u=a.year<<9|a.month<<5|a.day;i.year=u>=c?a.year:a.year-1,c=f[i.year-f[0]];var p,d=new Date(c>>9&4095,(c>>5&15)-1,31&c),g=new Date(a.year,a.month-1,a.day);p=Math.round((g-d)/864e5);var v,m=h[i.year-h[0]];for(v=0;v<13;v++){var y=m&1<<12-v?30:29;if(p>13;!x||v=2&&n<=6},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year()+(a.year()<0?1:0),e=a.month(),(r=a.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=i},{"../main":572,"object-assign":455}],561:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate);return(t=a.year())<0&&t++,a.day()+30*(a.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,a=e-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":572,"object-assign":455}],562:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+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=i},{"../main":572,"object-assign":455}],563:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),t=t<=0?t+1:t,(r=a.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=i},{"../main":572,"object-assign":455}],564:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),r=a.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),a=Math.floor((e-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),s=e-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,s)}}),n.calendars.julian=i},{"../main":572,"object-assign":455}],565:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(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}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[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 a=this._validate(t,e,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.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=i},{"../main":572,"object-assign":455}],566:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.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 a=this._validate(t,e,r,n.local.invalidMonth);(t=a.year())<0&&t++;for(var i=a.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=i},{"../main":572,"object-assign":455}],567:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=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+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),a=e.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)++o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,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 a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t-(t>=0?474:473),s=474+o(i,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/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),a=2820;if(1029982!==n){var i=Math.floor(n/366),s=o(n,366);a=Math.floor((2134*i+2816*s+2815)/1028522)+i+1}var l=a+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),h=t-this.toJD(l,u,1)+1;return this.newDate(l,u,h)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":572,"object-assign":455}],569:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(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 i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(a.year());return i.weekOfYear(t,a.month(),a.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 a=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(a.year());return i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.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":572,"object-assign":455}],570:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(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 i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(a.year());return i.weekOfYear(t,a.month(),a.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 a=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(a.year());return i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.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":572,"object-assign":455}],571:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),s=i+1,l=a-12*i,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(t=null!=t.year?t.year:t)>=1276&&t<=1500),a},_validate:function(t,e,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;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":572,"object-assign":455}],572:[function(t,e,r){var n=t("object-assign");function a(){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 i(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(a.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,a){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,a):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="",a=0;r>0;){var i=r%10;n=(0===i?"":t[i]+e[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(i.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 i(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),a=t.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);a=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)i++,o-=e,e=t.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),a];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 a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;e=this._add(t,r*a[0]+i*a[1],a[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(),a="m"===r?e:t.month(),i="d"===r?e:t.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),t.date(n,a,i)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var a=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(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),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new a;c.cdate=i,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":455}],573:[function(t,e,r){var n=t("object-assign"),a=t("./main");n(a.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"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.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 a.local.invalidFormat||a.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,i,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,h=r.monthNamesShort||this.local.monthNamesShort,f=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 a=""+e;if(p(t,n))for(;a.length1},x=function(t,r){var n=y(t,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+i+"}"),s=e.substring(A).match(o);if(!s)throw(a.local.missingNumberAt||a.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,i){for(var o=y(t,i)?n:r,s=0;s-1){p=1,d=g;for(var E=this.daysInMonth(f,p);d>E;E=this.daysInMonth(f,p))p++,d-=E}return h>-1?this.fromJD(h):this.newDate(f,p,d)},determineDate:function(t,e,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return i.parseDate(n,t,a)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.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:i.today().add(t,"d"):i.newDate(t)}})},{"./main":572,"object-assign":455}],574:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":147}],575:[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":574}],576:[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}]},{}],577:[function(t,e,r){"use strict";var n=t("./arrow_paths"),a=t("../../plots/font_attributes"),i=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({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",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.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",i.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:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../../plots/font_attributes":793,"./arrow_paths":576}],578:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)})}function s(t,e){var r,n=e._id,i=n.charAt(0),o=t[i],s=t["a"+i],l=t[i+"ref"],c=t["a"+i+"ref"],u=t["_"+i+"padplus"],h=t["_"+i+"padminus"],f={x:1,y:-1}[i]*t[i+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+f,g=p-f,v=3*t.startarrowsize*t.arrowwidth||0,m=v+f,y=v-f;if(c===l){var x=a.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=a.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(h,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=a.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(h,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([i,o],t)}},{"../../lib":719,"../../plots/cartesian/axes":767,"./draw":583}],579:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("../../plot_api/plot_template").arrayEditor;function o(t,e){var r,n,a,i,o,l,c,u=t._fullLayout.annotations,h=[],f=[],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),h={},f=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 H=!1,G=["x","y"],Y=0;Y1)&&(tt===$?((ct=et.r2fraction(e["a"+Q]))<0||ct>1)&&(H=!0):H=!0),W=et._offset+et.r2p(e[Q]),J=.5}else"x"===Q?(Z=e[Q],W=b.l+b.w*Z):(Z=1-e[Q],W=b.t+b.h*Z),J=e.showarrow?.5:Z;if(e.showarrow){lt.head=W;var ut=e["a"+Q];K=nt*V(.5,e.xanchor)-at*V(.5,e.yanchor),tt===$?(lt.tail=et._offset+et.r2p(ut),X=K):(lt.tail=W+ut,X=K+ut),lt.text=lt.tail+K;var ht=x["x"===Q?"width":"height"];if("paper"===$&&(lt.head=o.constrain(lt.head,1,ht-1)),"pixel"===tt){var ft=-Math.max(lt.tail-3,lt.text),pt=Math.min(lt.tail+3,lt.text)-ht;ft>0?(lt.tail+=ft,lt.text+=ft):pt>0&&(lt.tail-=pt,lt.text-=pt)}lt.tail+=st,lt.head+=st}else X=K=it*V(J,ot),lt.text=W+K;lt.text+=st,K+=st,X+=st,e["_"+Q+"padplus"]=it/2+X,e["_"+Q+"padminus"]=it/2-X,e["_"+Q+"size"]=it,e["_"+Q+"shift"]=K}if(H)I.remove();else{var dt=0,gt=0;if("left"!==e.align&&(dt=(w-m)*("center"===e.align?.5:1)),"top"!==e.valign&&(gt=(O-y)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:R+dt-1,y:R+gt}).call(c.setClipUrl,B?M:null,t);else{var vt=R+gt-d.top,mt=R+dt-d.left;U.call(h.positionText,mt,vt).call(c.setClipUrl,B?M:null,t)}N.select("rect").call(c.setRect,R,R,w,O),F.call(c.setRect,z/2,z/2,D-z,j-z),I.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:"rotate("+E+","+S.x.text+","+S.y.text+")"});var yt,xt=function(r,n){C.selectAll(".annotation-arrow-g").remove();var u=S.x.head,h=S.y.head,f=S.x.tail+r,d=S.y.tail+n,m=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(E,m,y),w=o.apply2DTransform(x),M=o.apply2DTransform2(x),P=+F.attr("width"),O=+F.attr("height"),z=m-.5*P,D=z+P,R=y-.5*O,B=R+O,N=[[z,R,z,B],[z,B,D,B],[D,B,D,R],[D,R,z,R]].map(M);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,h,u+1e6,h+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(f,d,u,h,t[0],t[1],t[2],t[3]);e&&(f=e.x,d=e.y)});var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=C.append("g").style({opacity:l.opacity(V)}).classed("annotation-arrow-g",!0),H=q.append("path").attr("d","M"+f+","+d+"L"+u+","+h).style("stroke-width",j+"px").call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&&H.node().parentNode&&!i){var G=u,Y=h;if(e.standoff){var W=Math.sqrt(Math.pow(u-f,2)+Math.pow(h-d,2));G+=e.standoff*(f-u)/W,Y+=e.standoff*(d-h)/W}var X,Z,J=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-G)+","+(d-Y),transform:"translate("+G+","+Y+")"}).style("stroke-width",j+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:t,prepFn:function(){var t=c.getTranslate(I);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+".autorange",!0),v&&v.autorange&&k(v._name+".autorange",!0)},moveFn:function(t,r){var n=w(X,Z),a=n[0]+t,i=n[1]+r;I.call(c.setTranslate,a,i),T("x",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),T("y",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&T("ax",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&T("ay",v.p2r(v.r2p(e.ay)+r)),q.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+E+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&xt(0,0),P)p.init({element:I.node(),gd:t,prepFn:function(){yt=L.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?T("ax",s.p2r(s.r2p(e.ax)+t)):T("ax",e.ax+t),e.ayref===e.yref?T("ay",v.p2r(v.r2p(e.ay)+r)):T("ay",e.ay+r),xt(t,r);else{if(i)return;var a,o;if(s)a=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;a=p.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,h=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(h-r/b.h,u,0,1,e.yanchor)}T("x",a),T("y",o),s&&v||(n=p.getCursor(s?.5:a,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+yt}),f(I,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(I),a.call("_guiRelayout",t,A());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,v=e.indexOf("end")>=0,m=h.backoff*p+r.standoff,y=f.backoff*d+r.startstandoff;if("line"===u.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},s={x:+t.attr("x2"),y:+t.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void P();if(m){if(m*m>x*x+b*b)return void P();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void P();var k=y*Math.cos(l),T=y*Math.sin(l);o.x-=k,o.y-=T,t.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var A=u.getTotalLength(),M="";if(A1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=a(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":816,"../annotations/draw":583}],590:[function(t,e,r){"use strict";var n=t("../../registry"),a=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 i=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 i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}i.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(n(t))},i.opacity=function(t){return t?n(t).getAlpha():0},i.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},i.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var a=n(e||l).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},i.contrast=function(t,e,r){var a=n(t);return 1!==a.getAlpha()&&(a=n(i.combine(t,l))),(a.isDark()?e?a.lighten(e):l:r?a.darken(r):s).toString()},i.stroke=function(t,e){var r=n(e);t.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(t,e){var r=n(e);t.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,r,n,a,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));a++)n>u&&n0?n>=l:n<=l));a++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10));Y*=Z*c.roundUp(X/Z,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(G.tick0=0)}G.dtick=Y}G.domain=[U+N,U+R-N],G.setScale(),t.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var J,K=t.select("."+T.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),Q=t.select("."+T.cbaxis),$=0;function tt(n,a){var i={propContainer:G,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),d.draw(r,n,u(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+F)*l.w,n=G.title.font.size;t="top"===A?(1-(U+R-N))*l.h+l.t+3+.75*n:(1-(U+N))*l.h+l.t-3-.25*n,tt(G._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var i=t.select("."+T.cbtitle),o=i.select("text"),u=[-e.outlinewidth/2,e.outlinewidth/2],h=i.select(".h"+G._id+"title-math-group").node(),p=15.6;if(o.node()&&(p=parseInt(o.node().style.fontSize,10)*_),h?($=f.bBox(h).height)>p&&(u[1]-=($-p)/2):o.node()&&!o.classed(T.jsPlaceholder)&&($=f.bBox(o.node()).height),$){if($+=5,"top"===A)G.domain[1]-=$/l.h,u[1]*=-1;else{G.domain[0]+=$/l.h;var d=g.lineCount(o);u[1]+=(1-d)*p}i.attr("transform","translate("+u+")"),G.setScale()}}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-G.domain[1]))+")"),Q.attr("transform","translate(0,"+Math.round(-l.t)+")");var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).data(P);m.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),m.exit().remove();var y=M.map(G.c2p).map(Math.round).sort(function(t,e){return t-e});m.each(function(t,i){var o=[0===i?M[0]:(P[i]+P[i-1])/2,i===P.length-1?M[1]:(P[i]+P[i+1])/2].map(G.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[1]);var s=n.select(this).attr({x:j,width:Math.max(I,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(e._fillgradient)f.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=E(t).replace("e-","");s.attr("fill",a(l).toHexString())}});var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(v.color&&v.width?O:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr("d","M"+j+","+(Math.round(G.c2p(t))+v.width/2%1)+"h"+I).call(f.lineGroupStyle,v.width,S(t),v.dash)}),Q.selectAll("g."+G._id+"tick,path").remove();var b=j+I+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),w=s.calcTicks(G),k=s.makeTransFn(G),C=s.getTickSigns(G)[2];return s.drawTicks(r,G,{vals:"inside"===G.ticks?s.clipEnds(G,w):w,layer:Q,path:s.makeTickPath(G,b,C),transFn:k}),s.drawLabels(r,G,{vals:w,layer:Q,transFn:k,labelFns:s.makeLabelFns(G,b)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=G.title.font.size,e=G._offset+G._length/2,a=l.l+(G.position||0)*l.w+("right"===G.side?10+t*(G.showticklabels?1:.5):-10-t*(G.showticklabels?.5:0));tt("h"+G._id+"title",{avoid:{selection:n.select(r).selectAll("g."+G._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:a,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=I+e.outlinewidth/2+f.bBox(Q.node()).width;if((J=K.select("text")).node()&&!J.classed(T.jsPlaceholder)){var a,o=K.select(".h"+G._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(A)?f.bBox(o).width:f.bBox(K.node()).right-j-l.l,n=Math.max(n,a)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=q-H;t.select("."+T.cbbg).attr({x:j-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:H-B,width:Math.max(s,2),height:Math.max(c+2*B,2)}).call(p.fill,e.bgcolor).call(p.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+T.cboutline).attr({x:j,y:H+e.ypad+("top"===A?$:0),width:Math.max(I,2),height:Math.max(c-2*e.ypad-$,2)}).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var u=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform","translate("+(l.l-u)+","+l.t+")");var h={},d=w[e.yanchor],g=k[e.yanchor];"pixels"===e.lenmode?(h.y=e.y,h.t=c*d,h.b=c*g):(h.t=h.b=0,h.yt=e.y+e.len*d,h.yb=e.y-e.len*g);var v=w[e.xanchor],m=k[e.xanchor];if("pixels"===e.thicknessmode)h.x=e.x,h.l=s*v,h.r=s*m;else{var y=s-I;h.l=y*v,h.r=y*m,h.xl=e.x-e.thickness*v,h.xr=e.x+e.thickness*m}i.autoMargin(r,e._id,h)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,a,i,s=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+" translate("+r+","+o+")"),a=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),i=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(a,i,e.xanchor,e.yanchor);h(t,c)},doneFn:function(){if(h(t),void 0!==a&&void 0!==i){var n={};n[e._propPrefix+"x"]=a,n[e._propPrefix+"y"]=i,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)}),e.exit().each(function(e){i.autoMargin(t,e._id)}).remove(),e.order()}}},{"../../constants/alignment":688,"../../lib":719,"../../lib/extend":710,"../../lib/setcursor":739,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"../../plots/plots":828,"../../registry":848,"../color":594,"../colorscale/helpers":605,"../dragelement":612,"../drawing":615,"../titles":681,"./constants":596,d3:164,tinycolor2:538}],599:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":719}],600:[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":595,"./defaults":597,"./draw":598,"./has_colorbar":599}],601:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),a=t("../../lib/regex").counter,i=t("./scales.js").scales;Object.keys(i);function o(t){return"`"+t+"`"}e.exports=function(t,e){t=t||"";var r,s=(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"===s,u="string"==typeof e.colorscaleDflt?i[e.colorscaleDflt]:null,h=e.editTypeOverride||"",f=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(f+(r={z:"z",c:"color"}[s]));var p=s+"auto",d=s+"min",g=s+"max",v=s+"mid",m=(o(f+p),o(f+d),o(f+g),{});m[d]=m[g]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:h||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[d]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},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:a("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":735,"../colorbar/attributes":595,"./scales.js":609}],602:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("./helpers").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?a.nestedProperty(e,c).get():e,h=i(u),f=!1!==h.auto,p=h.min,d=h.max,g=h.mid,v=function(){return a.aggNums(Math.min,null,l)},m=function(){return a.aggNums(Math.max,null,l)};(void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.min(p,v()):v()),void 0===d?d=m():f&&(d=u._colorAx&&n(d)?Math.max(d,m()):m()),f&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}},{"../../lib":719,"./helpers":605,"fast-isnumeric":226}],603:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./helpers").hasColorscale,i=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,a){var o=a.container?n.nestedProperty(t,a.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=i(o),l=s.auto;(l||void 0===s.min)&&r(o,a.min),(l||void 0===s.max)&&r(o,a.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,a++){var i=t[n];r[a]=[1-i[0],i[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}},{}],611:[function(t,e,r){"use strict";var n=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,i){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":719}],612:[function(t,e,r){"use strict";var n=t("mouse-event-offset"),a=t("has-hover"),i=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 h(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,f,p,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(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&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,p),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(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)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=u},{"../../lib":719,"../../plots/cartesian/constants":773,"./align":610,"./cursor":611,"./unhover":613,"has-hover":411,"has-passive-events":412,"mouse-event-offset":437}],613:[function(t,e,r){"use strict";var n=t("../../lib/events"),a=t("../../lib/throttle"),i=t("../../lib/dom").getGraphDiv,o=t("../fx/constants"),s=e.exports={};s.wrapped=function(t,e,r){(t=i(t))._fullLayout&&a.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/dom":708,"../../lib/events":709,"../../lib/throttle":744,"../fx/constants":627}],614:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],615:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=t("../../lib/svg_text_utils"),h=t("../../constants/xmlns_namespaces"),f=t("../../constants/alignment").LINE_SPACING,p=t("../../constants/interactions").DESELECTDIM,d=t("../../traces/scatter/subtypes"),g=t("../../traces/scatter/make_bubble_size_func"),v=e.exports={},m=t("../fx/helpers").appendArrayPointValue;v.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},v.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},v.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},v.setRect=function(t,e,r,n,a){t.call(v.setPosition,e,r).call(v.setSize,n,a)},v.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform","translate("+i+","+o+")"),!0)},v.translatePoints=function(t,e,r){t.each(function(t){var a=n.select(this);v.translatePoint(t,a,e,r)})},v.hideOutsideRangePoint=function(t,e,r,n,a,i){e.attr("display",r.isPtWithinRange(t,a)&&n.isPtWithinRange(t,i)?null:"none")},v.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each(function(e){var i=e[0].trace,s=i.xcalendar,l=i.ycalendar,c=o.traceIs(i,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each(function(t){v.hideOutsideRangePoint(t,n.select(this),r,a,s,l)})})}},v.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},v.singleLineStyle=function(t,e,r,n,a){e.style("fill","none");var i=(((t||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(e,n||i.color),v.dashLine(e,l,o)},v.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,l=a||i.dash||"";n.select(this).call(s.stroke,r||i.color).call(v.dashLine,l,o)})},v.dashLine=function(t,e,r){r=+r||0,e=v.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},v.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},v.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},v.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)})};var y=t("./symbol_defs");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(y).forEach(function(t){var e=y[t];v.symbolList=v.symbolList.concat([e.n,t,e.n+100,t+"-open"]),v.symbolNames[e.n]=t,v.symbolFuncs[e.n]=e.f,e.needLine&&(v.symbolNeedLines[e.n]=!0),e.noDot?v.symbolNoDot[e.n]=!0:v.symbolList=v.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"]),e.noFill&&(v.symbolNoFill[e.n]=!0)});var x=v.symbolNames.length,b="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function _(t,e){var r=t%100;return v.symbolFuncs[r](e)+(t>=200?b:"")}v.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=v.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=x||t>=400?0:Math.floor(Math.max(t,0))};var w={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},T=n.format("~.1f"),A={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:w},horizontalreversed:{node:"linearGradient",attrs:w,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};v.gradient=function(t,e,r,a,o,l){for(var u=o.length,h=A[a],f=new Array(u),p=0;p=100,e.attr("d",_(u,l))}var h,f,p,d=!1;if(t.so)p=o.outlierwidth,f=o.outliercolor,h=i.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,f="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(i.color)&&(h=s.defaultLine,d=!0),h="mc"in t?t.mcc=n.markerScale(t.mc):i.color||"rgba(0,0,0,0)",n.selectedColorFn&&(h=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:p)+"px");var m=i.gradient,y=t.mgt;if(y?d=!0:y=m&&m.type,Array.isArray(y)&&(y=y[0],A[y]||(y=0)),y&&"none"!==y){var x=t.mgc;x?d=!0:x=m.color;var b=r.uid;d&&(b+="-"+t.i),v.gradient(e,a,b,y,[[0,x],[1,h]],"fill")}else s.fill(e,h);p&&s.stroke(e,f)}},v.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=v.tryColorscale(r,""),e.lineScale=v.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,v.makeSelectedPointStyleFns(t)),e},v.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},i=r.marker||{},s=n.marker||{},l=a.opacity,u=i.opacity,h=s.opacity,f=void 0!==u,d=void 0!==h;(c.isArrayOrTypedArray(l)||f||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?f?u:e:d?h:p*e});var g=a.color,v=i.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=a.size,x=i.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},v.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,c=i.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},v.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push(function(t,e){t.style("opacity",r.selectedOpacityFn(e))}),r.selectedColorFn&&i.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&i.push(function(t,e){var n=e.mx||a.symbol||0,i=r.selectedSizeFn(e);t.attr("d",_(v.symbolNumber(n),i)),e.mrc2=i}),i.length&&t.each(function(t){for(var e=n.select(this),r=0;r0?r:0}v.textPointStyle=function(t,e,r,a){if(t.size()){var i;if(e.selectedpoints){var o=v.makeSelectedTextStyleFns(e);i=o.selectedTextColorFn}var s=e.texttemplate;a&&(s=!1),t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,s?"txt":"tx",s?"texttemplate":"text");if(o||0===o){if(s){var l={};m(l,e,t.i),o=c.texttemplateString(o,{},r._fullLayout._d3locale,l,t,e._meta||{})}var h=t.tp||e.textposition,f=E(t,e),p=i?i(t):t.tc||e.textfont.color;a.call(v.font,t.tf||e.textfont.family,f,p).text(o).call(u.convertToTspans,r).call(S,h,f,t.mrc)}else a.remove()})}},v.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedTextStyleFns(e);t.each(function(t){var a=n.select(this),i=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=E(t,e);s.fill(a,i),S(a,o,l,t.mrc2||t.mrc)})}};var C=.5;function L(t,e,r,a){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(i*i+o*o,C/2),u=Math.pow(s*s+l*l,C/2),h=(u*u*i-c*c*s)*a,f=(u*u*o-c*c*l)*a,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&h/p),2),n.round(e[1]+(p&&f/p),2)],[n.round(e[0]-(d&&h/d),2),n.round(e[1]-(d&&f/d),2)]]}v.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(v.savedBBoxes={},I=0),r&&(v.savedBBoxes[r]=m),I++,c.extendFlat({},m)},v.setClipUrl=function(t,e,r){t.attr("clip-path",D(e,r))},v.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||0,y:+e[1]||0}},v.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+e+", "+r+")").trim(),t[a]("transform",i),i},v.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||1,y:+e[1]||1}},v.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+e+", "+r+")").trim(),t[a]("transform",i),i};var R=/\s*sc.*/;v.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":" scale("+e+","+r+")";t.each(function(){var t=(this.getAttribute("transform")||"").replace(R,"");t=(t+=n).trim(),this.setAttribute("transform",t)})}};var F=/translate\([^)]*\)\s*$/;v.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(F);t=1===e&&1===r?[]:["translate("+o+","+s+")","scale("+e+","+r+")","translate("+-o+","+-s+")"],l&&t.push(l),a.attr("transform",t.join(" "))}})}},{"../../constants/alignment":688,"../../constants/interactions":694,"../../constants/xmlns_namespaces":696,"../../lib":719,"../../lib/svg_text_utils":743,"../../registry":848,"../../traces/scatter/make_bubble_size_func":1127,"../../traces/scatter/subtypes":1134,"../color":594,"../colorscale":606,"../fx/helpers":629,"./symbol_defs":616,d3:164,"fast-isnumeric":226,tinycolor2:538}],616:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,a="l"+e+",-"+e,i="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+a+i+a+i+o+i+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),a=n.round(-t,2),i=n.round(-.309*t,2);return"M"+e+","+i+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+e+"L-"+a+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+e+",0L"+r+",-"+a+"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),a=n.round(.951*e,2),i=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"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+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),a=n.round(.76*t,2);return"M-"+a+",0l-"+r+",-"+e+"h"+a+"l"+r+",-"+e+"l"+r+","+e+"h"+a+"l-"+r+","+e+"l"+r+","+e+"h-"+a+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+a+"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),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+a+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),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+a+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),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+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),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+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),a=n.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"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),a=n.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"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),a=n.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+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),a=n.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:164}],617:[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"}}}},{}],618:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../registry"),i=t("../../plots/cartesian/axes"),o=t("../../lib"),s=t("./compute_error");function l(t,e,r,a){var l=e["error_"+a]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),h=0;h0;e.each(function(e){var h,f=e[0].trace,p=f.error_x||{},d=f.error_y||{};f.ids&&(h=function(t){return t.id});var g=o.hasMarkers(f)&&f.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,h);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),d.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var m=v.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(v,r.layerClipId,t),v.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),a(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),a(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,l,c);if(!g||t.vis){var i,o=e.select("path.yerror");if(d.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var h=d.width;i="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(i+="m-"+h+",0h"+2*h),!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",i)}else o.remove();var f=e.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var v=(p.copy_ystyle?d:p).width;i="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(i+="m0,-"+v+"v"+2*v),!f.size()?f=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(s.duration).ease(s.easing)),f.attr("d",i)}else f.remove()}})}})}},{"../../traces/scatter/subtypes":1134,"../drawing":615,d3:164,"fast-isnumeric":226}],623:[function(t,e,r){"use strict";var n=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},i=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)})}},{"../color":594,d3:164}],624:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("./layout_attributes").hoverlabel,i=t("../../lib/extend").extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":710,"../../plots/font_attributes":793,"./layout_attributes":633}],625:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry");function i(t,e,r,a){a=a||n.identity,Array.isArray(t)&&(e[0][r]=a(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||$<0||$>w[0]._length)return f.unhoverRaw(t,e)}if(e.pointerX=Q+_[0]._offset,e.pointerY=$+w[0]._offset,I="xval"in e?g.flat(l,e.xval):g.p2c(_,Q),z="yval"in e?g.flat(l,e.yval):g.p2c(w,$),!a(I[0])||!a(z[0]))return o.warn("Fx.hover failed",e,t),f.unhoverRaw(t,e)}var rt=1/0;for(R=0;RG&&(X.splice(0,G),rt=X[0].distance),m&&0!==W&&0===X.length){H.distance=W,H.index=!1;var st=B._module.hoverPoints(H,U,q,"closest",u._hoverlayer);if(st&&(st=st.filter(function(t){return t.spikeDistance<=W})),st&&st.length){var lt,ct=st.filter(function(t){return t.xa.showspikes});if(ct.length){var ut=ct[0];a(ut.x0)&&a(ut.y0)&&(lt=dt(ut),(!J.vLinePoint||J.vLinePoint.spikeDistance>lt.spikeDistance)&&(J.vLinePoint=lt))}var ht=st.filter(function(t){return t.ya.showspikes});if(ht.length){var ft=ht[0];a(ft.x0)&&a(ft.y0)&&(lt=dt(ft),(!J.hLinePoint||J.hLinePoint.spikeDistance>lt.spikeDistance)&&(J.hLinePoint=lt))}}}}function pt(t,e){for(var r,n=null,a=1/0,i=0;i1||X.length>1)||"closest"===O&&K&&X.length>1,Ct=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),Lt={hovermode:O,rotateLabels:Et,bgColor:Ct,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},Pt=A(X,Lt,t);if(function(t,e,r){var n,a,i,o,s,l,c,u=0,h=1,f=t.size(),p=new Array(f),d=0;function g(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,i=r.pos+r.dp+r.size-e.pmax,a>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=i;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-=i;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}for(t.each(function(t){var n=t[e],a="x"===n._id.charAt(0),i=n.range;0===d&&i&&i[0]>i[1]!==a&&(h=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]}),p.sort(function(t,e){return t[0].posref-e[0].posref||h*(e[0].traceIndex-t[0].traceIndex)});!n&&u<=f;){for(u++,n=!0,o=0;o.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=a;for(v.push.apply(v,m),p.splice(o+1,1),c=0,s=v.length-1;s>=0;s--)c+=v[s].dp;for(i=c/v.length,s=v.length-1;s>=0;s--)v[s].dp-=i;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var _=p[o];for(s=_.length-1;s>=0;s--){var w=_[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(Pt,Et?"xa":"ya",u),M(Pt,Et),e.target&&e.target.tagName){var Ot=d.getComponentMethod("annotations","hasClickToShow")(t,Tt);c(n.select(e.target),Ot?"pointer":"")}if(!e.target||i||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=t._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(t,0,kt))return;kt&&t.emit("plotly_unhover",{event:e,points:kt});t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:I,yvals:z})}(t,e,r,i)})},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var a=t.map(function(t){return{color:t.color||h.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,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}}),i=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):i,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||h.background,container:i,outerContainer:o},l=A(a,s,e.gd),c=0,u=0;return l.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 A(t,e,r){var a=r._fullLayout,i=e.hovermode,s=e.rotateLabels,c=e.bgColor,f=e.container,p=e.outerContainer,d=e.commonLabelOpts||{},g=e.fontFamily||v.HOVERFONT,y=e.fontSize||v.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,A="y"===i?"yLabel":"xLabel",M=x[A],S=(String(M)||"").split(" ")[0],E=p.node().getBoundingClientRect(),C=E.top,P=E.width,O=E.height,I=void 0!==M&&x.distance<=e.hoverdistance&&("x"===i||"y"===i);if(I){var z,D,R=!0;for(z=0;z"),void 0!==t.yLabel&&(p+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(p+=(p?"z: ":"")+t.zLabel)):I&&t[i+"Label"]===M?p=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(p=t.yLabel):p=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(p+=(p?"
":"")+t.text),void 0!==t.extraText&&(p+=(p?"
":"")+t.extraText),""!==p||t.hovertemplate||(""===f&&e.remove(),p=f);var _=a._d3locale,A=t.hovertemplate||!1,S=t.hovertemplateLabels||t,E=t.eventData[0]||{};A&&(p=(p=o.hovertemplateString(A,S,_,E,t.trace._meta)).replace(T,function(e,r){return f=L(r,t.nameLength),""}));var z=e.select("text.nums").call(u.font,t.fontFamily||g,t.fontSize||y,t.fontColor||b).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),D=e.select("text.name"),R=0,F=0;if(f&&f!==p){D.call(u.font,t.fontFamily||g,t.fontSize||y,x).text(f).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var B=D.node().getBoundingClientRect();R=B.width+2*k,F=B.height+2*k}else D.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:b});var N,j,V=z.node().getBoundingClientRect(),U=t.xa._offset+(t.x0+t.x1)/2,q=t.ya._offset+(t.y0+t.y1)/2,H=Math.abs(t.x1-t.x0),G=Math.abs(t.y1-t.y0),Y=V.width+w+k+R;if(t.ty0=C-V.top,t.bx=V.width+2*k,t.by=Math.max(V.height+2*k,F),t.anchor="start",t.txwidth=V.width,t.tx2width=R,t.offset=0,s)t.pos=U,N=q+G/2+Y<=O,j=q-G/2-Y>=0,"top"!==t.idealAlign&&N||!j?N?(q+=G/2,t.anchor="start"):t.anchor="middle":(q-=G/2,t.anchor="end");else if(t.pos=q,N=U+H/2+Y<=P,j=U-H/2-Y>=0,"left"!==t.idealAlign&&N||!j)if(N)U+=H/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=U+W-P,Z=U-W;X>0&&(U-=X),Z<0&&(U+=-Z)}else U-=H/2,t.anchor="end";z.attr("text-anchor",t.anchor),R&&D.attr("text-anchor",t.anchor),e.attr("transform","translate("+U+","+q+")"+(s?"rotate("+m+")":""))}),N}function M(t,e){t.each(function(t){var r=n.select(this);if(t.del)return r.remove();var a=r.select("text.nums"),i=t.anchor,o="end"===i?-1:1,s={start:1,end:-1,middle:0}[i],c=s*(w+k),h=c+s*(t.txwidth+k),f=0,p=t.offset;"middle"===i&&(c-=t.tx2width/2,h+=t.txwidth/2+k),e&&(p*=-_,f=t.offset*b),r.select("path").attr("d","middle"===i?"M-"+(t.bx/2+t.tx2width/2)+","+(p-t.by/2)+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(o*w+f)+","+(w+p)+"v"+(t.by/2-w)+"h"+o*t.bx+"v-"+t.by+"H"+(o*w+f)+"V"+(p-w)+"Z");var d=c+f,g=p+t.ty0-t.by/2+k,v=t.textAlign||"auto";"auto"!==v&&("left"===v&&"start"!==i?(a.attr("text-anchor","start"),d="middle"===i?-t.bx/2-t.tx2width/2+k:-t.bx-k):"right"===v&&"end"!==i&&(a.attr("text-anchor","end"),d="middle"===i?t.bx/2-t.tx2width/2-k:t.bx+k)),a.call(l.positionText,d,g),t.tx2width&&(r.select("text.name").call(l.positionText,h+s*k+f,p+t.ty0-t.by/2+k),r.select("rect").call(u.setRect,h+(s-1)*t.tx2width/2+f,p-t.by/2-1,t.tx2width,t.by+2))})}function S(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],s=t.cd[r]||{};function l(t){return t||a(t)&&0===t}var c=Array.isArray(r)?function(t,e){var a=o.castOption(i,r,t);return l(a)?a:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var a=c(r,n);l(a)&&(t[e]=a)}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:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=p.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+p.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var f=p.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+f+" / -"+p.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+f,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function E(t,e,r){var n,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,f=!!e.hLinePoint,d=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),d||f){var g=h.combine(s.plot_bgcolor,s.paper_bgcolor);if(f){var v,m,y=e.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(v=c.pointerX,m=c.pointerY):(v=n._offset+y.x,m=a._offset+y.y);var x,b,_=i.readability(y.color,g)<1.5?h.contrast(g):y.color,w=a.spikemode,k=a.spikethickness,T=a.spikecolor||_,A=p.getPxPosition(t,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var M=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),S=Math.max(S,a.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k,stroke:T,"stroke-dasharray":u.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k+2,stroke:g}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==a.side?k:-k),cy:m,r:k,fill:T}).classed("spikeline",!0)}if(d){var E,C,L=e.vLinePoint;n=L&&L.xa,a=L&&L.ya,"cursor"===n.spikesnap?(E=c.pointerX,C=c.pointerY):(E=n._offset+L.x,C=a._offset+L.y);var P,O,I=i.readability(L.color,g)<1.5?h.contrast(g):L.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||I,F=p.getPxPosition(t,n);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(P=F,O=C),-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,O=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D,stroke:R,"stroke-dasharray":u.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D+2,stroke:g}).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 C(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function L(t,e){return l.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":719,"../../lib/events":709,"../../lib/override_cursor":730,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../registry":848,"../color":594,"../dragelement":612,"../drawing":615,"./constants":627,"./helpers":629,d3:164,"fast-isnumeric":226,tinycolor2:538}],631:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r,a){r("hoverlabel.bgcolor",(a=a||{}).bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},{"../../lib":719}],632:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=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 a.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return a.castOption(t,r,"hoverinfo",function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:l.hover,unhover:i.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=a.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:t("./click")}},{"../../lib":719,"../dragelement":612,"./attributes":624,"./calc":625,"./click":626,"./constants":627,"./defaults":628,"./helpers":629,"./hover":630,"./layout_attributes":633,"./layout_defaults":634,"./layout_global_defaults":635,d3:164}],633:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../plots/font_attributes")({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","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1],editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:20,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,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":793,"./constants":627}],634:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}var o,s=i("clickmode");"select"===i("dragmode")&&i("selectdirection"),e._has("cartesian")?s.indexOf("select")>-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){f||p||d||"independent"===T("pattern")&&(f=!0),v._hasSubplotGrid=f;var x,b,_="top to bottom"===T("roworder"),w=f?.2:.1,k=f?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u("x",T,w,x,y),y:u("y",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,a,i,o,s,l,u,f=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(d){var x=f.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==g||c.uirevision){var v,m,y,x=i.newContainer(e,"legend");if(b("uirevision",e.uirevision),!1!==g)b("bgcolor",e.paper_bgcolor),b("bordercolor"),b("borderwidth"),a.coerceFont(b,"font",e.font),"h"===b("orientation")?(v=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(m=1.1,y="bottom"):(m=-.1,y="top")):(v=1.02,m=1,y="auto"),b("traceorder",f),l.isGrouped(e.legend)&&b("tracegroupgap"),b("itemsizing"),b("itemclick"),b("itemdoubleclick"),b("x",v),b("xanchor"),b("y",m),b("yanchor",y),b("valign"),a.noneOrAll(c,x,["x","y"])}function b(t,e){return a.coerce(c,x,o,t,e)}}},{"../../lib":719,"../../plot_api/plot_template":757,"../../plots/layout_attributes":819,"../../registry":848,"./attributes":642,"./helpers":648}],645:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),h=t("../../lib/svg_text_utils"),f=t("./handle_click"),p=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,v=d.FROM_TL,m=d.FROM_BR,y=t("./get_legend_data"),x=t("./style"),b=t("./helpers");function _(t,e,r,n,a){var i=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(i._group&&(l.group=i._group),o.traceIs(i,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l))if(1===n)e._clickTimeout=setTimeout(function(){f(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)&&f(r,t,n)}}function w(t,e){var r=t.data()[0][0],n=e._fullLayout,i=n.legend,s=r.trace,l=o.traceIs(s,"pie-like"),u=s.index,f=e._context.edits.legendText&&!l,d=i._maxNameLength,v=l?r.label:s.name;s._meta&&(v=a.templateString(v,s._meta));var m=a.ensureSingle(t,"text","legendtext");function y(r){h.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,a,i=t.select("g[class*=math-group]"),o=i.node(),s=e._fullLayout.legend.font.size*g;if(o){var l=c.bBox(o);n=l.height,a=l.width,c.setTranslate(i,0,n/4)}else{var u=t.select(".legendtext"),f=h.lineCount(u),d=u.node();n=s*f,a=d?c.bBox(d).width:0;var v=s*(.3+(1-f)/2);h.positionText(u,p.textGap,v)}r.lineHeight=s,r.height=Math.max(n,16)+3,r.width=a}(t,e)})}m.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,n.legend.font).text(f?k(v,d):v),h.positionText(m,p.textGap,0),f?m.call(h.makeEditable,{gd:e,text:v}).call(y).on("edit",function(t){this.text(k(t,d)).call(y);var n=r.trace._fullInput||{},i={};if(o.hasTransform(n,"groupby")){var s=o.getTransformIndices(n,"groupby"),l=s[s.length-1],c=a.keyedContainer(n,"transforms["+l+"].styles","target","value.name");c.set(r.trace._group,t),i=c.constructUpdate()}else i.name=t;return o.call("_guiRestyle",e,i,u)}):y(m)}function k(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 T(t,e){var r,i=e._context.doubleClickDelay,o=1,s=a.ensureSingle(t,"rect","legendtoggle",function(t){t.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")});s.on("mousedown",function(){(r=(new Date).getTime())-e._legendMouseDownTimei&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})}function A(t){return a.isRightAnchor(t)?"right":a.isCenterAnchor(t)?"center":"left"}function M(t){return a.isBottomAnchor(t)?"bottom":a.isMiddleAnchor(t)?"middle":"top"}e.exports=function(t){var e=t._fullLayout,r="legend"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,h=e.showlegend&&y(t.calcdata,s),f=e.hiddenlabels||[];if(!e.showlegend||!h.length)return e._infolayer.selectAll(".legend").remove(),e._topdefs.select("#"+r).remove(),i.autoMargin(t,"legend");var d=a.ensureSingle(e._infolayer,"g","legend",function(t){t.attr("pointer-events","all")}),g=a.ensureSingleById(e._topdefs,"clipPath",r,function(t){t.append("rect")}),k=a.ensureSingle(d,"rect","bg",function(t){t.attr("shape-rendering","crispEdges")});k.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var S=a.ensureSingle(d,"g","scrollbox"),E=a.ensureSingle(d,"rect","scrollbar",function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)}),C=S.selectAll("g.groups").data(h);C.enter().append("g").attr("class","groups"),C.exit().remove();var L=C.selectAll("g.traces").data(a.identity);L.enter().append("g").attr("class","traces"),L.exit().remove(),L.style("opacity",function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==f.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){n.select(this).call(w,t)}).call(x,t).each(function(){n.select(this).call(T,t)}),a.syncOrAsync([i.previousPromises,function(){return function(t,e,r){var a=t._fullLayout,i=a.legend,o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,h=2*u,f=p.textGap,d=p.itemGap,g=2*(u+d),v=M(i),m=i.y<0||0===i.y&&"top"===v,y=i.y>1||1===i.y&&"bottom"===v;i._maxHeight=Math.max(m||y?a.height/2:o.h,30);var x=0;if(i._width=0,i._height=0,s)r.each(function(t){var e=t[0].height;c.setTranslate(this,u,d+u+i._height+e/2),i._height+=e,i._width=Math.max(i._width,t[0].width)}),x=f+i._width,i._width+=d+f+h,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 _=A(i),w=i.x<0||0===i.x&&"right"===_,k=i.x>1||1===i.x&&"left"===_,T=y||m,S=a.width/2;i._maxWidth=Math.max(w?T&&"left"===_?o.l+o.w:S:k?T&&"right"===_?o.r+o.w:S:o.w,2*f);var E=0,C=0;r.each(function(t){var e=t[0].width+f;E=Math.max(E,e),C+=e}),x=null;var L=0;if(l){var P=0,O=0,I=0;e.each(function(){var t=0,e=0;n.select(this).selectAll("g.traces").each(function(r){var n=r[0].height;c.setTranslate(this,0,d+u+n/2+e),e+=n,t=Math.max(t,f+r[0].width)}),P=Math.max(P,e);var r=t+d;r+u+O>i._maxWidth&&(L=Math.max(L,O),O=0,I+=P+i.tracegroupgap,P=e),c.setTranslate(this,O,I),O+=r}),i._width=Math.max(L,O)+u,i._height=I+P+g}else{var z=r.size(),D=C+h+(z-1)*di._maxWidth&&(L=Math.max(L,N),F=0,B+=R,i._height+=R,R=0),c.setTranslate(this,u+F,d+u+e/2+B),N=F+r+d,F+=n,R=Math.max(R,e)}),D?(i._width=F+h,i._height=R+g):(i._width=Math.max(L,N)+h,i._height+=R+g)}}i._width=Math.ceil(i._width),i._height=Math.ceil(i._height),i._effHeight=Math.min(i._height,i._maxHeight);var j=t._context.edits,V=j.legendText||j.legendPosition;r.each(function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=V?f:x||f+t[0].width;s||(a+=d/2),c.setRect(e,0,-r/2,a,r)})}(t,C,L)},function(){if(!function(t){var e=t._fullLayout.legend,r=A(e),n=M(e);return i.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._effHeight*m[n],t:e._effHeight*v[n]})}(t)){var u,h,f,y,x=e._size,b=s.borderwidth,w=x.l+x.w*s.x-v[A(s)]*s._width,T=x.t+x.h*(1-s.y)-v[M(s)]*s._effHeight;if(e.margin.autoexpand){var C=w,L=T;w=a.constrain(w,0,e.width-s._width),T=a.constrain(T,0,e.height-s._effHeight),w!==C&&a.log("Constrain legend.x to make legend fit inside graph"),T!==L&&a.log("Constrain legend.y to make legend fit inside graph")}if(c.setTranslate(d,w,T),E.on(".drag",null),d.on("wheel",null),s._height<=s._maxHeight||t._context.staticPlot)k.attr({width:s._width-b,height:s._effHeight-b,x:b/2,y:b/2}),c.setTranslate(S,0,0),g.select("rect").attr({width:s._width-2*b,height:s._effHeight-2*b,x:b,y:b}),c.setClipUrl(S,r,t),c.setRect(E,0,0,0,0),delete s._scrollY;else{var P,O,I,z=Math.max(p.scrollBarMinHeight,s._effHeight*s._effHeight/s._height),D=s._effHeight-z-2*p.scrollBarMargin,R=s._height-s._effHeight,F=D/R,B=Math.min(s._scrollY||0,R);k.attr({width:s._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:s._effHeight-b,x:b/2,y:b/2}),g.select("rect").attr({width:s._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:s._effHeight-2*b,x:b,y:b+B}),c.setClipUrl(S,r,t),V(B,z,F),d.on("wheel",function(){V(B=a.constrain(s._scrollY+n.event.deltaY/D*R,0,R),z,F),0!==B&&B!==R&&n.event.preventDefault()});var N=n.behavior.drag().on("dragstart",function(){var t=n.event.sourceEvent;P="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,I=B}).on("drag",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(O="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,V(B=function(t,e,r){var n=(r-e)/F+t;return a.constrain(n,0,R)}(I,P,O),z,F))});E.call(N);var j=n.behavior.drag().on("dragstart",function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(P=t.changedTouches[0].clientY,I=B)}).on("drag",function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(O=t.changedTouches[0].clientY,V(B=function(t,e,r){var n=(e-r)/F+t;return a.constrain(n,0,R)}(I,P,O),z,F))});S.call(j)}if(t._context.edits.legendPosition)d.classed("cursor-move",!0),l.init({element:d.node(),gd:t,prepFn:function(){var t=c.getTranslate(d);f=t.x,y=t.y},moveFn:function(t,e){var r=f+t,n=y+e;c.setTranslate(d,r,n),u=l.align(r,0,x.l,x.l+x.w,s.xanchor),h=l.align(n,0,x.t+x.h,x.t,s.yanchor)},doneFn:function(){void 0!==u&&void 0!==h&&o.call("_guiRelayout",t,{"legend.x":u,"legend.y":h})},clickFn:function(r,n){var a=e._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});a.size()>0&&_(t,d,a,r,n)}})}function V(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(S,0,-e),c.setRect(E,s._width,p.scrollBarMargin+e*n,p.scrollBarWidth,r),g.select("rect").attr("y",b+e)}}],t)}}},{"../../constants/alignment":688,"../../lib":719,"../../lib/events":709,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":848,"../color":594,"../dragelement":612,"../drawing":615,"./constants":643,"./get_legend_data":646,"./handle_click":647,"./helpers":648,"./style":650,d3:164}],646:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("./helpers");e.exports=function(t,e){var r,i,o={},s=[],l=!1,c={},u=0,h=0;function f(t,r){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;a=e.width}return v?n:Math.min(a,r)}function y(t,e,r){var i=t[0].trace,o=i.marker||{},l=o.line||{},c=r?i.type===r&&i.visible:a.traceIs(i,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each(function(t){var e=n.select(this),r=t[0],a=m(r.mlw,o.line,g,p);e.style("stroke-width",a+"px").call(s.fill,r.mc||o.color),a&&s.stroke(e,r.mlc||l.color)})}function x(t,e,r){var o=t[0],s=o.trace,l=r?s.type===r&&s.visible:a.traceIs(s,r),h=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(h.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),h.exit().remove(),h.size()){var f=(s.marker||{}).line,d=m(u(f.width,o.pts),f,g,p),v=i.minExtend(s,{marker:{line:{width:d}}});v.marker.line.color=f.color;var y=i.minExtend(o,{trace:v});c(h,y,v)}}t.each(function(t){var e=n.select(this),a=i.ensureSingle(e,"g","layers");a.style("opacity",t[0].trace.opacity);var o=r.valign,s=t[0].lineHeight,l=t[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));a.attr("transform","translate(0,"+c+")")}else a.attr("transform",null);a.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var u=a.selectAll("g.legendsymbols").data([t]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(function(t){var e=t[0].trace,r=[];"waterfall"===e.type&&e.visible&&(r=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 a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(r);a.enter().append("path").classed("legendwaterfall",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),a.exit().remove(),a.each(function(t){var r=n.select(this),a=e[t[0]].marker,i=m(void 0,a.line,g,p);r.attr("d",t[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)})}).each(function(t){y(t,this,"funnel")}).each(function(t){y(t,this)}).each(function(t){var r=t[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.traceIs(r,"box-violin")&&r.visible?[t]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),l.exit().remove(),l.each(function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=m(void 0,r.line,g,p);t.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(t,r.line.color)}else{var c=i.minExtend(r,{marker:{size:v?h:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,e)}})}).each(function(t){x(t,this,"funnelarea")}).each(function(t){x(t,this,"pie")}).each(function(t){var r,a,s=t[0],c=s.trace,u=c.visible&&c.fill&&"none"!==c.fill,h=l.hasLines(c),p=c.contours,g=!1,v=!1;if(p){var y=p.coloring;"lines"===y?g=!0:h="none"===y||"heatmap"===y||p.showlines,"constraint"===p.type?u="="!==p._operation:"fill"!==y&&"heatmap"!==y||(v=!0)}var x=l.hasMarkers(c)||l.hasText(c),b=u||v,_=h||g,w=x||!b?"M5,0":_?"M5,-2":"M5,-3",k=n.select(this),T=k.select(".legendfill").selectAll("path").data(u||v?[t]:[]);if(T.enter().append("path").classed("js-fill",!0),T.exit().remove(),T.attr("d",w+"h30v6h-30z").call(u?o.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+c.uid;o.gradient(t,e,r,"horizontalreversed",c.colorscale,"fill")}}),h||g){var A=m(void 0,c.line,d,f);a=i.minExtend(c,{line:{width:A}}),r=[i.minExtend(s,{trace:a})]}var M=k.select(".legendlines").selectAll("path").data(h||g?[r]:[]);M.enter().append("path").classed("js-line",!0),M.exit().remove(),M.attr("d",w+(g?"l30,0.0001":"h30")).call(h?o.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+c.uid;o.lineGroupStyle(t),o.gradient(t,e,r,"horizontalreversed",c.colorscale,"stroke")}})}).each(function(t){var r,a,s=t[0],c=s.trace,u=l.hasMarkers(c),d=l.hasText(c),g=l.hasLines(c);function m(t,e,r,n){var a=i.nestedProperty(c,t).get(),o=i.isArrayOrTypedArray(a)&&e?e(a):a;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function y(t){return t[0]}if(u||d||g){var x={},b={};if(u){x.mc=m("marker.color",y),x.mx=m("marker.symbol",y),x.mo=m("marker.opacity",i.mean,[.2,1]),x.mlc=m("marker.line.color",y),x.mlw=m("marker.line.width",i.mean,[0,5],p),b.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _=m("marker.size",i.mean,[2,16],h);x.ms=_,b.marker.size=_}g&&(b.line={width:m("line.width",y,[0,10],f)}),d&&(x.tx="Aa",x.tp=m("textposition",y),x.ts=10,x.tc=m("textfont.color",y),x.tf=m("textfont.family",y)),r=[i.minExtend(s,x)],(a=i.minExtend(c,b)).selectedpoints=null}var w=n.select(this).select("g.legendpoints"),k=w.selectAll("path.scatterpts").data(u?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),k.exit().remove(),k.call(o.pointStyle,a,e),u&&(r[0].mrc=3);var T=w.selectAll("g.pointtext").data(d?r:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),T.exit().remove(),T.selectAll("text").call(o.textPointStyle,a,e,!0)}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data("candlestick"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],o=m(void 0,i.line,g,p);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data("ohlc"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],l=m(void 0,i.line,g,p);a.style("fill","none").call(o.dashLine,i.line.dash,l),l&&s.stroke(a,i.line.color)})})}},{"../../lib":719,"../../registry":848,"../../traces/pie/helpers":1090,"../../traces/pie/style_one":1096,"../../traces/scatter/subtypes":1134,"../color":594,"../drawing":615,d3:164}],651:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/plots"),i=t("../../plots/cartesian/axis_ids"),o=t("../../lib"),s=t("../../fonts/ploticon"),l=o._,c=e.exports={};function u(t,e){var r,a,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=i.list(t,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(a=0;a1?(A=["toggleHover"],M=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],M=["resetGeo"]):h?(A=["hoverClosest3d"],M=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(A=["toggleHover"],M=["resetViewMapbox"]):g?A=["hoverClosestGl2d"]:p?A=["hoverClosestPie"]:x?(A=["hoverClosestCartesian","hoverCompareCartesian"],M=["resetViewSankey"]):A=["toggleHover"];u&&(A=["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}),a=0,i=0;i0?f+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,a){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,h,f=1/0,p=-1/0,d=n.match(i.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=h)));return p>=f?[f,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;o10?t/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:i}).style(a).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():e,X={element:W.node(),gd:t,prepFn:function(n){D&&(_=q(r.xanchor));R&&(w=H(r.yanchor));"path"===r.type?P=r.path:(m=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));mb?(k=y,S="y0",T=b,E="y1"):(k=b,S="y1",T=y,E="y0");Z(n),Q(p,r),function(t,e,r){var n=e.xref,a=e.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),c="";"paper"===n||o.autorange||(c+=n);"paper"===a||l.autorange||(c+=a);s.setClipUrl(t,c?"clip"+r._fullLayout._uid+c:null,r)}(e,r,t),X.moveFn="move"===O?J:K},doneFn:function(){u(e),$(p),d(e,t,r),n.call("_guiRelayout",t,N.getUpdateObj())},clickFn:function(){$(p)}};function Z(t){if(F)O="path"===t.target.tagName?"move":"start-point"===t.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,a=r.bottom-r.top,i=t.clientX-r.left,o=t.clientY-r.top,s=!B&&n>I&&a>z&&!t.shiftKey?c.getCursor(i/n,1-o/a):"move";u(e,s),O=s.split("-")[0]}}function J(n,a){if("path"===r.type){var i=function(t){return t},o=i,s=i;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&"date"===V.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+a)):(s=function(t){return Y(H(t)+a)},U&&"date"===U.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else D?j("xanchor",r.xanchor=G(_+n)):(j("x0",r.x0=G(m+n)),j("x1",r.x1=G(x+n))),R?j("yanchor",r.yanchor=Y(w+a)):(j("y0",r.y0=Y(y+a)),j("y1",r.y1=Y(b+a)));e.attr("d",g(t,r)),Q(p,r)}function K(n,a){if(B){var i=function(t){return t},o=i,s=i;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&"date"===V.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+a)):(s=function(t){return Y(H(t)+a)},U&&"date"===U.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else if(F){if("resize-over-start-point"===O){var l=m+n,c=R?y-a:y+a;j("x0",r.x0=D?l:G(l)),j("y0",r.y0=R?c:Y(c))}else if("resize-over-end-point"===O){var u=x+n,h=R?b-a:b+a;j("x1",r.x1=D?u:G(u)),j("y1",r.y1=R?h:Y(h))}}else{var d=~O.indexOf("n")?k+a:k,N=~O.indexOf("s")?T+a:T,W=~O.indexOf("w")?A+n:A,X=~O.indexOf("e")?M+n:M;~O.indexOf("n")&&R&&(d=k-a),~O.indexOf("s")&&R&&(N=T-a),(!R&&N-d>z||R&&d-N>z)&&(j(S,r[S]=R?d:Y(d)),j(E,r[E]=R?N:Y(N))),X-W>I&&(j(C,r[C]=D?W:G(W)),j(L,r[L]=D?X:G(X)))}e.attr("d",g(t,r)),Q(p,r)}function Q(t,e){(D||R)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=q(D?e.xanchor:a.midRange(r?[e.x0,e.x1]:f.extractPathCoords(e.path,h.paramIsX))),o=H(R?e.yanchor:a.midRange(r?[e.y0,e.y1]:f.extractPathCoords(e.path,h.paramIsY)));if(i=f.roundPositionForSharpStrokeRendering(i,1),o=f.roundPositionForSharpStrokeRendering(o,1),D&&R){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(D){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function $(t){t.selectAll(".visual-cue").remove()}c.init(X),W.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=i.getFromId(t,e.xref),v=i.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=f.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=f.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},"path"===d)return g&&"date"===g.type&&(n=f.decodeDate(n)),v&&"date"===v.type&&(s=f.decodeDate(s)),function(t,e,r){var n=t.path,i=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(h.segmentRE,function(t){var n=0,c=t.charAt(0),u=h.paramIsX[c],f=h.paramIsY[c],p=h.numParams[c],d=t.substr(1).replace(h.paramRE,function(t){return u[n]?t="pixel"===i?e(s)+Number(t):e(t):f[n]&&(t="pixel"===o?r(l)-Number(t):r(t)),++n>p&&(t="X"),t});return n>p&&(d=d.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+t)),c+d})}(e,n,s);if("pixel"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+p;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+p+"H"+l+"Z";var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),T="A"+w+","+k,A=b+w+","+_;return"M"+A+T+" 0 1,1 "+(b+","+(_-k))+T+" 0 0,1 "+A+"Z"}function v(t,e,r){return t.replace(h.segmentRE,function(t){var n=0,a=t.charAt(0),i=h.paramIsX[a],o=h.paramIsY[a],s=h.numParams[a];return a+t.substr(1).replace(h.paramRE,function(t){return n>=s?t:(i[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+e._dims.currentValueTotalHeight+")")}}function S(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,a=s.ensureSingle(t,"rect",u.railTouchRectClass,function(n){n.call(T,e,t,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function L(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,a=s.ensureSingle(t,"rect",u.railRectClass);a.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,e.bordercolor).call(i.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(a,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[u.name],n=[],a=0;a0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),a.autoMargin(t,g(e))}if(i.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),i.exit().each(function(){n.select(this).selectAll("g."+u.groupClassName).each(s)}).remove(),0!==r.length){var l=i.selectAll("g."+u.groupClassName).data(r,v);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||f<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr("transform","translate("+g+")")}}}I.call(z),P&&(M?I.on(".opacity",null):(k=0,T=!0,I.text(v).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)})),I.call(u.makeEditable,{gd:t}).on("edit",function(e){void 0!==m?o.call("_guiRestyle",t,g,e,m):o.call("_guiRelayout",t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(z)}).on("input",function(t){this.text(t||" ").call(u.positionText,x.x,x.y)}));return I.classed("js-placeholder",T),_}};var f=/ [XY][0-9]* /},{"../../constants/interactions":694,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":848,"../color":594,"../drawing":615,d3:164,"fast-isnumeric":226}],682:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),i=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/font_attributes":793,"../../plots/pad_attributes":827,"../color/attributes":593}],683:[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"}}},{}],684:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/array_container_defaults"),i=t("./attributes"),o=t("./constants").name,s=i.buttons;function l(t,e,r){function o(r,a){return n.coerce(t,e,i,r,a)}o("visible",a(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,a){return n.coerce(t,e,s,r,a)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("label"),r("execute"))}e.exports=function(t,e){a(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":719,"../../plots/array_container_defaults":763,"./attributes":682,"./constants":683}],685:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/plots"),i=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,h=t("./constants"),f=t("./scrollbox");function p(t){return t._index}function d(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function g(t,e,r,n,a,i,o,s){e.active=o,c(t.layout,h.name,e).applyUpdate("active",o),"buttons"===e.type?m(t,n,null,null,e):"dropdown"===e.type&&(a.attr(h.menuIndexAttrName,"-1"),v(t,n,a,i,e),s||m(t,n,a,i,e))}function v(t,e,r,n,a){var i=s.ensureSingle(e,"g",h.headerClassName,function(t){t.style("pointer-events","all")}),l=a._dims,c=a.active,u=a.buttons[c]||h.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};i.call(y,a,u,t).call(M,a,f,p),s.ensureSingle(e,"text",h.headerArrowClassName,function(t){t.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(h.arrowSymbol[a.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+a.pad.l,y:l.headerHeight/2+h.textOffsetY+a.pad.t}),i.on("click",function(){r.call(S,String(d(r,a)?-1:a._index)),m(t,e,r,n,a)}),i.on("mouseover",function(){i.call(w)}),i.on("mouseout",function(){i.call(k,a)}),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,i,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,v=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?v=m.headerHeight+h.gapButtonHeader:d=m.headerWidth+h.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(v=-h.gapButtonHeader+h.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},T={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||(g(t,o,0,e,r,i,l),s.execute&&a.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(k,o),u.call(_,o)})}),u.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,i&&(u.size()?function(t,e,r,n,a,i){var o,s,l,c=a.direction,u="up"===c||"down"===c,f=a._dims,p=a.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(i)}).remove(),0!==r.length){var l=o.selectAll("g."+h.headerGroupClassName).data(r,p);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",h.dropdownButtonGroupClassName,function(t){t.style("pointer-events","all")}),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=v+m;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),T?(this.hbar=C.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 L=m>k,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=d+g,z=v;I+P>l&&(I=l-P);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:z,width:P,height:O}),this._vbarYMin=z+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?h+P+.5:h+.5,N=f-.5,j=T?p+M+.5:p+.5,V=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",R).append("rect"),T||L?(this._clipRect=V.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(i.setClipUrl,R,this.gd),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||L){var U=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(U);var q=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.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,a=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=e+this._vbarYMin,s=i+this._vbarTranslateMax;e=(o.constrain(n.event.y,i,s)-i)/(s-i)*(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(i.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 a=t/r;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(i.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":719,"../color":594,"../drawing":615,d3:164}],688:[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"}}},{}],689:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},{}],690:[function(t,e,r){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format"}},{}],691:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],692:[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]}},{}],693:[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"}},{}],694:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],695:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],696:[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}},{}],697:[function(t,e,r){"use strict";r.version="1.50.1",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),a=r.register=n.register,i=t("./plot_api"),o=Object.keys(i),s=0;splotly-logomark"}}},{}],700:[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}},{}],701:[function(t,e,r){"use strict";var n=t("./mod"),a=n.mod,i=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 i(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=a(n,s))&&(n+=s);var i=a(t,s),o=i+s;return i>=r&&i<=n||o>=r&&o<=n}function h(t,e,r,n,a,i,c){a=a||0,i=i||0;var u,h,f,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+a,i-t*Math.sin(e)]}g?(u=0,h=o,f=s):r=a&&t<=i);var a,i},pathArc:function(t,e,r,n,a){return h(null,t,e,r,n,a,0)},pathSector:function(t,e,r,n,a){return h(null,t,e,r,n,a,1)},pathAnnulus:function(t,e,r,n,a,i){return h(t,e,r,n,a,i,1)}}},{"./mod":726}],702:[function(t,e,r){"use strict";var n=Array.isArray,a="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i="undefined"==typeof DataView?function(){}:DataView;function o(t){return a.isView(t)&&!(t instanceof i)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,a=0;aa.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,a){t%1||!n(t)||void 0!==a.min&&ta.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var a="number"==typeof t;!0!==n.strict&&a?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){a(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every(function(t){return a(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(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var a=n.regex||c(r);"string"==typeof t&&a.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if("string"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var a=t.split("+"),i=0;i=n&&t<=a?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(e),m=t.charAt(0);!c||"G"!==m&&"g"!==m||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var P=v.getComponentMethod("calendars","getCal")(e);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),L=P.newDate(T,P.toMonthIndex(T,A,O),M)}else L=P.newDate(T,Number(A),M)}catch(t){return u}return L?(L.toJD()-g)*h+S*f+E*p+C*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var I=new Date(Date.UTC(2e3,A,M,S,E));return I.setUTCFullYear(T),I.getUTCMonth()!==A?u:I.getUTCDate()!==M?u:I.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*h,T=3*f,A=5*p;function M(t,e,r,n,a){if((e||r||n||a)&&(t+=" "+w(e,2)+":"+w(r,2),(n||a)&&(t+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;t+="."+w(a,i)}return t}r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=a))return u;e||(e=0);var i,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/h)+g,E=Math.floor(l(t,h));try{i=v.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){i=m("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=n+h&&t<=a-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(i.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var S=/%\d?f/g;function E(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 a=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(a)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,a,i){if(a=_(a)&&a,!e)if("y"===r)e=i.year;else if("m"===r)e=i.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,h),n=w(Math.floor(r/f),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var a=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(t,r)+"\n"+E(i.dayMonthYear,t,n,a);e=i.dayMonth+"\n"+i.year}return E(e,t,n,a)};var L=3*h;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var a=Math.round(t/h)+g,i=v.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return e%12?i.add(o,e,"m"):i.add(o,e/12,"y"),(o.toJD()-g)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,a=0,i=0,s=0,l=0,c=_(e)&&v.getComponentMethod("calendars","getCal")(e),u=0;u0&&(r.push(a),a=[])}return a.length>0&&r.push(a),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+h*g}}function l(t,e,r,n,a){var i=n*t+a*e;if(i<0)return n*n+a*a;if(i>r){var o=n-t,s=a-e;return o*o+s*s}var l=n*e-a*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,a,i,o,c){if(s(t,e,r,n,a,i,o,c))return 0;var u=r-t,h=n-e,f=o-a,p=c-i,d=u*u+h*h,g=f*f+p*p,v=Math.min(l(u,h,d,a-t,i-e),l(u,h,d,o-t,c-e),l(f,p,g,t-a,e-i),l(f,p,g,r-a,n-i));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===a&&s===i||(n={},a=t,i=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)),h=t.getPointAtLength(o(r,e)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=f,f},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(t,e,r){var n,a,i=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),h=u;function f(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(a=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var a,i,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,h=0,f=0,p=s;h0?p=a:f=a,h++}return i}},{"./mod":726}],716:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),i=t("color-normalize"),o=t("../components/colorscale"),s=t("../components/color/attributes").defaultLine,l=t("./array").isArrayOrTypedArray,c=i(s),u=1;function h(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=i(t);return e.length?e:c}function p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,a,s,d,g,v=t.color,m=l(v),y=l(e),x=o.extractOpts(t),b=[];if(n=void 0!==x.colorscale?o.makeColorScaleFuncFromTrace(t):f,a=m?function(t,e){return void 0===t[e]?c:i(n(t[e]))}:f,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,m||y)for(var _=0;_o?s:a(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(a(t)&&t>=0&&t%1==0)},l.noop=t("./noop"),l.identity=t("./identity"),l.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var a=t.length,i=new Array(a),o=0;o=Math.pow(2,r)?a>10?(l.warn("randstr failed uniqueness"),c):t(e,r,n,(a||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,a,i,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(a-=s*Math.floor(a/s)),a<0?a=-1-a:a>=o&&(a=s-1-a),i+=t[a]*c[n];u[r]=i}return u},l.syncOrAsync=function(t,e,r){var n;function a(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(a).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,a=!1,i=!0;for(n=0;n0?e:0})},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var C=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,n){return C.test(n)?e[n]||"":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||"")})};var L={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return I.apply(L,arguments)};var P={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return I.apply(P,arguments)};var O=/^[:|\|]/;function I(t,e,r){var a=this,i=arguments;e||(e={});var o={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,s,c){var u,h,f,p;for(f=3;f=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(a=10*a+s-48),!l||!c){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var z=2e9;l.seedPseudoRandom=function(){z=2e9},l.pseudoRandom=function(){var t=z;return z=(69069*z+1)%4294967296,Math.abs(z-t)<429496729?l.pseudoRandom():z/4294967296},l.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},a=l.extractOption(t,e,"htx","hovertext");if(l.isValidTextValue(a))return n(a);var i=l.extractOption(t,e,"tx","text");return l.isValidTextValue(i)?n(i):void 0},l.isValidTextValue=function(t){return t||0===t},l.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;n2)return c[e]=2|c[e],f.set(t,null);if(h){for(o=e;o1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;ee/2?t-Math.round(t/e)*e:t}}},{}],727:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./array").isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,l=0,c=e.split(".");l/g),o=0;oi||c===a||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===a||li||c===a||cs)return!1;var u,h,f,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;uMath.max(h,v)||c>Math.max(f,m)))if(cu||Math.abs(n(o,f))>a)return!0;return!1},i.filter=function(t,e){var r=[t[0]],n=0,a=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{"../constants/numerical":695,"./matrix":725}],732:[function(t,e,r){(function(r){"use strict";var n=t("./show_no_webgl_msg"),a=t("regl");e.exports=function(t,e){var i=t._fullLayout,o=!0;return i._glcanvas.each(function(n){if(!n.regl&&(!n.pick||i._has("parcoords"))){try{n.regl=a({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&&this.addEventListener("webglcontextlost",function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})},!1)}}),o||n({container:i._glcontainer.node()}),o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":740,regl:503}],733:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;na.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var i,u,h=0,f=e.length,p=0,d=f>1?(e[f-1]-e[0])/(f-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);h90&&a.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,a=e[n]-e[0]||1,i=a/(n||1)/1e4,o=[e[0]],s=0;se[s]+i&&(a=Math.min(a,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:a}},r.roundUp=function(t,e,r){for(var n,a=0,i=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(e)||(e=!1),a(i[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":702,"fast-isnumeric":226}],742:[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":121}],743:[function(t,e,r){"use strict";var n=t("d3"),a=t("../lib"),i=t("../constants/xmlns_namespaces"),o=t("../constants/alignment").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,M){var S=t.text(),C=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(e&&e._promises||[]).push(new Promise(function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),i={fontSize:r};!function(t,e,r){var i,o,s,l;MathJax.Hub.Queue(function(){return o=a.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"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},function(){var r="math-output-"+a.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())a.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"!==i)return MathJax.Hub.setRenderer(i)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})}(C[2],i,function(n,a,i){L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return O(),void e();var l=L.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(o.node()),a&&a.node()&&o.node().insertBefore(a.node().cloneNode(!0),o.node().firstChild),o.attr({class:P,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=t.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var h=s(u,"width"),f=s(u,"height"),p=+t.attr("x")-h*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],d=-(r||s(t,"height"))/4;"y"===P[0]?(l.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-h/2,d-f/2]+")"}),o.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===P[0]?o.attr({x:t.attr("x"),y:d-f/2}):"a"===P[0]&&0!==P.indexOf("atitle")?o.attr({x:0,y:d}):o.attr({x:p,y:+t.attr("y")+d-f/2}),M&&M.call(t,l),e(l)})})):O(),t}function O(){L.empty()||(P=t.attr("class")+"-math",L.select("svg."+P).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(v," ");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(i.svg,"tspan");n.select(e).attr({class:"line",dy:c*o+"em"}),t.appendChild(e),r=e;var a=l;if(l=[{node:e}],a.length>1)for(var s=1;s doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else a.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),P=0;P|>|>)/g;var h={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"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},d="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=r.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;r.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\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&&E(n)}var A=/(^|;)\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"],a="...".length,i=t.split(m),o=[],s="",l=0,c=0;ca?o.push(u.substr(0,d-a)+"..."):o.push(u.substr(0,d));break}s=""}}return o.join("")};var M={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,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)):M[e])||t})}function C(t,e,r){var n,a,i,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},i="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:i()-c.left+"px","z-index":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function a(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var i=a("x",e),o=a("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:i,y:o})})},r.makeEditable=function(t,e){var r=e.gd,a=e.delegate,i=n.dispatch("edit","input","cancel"),o=a||t;if(t.style({"pointer-events":a?"none":"all"}),1!==t.size())throw new Error("boo");function s(){!function(){var a=n.select(r).select(".svg-container"),o=a.append("div"),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&&(u=t.attr("data-unformatted"));o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":s.fontFamily||"Arial","font-size":c,color:e.fill||s.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(u).call(C(t,a,e)).on("blur",function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,a=n.select(this).attr("class");(e=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(t,o)}).on("focus",function(){var t=this;r._editing=!0,n.select(document).on("mouseup",function(){if(n.event.target===t)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),i.cancel.call(t,this.textContent)):(i.input.call(t,this.textContent),n.select(this).call(C(t,a,e)))}).on("keydown",function(){13===n.event.which&&this.blur()}).call(l)}(),t.style({opacity:0});var a,s=o.attr("class");(a=s?"."+s.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(a).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,i,"on")}},{"../constants/alignment":688,"../constants/xmlns_namespaces":696,"../lib":719,d3:164}],744:[function(t,e,r){"use strict";var n={};function a(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var i=n[t],o=Date.now();if(!i){for(var s in n)n[s].tsi.ts+e?l():i.timer=setTimeout(function(){l(),i.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)a(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],745:[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":226}],746:[function(t,e,r){"use strict";var n=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,i=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=a[t.locationmode],n=e.objects[r];return i(e,n).features}},{"../plots/geo/constants":795,"topojson-client":541}],747:[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"}}},{}],748:[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"}}},{}],749:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,a=n.layoutArrayContainers,i=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 i=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.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&&i.warn("Full array edits are incompatible with other edits",h);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",h,y),!0;e.set(y)}return!g&&(f(v,m),p(t),!0)}var x,b,_,w,k,T,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(m,h).get(),P=[],O=-1,I=C.length;for(x=0;xC.length-(A?0:1))i.warn("index out of range",h,_);else if(void 0!==T)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",h,_),c(T)?P.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):i.warn("Unrecognized full object edit value",h,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(P[x],1),L&&L.splice(P[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(f(v,m),d!==a){var z;if(-1===O)z=S;else{for(I=Math.max(C.length,I),z=[],x=0;x=O);x++)z.push(_);for(x=O;x=t.data.length||a<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(a,n+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),z(t,e,"currentIndices"),"undefined"==typeof r||Array.isArray(r)||(r=[r]),"undefined"!=typeof r&&z(t,r,"newIndices"),"undefined"!=typeof r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(t,e,r,n,i){!function(t,e,r,n){var a=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if("undefined"==typeof r)throw new Error("indices must be an integer or array of integers");for(var i in z(t,r,"indices"),e){if(!Array.isArray(e[i])||e[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==e[i].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 i,l,c,u,h,f=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=I(r,t.data.length-1),e)for(var g=0;g-1?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 H(t,e,r){if(t=o.getGraphDiv(t),k.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(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 a=J(t,n),i=a.flags;i.calc&&(t.calcdata=void 0);var s=[f.previousPromises];i.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(G(t,i,a)||f.supplyDefaults(t),i.legend&&s.push(T.doLegend),i.layoutstyle&&s.push(T.layoutStyles),i.axrange&&Y(s,a.rangesAltered),i.ticks&&s.push(T.doTicksRelayout),i.modebar&&s.push(T.doModeBar),i.camera&&s.push(T.doCamera),i.colorbars&&s.push(T.doColorBars),s.push(C)),s.push(f.rehover,f.redrag),c.add(t,H,[t,a.undoit],H,[t,a.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then(function(){return t.emit("plotly_relayout",a.eventData),t})}function G(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var a in e)if("axrange"!==a&&e[a])return!1;for(var i in r.rangesAltered){var o=d.id2name(i),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==i){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function Y(t,e){var r=e?function(t){var r=[],n=!0;for(var a in e){var i=d.getFromId(t,a);if(r.push(a),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o);i.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function J(t,e){var r,n,a,i=t.layout,l=t._fullLayout,c=l._guiEditing,f=j(l._preGUI,c),p=Object.keys(e),g=d.list(t),v=o.extendDeepAll({},e),m={};for(q(e),p=Object.keys(e),n=0;n0&&"string"!=typeof I.parts[D];)D--;var R=I.parts[D],F=I.parts[D-1]+"."+R,B=I.parts.slice(0,D).join("."),V=s(t.layout,B).get(),U=s(l,B).get(),H=I.get();if(void 0!==z){T[O]=z,S[O]="reverse"===R?z:N(H);var G=h.getLayoutValObject(l,I.parts);if(G&&G.impliedEdits&&null!==z)for(var Y in G.impliedEdits)E(o.relativeAttr(O,Y),G.impliedEdits[Y]);if(-1!==["width","height"].indexOf(O))if(z){E("autosize",null);var J="height"===O?"width":"height";E(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",z?null:l.width),E("height",z?null:l.height);else if(F.match(W))P(F),s(l,B+"._inputRange").set(null);else if(F.match(X)){P(F),s(l,B+"._inputRange").set(null);var Q=s(l,B).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===R){var $=V,tt="linear"===U.type&&"log"===z,et="log"===U.type&&"linear"===z;if(tt||et){if($&&$.range)if(U.autorange)tt&&($.range=$.range[1]>$.range[0]?[1,2]:[2,1]);else{var rt=$.range[0],nt=$.range[1];tt?(rt<=0&&nt<=0&&E(B+".autorange",!0),rt<=0?rt=nt/1e6:nt<=0&&(nt=rt/1e6),E(B+".range[0]",Math.log(rt)/Math.LN10),E(B+".range[1]",Math.log(nt)/Math.LN10)):(E(B+".range[0]",Math.pow(10,rt)),E(B+".range[1]",Math.pow(10,nt)))}else E(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,U,z,E),u.getComponentMethod("images","convertCoords")(t,U,z,E)}else E(B+".autorange",!0),E(B+".range",null);s(l,B+"._inputRange").set(null)}else if(R.match(M)){var at=s(l,O).get(),it=(z||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,at,it,E),u.getComponentMethod("images","convertCoords")(t,at,it,E)}var ot=w.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var st=ot.property,lt=G||{editType:"calc"};""!==n&&""===st&&(w.isAddVal(z)?S[O]=null:w.isRemoveVal(z)?S[O]=(s(i,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,lt),m[r]||(m[r]={});var ct=m[r][n];ct||(ct=m[r][n]={}),ct[st]=z,delete e[O]}else"reverse"===R?(V.range?V.range.reverse():(E(B+".autorange",!0),V.range=[1,0]),U.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===z||"select"===z)&&"lasso"!==H&&"select"!==H?_.plot=!0:l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,I.set(z))}}for(r in m){w.applyContainerArrayChanges(t,f(i,r),m[r],_,f)||(_.plot=!0)}var ut=l._axisConstraintGroups||[];for(C in L)for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function at(t,e){for(var r=0;r=a.length?a[0]:a[t]:a}function l(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}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(i,u){function h(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&h()};e()}var d,g,v=0;function m(t){return Array.isArray(a)?v>=a.length?t.transitionOpts=a[v]:t.transitionOpts=a[0]:t.transitionOpts=a,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&TT)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var a=0;a=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&"number"==typeof m&&y&&Se.index?-1:t.index=0;n--){if("number"==typeof(a=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=e[r],i.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:a[n]});var l=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,i];return c&&c.add(t,l,h,u,p),f.modifyFrames(t,i)},r.addTraces=function t(e,n,a){e=o.getGraphDiv(e);var i,s,l=[],u=r.deleteTraces,h=t,f=[e,l],p=[e,n];for(function(t,e,r){var n,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!k(o))return!1;t=i[a][o]}else t=i[a]}else t=i}}return t}function k(t){return t===Math.round(t)&&t>=0}function T(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?"data_array"===t.valType?(t.role="data",n[e+"src"]={valType:"string",editType:"none"}):!0===t.arrayOk&&(n[e+"src"]={valType:"string",editType:"none"}):g(t)&&(t.role="object")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[b];if(!n)return;delete t[b],r[e]={items:{}},r[e].items[n]=t,r[e].role="object"})}(t),function(t){!function t(e){for(var r in e)if(g(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n=l.length)return!1;a=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)a=u[o];else{var h=t._module;if(h||(h=(n.modules[t.type||i.type.dflt]||{})._module),!h)return!1;if(!(a=(r=h.attributes)&&r[o])){var f=h.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return w(a,e,s)},r.getLayoutValObject=function(t,e){return w(function(t,e){var r,a,i,s,l=t._basePlotModules;if(l){var c;for(r=0;r=a&&(r._input||{})._templateitemname;s&&(o=a);var l,c=e+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][i]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function f(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:f,applyUpdate:function(e,r){e&&h(e,r);var a=f();for(var i in a)n.nestedProperty(t,i).set(a[i])}}}},{"../lib":719,"../plots/attributes":764}],758:[function(t,e,r){"use strict";var n=t("d3"),a=t("../registry"),i=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),h=t("../components/modebar"),f=t("../plots/cartesian/axes"),p=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,v=d.clean,m=t("../plots/cartesian/autorange").doAutoRange,y="start",x="middle",b="end";function _(t,e,r){for(var n=0;n=t[1]||a[1]<=t[0])&&(i[0]e[0]))return!0}return!1}function w(t){var e,a,s,u,d,g,v=t._fullLayout,m=v._size,y=m.p,x=f.list(t,"",!0);if(v._paperdiv.style({width:t._context.responsive&&v.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":v.width+"px",height:t._context.responsive&&v.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":v.height+"px"}).selectAll(".main-svg").call(c.setSize,v.width,v.height),t._context.setBackground(t,v.paper_bgcolor),r.drawMainTitle(t),h.manage(t),!v._has("cartesian"))return i.previousPromises(t);function b(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-y-n:e._offset+e._length+y+n:m.t+m.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+y+n:e._offset-y-n:m.l+m.w*(t.position||0)+n%1}for(e=0;ek?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var i=e[n],o=p(e,n,r);a(i)?(Array.isArray(e)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),t(i,o)):Array.isArray(i)&&d(i)&&t(i,o)}}({data:v,layout:f},""),u.length)return u.map(g)}},{"../lib":719,"../plots/attributes":764,"../plots/plots":828,"./plot_config":755,"./plot_schema":756,"./plot_template":757}],760:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./plot_api"),i=t("../lib"),o=t("../snapshot/helpers"),s=t("../snapshot/tosvg"),l=t("../snapshot/svgtoimg"),c={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(t,e){var r,u,h,f;function p(t){return!(t in e)||i.validate(e[t],c[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},h=t.config||{},f={}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),h=t._context,f=t._fullLayout||{}),!p("width")&&null!==e.width||!p("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!p("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var d={};function g(t,r){return i.coerce(e,d,c,t,r)}var v=g("format"),m=g("width"),y=g("height"),x=g("scale"),b=g("setBackground"),_=g("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=i.extendFlat({},u);m?k.width=m:null===e.width&&n(f.width)&&(k.width=f.width),y?k.height=y:null===e.height&&n(f.height)&&(k.height=f.height);var T=i.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=o.getRedrawFunc(w);function M(){return new Promise(function(t){setTimeout(t,o.getDelay(w._fullLayout))})}function S(){return new Promise(function(t,e){var r=s(w,v,x),n=w._fullLayout.width,c=w._fullLayout.height;if(a.purge(w),document.body.removeChild(w),"svg"===v)return t(_?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=i.randstr(),l({format:v,width:n,height:c,scale:x,canvas:u,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){a.plot(w,r,k,T).then(A).then(M).then(S).then(function(e){t(function(t){return _?t.replace(o.IMAGE_URL_PREFIX,""):t}(e))}).catch(function(t){e(t)})})}},{"../lib":719,"../snapshot/helpers":852,"../snapshot/svgtoimg":854,"../snapshot/tosvg":856,"./plot_api":754,"fast-isnumeric":226}],761:[function(t,e,r){"use strict";var n=t("../lib"),a=t("../plots/plots"),i=t("./plot_schema"),o=t("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,a,i,o){o=o||[];for(var h=Object.keys(t),f=0;fx.length&&a.push(p("unused",i,m.concat(x.length)));var T,A,M,S,E,C=x.length,L=Array.isArray(k);if(L&&(C=Math.min(C,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&a.push(p("unused",i,m.concat(A,x[A].length)));var P=x[A].length;for(T=0;T<(L?Math.min(P,k[A].length):P);T++)M=L?k[A][T]:k,S=y[A][T],E=x[A][T],n.validate(S,M)?E!==S&&E!==+S&&a.push(p("dynamic",i,m.concat(A,T),S,E)):a.push(p("value",i,m.concat(A,T),S))}else a.push(p("array",i,m.concat(A),y[A]));else for(A=0;A1&&f.push(p("object","layout"))),a.supplyDefaults(d);for(var g=d._fullData,v=r.length,m=0;m0&&((b=A-o(v)-o(m))>M?_/b>S&&(y=v,x=m,S=_/b):_/A>S&&(y={val:v.val,pad:0},x={val:m.val,pad:0},S=_/A));if(f===p){var E=f-1,C=f+1;if(k)if(0===f)i=[0,1];else{var L=(f>0?h:u).reduce(function(t,e){return Math.max(t,o(e))},0),P=f/(1-Math.min(.5,L/A));i=f>0?[0,P]:[P,0]}else i=T?[Math.max(0,E),Math.max(1,C)]:[E,C]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):T&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),i=[y.val-S*o(y),x.val+S*o(x)];return d&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function l(t){var e=t._length/20;return"domain"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function c(t,e){var r,n,a,i=e._id,o=t._fullData,s=t._fullLayout,l=[],c=[];function f(t,e){for(r=0;r=r&&(c.extrapad||!o)){s=!1;break}a(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=i&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function p(t){return n(t)&&Math.abs(t)=e}e.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(t,e){if(e.setScale(),e.autorange){e.range=s(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var r=e._input,n={};n[e._attr+".range"]=e.range,n[e._attr+".autorange"]=e.autorange,o.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,n),r.range=e.range.slice(),r.autorange=e.autorange}var i=e._anchorAxis;if(i&&i.rangeslider){var l=i.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=s(t,e)),i._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var a,o,s,l,c,f,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,k=!1;function T(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=T((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),M=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(a=0;a0&&(g=o),o>v&&o-i&&(g=o),o>v&&o=P;a--)L(a);return{min:m,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":695,"../../lib":719,"../../registry":848,"fast-isnumeric":226}],767:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../components/titles"),u=t("../../components/color"),h=t("../../components/drawing"),f=t("./layout_attributes"),p=t("./clean_ticks"),d=t("../../constants/numerical"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t("../../constants/alignment").MID_SHIFT,T=t("../../constants/alignment").LINE_SPACING,A=t("../../constants/alignment").OPPOSITE_SIDE,M=e.exports={};M.setConvert=t("./set_convert");var S=t("./axis_autotype"),E=t("./axis_ids");M.id2name=E.id2name,M.name2id=E.name2id,M.cleanId=E.cleanId,M.list=E.list,M.listIds=E.listIds,M.getFromId=E.getFromId,M.getFromTrace=E.getFromTrace;var C=t("./autorange");M.getAutoRange=C.getAutoRange,M.findExtremes=C.findExtremes,M.coerceRef=function(t,e,r,n,a,i){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=l[0]||i),i||(i=a),u[c]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(t,e,u,c)},M.coercePosition=function(t,e,r,n,a,i){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(a,i);else{var c=M.getFromId(e,n);l=r(a,i=c.fraction2r(i)),o=c.cleanPos}t[a]=o(l)},M.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:M.getFromId(e,r).cleanPos)(t)},M.redrawComponents=function(t,e){e=e||M.listIds(t);var r=t._fullLayout;function n(n,a,i,s){for(var l=o.getComponentMethod(n,a),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},M.saveRangeInitial=function(t,e){for(var r=M.list(t,"",!0),n=!1,a=0;a.3*f||u(n)||u(i))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?t=M.tickIncrement(t,"M6","reverse")+1.5*m:i.exactMonths>.8?t=M.tickIncrement(t,"M1","reverse")+15.5*m:t-=m/2;var l=M.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,i)),v=x,0;v<=u;)v=M.tickIncrement(v,y,!1,i),0;return{start:e.c2r(x,0,i),end:e.c2r(v,0,i),size:y,_dataSpan:u-c}},M.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type||"multicategory"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),"radialaxis"===t._name&&(n*=2)),"array"===t.tickmode&&(n*=100),M.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),V(t)},M.calcTicks=function(t){M.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if("array"===t.tickmode)return function(t){var e=t.tickvals,r=t.ticktext,n=new Array(e.length),a=s.simpleMap(t.range,t.r2l),i=1.0001*a[0]-1e-4*a[1],o=1.0001*a[1]-1e-4*a[0],l=Math.min(i,o),c=Math.max(i,o),u=0;Array.isArray(r)||(r=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var f=0;fl&&p=n:h<=n)&&!(o.length>u||h===c);h=M.tickIncrement(h,t.dtick,i,t.calendar)){c=h;var f=!1;l&&h!==(0|h)&&(f=!0),o.push({minor:f,value:h})}rt(t)&&360===Math.abs(e[1]-e[0])&&o.pop(),t._tmax=(o[o.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;for(var p=new Array(o.length),d=0;d10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=m&&i<=10||e>=15*m)t._tickround="d";else if(e>=x&&i<=16||e>=y)t._tickround="M";else if(e>=b&&i<=19||e>=x)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,o)-20,t._tickround<0&&(t._tickround=4)}}else if(a(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);a(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(H(t.exponentformat)&&!G(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function U(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}}M.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar);var i=2*e;i>g?(e/=g,r=n(10),t.dtick="M"+12*j(e,r,I)):i>v?(e/=v,t.dtick="M"+j(e,1,z)):i>m?(t.dtick=j(e,m,R),t.tick0=s.dateTick0(t.calendar,!0)):i>y?t.dtick=j(e,y,z):i>x?t.dtick=j(e,x,D):i>b?t.dtick=j(e,b,D):(r=n(10),t.dtick=j(e,r,I))}else if("log"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick="L"+j(e,r,I)}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))):rt(t)?(t.tick0=0,r=1,t.dtick=j(e,r,N)):(t.tick0=0,r=n(10),t.dtick=j(e,r,I));if(0===t.dtick&&(t.dtick=1),!a(t.dtick)&&"string"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}},M.tickIncrement=function(t,e,r,i){var o=r?-1:1;if(a(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,i);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?B:F,h=t+.01*o,f=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)},M.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),i=r[1]"+l,t._prevDateHead=l));e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,i){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);"never"===i&&(i="");n&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)e.text=Y(Math.pow(10,l),t,i,n);else if(a(o)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),f=Math.abs(h),p=t.exponentformat;"power"===p||H(p)&&G(h)?(e.text=0===h?1:1===h?"10":"10"+(h>1?"":_)+f+"",e.fontSize*=1.25):("e"===p||"E"===p)&&f>2?e.text="1"+p+(h>0?"+":_)+f:(e.text=Y(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),a=t._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?e.text=o+" - "+i:(e.text=i,e.text2=o)}(t,o,r):rt(t)?function(t,e,r,n,a){if("radians"!==t.thetaunit||r)e.text=Y(e.x,t,a,n);else{var i=e.x/180;if(0===i)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,a=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)e.text=Y(s.deg2rad(e.x),t,a,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=_+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,a){"never"===a?a="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide");e.text=Y(e.x,t,a,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 v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},M.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return M.hoverLabelText(t,e)+" - "+M.hoverLabelText(t,r);var n="log"===t.type&&e<=0,a=M.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":_+a:a};var q=["f","p","n","\u03bc","m","","k","M","G","T"];function H(t){return"SI"===t||"B"===t}function G(t){return t>14||t<-15}function Y(t,e,r,n){var i=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=M.getTickFormat(e),h=e.separatethousands;if(n){var f={exponentformat:l,dtick:"none"===e.showexponent?e.dtick:a(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};V(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"
":"B"===l&&9===c?t+="B":H(l)&&(t+=q[c/3+5]));return i?_+t:t}function W(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function X(t,e){var r=t.l2p(e);return r>1&&r=0,i=u(t,e[1])<=0;return(r||a)&&(n||i)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(a)))){r=n;break}break;case"log":for(e=0;e0?r.bottom-h:0,f)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var d=[0,1];if("x"===g){if("b"===c?n[c]=e._depth:(n[c]=e._depth=Math.max(r.width>0?h-r.top:0,f),d.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var y=e._offset-r.left;y>0&&(n.xl=0,n.l=y)}}else if("l"===c?n[c]=e._depth=Math.max(r.height>0?h-r.left:0,f):(n[c]=e._depth=Math.max(r.height>0?r.right-h:0,f),d.reverse()),r.height>0){var x=r.bottom-(e._offset+e._length);x>0&&(n.yb=0,n.b=x);var b=e._offset-r.top;b>0&&(n.yt=1,n.t=b)}if(n[v]="free"===e.anchor?e.position:e._anchorAxis.domain[d[0]],e.title.text!==p._dfltTitle[g]){var _=(e.title.text.match(l.BR_TAG_ALL)||[]).length;n[c]+=_?e.title.font.size*(_+1)*T:e.title.font.size}e.mirror&&"free"!==e.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(a[u]+=f),!0===e.mirror||"ticks"===e.mirror?a[v]=e._anchorAxis.domain[d[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(a[v]=[e._counterDomainMin,e._counterDomainMax][d[1]]))}rt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),i.autoMargin(t,J(e),n),i.autoMargin(t,K(e),a),i.autoMargin(t,Q(e),s)}),r.skipTitle||rt&&"bottom"===e.side||$.push(function(){return function(t,e){var r,n=t._fullLayout,a=e._id,i=a.charAt(0),o=e.title.font.size;if("multicategory"===e.type)r=e._depth;else{r=10+1.5*o+(e.linewidth?e.linewidth-1:0)}var s,l,u,f,p=M.getPxPosition(t,e);"x"===i?(l=e._offset+e._length/2,u="top"===e.side?-r-o*(e.showticklabels?1:0):r+o*(e.showticklabels?1.5:.5),u+=p):(u=e._offset+e._length/2,l="right"===e.side?r+o*(e.showticklabels?1:.5):-r-o*(e.showticklabels?.5:0),l+=p,s={rotate:"-90",offset:0});if("multicategory"!==e.type){var d=e._selections[e._id+"tick"];if(f={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var g=h.getTranslate(d.node().parentNode);f.offsetLeft=g.x,f.offsetTop=g.y}}return c.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[i],avoid:f,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(t,e)}),s.syncOrAsync($)}},M.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],n=t.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==t.ticks==("x"===e)&&(a=a.map(function(t){return-t})),a},M.makeTransFn=function(t){var e=t._id.charAt(0),r=t._offset;return"x"===e?function(e){return"translate("+(r+t.l2p(e.x))+",0)"}:function(e){return"translate(0,"+(r+t.l2p(e.x))+")"}},M.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var a=t._id.charAt(0),i=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+i*r)+"v"+n*r:"M"+(e+i*r)+",0h"+n*r},M.makeLabelFns=function(t,e,r){var n=t._id.charAt(0),i="boundaries"!==t.tickson&&"outside"===t.ticks,o=0,l=0;if(i&&(o+=t.ticklen),r&&"outside"===t.ticks){var c=s.deg2rad(r);o=t.ticklen*Math.cos(c)+1,l=t.ticklen*Math.sin(c)}t.showticklabels&&(i||t.showline)&&(o+=.2*t.tickfont.size);var u,h,f,p,d={labelStandoff:o+=(t.linewidth||1)/2,labelShift:l};return"x"===n?(p="bottom"===t.side?1:-1,u=l*p,h=e+o*p,f="bottom"===t.side?1:-.2,d.xFn=function(t){return t.dx+u},d.yFn=function(t){return t.dy+h+t.fontSize*f},d.anchorFn=function(t,e){return a(e)&&0!==e&&180!==e?e*p<0?"end":"start":"middle"},d.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side?-n:0}):"y"===n&&(p="right"===t.side?1:-1,u=o,h=-l*p,f=90===Math.abs(t.tickangle)?.5:0,d.xFn=function(t){return t.dx+e+(u+t.fontSize*f)*p},d.yFn=function(t){return t.dy+h+t.fontSize*k},d.anchorFn=function(e,r){return a(r)&&90===Math.abs(r)?"middle":"right"===t.side?"start":"end"},d.heightFn=function(e,r,n){return(r*="left"===t.side?1:-1)<-30?-n:r<30?-.5*n:0}),d},M.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",a=r.layer.selectAll("path."+n).data(e.ticks?r.vals:[],W);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,e.tickcolor).style("stroke-width",h.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},M.drawGrid=function(t,e,r){r=r||{};var n=e._id+"grid",a=r.vals,i=r.counterAxis;if(!1===e.showgrid)a=[];else if(i&&M.shouldShowZeroLine(t,e,i))for(var o="array"===e.tickmode,s=0;s1)for(n=1;n2*o}(t,e)?"date":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(t)?"category":function(t){if(!t)return!1;for(var e=0;en?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n0;o&&(a="array");var s,l=r("categoryorder",a);"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,a,i=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nl*x)||k)for(r=0;rI&&RP&&(P=R);p/=(P-L)/(2*O),L=c.l2r(L),P=c.l2r(P),c.range=c._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function z(t,e,r,n,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function D(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function R(t,e,r,n,a,i){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),F(t,e,a,i)}function F(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 B(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(t){S&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),S=!1)}function j(t){return"lasso"===t||"select"===t}function V(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,M)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function U(t,e,r,n){for(var a,i,o,l,c=!1,u={},h={},f=0;f-1&&w(a,t,X,Z,e.id,St),i.indexOf("event")>-1&&h.click(t,a,e.id);else if(1===r&&pt){var s=S?G:F,c="s"===S||"w"===E?0:1,u=s._name+".range["+c+"]",f=function(t,e){var r,a=t.range[e],i=Math.abs(a-t.range[1-e]);return"date"===t.type?a:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,a))):(r=Math.floor(Math.log(Math.abs(a))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,n.format("."+String(r)+"g")(a))}(s,c),p="left",d="middle";if(s.fixedrange)return;S?(d="n"===S?"top":"bottom","right"===s.side&&(p="right")):"e"===E&&(p="right"),t._context.showAxisRangeEntryBoxes&&n.select(vt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:d}).on("edit",function(e){var r=s.d2r(e);void 0!==r&&o.call("_guiRelayout",t,u,r)})}}function Lt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(Q,e+mt)),a=Math.max(0,Math.min($,r+yt)),i=Math.abs(n-mt),o=Math.abs(a-yt);function s(){kt="",xt.r=xt.l,xt.t=xt.b,At.attr("d","M0,0Z")}if(xt.l=Math.min(mt,n),xt.r=Math.max(mt,n),xt.t=Math.min(yt,a),xt.b=Math.max(yt,a),tt.isSubplotConstrained)i>M||o>M?(kt="xy",i/Q>o/$?(o=i*$/Q,yt>a?xt.t=yt-o:xt.b=yt+o):(i=o*Q/$,mt>n?xt.l=mt-i:xt.r=mt+i),At.attr("d",V(xt))):s();else if(et.isSubplotConstrained)if(i>M||o>M){kt="xy";var l=Math.min(xt.l/Q,($-xt.b)/$),c=Math.max(xt.r/Q,($-xt.t)/$);xt.l=l*Q,xt.r=c*Q,xt.b=(1-l)*$,xt.t=(1-c)*$,At.attr("d",V(xt))}else s();else!nt||og[1]-1/4096&&(e.domain=s),a.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":719,"fast-isnumeric":226}],783:[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 a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*r;t.range=t._input.range=[t.l2r(i+(a[0]-i)*e),t.l2r(i+(a[1]-i)*e)]}},{"../../constants/alignment":688}],784:[function(t,e,r){"use strict";var n=t("polybooljs"),a=t("../../registry"),i=t("../../components/color"),o=t("../../components/fx"),s=t("../../lib"),l=t("../../lib/polygon"),c=t("../../lib/throttle"),u=t("../../components/fx/helpers").makeEventData,h=t("./axis_ids").getFromId,f=t("../../lib/clear_gl_canvases"),p=t("../../plot_api/subroutines").redrawReglTraces,d=t("./constants"),g=d.MINSELECT,v=l.filter,m=l.tester;function y(t){return t._id}function x(t,e,r,n,a,i,o){var s,l,c,u,h,f,p,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){k(t,e,i);var x=function(t,e){var r,n,a=t[0],i=-1,o=[];for(n=0;n0?function(t,e){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(a=0;a1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(s)&&(f=S(x))){for(o&&o.remove(),g=0;g0?"M"+a.join("M")+"Z":"M0,0Z",e.attr("d",n)}function S(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,a=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(a)>-1}function E(t,e,r){var n,i,o,s;for(n=0;n-1&&x(e,S,a.xaxes,a.yaxes,a.subplot,a,G),"event"===r&&S.emit("plotly_selected",void 0);o.click(S,e)}).catch(s.error)},a.doneFn=function(){W.remove(),c.done(X).then(function(){c.clear(X),a.gd.emit("plotly_selected",_),p&&a.selectionDefs&&(p.subtract=H,a.selectionDefs.push(p),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,f)),a.doneFnCompleted&&a.doneFnCompleted(Z)}).catch(s.error)}},clearSelect:L,selectOnClick:x}},{"../../components/color":594,"../../components/fx":632,"../../components/fx/helpers":629,"../../lib":719,"../../lib/clear_gl_canvases":704,"../../lib/polygon":731,"../../lib/throttle":744,"../../plot_api/subroutines":758,"../../registry":848,"./axis_ids":770,"./constants":773,polybooljs:474}],785:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,c=i.ensureNumber,u=i.isArrayOrTypedArray,h=t("../../constants/numerical"),f=h.FP_SAFE,p=h.BADNUM,d=h.LOG_CLIP,g=t("./constants"),v=t("./axis_ids");function m(t){return Math.pow(10,t)}function y(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",h=r.charAt(0);function x(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],a=t.range[1];return.5*(n+a-2*d*Math.abs(n-a))}return p}function b(e,r,n){var o=l(e,n||t.calendar);if(o===p){if(!a(e))return p;e=+e;var s=Math.floor(10*i.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function _(e,r,n){return s(e,r,n||t.calendar)}function w(e){return t._categories[Math.round(e)]}function k(e){if(y(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 p}function T(e){if(t._categoriesMap)return t._categoriesMap[e]}function A(t){var e=T(t);return void 0!==e?e:a(t)?+t:void 0}function M(e){return a(e)?n.round(t._b+t._m*e,2):p}function S(e){return(e-t._b)/t._m}t.c2l="log"===t.type?x:c,t.l2c="log"===t.type?m:c,t.l2p=M,t.p2l=S,t.c2p="log"===t.type?function(t,e){return M(x(t,e))}:M,t.p2c="log"===t.type?function(t){return m(S(t))}:S,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=S,t.cleanPos=c):"log"===t.type?(t.d2r=t.d2l=function(t,e){return x(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=x,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(S(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=S,t.cleanPos=c):"date"===t.type?(t.d2r=t.r2d=i.identity,t.d2c=t.r2c=t.d2l=t.r2l=b,t.c2d=t.c2r=t.l2d=t.l2r=_,t.d2p=t.r2p=function(e,r,n){return t.l2p(b(e,0,n))},t.p2d=t.p2r=function(t,e,r){return _(S(t),e,r)},t.cleanPos=function(e){return i.cleanDate(e,p,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=k,t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:c(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=T,t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:c(t)},t.setupMultiCategory=function(n){var a,o,s=t._traceIndices,l=e._axisMatchGroups;if(l&&l.length&&0===t._categories.length)for(a=0;af&&(s[n]=f),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else i.nestedProperty(t,e).set(o)},t.setScale=function(r){var n=e._size;if(t.overlaying){var a=v.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var i=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(i);var s=t.r2l(t[i][0],o),l=t.r2l(t[i][1],o);if("y"===h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.makeCalcdata=function(e,r){var n,a,o,s,l=t.type,c="date"===l&&e[r+"calendar"];if(r in e){if(n=e[r],s=e._length||i.minRowLength(n),i.isTypedArray(n)&&("linear"===l||"log"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}if("multicategory"===l)return function(t,e){for(var r=new Array(e),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 v(e,r){var n=e.plotinfo,a=n.xaxis,l=n.yaxis,c=a._length,u=l._length,h=!!e.xr1,f=!!e.yr1,p=[];if(h){var d=i.simpleMap(e.xr0,a.r2l),g=i.simpleMap(e.xr1,a.r2l),v=d[1]-d[0],m=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*m/v),a.range[0]=a.l2r(d[0]*(1-r)+r*g[0]),a.range[1]=a.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(f){var y=i.simpleMap(e.yr0,l.r2l),x=i.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]=a.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,a,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[a._id,l._id]);var w=h?c/p[2]:1,k=f?u/p[3]:1,T=h?p[0]:0,A=f?p[1]:0,M=h?p[0]/p[2]*c:0,S=f?p[1]/p[3]*u:0,E=a._offset-M,C=l._offset-S;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},{"../../components/drawing":615,"../../lib":719,"../../registry":848,"./axes":767,d3:164}],790:[function(t,e,r){"use strict";var n=t("../../registry").traceIs,a=t("./axis_autotype");function i(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=i(t),a=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return a&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}e.exports=function(t,e,r,s){"-"===r("type",(s.splomStash||{}).type)&&(!function(t,e){if("-"!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf("scene")&&(r=s);var l=function(t,e,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[e])return a;if((a[r+"axis"]||r)===e){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(e,r,s);if(!l)return;if("histogram"===l.type&&s==={v:"y",h:"x"}[l.orientation||"v"])return void(t.type="linear");var c,u=s+"calendar",h=l[u],f={noMultiCategory:!n(l,"cartesian")||n(l,"noMultiCategory")};if(o(l,s)){var p=i(l),d=[];for(c=0;c0?".":"")+i;a.isPlainObject(o)?l(o,e,s,n+1):e(s,i,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){i(t,c,s.cache),s.check=function(){if(l){var e=i(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"],h=0;ha*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],a=t[1][1]-t[0][1],i=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),i&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),a/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(a-s*(o[1][1]+o[0][1]))/2;return i&&r.clipExtent(i),r.scale(150*s).translate([l,c])},r.precision(g.precision),a&&r.clipAngle(a-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var h=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],f=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,a=t[1]-r,i=e[0]+r,o=e[1]-r;n>0&&a<0&&(a+=360);var s=(a-n)/4;return{type:"Polygon",coordinates:[[[n,i],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[a,o],[a,i],[a-s,i],[a-2*s,i],[a-3*s,i],[n,i]]]}}(f.range,p.range);u.fitExtent(h,d);var v=this.bounds=u.getBounds(d),m=this.fitScale=u.scale(),y=u.translate();if(!isFinite(v[0][0])||!isFinite(v[0][1])||!isFinite(v[1][0])||!isFinite(v[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=["projection.rotation","center","lonaxis.range","lataxis.range"],_="Invalid geo settings, relayout'ing to default view.",w={},k=0;k-1&&p(n.event,i,[r.xaxis],[r.yaxis],r.id,g),c.indexOf("event")>-1&&l.click(i,n.event))})}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,a="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",a),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(s.setClipUrl,a,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"},u.setConvert(t.mockAxis,r)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale}:t._isClipped?this.viewInitial={"projection.scale":r.scale,"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale,"projection.rotation.lon":n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function a(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",a).attr("transform",n)}},{"../../components/color":594,"../../components/dragelement":612,"../../components/drawing":615,"../../components/fx":632,"../../lib":719,"../../lib/topojson_utils":746,"../../registry":848,"../cartesian/axes":767,"../cartesian/select":784,"../plots":828,"./constants":795,"./projections":800,"./zoom":801,d3:164,"topojson-client":541}],797:[function(t,e,r){"use strict";var n=t("../../plots/get_data").getSubplotCalcData,a=t("../../lib").counterRegex,i=t("./geo"),o="geo",s=a(o),l={};l[o]={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,a=e._subplots[o],s=0;s0&&w<0&&(w+=360);var k,T,A,M=(_+w)/2;if(!c){var S=u?s.projRotate:[M,0,0];k=r("projection.rotation.lon",S[0]),r("projection.rotation.lat",S[1]),r("projection.rotation.roll",S[2]),r("showcoastlines",!u)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean")&&r("oceancolor")}(c?(T=-96.6,A=38.7):(T=u?M:k,A=(b[0]+b[1])/2),r("center.lon",T),r("center.lat",A),h)&&r("projection.parallels",s.projParallels||[0,60]);r("projection.scale"),r("showland")&&r("landcolor"),r("showlakes")&&r("lakecolor"),r("showrivers")&&(r("rivercolor"),r("riverwidth")),r("showcountries",u&&"usa"!==i)&&(r("countrycolor"),r("countrywidth")),("usa"===i||"north america"===i&&50===n)&&(r("showsubunits",!0),r("subunitcolor"),r("subunitwidth")),u||r("showframe",!0)&&(r("framecolor"),r("framewidth")),r("bgcolor")}e.exports=function(t,e,r){n(t,e,r,{type:"geo",attributes:i,handleDefaults:s,partition:"y"})}},{"../subplot_defaults":842,"./constants":795,"./layout_attributes":798}],800:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var a=c[e.type];return t.geo.stream(e,n(a)),a.result()}t.geo.project=function(t,e){var a=e.stream;if(!a)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,a)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},a=[],i=[],o={point:function(t,e){a.push([t,e])},result:function(){var t=a.length?a.length<2?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a}:null;return a=[],t}},s={lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){a.length&&(i.push(a),a=[])},result:function(){var t=i.length?i.length<2?{type:"LineString",coordinates:i[0]}:{type:"MultiLineString",coordinates:i}:null;return i=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){var t=a.length;if(t){do{a.push(a[0].slice())}while(++t<4);i.push(a),a=[]}},polygonEnd:u,result:function(){if(!i.length)return null;var t=[],e=[];return i.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++rn^p>n&&r<(f-c)*(n-u)/(p-u)+c&&(a=!a)}return a}(t[0],r))return t.push(e),!0})||t.push([e])}),i=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var h=1e-6,f=h*h,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),v=180/p;function m(t){return t>1?d:t<-1?-d:Math.asin(t)}function y(t){return t>1?0:t<-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>h;n++){var i=Math.cos(e);e-=a=(e+Math.sin(e)*(i+2)-r)/(2*i*(1+i))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function a(t,r){for(var a=r<0?-1:1,i=n[+(r<0)],o=0,s=i.length-1;oi[o][2][0];++o);var l=e(t-i[o][1][0],r);return l[0]+=e(i[o][1][0],a*r>a*i[o][0][1]?i[o][0][1]:r)[0],l}e.invert&&(a.invert=function(t,i){for(var o=r[+(i<0)],s=n[+(i<0)],c=0,u=o.length;c=0;--a){var o=n[1][a],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,h=180*o[2][0]/p,f=180*o[2][1]/p;r.push(s([[h-e,f-e],[h-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),l)},a},i.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],i=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return i>o&&(r=i,i=o,o=r),[[n,i],[a,o]]})}),i):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},i},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=m(r),a=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+a)),m((n+r*(a+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length<2&&(e=t),1===e)return w;if(e===1/0)return T;function r(r,n){var a=w(r/e,n);return a[0]*=t,a}return r.invert=function(r,n){var a=w.invert(r/t,n);return a[0]*=e,a},r}function T(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function M(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),a=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>h&&--a>0);return e/2}}T.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,M.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(M)}).raw=M,S(p);var E=function(t,e,r){var n=S(r);function a(r,a){return[t*r*Math.cos(a=n(a)),e*Math.sin(a)]}return a.invert=function(n,a){var i=m(a/e);return[n/(t*Math.cos(i)),m((2*i+Math.sin(2*i))/r)]},a}(Math.SQRT2/d,Math.SQRT2,p);function C(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(E)}).raw=E,C.invert=function(t,e){var r,n=e,a=25;do{var i=n*n,o=i*i;n-=r=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Math.abs(r)>h&&--a>0);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(C)}).raw=C;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function P(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),a=Math.floor(n),i=n-a,o=(r=L[a])[0],s=r[1],l=(r=L[++a])[0],c=r[1],u=(r=L[Math.min(19,++a)])[0],h=r[1];return[t*(l+i*(u-o)/2+i*i*(u-2*l+o)/2),(e>0?d:-d)*(c+i*(h-s)/2+i*i*(h-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function I(t,e){var r,n=Math.cos(e),a=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*a,Math.sin(e)*a]}function z(t,e){var r=I(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),P.invert=function(t,e){var r=e/d,n=90*r,a=Math.min(18,Math.abs(n/5)),i=Math.max(0,Math.floor(a));do{var o=L[i][1],s=L[i+1][1],l=L[Math.min(19,i+2)][1],c=l-o,u=l-2*s+o,h=2*(Math.abs(r)-s)/c,p=u/c,m=h*(1-p*h*(1-2*p*h));if(m>=0||1===i){n=(e>=0?5:-5)*(m+a);var y,x=50;do{m=(a=Math.min(18,Math.abs(n)/5))-(i=Math.floor(a)),o=L[i][1],s=L[i+1][1],l=L[Math.min(19,i+2)][1],n-=(y=(e>=0?d:-d)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*v}while(Math.abs(y)>f&&--x>0);break}}while(--i>=0);var b=L[i][0],_=L[i+1][0],w=L[Math.min(19,i+2)][0];return[t/(_+m*(w-b)/2+m*m*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(P)}).raw=P,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(O)}).raw=O,I.invert=function(t,e){if(!(t*t+4*e*e>p*p+h)){var r=t,n=e,a=25;do{var i,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),f=Math.sin(2*n),d=c*c,g=u*u,v=s*s,m=1-g*l*l,x=m?y(u*l)*Math.sqrt(i=1/m):i=0,b=2*x*u*s-t,_=x*c-e,w=i*(g*v+x*u*l*d),k=i*(.5*o*f-2*x*c*s),T=.25*i*(f*s-x*c*g*o),A=i*(d*l+x*v*u),M=k*T-A*w;if(!M)break;var S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--a>0);return[r,n]}},(t.geo.aitoff=function(){return x(I)}).raw=I,z.invert=function(t,e){var r=t,n=e,a=25;do{var i,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,f=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),v=g*g,m=1-u*p*p,x=m?y(o*p)*Math.sqrt(i=1/m):i=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*i*(u*v+x*o*p*c)+.5/d,k=i*(f*l/4-x*s*g),T=.125*i*(l*g-x*s*u*f),A=.5*i*(c*p+x*v*o)+.5,M=k*T-A*w,S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--a>0);return[r,n]},(t.geo.winkel3=function(){return x(z)}).raw=z}},{}],801:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=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 h(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],h={},f={};function p(t,e){h[n+"."+t]=a.nestedProperty(l,t).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=a.nestedProperty(u,t);r.get()!==e&&(r.set(e),a.nestedProperty(l,t).set(e),f[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),o.emit("plotly_relayout",f)}function f(t,e){var r=u(0,e);function a(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),h(t,e,a)}),r}function p(t,e){var r,a,i,o,s,f,p,d,g,v=u(0,e),m=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),a=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",a[0]),r("center.lat",a[1])}return v.on("zoomstart",function(){n.select(this).style(l),r=n.mouse(this),a=e.rotate(),i=e.translate(),o=a,s=y(r)}).on("zoom",function(){if(f=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>m||Math.abs(n[1]-t[1])>m}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([i[0],n.event.translate[1]]),s?y(f)&&(d=y(f),p=[o[0]+(d[0]-s[0]),a[1],a[2]],e.rotate(p),o=p):s=y(r=f),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&&h(t,e,x)}),v}function d(t,e){var r,a={r:e.rotate(),k:e.scale()},i=u(0,e),f=function(t){var e=0,r=arguments.length,a=[];for(;++ed?(i=(h>0?90:-90)-p,a=0):(i=Math.asin(h/d)*s-p,a=Math.sqrt(d*d-h*h));var g=180-i-2*p,m=(Math.atan2(f,u)-Math.atan2(c,a))*s,x=(Math.atan2(f,u)-Math.atan2(c,-a))*s,b=v(r[0],r[1],i,m),_=v(r[0],r[1],g,x);return b<=_?[i,m,r[2]]:[g,x,r[2]]}(k,r,E);isFinite(T[0])&&isFinite(T[1])&&isFinite(T[2])||(T=E),e.rotate(T),E=T}}else r=g(e,M=b);f.of(this,arguments)({type:"zoom"})}),A=f.of(this,arguments),p++||A({type:"zoomstart"})}).on("zoomend",function(){var r;n.select(this).style(c),d.call(i,"zoom",null),r=f.of(this,arguments),--p||r({type:"zoomend"}),h(t,e,m)}).on("zoom.redraw",function(){t.render();var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),n.rebind(i,f,"on")}function g(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function v(t,e,r,n){var a=m(r-t),i=m(n-e);return Math.sqrt(a*a+i*i)}function m(t){return(t%360+540)%360-180}function y(t,e,r){var n=r*o,a=t.slice(),i=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return a[i]=t[i]*l-t[s]*c,a[s]=t[s]*l+t[i]*c,a}function x(t,e){for(var r=0,n=0,a=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(i)*_*(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)/_*(i>=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?(i=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],i||s?(i&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=a),Math.abs(c.dragStart[0]-n).999&&(v="turntable"):v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var a=e._basePlotModules.length>1;o(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!a)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":594,"../../../lib":719,"../../../registry":848,"../../get_data":802,"../../subplot_defaults":842,"./axis_defaults":810,"./layout_attributes":813}],813:[function(t,e,r){"use strict";var n=t("./axis_attributes"),a=t("../../domain").attributes,i=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:i(s(0,0,1),{}),center:i(s(0,0,0),{}),eye:i(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({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":719,"../../../lib/extend":710,"../../domain":792,"./axis_attributes":809}],814:[function(t,e,r){"use strict";var n=t("../../../lib/str2rgbarray"),a=["xaxis","yaxis","zaxis"];function i(){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]}i.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[a[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 i;return e.merge(t),e}},{"../../../lib/str2rgbarray":742}],815:[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[i[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 h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||a.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var p=n.calcTicks(u),d=0;d/g," "));l[c]=p,u.tickmode=h}}e.ticks=l;for(var c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(var 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],a=new Array(n.length),i=0;i")):"isosurface"===e.type||"volume"===e.type?(w.valueLabel=h.tickText(t.mockAxis,t.mockAxis.d2l(p.traceCoordinate[3]),"hover").text,M.push("value: "+w.valueLabel),p.textLabel&&M.push(p.textLabel),x=M.join("
")):x=p.textLabel;var S={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:_};f.appendArrayPointValue(S,b,_),e._module.eventData&&(S=b._module.eventData(S,p,b,{},_));var E={points:[S]};t.fullSceneLayout.hovermode&&f.loneHover({trace:b,x:(.5+.5*m[0]/m[3])*i,y:(.5-.5*m[1]/m[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:x,name:c.name,color:f.castHoverOption(b,_,"bgcolor")||c.color,borderColor:f.castHoverOption(b,_,"bordercolor"),fontFamily:f.castHoverOption(b,_,"font.family"),fontSize:f.castHoverOption(b,_,"font.size"),fontColor:f.castHoverOption(b,_,"font.color"),nameLength:f.castHoverOption(b,_,"namelength"),textAlign:f.castHoverOption(b,_,"align"),hovertemplate:u.castOption(b,_,"hovertemplate"),hovertemplateLabels:u.extendFlat({},S,w),eventData:[S]},{container:n,gd:r}),p.buttons&&p.distance<5?r.emit("plotly_click",E):r.emit("plotly_hover",E),s=E}else f.loneUnhover(n),r.emit("plotly_unhover",s);t.drawAnnotations(t)}.bind(null,t),t.traces={},t.make4thDimension(),!0}function b(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e,e[this.id]),this.spikeOptions=m(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),x(this,this.pixelRatio)}var _=b.prototype;_.initializeGLCamera=function(){var t=this.fullSceneLayout.camera,e="orthographic"===t.projection.type;this.camera=i(this.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:e,zoomMin:.01,zoomMax:100,mode:"orbit"})},_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas,n=this.glplot.camera,a=this.glplot.pixelRatio;this.glplot.dispose(),requestAnimationFrame(function i(){e.isContextLost()?requestAnimationFrame(i):x(t,n,a,r)?t.plot.apply(t,t.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")})};var w=["xaxis","yaxis","zaxis"];function k(t,e,r){for(var n=t.fullSceneLayout,a=0;a<3;a++){var i=w[a],o=i.charAt(0),s=n[i],l=e[o],c=e[o+"calendar"],h=e["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var f,p=0;p<(h||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][i])g[0][i]=-1,g[1][i]=1;else{var E=g[1][i]-g[0][i];g[0][i]-=E/32,g[1][i]+=E/32}if("reversed"===s.autorange){var C=g[0][i];g[0][i]=g[1][i],g[1][i]=C}}else{var L=s.range;g[0][i]=s.r2l(L[0]),g[1][i]=s.r2l(L[1])}g[0][i]===g[1][i]&&(g[0][i]-=1,g[1][i]+=1),v[i]=g[1][i]-g[0][i],this.glplot.bounds[0][i]=g[0][i]*f[i],this.glplot.bounds[1][i]=g[1][i]*f[i]}var P=[1,1,1];for(i=0;i<3;++i){var O=m[l=(s=c[w[i]]).type];P[i]=Math.pow(O.acc,1/O.count)/f[i]}var I;if("auto"===c.aspectmode)I=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===c.aspectmode)I=[1,1,1];else if("data"===c.aspectmode)I=P;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var z=c.aspectratio;I=[z.x,z.y,z.z]}c.aspectratio.x=u.aspectratio.x=I[0],c.aspectratio.y=u.aspectratio.y=I[1],c.aspectratio.z=u.aspectratio.z=I[2],this.glplot.aspect=I;var D=c.domain||null,R=e._size||null;if(D&&R){var F=this.container.style;F.position="absolute",F.left=R.l+D.x[0]*R.w+"px",F.top=R.t+(1-D.y[1])*R.h+"px",F.width=R.w*(D.x[1]-D.x[0])+"px",F.height=R.h*(D.y[1]-D.y[0])+"px"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),T(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]);var r="orthographic"===t.projection.type;if(r!==this.glplot.camera._ortho){this.glplot.redraw();var n=this.glplot.pixelRatio,a=this.glplot.clearColor;this.glplot.gl.clearColor(a[0],a[1],a[2],a[3]),this.glplot.gl.clear(this.glplot.gl.DEPTH_BUFFER_BIT|this.glplot.gl.COLOR_BUFFER_BIT),this.glplot.dispose(),x(this,n),this.glplot.camera._ortho=r}},_.saveCamera=function(t){var e=this.fullLayout,r=this.getCamera(),n=u.nestedProperty(t,this.id+".camera"),a=n.get(),i=!1;function o(t,e,r,n){var a=["up","center","eye"],i=["x","y","z"];return e[a[r]]&&t[a[r]][i[n]]===e[a[r]][i[n]]}if(void 0===a)i=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!o(r,a,s,l)){i=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(i=!0)}if(i){var h={};h[this.id+".camera"]=a,c.call("_storeDirectGUIEdit",t,e._preGUI,h),n.set(r),u.nestedProperty(e,this.id+".camera").set(r)}return i},_.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,a=n._fullLayout,i=this.fullSceneLayout.camera,o=i.up.x,s=i.up.y,l=i.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var h=this.id+".camera.up",f={x:0,y:0,z:1},p={};p[h]=f;var d=n.layout;c.call("_storeDirectGUIEdit",d,a._preGUI,p),i.up=f,u.nestedProperty(d,h).set(f)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,a=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);e.readPixels(0,0,r,a,e.RGBA,e.UNSIGNED_BYTE,i);for(var o=0,s=a-1;o\xa9 OpenStreetMap
',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:'\xa9 CARTO',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:'\xa9 CARTO',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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, under CC BY SA.',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}]}},a=Object.keys(n);e.exports={requiredVersion:"1.3.2",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:a,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.3.2."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.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\')'}}},{}],821:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r=t.split(" "),a=r[0],i=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(a){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(i){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":719}],822:[function(t,e,r){"use strict";var n=t("mapbox-gl"),a=t("../../lib"),i=t("../../plots/get_data").getSubplotCalcData,o=t("../../constants/xmlns_namespaces"),s=t("d3"),l=t("../../components/drawing"),c=t("../../lib/svg_text_utils"),u=t("./mapbox"),h=r.constants=t("./constants");function f(t){return"string"==typeof t&&(-1!==h.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://"))}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=a.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==h.requiredVersion)throw new Error(h.wrongVersionErrorMsg);var s=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],i=[],o=!1,s=!1,l=0;l1&&a.warn(h.multipleTokensErrorMsg),n[0]):(i.length&&a.log(["Listed mapbox access token(s)",i.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,o);n.accessToken=s;for(var l=0;lx/2){var b=g.split("|").join("
");m.text(b).attr("data-unformatted",b).call(c.convertToTspans,t),y=l.bBox(m.node())}m.attr("transform","translate(-3, "+(8-y.height)+")"),v.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var _=1;y.width+6>x&&(_=x/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];v.attr("transform","translate("+w[0]+","+w[1]+") scale("+_+")")}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function c(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})}return{layout:e,paint:r}}s.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=l(t)},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.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,l(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=t.sourceattribution);return a}(t);e.addSource(this.idSource,r)}},s.updateLayer=function(t){var e,r=this.subplot,n=c(t),a=this.subplot.belowLookup["layout-"+this.index];if("traces"===a)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&h(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),a.indexOf("event")>-1&&i.click(n,e.originalEvent)}}},g.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,i=t.dragmode;a="select"===i?function(t,r){(t.range={})[e.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(l)};var s=e.dragOptions;e.dragOptions=o.extendDeep(s||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),"select"===i||"lasso"===i?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){u(t,r,n,e.dragOptions,i)},c.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 l(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},g.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])},g.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?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){m.sendDataToCloud(t)});else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(t,o),s.text(o.text()&&u.text()?" - ":"")}},m.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=m.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function w(t,e){var r=t._context.locale,n=!1,a={};function o(t){for(var r=!0,i=0;i1&&O.length>1){for(i.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&O.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has("cartesian"),s._hasGeo=s._has("geo"),s._hasGL3D=s._has("gl3d"),s._hasGL2D=s._has("gl2d"),s._hasTernary=s._has("ternary"),s._hasPie=s._has("pie"),m.linkSubplots(h,s,u,a),m.cleanPlot(h,s,u,a),a._zoomlayer&&!t._dragging&&a._zoomlayer.selectAll(".select-outline").remove(),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var a=0;a0){var h=1-2*s;n=Math.round(h*n),i=Math.round(h*i)}}var f=m.layoutAttributes.width.min,p=m.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}),m.sanitizeMargins(r)},m.supplyLayoutModuleDefaults=function(t,e,r,n){var a,o,s,c=i.componentsRegistry,u=e._basePlotModules,h=i.subplotsRegistry.cartesian;for(a in c)(s=c[a]).includeBasePlot&&s.includeBasePlot(t,e);for(var f in u.length||u.push(h),e._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(t,e),h.finalizeSubplots(t,e)),e._subplots)e._subplots[f].sort(l.subplotSort);for(o=0;o.5*n.width&&(l.log("Margin push",e,"is too big in x, dropping"),r.l=r.r=0),r.b+r.t>.5*n.height&&(l.log("Margin push",e,"is too big in y, dropping"),r.b=r.t=0);var c=void 0!==r.xl?r.xl:r.x,u=void 0!==r.xr?r.xr:r.x,h=void 0!==r.yt?r.yt:r.y,f=void 0!==r.yb?r.yb:r.y;a[e]={l:{val:c,size:r.l+o},r:{val:u,size:r.r+o},b:{val:f,size:r.b+o},t:{val:h,size:r.t+o}},i[e]=1}else delete a[e],delete i[e];if(!n._replotting)return m.doAutoMargin(t)}},m.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),M(e);var r=e._size,n=e.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,h=n.b,f=e.width,p=e.height,d=e._pushmargin,g=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in d)g[v]||delete d[v];for(var y in d.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:h}},d){var x=d[y].l||{},b=d[y].b||{},_=x.val,w=x.size,k=b.val,T=b.size;for(var A in d){if(a(w)&&d[A].r){var S=d[A].r.val,E=d[A].r.size;if(S>_){var C=(w*S+(E-f)*_)/(S-_),L=(E*(1-_)+(w-f)*(1-S))/(S-_);C>=0&&L>=0&&f-(C+L)>0&&C+L>s+c&&(s=C,c=L)}}if(a(T)&&d[A].t){var P=d[A].t.val,O=d[A].t.size;if(P>k){var I=(T*P+(O-p)*k)/(P-k),z=(O*(1-k)+(T-p)*(1-P))/(P-k);I>=0&&z>=0&&p-(z+I)>0&&I+z>h+u&&(h=I,u=z)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(h),r.p=Math.round(n.pad),r.w=Math.round(f)-r.l-r.r,r.h=Math.round(p)-r.t-r.b,!e._replotting&&m.didMarginChange(o,r)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var D=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return i.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o=0,s=0;function l(){return o++,function(){var e;s++,n||s!==o||(e=a,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return i.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(e)))}}r.runFn(l),setTimeout(l())})}],o=l.syncOrAsync(a,t);return o&&o.then||(o=Promise.resolve()),o.then(function(){return t})}m.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},m.graphJson=function(t,e,r,n,a){(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&m.supplyDefaults(t);var i=a?t._fullData:t.data,o=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if("function"==typeof t)return null;if(l.isPlainObject(t)){var e,n,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;a[e]=c(t[e])}return a}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(i||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},m.modifyFrames=function(t,e){var r,n,a,i=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(i=n.calc(t,r))}Array.isArray(i)&&i[0]||(i=[{x:u,y:u}]),i[0].t||(i[0].t={}),i[0].trace=r,d[e]=i}}for(L(c,f),a=0;a1e-10?t:0}function f(t,e,r){e=e||0,r=r||0;for(var n=t.length,a=new Array(n),i=0;i0?r:1/0}),a=n.mod(r+1,e.length);return[e[r],e[a]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var a=-e*r,i=e*e+1,o=2*(e*a-r),s=a*a+r*r-t*t,l=Math.sqrt(o*o-4*i*s),c=(-o+l)/(2*i),u=(-o-l)/(2*i);return[[c,e*c+a+n],[u,e*u+a+n]]},clampTiny:h,pathPolygon:function(t,e,r,n,a,i){return"M"+f(u(t,e,r,n),a,i).join("L")},pathPolygonAnnulus:function(t,e,r,n,a,i,o){var s,l;t=0?f.angularAxis.domain:n.extent(k),E=Math.abs(k[1]-k[0]);A&&!T&&(E=0);var C=S.slice();M&&T&&(C[1]+=E);var L=f.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),f.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var P=f.angularAxis.ticksStep||(C[1]-C[0])/(L*(f.minorTicks+1));w&&(P=Math.max(Math.round(P),1)),C[2]||(C[2]=P);var O=n.range.apply(this,C);if(O=O.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=M?E:0,"undefined"==typeof(t=n.select(this).select("svg.chart-root"))||t.empty()){var I=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),z=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(z)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var D,R=t.select(".chart-group"),F={fill:"none",stroke:f.tickColor},B={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){D=t.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend="undefined"==typeof t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:f.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(f.width-j.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else D=t.select(".legend-group").style({display:"none"});t.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(f.width-(f.margin.left+f.margin.right+2*x+(j?j.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(".outer-group").attr("transform","translate("+V+")"),f.title&&f.title.text){var U=t.select("g.title-group text").style(B).text(f.title.text),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var Y=t.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});function W(t,e){return s(t)%360+f.orientation}if(f.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+f.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(O),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+W(t)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:f.minorTickColor}),Z.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+f.labelOffset,dy:i+"em",transform:function(t,e){var r=W(t),n=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-r+" "+n+" 0)":"radial"==a?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(B);f.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var Q=n.max(R.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:"translate("+[x+Q,f.margin.top]+")"});var $=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(p);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),p[0]||$){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return"undefined"!=typeof t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var at,it,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!T){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(Y).angle;ht.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-f.orientation)%360;at=s.invert(n);var a=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(at)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",function(t,e){var n=o.util.getMousePos(Y).radius;ft.attr({r:n}).style({opacity:.5}),it=r.invert(o.util.getMousePos(Y).radius);var a=o.util.convertToCartesian(n,f.radialAxis.orientation);ct.text(o.util.round(it)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(e,r){var a=n.select(this),i=this.style.fill,s="black",l=this.style.opacity||1;if(a.attr({"data-opacity":l}),i&&"none"!==i){a.attr({"data-fill":i}),s=n.hsl(i).darker().toString(),a.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};T&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,h=this.getBoundingClientRect(),f=t.node().getBoundingClientRect(),p=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ut.config({color:s}).text(u),ut.move(p)}else i=this.style.stroke||"black",a.attr({"data-stroke":i}),s=n.hsl(i).darker().toString(),a.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()}).on("mouseout.tooltip",function(t,e){ut.hide();var r=n.select(this),a=r.attr("data-fill");a?r.style({fill:a,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})})}(c),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return u},f.getinputConfig=function(){return c},f.radialScale=function(t){return r},f.angularScale=function(t){return s},f.svg=function(){return t},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var a=e||6,i=[],o=[];n.range(0,360+a,a).forEach(function(e,r){var n=e*Math.PI/180,a=t(n);i.push(e),o.push(a)});var s={t:i,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if("undefined"==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],a=e[1],i={};return i.x=r,i.y=a,i.pos=e,i.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,i.radius=Math.sqrt(r*r+a*a),i},o.util.duplicatesCount=function(t){for(var e,r={},n={},a=0,i=t.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,a,i)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,a,i)},"stroke-width":function(t,e){return d["stroke-width"](r,a,i)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,a,i)},opacity:function(t,e){return d.opacity(r,a,i)},display:function(t,e){return d.display(r,a,i)}})}};var h=e.angularScale.range(),f=Math.abs(h[1]-h[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-f/2}).endAngle(function(t){return f/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,a){n.select(this).attr({class:"mark arc",d:p,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,a){return r[t[a].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return"undefined"==typeof t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var v=g.selectAll("path.mark").data(function(t,e){return t});v.enter().append("path").attr({class:"mark"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()})}return i.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),a(t[r],o.PolyChart.defaultConfig()),a(t[r],e)}),this):t},i.getColorScale=function(){},n.rebind(i,e,"on"),i},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,i=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var i=a({},e.elements[r]);return i.name=t,i.color=[].concat(e.elements[r].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||"undefined"==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,h=u?e.height:c*o.length,f=s.classed("legend-group",!0).selectAll("svg").data([0]),p=f.enter().append("svg").attr({width:300,height:h+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),v=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,h]);if(u){var m=f.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),f.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=f.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r,a,i,o=t.symbol;return i=3*(a=c),"line"===(r=o)?"M"+[[-a/2,-a/12],[a/2,-a/12],[a/2,a/12],[-a/2,a/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(i)():n.svg.symbol().type("square").size(i)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient("right"),b=f.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(a(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=i.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),c};return c.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",h=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(h);var f=i.padding,p=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},g=p.width+2*f+l,v=p.height+2*f;return r.attr({d:"M"+[[l,-v/2],[l,-v/4],[i.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-v/2+2*f]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return a(i,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?("undefined"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&"undefined"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&"undefined"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&"undefined"!=typeof s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{"../../../constants/alignment":688,"../../../lib":719,d3:164}],838:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../../lib"),i=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=a.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,a,i,u,h=new s;function f(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,a||(a=o.Axis()),i=o.adapter.plotly().convert(e),a.config(i).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return f.isPolar=!0,f.svg=function(){return a.svg()},f.getConfig=function(){return e},f.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},f.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},f.setUndoPoint=function(){var t,n,a=this,i=o.util.cloneJson(e);t=i,n=r,h.add({undo:function(){n&&a(n)},redo:function(){a(t)}}),r=o.util.cloneJson(i)},f.undo=function(){h.undo()},f.redo=function(){h.redo()},f},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:e,_paperdiv:r,_paper:a};t._fullLayout=l(o,t.layout)}},{"../../../components/color":594,"../../../lib":719,"./micropolar":837,"./undo_manager":839,d3:164}],839:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function a(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(a(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(a(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&f<=0?0:Math.max(u,f);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&h>=0?0:Math.min(c,h);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&f>=0?0:Math.min(u,f);n=l>=360?1:c<=0&&h<=0?0:Math.max(c,h);return[e,r,n,a]}(f),x=y[2]-y[0],b=y[3]-y[1],_=h/u,w=Math.abs(b/x);_>w?(p=u,m=(h-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=h,m=(u-(p=h/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],T=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=p/x,M=this.innerRadius=e.hole*A,S=this.cx=k-A*y[0],L=this.cy=T+A*y[3],P=this.cxx=S-k,O=this.cyy=L-T;this.radialAxis=this.mockAxis(t,e,a,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[a.side],domain:[M/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,i,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var I=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",I).attr("transform",R(P,O)),r.frontplot.attr("transform",R(k,T)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",I).attr("transform",R(S,L)).call(s.fill,e.bgcolor)},O.mockAxis=function(t,e,r,n){var a=o.extendFlat({},r,n);return f(a,e,t),a},O.mockCartesianAxis=function(t,e,r){var n=this,a=r._id,i=o.extendFlat({type:"linear"},r);h(i,t);var s={x:[0,2],y:[1,3]};return i.setRange=function(){var t=n.sectorBBox,r=s[a],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);i.range=[t[r[0]]*l,t[r[1]]*l]},i.isPtWithinRange="x"===a?function(t){return n.isPtInside(t)}:function(){return!0},i.setRange(),i.setScale(),i},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,a=e.radialaxis;n.setScale(),p(r,n);var i=n.range;a.range=i.slice(),a._input.range=i.slice(),n._rl=[n.r2l(i[0],null,"gregorian"),n.r2l(i[1],null,"gregorian")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.radialaxis,p=E(e.sector[0],360),d=r.radialAxis,g=l90&&p<=270&&(d.tickangle=180);var v=function(t){return"translate("+(d.l2p(t.x)+l)+",0)"},m=I(f);if(r.radialTickLayout!==m&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),g){d.setScale();var y=u.calcTicks(d),x=u.clipEnds(d,y),b=u.getTickSigns(d)[2];u.drawTicks(n,d,{vals:y,layer:a["radial-axis"],path:u.makeTickPath(d,0,b),transFn:v,crisp:!1}),u.drawGrid(n,d,{vals:x,layer:a["radial-grid"],path:function(t){return r.pathArc(d.r2p(t.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,d,{vals:y,layer:a["radial-axis"],transFn:v,labelFns:u.makeLabelFns(d,0)})}var _=r.radialAxisAngle=r.vangles?L(z(C(f.angle),r.vangles)):f.angle,w=R(c,h),k=w+F(-_);D(a["radial-axis"],g&&(f.showticklabels||f.ticks),{transform:k}),D(a["radial-grid"],g&&f.showgrid,{transform:w}),D(a["radial-line"].select("line"),g&&f.showline,{x1:l,y1:0,x2:i,y2:0,transform:k}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,a=this.radius,i=this.cx,o=this.cy,s=e.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,h=C(u),f=Math.cos(h),p=Math.sin(h),d=0;if(s.title){var g=l.bBox(this.layers["radial-axis"].node()).height,v=s.title.font.size;d="counterclockwise"===s.side?-g-.4*v:g+.8*v}this.layers["radial-axis-title"]=m.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:S(n,"Click to enter radial axis title"),attributes:{x:i+a/2*f+d*p,y:o-a/2*p+d*f,"text-anchor":"middle"},transform:{rotate:-u}})},O.updateAngularAxis=function(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.angularaxis,p=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",f.rotation),p.setGeometry(),p.setScale();var d=function(t){return p.t2g(t.x)};"linear"===p.type&&"radians"===p.thetaunit&&(p.tick0=L(p.tick0),p.dtick=L(p.dtick));var g=function(t){return R(c+i*Math.cos(t),h-i*Math.sin(t))},v=u.makeLabelFns(p,0).labelStandoff,m={xFn:function(t){var e=d(t);return Math.cos(e)*v},yFn:function(t){var e=d(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(v+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*T)},anchorFn:function(t){var e=d(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=d(t);return-.5*(1+Math.sin(n))*r}},y=I(f);r.angularTickLayout!==y&&(a["angular-axis"].selectAll("."+p._id+"tick").remove(),r.angularTickLayout=y);var x,b=u.calcTicks(p);if("linear"===e.gridshape?(x=b.map(d),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===p.type&&(b=b.filter(function(t){return o.isAngleInsideSector(d(t),r.sectorInRad)})),p.visible){var _="inside"===p.ticks?-1:1,w=(p.linewidth||1)/2;u.drawTicks(n,p,{vals:b,layer:a["angular-axis"],path:"M"+_*w+",0h"+_*p.ticklen,transFn:function(t){var e=d(t);return g(e)+F(-L(e))},crisp:!1}),u.drawGrid(n,p,{vals:b,layer:a["angular-grid"],path:function(t){var e=d(t),r=Math.cos(e),n=Math.sin(e);return"M"+[c+l*r,h-l*n]+"L"+[c+i*r,h-i*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,p,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return g(d(t))},labelFns:m})}D(a["angular-line"].select("path"),f.showline,{d:r.pathSubplot(),transform:R(c,h)}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,h=e.innerRadius,f=e.cx,p=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,T=e.radialAxis,S=M.clampTiny,E=M.findXYatLength,C=M.findEnclosingVertexAngles,L=A.cornerHalfWidth,P=A.cornerLen/2,O=d.makeDragger(o,"path","maindrag","crosshair");n.select(O).attr("d",e.pathSubplot()).attr("transform",R(f,p));var I,z,D,F,B,N,j,V,U,q={element:O,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function Y(t,e){return Math.atan2(_-e,t-m)}function W(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=P/t,a=r-n,i=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return"M"+W(s,a)+"A"+[s,s]+" 0,0,0 "+W(s,i)+"L"+W(l,i)+"A"+[l,l]+" 0,0,1 "+W(l,a)+"Z"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var a,i,o=W(t,r),s=W(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,h=-1/u,f=E(L,u,l,c);a=E(P,h,f[0][0],f[0][1]),i=E(P,h,f[1][0],f[1][1])}else{var p,d;c?(p=P,d=L):(p=L,d=P),a=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return"M"+a.join("L")+"L"+i.reverse().join("L")+"Z"}function J(t,e){return e=Math.max(Math.min(e,u),h),tl?(t-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),a.indexOf("event")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,i){var o=r._fullLayout.dragmode,l=O.getBoundingClientRect();if(I=n-l.left,z=i-l.top,k){var c=M.findPolygonOffset(u,w[0],w[1],k);I+=m+c[0],z+=_+c[1]}switch(o){case"zoom":q.moveFn=k?tt:Q,q.clickFn=nt,q.doneFn=et,function(){D=null,F=null,B=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=a(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,f,p,B)).attr("fill-rule","evenodd"),U=d.makeCorners(s,f,p),b(r)}();break;case"select":case"lasso":y(t,n,i,q,o)}},O.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=O,r._fullLayout._hoversubplot=e.id},O.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},O.updateRadialDrag=function(t,e,r){var a=this,s=a.gd,l=a.layers,c=a.radius,u=a.innerRadius,h=a.cx,f=a.cy,p=a.radialAxis,v=A.radialDragBoxSize,m=v/2;if(p.visible){var y,x,_,T=C(a.radialAxisAngle),M=p._rl,S=M[0],E=M[1],P=M[r],O=.75*(M[1]-M[0])/(1-e.hole)/c;r?(y=h+(c+m)*Math.cos(T),x=f-(c+m)*Math.sin(T),_="radialdrag"):(y=h+(u-m)*Math.cos(T),x=f-(u-m)*Math.sin(T),_="radialdrag-inner");var I,B,N,j=d.makeRectDragger(l,_,"crosshair",-m,-m,v,v),V={element:j,gd:s};D(n.select(j),p.visible&&u0==(r?N>S:Nn?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*i},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 a=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?i(t):t}(a(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,a){var i,o,s=e[a],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(i=new Array(l),o=0;o0){for(var n=[],a=0;a=u&&(p.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,n){var a=h[e._name];function o(r,n){return i.coerce(t,e,a,r,n)}o("uirevision",n.uirevision),e.type="linear";var f=o("color"),p=f!==a.color.dflt?f:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,v=o("title.text",g);e._hovertitle=v===g?v:d,i.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:p}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:p}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:f,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}e.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:h,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":594,"../../lib":719,"../../plot_api/plot_template":757,"../cartesian/line_grid_defaults":781,"../cartesian/tick_label_defaults":786,"../cartesian/tick_mark_defaults":787,"../cartesian/tick_value_defaults":788,"../subplot_defaults":842,"./layout_attributes":845}],847:[function(t,e,r){"use strict";var n=t("d3"),a=t("tinycolor2"),i=t("../../registry"),o=t("../../lib"),s=o._,l=t("../../components/color"),c=t("../../components/drawing"),u=t("../cartesian/set_convert"),h=t("../../lib/extend").extendFlat,f=t("../plots"),p=t("../cartesian/axes"),d=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/titles"),m=t("../cartesian/select").prepSelect,y=t("../cartesian/select").selectOnClick,x=t("../cartesian/select").clearSelect,b=t("../cartesian/constants");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var a=0;ak*x?a=(i=x)*k:i=(a=y)/k,o=v*a/y,s=m*i/x,r=e.l+e.w*d-a/2,n=e.t+e.h*(1-g)-i/2,f.x0=r,f.y0=n,f.w=a,f.h=i,f.sum=b,f.xaxis={type:"linear",range:[_+2*T-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:"x"},u(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(t){return t.a>=f.aaxis.range[0]&&t.a<=f.aaxis.range[1]&&t.b>=f.baxis.range[1]&&t.b<=f.baxis.range[0]&&t.c>=f.caxis.range[1]&&t.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[_,b-w-T],domain:[g-s/2,g+s/2],_id:"y"},u(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var A=f.yaxis.domain[0],M=f.aaxis=h({},t.aaxis,{range:[_,b-w-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(M,f.graphDiv._fullLayout),M.setScale();var S=f.baxis=h({},t.baxis,{range:[b-_-T,w],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});u(S,f.graphDiv._fullLayout),S.setScale();var E=f.caxis=h({},t.caxis,{range:[b-_-w,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(E,f.graphDiv._fullLayout),E.setScale();var C="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";f.clipDef.select("path").attr("d",C),f.layers.plotbg.select("path").attr("d",C);var L="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";f.clipDefRelative.select("path").attr("d",L);var P="translate("+r+","+n+")";f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),f.clipDefRelative.select("path").attr("transform",null);var O="translate("+(r-S._offset)+","+(n+i)+")";f.layers.baxis.attr("transform",O),f.layers.bgrid.attr("transform",O);var I="translate("+(r+a/2)+","+n+")rotate(30)translate(0,"+-M._offset+")";f.layers.aaxis.attr("transform",I),f.layers.agrid.attr("transform",I);var z="translate("+(r+a/2)+","+n+")rotate(-30)translate(0,"+-E._offset+")";f.layers.caxis.attr("transform",z),f.layers.cgrid.attr("transform",z),f.drawAxes(!0),f.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",E.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(l.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),c.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},w.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,a=this.aaxis,i=this.baxis,o=this.caxis;if(this.drawAx(a),this.drawAx(i),this.drawAx(o),t){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),c=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=v.draw(e,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=v.draw(e,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(e,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*i.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=v.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(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"}})}},w.drawAx=function(t){var e,r=this.graphDiv,n=t._name,a=n.charAt(0),i=t._id,s=this.layers[n],l=a+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll("."+i+"tick").remove(),this[l]=c),t.setScale();var u=p.calcTicks(t),h=p.clipEnds(t,u),f=p.makeTransFn(t),d=p.getTickSigns(t)[2],g=o.deg2rad(30),v=d*(t.linewidth||1)/2,m=d*t.ticklen,y=this.w,x=this.h,b="b"===a?"M0,"+v+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+v+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[a];p.drawTicks(r,t,{vals:"inside"===t.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),p.drawGrid(r,t,{vals:h,layer:this.layers[a+"grid"],path:_,transFn:f,crisp:!1}),p.drawLabels(r,t,{vals:u,layer:s,transFn:f,labelFns:p.makeLabelFns(t,0,30)})};var T=b.MINZOOM/2+.87,A="m-0.87,.5h"+T+"v3h-"+(T+5.2)+"l"+(T/2+2.6)+",-"+(.87*T+4.5)+"l2.6,1.5l-"+T/2+","+.87*T+"Z",M="m0.87,.5h-"+T+"v3h"+(T+5.2)+"l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-2.6,1.5l"+T/2+","+.87*T+"Z",S="m0,1l"+T/2+","+.87*T+"l2.6,-1.5l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-"+(T/2+2.6)+","+(.87*T+4.5)+"l2.6,1.5l"+T/2+",-"+.87*T+"Z",E="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",C=!0;function L(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var t,e,r,n,u,h,f,p,v,_,w=this,T=w.layers.plotbg.select("path").node(),P=w.graphDiv,O=P._fullLayout._zoomlayer,I={element:T,gd:P,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(i,o,s){I.xaxes=[w.xaxis],I.yaxes=[w.yaxis];var c=P._fullLayout.dragmode;I.minDrag="lasso"===c?1:void 0,"zoom"===c?(I.moveFn=N,I.clickFn=D,I.doneFn=j,function(i,o,s){var c=T.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,h=a(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),f="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",p=!1,v=O.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",f),_=O.append("path").attr("class","zoombox-corners").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),x(P)}(0,o,s)):"pan"===c?(I.moveFn=V,I.clickFn=D,I.doneFn=U,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(P)):"select"!==c&&"lasso"!==c||m(i,o,s,I,c)}};function z(t){var e={};return e[w.id+".aaxis.min"]=t.a,e[w.id+".baxis.min"]=t.b,e[w.id+".caxis.min"]=t.c,e}function D(t,e){var r=P._fullLayout.clickmode;L(P),2===t&&(P.emit("plotly_doubleclick",null),i.call("_guiRelayout",P,z({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&y(e,P,[w.xaxis],[w.yaxis],w.id,I),r.indexOf("event")>-1&&g.click(P,e,w.id)}function R(t,e){return 1-e/w.h}function F(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function N(a,i){var o=t+a,s=e+i,l=Math.max(0,Math.min(1,R(0,e),R(0,s))),c=Math.max(0,Math.min(1,F(t,e),F(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,T=(1-l)*w.h,C=T-x/k;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),p=!0),P.emit("plotly_relayouting",z(u))}function j(){L(P),u!==r&&(i.call("_guiRelayout",P,z(u)),C&&P.data&&P._context.showTips&&(o.notifier(s(P,"Double-click to zoom back out"),"long"),C=!1))}function V(t,e){var n=t/w.xaxis._m,a=e/w.yaxis._m,i=[(u={a:r.a-a,b:r.b+(n+a)/2,c:r.c-(n-a)/2}).a,u.b,u.c].sort(),o=i.indexOf(u.a),s=i.indexOf(u.b),l=i.indexOf(u.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),u={a:i[o],b:i[s],c:i[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var h="translate("+(w.x0+t)+","+(w.y0+e)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var f="translate("+-t+","+-e+")";w.clipDefRelative.select("path").attr("transform",f),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),P.emit("plotly_relayouting",z(u))}function U(){i.call("_guiRelayout",P,z(u))}T.onmousemove=function(t){g.hover(P,t,w.id),P._fullLayout._lasthover=T,P._fullLayout._hoversubplot=w.id},T.onmouseout=function(t){P._dragging||d.unhover(P,t)},d.init(I)}},{"../../components/color":594,"../../components/dragelement":612,"../../components/drawing":615,"../../components/fx":632,"../../components/titles":681,"../../lib":719,"../../lib/extend":710,"../../registry":848,"../cartesian/axes":767,"../cartesian/constants":773,"../cartesian/select":784,"../cartesian/set_convert":785,"../plots":828,d3:164,tinycolor2:538}],848:[function(t,e,r){"use strict";var n=t("./lib/loggers"),a=t("./lib/noop"),i=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"),h=l.extendFlat,f=l.extendDeepAll;function p(t){var e=t.name,a=t.categories,i=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 a in m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(a,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(h[p[r]].title={text:""});for(r=0;rpath, .legendlines>path, .cbfill").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,"TOBESTRIPPED"))}),"pdf"!==e&&"eps"!==e||f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(s.xmlns,"xmlns",s.svg),f.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(f.attr("width",r*d),f.attr("height",r*g),f.attr("viewBox","0 0 "+d+" "+g));var _=(new window.XMLSerializer).serializeToString(f.node());return _=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":594,"../components/drawing":615,"../constants/xmlns_namespaces":696,"../lib":719,d3:164}],857:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r0&&h.s>0||(c=!1)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:!c,padded:!0})}}function m(t){for(var e=t.traces,r=0;rh+c||!n(u))}for(var p=0;p0&&_.s>0||(m=!1)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:!m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,a=t._fullLayout,i=t._fullData,s=t.calcdata,l=[],c=[],h=0;hi))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return a(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}function T(t){return"auto"===t?0:t}function A(t,e,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,c=i.anchor||0,u=a.width,h=a.height,f=Math.abs(e-t),p=Math.abs(n-r),d=f>2*y&&p>2*y?y:0;f-=2*d,p-=2*d;var g=!1;if(!("auto"===l)||u<=f&&h<=p||!(u>f||h>p)||(u>p||h>f)&&u2*y?y:0:f>2*y?y:0;var d=1;l&&(d=s?Math.min(1,p/h):Math.min(1,f/u));var g=T(c);o+=.5*(d*(s?h:u)*Math.abs(Math.sin(Math.PI/180*g))+d*(s?u:h)*Math.abs(Math.cos(Math.PI/180*g)));var v=(t+e)/2,m=(r+n)/2;return s?v=e-o*_(e,t):m=n+o*_(r,n),{textX:(a.left+a.right)/2,textY:(a.top+a.bottom)/2,targetX:v,targetY:m,scale:d,rotate:g}}e.exports={plot:function(t,e,r,p,d,x){var T=e.xaxis,S=e.yaxis,E=t._fullLayout;d||(d={mode:E.barmode,norm:E.barmode,gap:E.bargap,groupgap:E.bargroupgap});var C=i.makeTraceGroups(p,r,"trace bars").each(function(r){var c=n.select(this),p=r[0].trace,E="waterfall"===p.type,C="funnel"===p.type,L="bar"===p.type||C,P=0;E&&p.connector.visible&&"between"===p.connector.mode&&(P=p.connector.line.width/2);var O="h"===p.orientation,I=i.ensureSingle(c,"g","points"),z=b(p),D=I.selectAll("g.point").data(i.identity,z);D.enter().append("g").classed("point",!0),D.exit().remove(),D.each(function(c,b){var E,C,I=n.select(this),z=function(t,e,r,n){var a=[],i=[],o=n?e:r,s=n?r:e;return a[0]=o.c2p(t.s0,!0),i[0]=s.c2p(t.p0,!0),a[1]=o.c2p(t.s1,!0),i[1]=s.c2p(t.p1,!0),n?[a,i]:[i,a]}(c,T,S,O),D=z[0][0],R=z[0][1],F=z[1][0],B=z[1][1],N=!(D!==R&&F!==B&&a(D)&&a(R)&&a(F)&&a(B));if(N&&L&&f.getLineWidth(p,c)&&(O?R-D==0:B-F==0)&&(N=!1),c.isBlank=N,N&&O&&(R=D),N&&!O&&(B=F),P&&!N&&(O?(D-=_(D,R)*P,R+=_(D,R)*P):(F-=_(F,B)*P,B+=_(F,B)*P)),"waterfall"===p.type){if(!N){var j=p[c.dir].marker;E=j.line.width,C=j.color}}else E=f.getLineWidth(p,c),C=c.mc||p.marker.color;var V=n.round(E/2%1,2);function U(t){return 0===d.gap&&0===d.groupgap?n.round(Math.round(t)-V,2):t}if(!t._context.staticPlot){var q=s.opacity(C)<1||E>.01?U:function(t,e){return Math.abs(t-e)>=2?U(t):t>e?Math.ceil(t):Math.floor(t)};D=q(D,R),R=q(R,D),F=q(F,B),B=q(B,F)}var H=w(i.ensureSingle(I,"path"),d,x);if(H.style("vector-effect","non-scaling-stroke").attr("d","M"+D+","+F+"V"+B+"H"+R+"V"+F+"Z").call(l.setClipUrl,e.layerClipId,t),k(d)){var G=l.makePointStyleFns(p);l.singlePointStyle(c,H,p,G,t)}!function(t,e,r,n,a,s,c,p,d,x,b){var _,k=e.xaxis,T=e.yaxis,S=t._fullLayout;function E(e,r,n){var a=i.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t);return a}var C=n[0].trace,L="h"===C.orientation,P=function(t,e,r,n,a){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,a){var o=e[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l="h"===o.orientation,c="waterfall"===o.type,h="funnel"===o.type;function f(t){var e=l?n:a;return u(e,+t,!0).text}var p,d=e[r],g={};g.label=d.p,g.labelLabel=(p=d.p,u(l?a:n,p,!0).text);var v=i.castOption(o,d.i,"text");(0===v||v)&&(g.text=v),g.value=d.s,g.valueLabel=f(d.s);var y={};m(y,o,d.i),c&&(g.delta=+d.rawS||d.s,g.deltaLabel=f(g.delta),g.final=d.v,g.finalLabel=f(g.final),g.initial=g.final-g.delta,g.initialLabel=f(g.initial)),h&&(g.value=d.s,g.valueLabel=f(g.value),g.percentInitial=d.begR,g.percentInitialLabel=i.formatPercent(d.begR),g.percentPrevious=d.difR,g.percentPreviousLabel=i.formatPercent(d.difR),g.percentTotal=d.sumR,g.percenTotalLabel=i.formatPercent(d.sumR));var x=i.castOption(o,d.i,"customdata");return x&&(g.customdata=x),i.texttemplateString(s,g,t._d3locale,y,g,o._meta||{})}(t,e,r,n,a):s.textinfo?function(t,e,r,n){var a=t[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function c(t){var e=o?r:n;return u(e,+t,!0).text}var h,f,p=a.textinfo,d=t[e],g=p.split("+"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m("label")&&v.push((f=t[e].p,u(o?n:r,f,!0).text)),m("text")&&(0===(h=i.castOption(a,d.i,"text"))||h)&&v.push(h),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m("initial")&&v.push(c(b)),m("delta")&&v.push(c(y)),m("final")&&v.push(c(x))}if(l){m("value")&&v.push(c(d.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(h=i.formatPercent(d.begR),w&&(h+=" of initial"),v.push(h)),m("percent previous")&&(h=i.formatPercent(d.difR),w&&(h+=" of previous"),v.push(h)),m("percent total")&&(h=i.formatPercent(d.sumR),w&&(h+=" of total"),v.push(h))}return v.join("
")}(e,r,n,a):f.getValue(s.text,r),f.coerceString(g,o)}(S,n,a,k,T);_=function(t,e){var r=f.getValue(t.textposition,e);return f.coerceEnumerated(v,r)}(C,a);var O="stack"===x.mode||"relative"===x.mode,I=n[a],z=!O||I._outmost;if(P&&"none"!==_&&(!I.isBlank&&s!==c&&p!==d||"auto"!==_&&"inside"!==_)){var D=S.font,R=h.getBarColor(n[a],C),F=h.getInsideTextFont(C,a,D,R),B=h.getOutsideTextFont(C,a,D),N=r.datum();L?"log"===k.type&&N.s0<=0&&(s=k.range[0]0&&q>0,Z=U<=Y&&q<=W,J=U<=W&&q<=Y,K=L?Y>=U*(W/q):W>=q*(Y/U);X&&(Z||J||K)?_="inside":(_="outside",j.remove(),j=null)}else _="inside";if(!j){var Q=(j=E(r,P,"outside"===_?B:F)).attr("transform");if(j.attr("transform",""),V=l.bBox(j.node()),U=V.width,q=V.height,j.attr("transform",Q),U<=0||q<=0)return void j.remove()}"outside"===_?(G="both"===C.constraintext||"outside"===C.constraintext,H=i.getTextTransform(M(s,c,p,d,V,{isHorizontal:L,constrained:G,angle:C.textangle}))):(G="both"===C.constraintext||"inside"===C.constraintext,H=i.getTextTransform(A(s,c,p,d,V,{isHorizontal:L,constrained:G,angle:C.textangle,anchor:C.insidetextanchor}))),w(j,x,b).attr("transform",H)}else r.select("text").remove()}(t,e,I,r,b,D,R,F,B,d,x),e.layerClipId&&l.hideOutsideRangePoint(c,I.select("text"),T,S,p.xcalendar,p.ycalendar)});var R=!1===p.cliponaxis;l.setClipUrl(c,R?null:e.layerClipId,t)});c.getComponentMethod("errorbars","plot")(t,C,e,d)},toMoveInsideBar:A,toMoveOutsideBar:M}},{"../../components/color":594,"../../components/drawing":615,"../../components/fx/helpers":629,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../registry":848,"./attributes":858,"./constants":860,"./helpers":863,"./style":871,d3:164,"fast-isnumeric":226}],869:[function(t,e,r){"use strict";function n(t,e,r,n,a){var i=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 a?[(i+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(i+o)/2,l]}e.exports=function(t,e){var r,a=t.cd,i=t.xaxis,o=t.yaxis,s=a[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===a.bargap&&0===a.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(e){p(n.select(this),e[0].trace,t)}),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:d,styleOnSelect:function(t,e,r){var a=e[0].trace;a.selectedpoints?function(t,e,r){i.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each(function(t){var a,s=n.select(this);if(t.selected){a=o.extendFlat({},g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(a.color=l),i.font(s,a)}else i.selectedTextStyle(s,e)})}(t.selectAll("text"),e,r)}(r,a,t):(p(r,a,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:y,getBarColor:b}},{"../../components/color":594,"../../components/drawing":615,"../../lib":719,"../../registry":848,"./attributes":858,"./helpers":863,d3:164}],872:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),a(t,"marker")&&i(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(t,"marker.line")&&i(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":594,"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605}],873:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../lib/extend").extendFlat,i=t("../scatterpolar/attributes"),o=t("../bar/attributes");e.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:a({},o.base,{}),offset:a({},o.offset,{}),width:a({},o.width,{}),text:a({},o.text,{}),hovertext:a({},o.hovertext,{}),marker:o.marker,hoverinfo:i.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{"../../lib/extend":710,"../../plots/template_attributes":843,"../bar/attributes":858,"../scatterpolar/attributes":1178}],874:[function(t,e,r){"use strict";var n=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/calc"),i=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"),h=c.makeCalcdata(e,"theta"),f=e._length,p=new Array(f),d=u,g=h,v=0;vf.range[1]&&(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=a.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,h,t),t.hovertemplate=u.hovertemplate,t.color=i(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":632,"../../lib":719,"../../plots/polar/helpers":830,"../bar/hover":864,"../scatterpolar/hover":1181}],877:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":831,"../bar/select":869,"../bar/style":871,"../scatter/marker_colorbar":1128,"./attributes":873,"./calc":874,"./defaults":875,"./hover":876,"./layout_attributes":878,"./layout_defaults":879,"./plot":880}],878:[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"}}},{}],879:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i,o={};function s(r,o){return n.coerce(t[i]||{},e[i],a,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var h=s.findEnclosingVertexAngles(c,t.vangles)[0],f=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[h,(c+u)/2,f];return s.pathPolygonAnnulus(n,a,c,u,p,e,r)};return function(t,n,a,o){return i.pathAnnulus(t,n,a,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");i.makeTraceGroups(p,r,"trace bars").each(function(){var r=n.select(this),s=i.ensureSingle(r,"g","points").selectAll("g.point").data(i.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=h.c2g(t.p0),d=t.thetag1=h.c2g(t.p1);if(a(o)&&a(s)&&a(p)&&a(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=f(o,s,p,d)}else e="M0,0Z";i.ensureSingle(r,"path").attr("d",e)}),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)})}},{"../../components/drawing":615,"../../lib":719,"../../plots/polar/helpers":830,d3:164,"fast-isnumeric":226}],881:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../bar/attributes"),i=t("../../components/color/attributes"),o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},name:{valType:"string",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers",editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1,editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},c.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},c.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,offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":593,"../../lib/extend":710,"../../plots/template_attributes":843,"../bar/attributes":858,"../scatter/attributes":1111}],882:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=a._,o=t("../../plots/cartesian/axes");function s(t,e,r){var n={text:"tx",hovertext:"htx"};for(var a in n)Array.isArray(e[a])&&(t[n[a]]=e[a][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,h,f,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||"x"),v=o.getFromId(t,e.yaxis||"y"),m=[],y="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(u=g,h="x",f=v,p="y"):(u=v,h="y",f=g,p="x");var x,b=u.makeCalcdata(e,h),_=function(t,e,r,i,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+"0"in t?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||a.isDateTime(t.name)&&"date"===r.type)?t.name:o;var l="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]);return i.map(function(){return l})}(e,p,f,b,d[y]),w=a.distinctVals(_),k=w.vals,T=w.minDiff/2,A=function(t,e){for(var r=t.length,n=new Array(r+1),a=0;a=0&&Cx.uf};for(r=0;r0){var O=S[r].sort(l),I=O.map(c),z=I.length;(x={}).pos=k[r],x.pts=O,x[p]=x.pos,x[h]=x.pts.map(function(t){return t.v}),x.min=I[0],x.max=I[z-1],x.mean=a.mean(I,z),x.sd=a.stdev(I,z,x.mean),x.q1=a.interp(I,.25),x.med=a.interp(I,.5),x.q3=a.interp(I,.75),x.lf=Math.min(x.q1,I[Math.min(a.findBin(2.5*x.q1-1.5*x.q3,I,!0)+1,z-1)]),x.uf=Math.max(x.q3,I[Math.max(a.findBin(2.5*x.q3-1.5*x.q1,I),0)]),x.lo=4*x.q1-3*x.q3,x.uo=4*x.q3-3*x.q1;var D=1.57*(x.q3-x.q1)/Math.sqrt(z);x.ln=x.med-D,x.un=x.med+D,x.pts2=O.filter(P),m.push(x)}!function(t,e){if(a.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(m[0].t={num:d[y],dPos:T,posLetter:p,valLetter:h,labels:{med:i(t,"median:"),min:i(t,"min:"),q1:i(t,"q1:"),q3:i(t,"q3:"),max:i(t,"max:"),mean:"sd"===e.boxmean?i(t,"mean \xb1 \u03c3:"):i(t,"mean:"),lf:i(t,"lower fence:"),uf:i(t,"upper fence:")}},d[y]++,m):[{t:{empty:!0}}]}},{"../../lib":719,"../../plots/cartesian/axes":767,"fast-isnumeric":226}],883:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib"),i=t("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,h=e._fullLayout,f=o._id,p=f.charAt(0),d=[],g=0;for(s=0;s1,b=1-h[t+"gap"],_=1-h[t+"groupgap"];for(s=0;s0){var H=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;H+G>=0&&((W=U*(H+G))>M?(q=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;H-G<=0&&((X=-U*(H-G))>S?(q=!0,V=Y,N=X):X>F&&(V=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;lt.lo&&(_.so=!0)}return i});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(i.translatePoints,l,c)}function u(t,e,r,i){var o,s,l=e.pos,c=e.val,u=i.bPos,h=i.bPosPxOffset||0,f=r.boxmean||(r.meanline||{}).visible;Array.isArray(i.bdPos)?(o=i.bdPos[0],s=i.bdPos[1]):(o=i.bdPos,s=i.bdPos);var p=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?a.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+h,a=l.c2p(t.pos+u-o,!0)+h,i=l.c2p(t.pos+u+s,!0)+h,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+p+","+a+"V"+i+("sd"===f?"m0,0L"+d+","+e+"L"+p+","+a+"L"+g+","+e+"Z":"")):n.select(this).attr("d","M"+a+","+p+"H"+i+("sd"===f?"m0,0L"+e+","+d+"L"+a+","+p+"L"+e+","+g+"Z":""))})}e.exports={plot:function(t,e,r,i){var o=e.xaxis,s=e.yaxis;a.makeTraceGroups(i,r,"trace boxes").each(function(t){var e,r,a=n.select(this),i=t[0],h=i.t,f=i.trace;h.wdPos=h.bdPos*f.whiskerwidth,!0!==f.visible||h.empty?a.remove():("h"===f.orientation?(e=s,r=o):(e=o,r=s),l(a,{pos:e,val:r},f,h),c(a,{x:o,y:s},f,h),u(a,{pos:e,val:r},f,h))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{"../../components/drawing":615,"../../lib":719,d3:164}],891:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,a=t.cd,i=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;var a=1/0;var i=-1/0;var o=e.length;for(var s=0;s0?Math.floor:Math.ceil,O=C>0?Math.ceil:Math.floor,I=C>0?Math.min:Math.max,z=C>0?Math.max:Math.min,D=P(S+L),R=O(E-L),F=[[h=M(S)]];for(i=D;i*C=0;a--)i[u-a]=t[h][a],o[u-a]=e[h][a];for(s.push({x:i,y:o,bicubic:l}),a=h,i=[],o=[];a>=0;a--)i[h-a]=t[a][0],o[h-a]=e[a][0];return s.push({x:i,y:o,bicubic:c}),s}},{}],905:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e,r){var i,o,s,l,c,u,h,f,p,d,g,v,m,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,C=M.length,L=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var a,i,o,s,l,c,u,h,p,d,g,v,m=[],y=[],x={};if("b"===e)for(i=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,i))),s=i-o,x.length=P,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,i)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},a=0;a0&&(p=t.dxydi([],a-1,o,0,s),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],a-1,o,1,s),m.push(h[0]-d[0]/3),y.push(h[1]-d[1]/3)),m.push(h[0]),y.push(h[1]),l=h;else for(a=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,a))),u=a-c,x.length=L,x.crossLength=P,x.xy=function(e){return t.evalxy([],a,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},i=0;i0&&(g=t.dxydj([],c,i-1,u,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,i-1,u,1),m.push(h[0]-v[0]/3),y.push(h[1]-v[1]/3)),m.push(h[0]),y.push(h[1]),l=h;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=f,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function z(n){var a,i,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=T.length,"b"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),h.xy=function(e){return t.evalxy([],e,n)},h.dxy=function(e,r){return t.dxydi([],e,o,r,l)},a=0;ax.length-1||_.push(a(z(o),{color:b.gridcolor,width:b.gridwidth}));for(f=u;fx.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],i=0;ix[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(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],h=c[1],f=u;f<=h;f++)p=b.tick0+b.dtick*f,_.push(a(I(p),{color:b.gridcolor,width:b.gridwidth}));for(f=u-1;fx[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":710,"../../plots/cartesian/axes":767}],906:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,i,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],a=0;a90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],920:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=t("../../constants/alignment");function h(t,e,r,a,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 a=r,s=a.x,l=a.y,c=i([],s,t.c2p),u=i([],l,e.c2p),h="M"+o(c,u,a.smoothing);n.select(this).attr("d",h).style("stroke-width",a.width).style("stroke",a.color).style("fill","none")}),u.exit().remove()}function f(t,e,r,i,o,c,u,h){var f=c.selectAll("text."+h).data(u);f.enter().append("text").classed(h,!0);var p=0,d={};return f.each(function(o,c){var u;if("auto"===o.axis.tickangle)u=s(i,e,r,o.xy,o.dxy);else{var h=(o.axis.tickangle+180)*Math.PI/180;u=s(i,e,r,o.xy,[Math.cos(h),Math.sin(h)])}c||(d={angle:u.angle,flip:u.flip});var f=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({"text-anchor":f>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(l.convertToTspans,t),v=a.bBox(this);g.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*f+","+.3*v.height+")"),p=Math.max(p,v.width+o.axis.labelpadding)}),f.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,a){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(a,r,"trace").each(function(e){var r=n.select(this),a=e[0],d=a.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),h(l,u,x,v,"a",v._gridlines),h(l,u,x,m,"b",m._gridlines),h(l,u,y,v,"a",v._minorgridlines),h(l,u,y,m,"b",m._minorgridlines),h(l,u,b,v,"a-boundary",v._boundarylines),h(l,u,b,m,"b-boundary",m._boundarylines);var w=f(t,l,u,d,a,_,v._labels,"a-label"),k=f(t,l,u,d,a,_,m._labels,"b-label");!function(t,e,r,n,a,i,o,l){var u,h,f,p,d=c.aggNums(Math.min,null,r.a),v=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+v),h=m,f=r.ab2xy(u,h,!0),p=r.dxyda_rough(u,h),void 0===o.angle&&c.extendFlat(o,s(r,a,i,f,r.dxydb_rough(u,h)));g(t,e,r,n,f,p,r.aaxis,a,i,o,"a-title"),u=d,h=.5*(m+y),f=r.ab2xy(u,h,!0),p=r.dxydb_rough(u,h),void 0===l.angle&&c.extendFlat(l,s(r,a,i,f,r.dxyda_rough(u,h)));g(t,e,r,n,f,p,r.baxis,a,i,l,"b-title")}(t,_,d,a,l,u,w,k),function(t,e,r,n,a){var s,l,u,h,f=r.select("#"+t._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var p=c.ensureSingle(f,"path","carpetboundary"),d=e.clipsegments,g=[];for(h=0;h90&&v<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*p*i-x),y.attr("transform","translate("+e.p[0]+","+e.p[1]+") rotate("+e.angle+") translate(0,"+x+")").classed("user-select-none",!0).attr("text-anchor","middle").call(a.font,u.title.font)}),y.exit().remove()}},{"../../components/drawing":615,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"./makepath":917,"./map_1d_array":918,"./orient_text":919,d3:164}],921:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/search").findBin,i=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,h=t.aaxis,f=t.baxis,p=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||ev},t.setScale=function(){var e=t._x,r=t._y,n=i(t._xctrl,t._yctrl,e,r,h.smoothing,f.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,h.smoothing,f.smoothing),t.dxydi=s([t._xctrl,t._yctrl],h.smoothing,f.smoothing),t.dxydj=l([t._xctrl,t._yctrl],h.smoothing,f.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(a(t,e),c-2)),n=e[r],i=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(i-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(a(t,r),u-2)),n=r[e],i=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(i-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,a,i){if(!i&&(ne[c-1]|ar[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(a),l=t.evalxy([],o,s);if(i){var h,f,p,d,g=0,v=0,m=[];ne[c-1]?(h=c-2,f=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):f=o-(h=Math.max(0,Math.min(c-2,Math.floor(o)))),ar[u-1]?(p=u-2,d=1,v=(a-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,h,p,f,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,h,p,f,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,a){var i=t.dxydi(null,e,r,n,a),o=t.dadi(e,n);return[i[0]/o,i[1]/o]},t.dxydb=function(e,r,n,a){var i=t.dxydj(null,e,r,n,a),o=t.dbdj(r,a);return[i[0]/o,i[1]/o]},t.dxyda_rough=function(e,r,n){var a=m*(n||.1),i=t.ab2xy(e+a,r,!0),o=t.ab2xy(e-a,r,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dxydb_rough=function(e,r,n){var a=y*(n||.1),i=t.ab2xy(e,r+a,!0),o=t.ab2xy(e,r-a,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":738,"./compute_control_points":909,"./constants":910,"./create_i_derivative_evaluator":911,"./create_j_derivative_evaluator":912,"./create_spline_evaluator":913}],922:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var a,i,o,s=[],l=[],c=t[0].length,u=t.length;function h(e,r){var n,a=0,i=0;return e>0&&void 0!==(n=t[r][e-1])&&(i++,a+=n),e0&&void 0!==(n=t[r-1][e])&&(i++,a+=n),r0&&i0&&a1e-5);return n.log("Smoother converged to",T,"after",A,"iterations"),t}},{"../../lib":719}],923:[function(t,e,r){"use strict";var n=t("../../lib").isArray1D;e.exports=function(t,e,r){var a=r("x"),i=a&&a.length,o=r("y"),s=o&&o.length;if(!i&&!s)return!1;if(e._cheater=!a,i&&!n(a)||s&&!n(o))e._length=null;else{var l=i?a.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":719}],924:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../scattergeo/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../plots/attributes"),s=t("../../components/color/attributes").defaultLine,l=t("../../lib/extend").extendFlat,c=a.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},text:l({},a.text,{}),hovertext:l({},a.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:a.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:a.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n()},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":593,"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../scattergeo/attributes":1150}],925:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../constants/numerical").BADNUM,i=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 h=0;h")}(t,h,o,f.mockAxis),[t]}},{"../../lib":719,"../../plots/cartesian/axes":767,"./attributes":924}],929:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),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"],meta:{}}},{"../../plots/geo":797,"../heatmap/colorbar":1003,"./attributes":924,"./calc":925,"./defaults":926,"./event_data":927,"./hover":928,"./plot":930,"./select":931,"./style":932}],930:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../lib/polygon"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("./style").style;function c(t,e){for(var r=t[0].trace,n=t.length,a=o(r,e),i=0;i0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===l||"FJI"===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),a=0;ae?r[n++]=[t[a][0]+360,t[a][1]]:a===e?(r[n++]=t[a],r[n++]=[t[a][0],-90]):r[n++]=t[a];var o=i.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(i.tester(t))},o.type){case"MultiPolygon":for(r=0;ro&&(o=c,e=l)}else e=r;return i.default(e).geometry.coordinates}(s),e.fIn=t,e.fOut=s,m.push(s)}else o.log(["Location with id",e.loc,"does not have a valid GeoJSON geometry,","choroplethmapbox traces only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete v[t.id]}switch(o.isArrayOrTypedArray(k.opacity)&&(x=function(t){var e=t.mo;return n(e)?+o.constrain(e,0,1):0}),o.isArrayOrTypedArray(T.color)&&(b=function(t){return t.mlc}),o.isArrayOrTypedArray(T.width)&&(_=function(t){return t.mlw}),d.type){case"FeatureCollection":var M=d.features;for(g=0;g=0;n--){var a=r[n].id;if("string"==typeof a&&0===a.indexOf("water"))for(var i=n+1;i=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,a=new o(t,r.uid),i=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(i,{type:"geojson",data:s.geojson}),a._addLayers(s,l),e[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":820,"./convert":934}],938:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach(function(t){l[t]=i[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,e.exports=l},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../mesh3d/attributes":1052}],939:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,a=e.v,i=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,a.length,i.length),s=-1/0,l=1/0,c=0;co.level||o.starts.length&&i===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&&f===u)&&(n.prefixBoundary=!0);break;case"][":h=Math.min(p[0],p[1]),f=Math.max(p[0],p[1]),hc&&(n.prefixBoundary=!0)}}}},{}],946:[function(t,e,r){"use strict";var n=t("../../components/colorscale").extractOpts,a=t("./make_color_map"),i=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=a(e,{isColorbar:!0});if("heatmap"===c){var h=n(e);r._fillgradient=e.colorscale,r._zrange=[h.min,h.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:i(o),size:l}}}},{"../../components/colorscale":606,"./end_plus":954,"./make_color_map":959}],947:[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}}},{}],948:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./label_defaults"),i=t("../../components/color"),o=i.addOpacity,s=i.opacity,l=t("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,i,l,h){var f,p,d,g=e.contours,v=r("contours.operation");(g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===v?f=g.showlines=!0:(f=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),f)&&(p=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash"));r("line.smoothing"),a(r,i,p,h)}},{"../../components/color":594,"../../constants/filter_ops":691,"./label_defaults":958,"fast-isnumeric":226}],949:[function(t,e,r){"use strict";var n=t("../../constants/filter_ops"),a=t("fast-isnumeric");function i(t,e){var r,i=Array.isArray(e);function o(t){return a(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(i?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=i?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=i?e.map(o):[o(e)]),r}function o(t){return function(e){e=i(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=i(t,e),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":691,"fast-isnumeric":226}],950:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],951:[function(t,e,r){"use strict";var n=t("../../lib");function a(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,i,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."),i=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":719,"./constraint_mapping":949,"./end_plus":954}],954:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],955:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./constants");function i(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(t)?i=1:-1!==a.LEFTSTART.indexOf(t)?n=1:-1!==a.TOPSTART.indexOf(t)?i=-1:n=-1;return[n,i]}(h,r,e),p=[s(t,e,[-f[0],-f[1]])],d=t.z.length,g=t.z[0].length,v=e.slice(),m=f.slice();for(c=0;c<1e4;c++){if(h>20?(h=a.CHOOSESADDLE[h][(f[0]||f[1])<0?0:1],t.crossings[u]=a.SADDLEREMAINDER[h]):delete t.crossings[u],!(f=a.NEWDELTA[h])){n.log("Found bad marching index:",h,e,t.level);break}p.push(s(t,e,f)),e[0]+=f[0],e[1]+=f[1],u=e.join(","),i(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=f[0]&&(e[0]<0||e[0]>g-2)||f[1]&&(e[1]<0||e[1]>d-2);if(e[0]===v[0]&&e[1]===v[1]&&f[0]===m[0]&&f[1]===m[1]||r&&y)break;h=t.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,A,M,S,E,C,L,P,O,I,z=i(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]=C.concat(p,E));break}U||(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,i,o,s,l,c,u,h,f=t[0].z,p=f.length,d=f[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):a.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;h+="L"+n}if(s===t.edgepaths.length){a.log("unclosed perimeter path");break}f=s,(d=-1===p.indexOf(f))&&(f=p[0],h+="Z")}for(f=0;fn.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(h)+Math.cos(c)*o);if(f<1||p<1)return 1/0;var d=m.EDGECOST*(1/(f-1)+1/(p-1));d+=m.ANGLECOST*c*c;for(var g=s-u,v=l-h,y=s+u,x=l+h,b=0;b2*m.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=m.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var a=e.width/2,i=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),h=a*u,f=i*c,p=a*c,d=-i*u,g=[[o-h-f,s-p-d],[o+h-f,s+p-d],[o+h+f,s+p+d],[o-h+f,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,i,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,a=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:a,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+a+")"}).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={}),a.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,h=r.end,f=t._input.contours;if(u>h&&(r.start=f.start=h,h=r.end=f.end=u,u=r.start),!(r.size>0))c=u===h?1:i(u,h,t.ncontours).dtick,f.size=r.size=c}}},{"../../lib":719,"../../plots/cartesian/axes":767}],963:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=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,i=r.contours,s=r.line,l=i.size||1,c=i.start,u="constraint"===i.type,h=!u&&"lines"===i.coloring,f=!u&&"fill"===i.coloring,p=h||f?o(r):null;e.selectAll("g.contourlevel").each(function(t){n.select(this).selectAll("path").call(a.lineGroupStyle,s.width,h?p(t.level):s.color,s.dash)});var d=i.labelfont;if(e.selectAll("g.contourlabels text").each(function(t){a.font(n.select(this),{family:d.family,size:d.size,color:d.color||(h?p(t.level):s.color)})}),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(f){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))}}),i(t)}},{"../../components/drawing":615,"../heatmap/style":1012,"./make_color_map":959,d3:164}],964:[function(t,e,r){"use strict";var n=t("../../components/colorscale/defaults"),a=t("./label_defaults");e.exports=function(t,e,r,i,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,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,c,o)}},{"../../components/colorscale/defaults":604,"./label_defaults":958}],965:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),a=t("../contour/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../lib/extend").extendFlat,s=a.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:a.fillcolor,autocontour:a.autocontour,ncontours:a.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:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../contour/attributes":943,"../heatmap/attributes":1e3}],966:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),a=t("../../lib"),i=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"),h=t("../carpet/lookup_carpetid"),f=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var 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,h,f,p,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,a.isArray1D(e.z)&&i(e,m,y,"a","b",["z"]);r=e._a=e._a||e.a,f=e._b=e._b||e.b,r=r?m.makeCalcdata(e,"_a"):[],f=f?y.makeCalcdata(e,"_b"):[],u=e.a0||0,h=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=a.maxRowLength(g),b="scaled"===e.xtype?"":r,_=c(e,b,u,h,x,m),w="scaled"===e.ytype?"":f,k=c(e,w,p,d,g.length,y),T={a:_,b:k,z:g};"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"});return[T]}(t,e);return f(e,e._z),g}}},{"../../components/colorscale/calc":602,"../../lib":719,"../carpet/lookup_carpetid":916,"../contour/set_contours":962,"../heatmap/clean_2d_array":1002,"../heatmap/convert_column_xyz":1004,"../heatmap/find_empties":1006,"../heatmap/interp2d":1009,"../heatmap/make_bound_array":1010,"./defaults":967}],967:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../heatmap/xyz_defaults"),i=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,a){return n.coerce(t,e,i,r,a)}if(u("carpet"),t.a&&t.b){if(!a(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,i,r)}),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{"../../lib":719,"../contour/constraint_defaults":948,"../contour/contours_defaults":950,"../contour/style_defaults":964,"../heatmap/xyz_defaults":1014,"./attributes":965}],968:[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"],meta:{}}},{"../../plots/cartesian":778,"../contour/colorbar":946,"../contour/style":963,"./attributes":965,"./calc":966,"./defaults":967,"./plot":969}],969:[function(t,e,r){"use strict";var n=t("d3"),a=t("../carpet/map_1d_array"),i=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"),h=t("../contour/constants"),f=t("../contour/convert_to_constraints"),p=t("../contour/empty_pathinfo"),d=t("../contour/close_boundaries"),g=t("../carpet/lookup_carpetid"),v=t("../carpet/axis_aligned_line");function m(t,e,r){var n=t.getPointAtLength(e),a=t.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/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),k=r[0],T=k.trace,A=T._carpetTrace=g(t,T),M=t.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var S=k.a,E=k.b,C=T.contours,L=p(C,e,k),P="constraint"===C.type,O=C._operation,I=P?"="===O?"lines":"fill":C.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(L);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(L,D,R);var F,B,N,j,V=L;"constraint"===C.type&&(V=f(L,O)),function(t,e){var r,n,a,i,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=a([],F.x,_.c2p),N=a([],F.y,w.c2p),B.reverse(),N.reverse(),U.push(i(B,N,F.bicubic));var q="M"+U.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,h,f,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(f=0;f=0&&(f=C,d=g):Math.abs(h[1]-f[1])=0&&(f=C,d=g):s.log("endpt to newendpt is not vert. or horz.",h,f,C)}if(d>=0)break;y+=S(h,f),h=f}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(h,f)+"Z",h=null)}for(u=0;uv&&(n.max=v);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*h.LABELMIN)))for(var a=Math.min(Math.ceil(n.len/O),h.LABELMAX),i=0;i0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u<_.length;u++)k.push(_[u][0],_[u][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return a.extendFlat(c.heatmap.paint,{"heatmap-weight":d?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}},{"../../components/color":594,"../../components/colorscale":606,"../../constants/numerical":695,"../../lib":719,"../../lib/geojson_utils":714,"fast-isnumeric":226}],973:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/colorscale/defaults"),i=t("./attributes");e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}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"),a(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":604,"../../lib":719,"./attributes":970}],974:[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}},{}],975:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("../scattermapbox/hover");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 h=s.subplot.mockAxis;s.z=u.z,s.zLabel=a.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(t.hovertemplate)return;var a=(e.hi||t.hoverinfo).split("+"),i=-1!==a.indexOf("all"),o=-1!==a.indexOf("lon"),s=-1!==a.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}i||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==a.indexOf("text"))&&n.fillText(e,t,c);return c.join("
")}(c,u,l[0].t.labels),[s]}}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scattermapbox/hover":1174}],976:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),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,a=new i(t,r.uid),o=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}},{"../../plots/mapbox/constants":820,"./convert":972}],978:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.color=function(t,e){var r=t.marker,a=e.mc||r.color,i=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(a))return a;if(n(i)&&o)return i}(c,h),[s]}}},{"../../components/color":594,"../../lib":719,"../bar/hover":864}],986:[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":778,"../bar/select":869,"./attributes":979,"./calc":980,"./cross_trace_calc":982,"./defaults":983,"./event_data":984,"./hover":985,"./layout_attributes":987,"./layout_defaults":988,"./plot":989,"./style":990}],987:[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"}}},{}],988:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s path").each(function(t){if(!t.isBlank){var e=l.marker;n.select(this).call(i.fill,t.mc||e.color).call(i.stroke,t.mlc||e.line.color).call(a.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".regions").each(function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,l.connector.fillcolor)}),r.selectAll(".lines").each(function(){var t=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":594,"../../components/drawing":615,"../../constants/interactions":694,"../bar/style":871,d3:164}],991:[function(t,e,r){"use strict";var n=t("../pie/attributes"),a=t("../../plots/attributes"),i=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({},a.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:i({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":710,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/template_attributes":843,"../pie/attributes":1085}],992:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="funnelarea",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":828}],993:[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":1087}],994:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText;e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,a,r,i)}var c,u=l("values"),h=n.isArrayOrTypedArray(u),f=l("labels");if(Array.isArray(f)?(c=f.length,h&&(c=Math.min(c,u.length))):h&&(c=u.length,l("label0"),l("dlabel")),c){e._length=c,l("marker.line.width")&&l("marker.line.color",s.paper_bgcolor),l("marker.colors"),l("scalegroup");var p,d=l("text"),g=l("texttemplate");if(g||(p=l("textinfo",Array.isArray(d)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),g||p&&"none"!==p){var v=l("textposition");o(t,e,s,l,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(e,s,l),l("title.text")&&(l("title.position"),n.coerceFont(l,"title.font",s.font)),l("aspectratio"),l("baseratio")}else e.visible=!1}},{"../../lib":719,"../../plots/domain":792,"../bar/defaults":862,"./attributes":991}],995:[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":1096,"./attributes":991,"./base_plot":992,"./calc":993,"./defaults":994,"./layout_attributes":996,"./layout_defaults":997,"./plot":998,"./style":999}],996:[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":1092}],997:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},{"../../lib":719,"./layout_attributes":996}],998:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("../../lib"),o=t("../../lib/svg_text_utils"),s=t("../bar/plot").toMoveInsideBar,l=t("../pie/helpers"),c=t("../pie/plot"),u=c.attachFxHandlers,h=c.determineInsideTextFont,f=c.layoutAreas,p=c.prerenderTitles,d=c.positionTitleOutside;function g(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;p(e,t),f(e,r._size),i.makeTraceGroups(r._funnelarealayer,e,"trace").each(function(e){var f=n.select(this),p=e[0],v=p.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o=Math.pow(a,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 h,f,p=[];for(p.push(u()),h=t.length-1;h>-1;h--)if(!(f=t[h]).hidden){var d=f.v/l;c+=d,p.push(u())}var g=1/0,v=-1/0;for(h=0;h-1;h--)if(!(f=t[h]).hidden){var A=p[T+=1][0],M=p[T][1];f.TL=[-A,M],f.TR=[A,M],f.BL=w,f.BR=k,f.pxmid=(S=f.TR,E=f.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=f.TL,k=f.TR}var S,E}(e),f.each(function(){var f=n.select(this).selectAll("g.slice").data(e);f.enter().append("g").classed("slice",!0),f.exit().remove(),f.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=v.index;var f=p.cx,d=p.cy,m=n.select(this),y=m.selectAll("path.surface").data([r]);y.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),m.call(u,t,e);var x="M"+(f+r.TR[0])+","+(d+r.TR[1])+g(r.TR,r.BR)+g(r.BR,r.BL)+g(r.BL,r.TL)+"Z";y.attr("d",x),c.formatSliceLabel(t,r,p);var b=l.castOption(v.textposition,r.pts),_=m.selectAll("g.slicetext").data(r.text&&"none"!==b?[0]:[]);_.enter().append("g").classed("slicetext",!0),_.exit().remove(),_.each(function(){var e=i.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,h(v,r,t._fullLayout.font)).call(o.convertToTspans,t);var l,c,u,p=a.bBox(e.node()),g=Math.min(r.BL[1],r.BR[1]),m=Math.max(r.TL[1],r.TR[1]);c=Math.max(r.TL[0],r.BL[0]),u=Math.min(r.TR[0],r.BR[0]),l=i.getTextTransform(s(c,u,g,m,p,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})),e.attr("transform","translate("+f+","+d+")"+l)})}});var m=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);m.enter().append("g").classed("titletext",!0),m.exit().remove(),m.each(function(){var e=i.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),s=v.title.text;v._meta&&(s=i.templateString(s,v._meta)),e.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,v.title.font).call(o.convertToTspans,t);var l=d(p,r._size);e.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")})})})}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../bar/plot":868,"../pie/helpers":1090,"../pie/plot":1094,d3:164}],999:[function(t,e,r){"use strict";var n=t("d3"),a=t("../pie/style_one");e.exports=function(t){t._fullLayout._funnelarealayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(a,t,e)})})}},{"../pie/style_one":1096,d3:164}],1000:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../../components/colorscale/attributes"),o=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},n.x,{impliedEdits:{xtype:"array"}}),x0:o({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},n.y,{impliedEdits:{ytype:"array"}}),y0:o({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},n.dy,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},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"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:a()},{transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":601,"../../constants/docs":690,"../../lib/extend":710,"../../plots/template_attributes":843,"../scatter/attributes":1111}],1001:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../histogram2d/calc"),s=t("../../components/colorscale/calc"),l=t("./convert_column_xyz"),c=t("./clean_2d_array"),u=t("./interp2d"),h=t("./find_empties"),f=t("./make_bound_array");e.exports=function(t,e){var r,p,d,g,v,m,y,x,b,_=i.getFromId(t,e.xaxis||"x"),w=i.getFromId(t,e.yaxis||"y"),k=n.traceIs(e,"contour"),T=n.traceIs(e,"histogram"),A=n.traceIs(e,"gl2d"),M=k?"best":e.zsmooth;if(_._minDtick=0,w._minDtick=0,T)r=(b=o(t,e)).x,p=b.x0,d=b.dx,g=b.y,v=b.y0,m=b.dy,y=b.z;else{var S=e.z;a.isArray1D(S)?(l(e,_,w,"x","y",["z"]),r=e._x,g=e._y,S=e._z):(r=e._x=e.x?_.makeCalcdata(e,"x"):[],g=e._y=e.y?w.makeCalcdata(e,"y"):[]),p=e.x0,d=e.dx,v=e.y0,m=e.dy,y=c(S,e,_,w),(k||e.connectgaps)&&(e._emptypoints=h(y),u(y,e._emptypoints))}function E(t){M=e._input.zsmooth=e.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+t)}if("fast"===M)if("log"===_.type||"log"===w.type)E("log axis found");else if(!T){if(r.length){var C=(r[r.length-1]-r[0])/(r.length-1),L=Math.abs(C/100);for(x=0;xL){E("x scale is not linear");break}}if(g.length&&"fast"===M){var P=(g[g.length-1]-g[0])/(g.length-1),O=Math.abs(P/100);for(x=0;xO){E("y scale is not linear");break}}}var I=a.maxRowLength(y),z="scaled"===e.xtype?"":r,D=f(e,z,p,d,I,_),R="scaled"===e.ytype?"":g,F=f(e,R,v,m,y.length,w);A||(e._extremes[_._id]=i.findExtremes(_,D),e._extremes[w._id]=i.findExtremes(w,F));var B={x:D,y:F,z:y,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(z&&z.length===D.length-1&&(B.xCenter=z),R&&R.length===F.length-1&&(B.yCenter=R),T&&(B.xRanges=b.xRanges,B.yRanges=b.yRanges,B.pts=b.pts),k||s(t,e,{vals:y,cLetter:"z"}),k&&e.contours&&"heatmap"===e.contours.coloring){var N={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};B.xfill=f(N,z,p,d,I,_),B.yfill=f(N,R,v,m,y.length,w)}return[B]}},{"../../components/colorscale/calc":602,"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":848,"../histogram2d/calc":1032,"./clean_2d_array":1002,"./convert_column_xyz":1004,"./find_empties":1006,"./interp2d":1009,"./make_bound_array":1010}],1002:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,h,f;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,h=0;h=0;o--)(s=((h[[(r=(i=f[o])[0])-1,a=i[1]]]||g)[2]+(h[[r+1,a]]||g)[2]+(h[[r,a-1]]||g)[2]+(h[[r,a+1]]||g)[2])/20)&&(l[i]=[r,a,s],f.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(i in l)h[i]=l[i],u.push(l[i])}return u.sort(function(t,e){return e[2]-t[2]})}},{"../../lib":719}],1007:[function(t,e,r){"use strict";var n=t("../../components/fx"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../../components/colorscale").extractOpts;e.exports=function(t,e,r,s,l,c){var u,h,f,p,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,A=y,M=x;if(!1!==t.index){try{f=Math.round(t.index[1]),p=Math.round(t.index[0])}catch(e){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(f<0||f>=b[0].length||p<0||p>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(c){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(m=Math.max(m,Math.abs(t[i][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,a=1;for(o(t,e),r=0;r.01;r++)a=o(t,e,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),t}},{"../../lib":719}],1010:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib").isArrayOrTypedArray;e.exports=function(t,e,r,i,o,s){var l,c,u,h=[],f=n.traceIs(t,"contour"),p=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(a(e)&&e.length>1&&!p&&"category"!==s.type){var g=e.length;if(!(g<=o))return f?e.slice(0,o):e.slice(0,o+1);if(f||d)h=e.slice(0,o);else if(1===o)h=[e[0]-.5,e[0]+.5];else{for(h=[1.5*e[0]-.5*e[1]],u=1;u0;)f=p.c2p(k[y]),y--;for(f0;)m=d.c2p(T[y]),y--;if(m0&&(i=!0);for(var l=0;li){var o=i-r[t];return r[t]=i,o}}return 0},max:function(t,e,r,a){var i=a[e];if(n(i)){if(i=Number(i),!n(r[t]))return r[t]=i,i;if(r[t]c?t>o?t>1.1*a?a:t>1.1*i?i:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,i,s){if(n&&t>o){var l=d(e,i,s),c=d(r,i,s),u=t===a?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,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(t,e,r,n,i){var s,l,c=-1.1*e,f=-.1*e,p=t-f,d=r[0],g=r[1],v=Math.min(h(d+f,d+p,n,i),h(g+f,g+p,n,i)),m=Math.min(h(d+c,d+f,n,i),h(g+c,g+f,n,i));if(v>m&&mo){var y=s===a?1:6,x=s===a?"M12":"M1";return function(e,r){var o=n.c2d(e,a,i),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,i);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||a.nestedProperty(e,m+".start").set(z.start)}var V=b.end,U=r.r2l(I.end),q=void 0!==U;if((b.endFound||q)&&U!==r.r2l(V)){var H=q?U:a.aggNums(Math.max,null,d);z.end=r.l2r(H),q||a.nestedProperty(e,m+".start").set(z.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[m]=a.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,i,p,d,g=[],v=[],m=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=f(t,e,m,y),k=w[0],T=w[1],A="string"==typeof k.size,M=[],S=A?M:k,E=[],C=[],L=[],P=0,O=e.histnorm,I=e.histfunc,z=-1!==O.indexOf("density");_.enabled&&z&&(O=O.replace(/ ?density$/,""),z=!1);var D,R="max"===I||"min"===I?null:0,F=l.count,B=c[O],N=!1,j=function(t){return m.r2c(t,0,b)};for(a.isArrayOrTypedArray(e[x])&&"count"!==I&&(D=e[x],N="avg"===I,F=l[I]),r=j(k.start),p=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/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())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],J=0,K=X-1;for(r=0;r=J;r--)if(v[r]){K=r;break}for(r=J;r<=K;r++)if(n(g[r])&&n(v[r])){var Q={p:g[r],s:v[r],b:0};_.enabled||(Q.pts=L[r],q?Q.ph0=Q.ph1=L[r].length?T[L[r][0]]:g[r]:(Q.ph0=V(M[r]),Q.ph1=V(M[r+1],!0))),Z.push(Q)}return 1===Z.length&&(Z[0].width1=o.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),s(Z,e),a.isArrayOrTypedArray(e.selectedpoints)&&a.tagSelected(Z,e,Y),Z},calcAllAutoBins:f}},{"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":848,"../bar/arrays_to_calcdata":857,"./average":1019,"./bin_functions":1021,"./bin_label_vals":1022,"./norm_functions":1030,"fast-isnumeric":226}],1024:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1025:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axis_ids"),i=t("../../registry").traceIs,o=t("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=a.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,h,f,p,d,g,v,m=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 k(t,r,i){var o=t.uid+"__"+i;r||(r=o);var s=function(t,r){return a.getFromTrace({_fullLayout:e},t,r).type}(t,i),l=t[i+"calendar"],c=m[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(i)):(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&&(m[r]={traces:[t],dirs:[i],axType:s,calendar:t[i+"calendar"]||""}),t["_"+i+"bingroup"]=r}for(d=0;dS&&k.splice(S,k.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],L=[],P="string"==typeof w.size,O="string"==typeof A.size,I=[],z=[],D=P?I:w,R=O?z:A,F=0,B=[],N=[],j=e.histnorm,V=e.histfunc,U=-1!==j.indexOf("density"),q="max"===V||"min"===V?null:0,H=i.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"!==V&&(Y="avg"===V,H=i[V]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-a.tickIncrement(K,J,!1,m))/1e6;for(r=K;r=0&&p=0&&d0}function x(t){t.each(function(t){d.stroke(n.select(this),t.line.color)}).each(function(t){d.fill(n.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function b(t,e,r){var n=t._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return a.coerce(i,o,p,t,e)}return h(i,o,l,s,n),f(i,o,l,s),o}function _(t,e){return"translate("+t+","+e+")"}function w(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(t,e,r,a){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(i);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(c.convertToTspans,a).call(s.font,e),s.bBox(o.node())}function T(t,e,r,n,i,o){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=a.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,h){var f,p=t._fullLayout;y(r)&&h&&(f=h()),a.makeTraceGroups(p._indicatorlayer,e,"trace").each(function(e){var h,A,M,S,E,C=e[0].trace,L=n.select(this),P=C._hasGauge,O=C._isAngular,I=C._isBullet,z=C.domain,D={w:p._size.w*(z.x[1]-z.x[0]),h:p._size.h*(z.y[1]-z.y[0]),l:p._size.l+p._size.w*z.x[0],r:p._size.r+p._size.w*(1-z.x[1]),t:p._size.t+p._size.h*(1-z.y[1]),b:p._size.b+p._size.h*z.y[0]},R=D.l+D.w/2,F=D.t+D.h/2,B=Math.min(D.w/2,D.h),N=l.innerRadius*B,j=C.align||"center";if(A=F,P){if(O&&(h=R,A=F+B/2,M=function(t){return e=t,r=.9*N,n=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),[r/n,e,r];var e,r,n}),I){var V=l.bulletPadding,U=1-l.bulletNumberDomainSize+V;h=D.l+(U+(1-U)*v[j])*D.w,M=function(t){return w(t,(l.bulletNumberDomainSize-V)*D.w,D.h)}}}else h=D.l+v[j]*D.w,M=function(t){return w(t,D.w,D.h)};!function(t,e,r,i){var o,l,h,f=r[0].trace,p=i.numbersX,x=i.numbersY,w=f.align||"center",A=g[w],M=i.transitionOpts,S=i.onComplete,E=a.ensureSingle(e,"g","numbers"),C=[];f._hasNumber&&C.push("number");f._hasDelta&&(C.push("delta"),"left"===f.delta.position&&C.reverse());var L=E.selectAll("text").data(C);function P(e,r,n,a){if(!e.match("s")||n>=0==a>=0||r(n).slice(-1).match(m)||r(a).slice(-1).match(m))return r;var i=e.slice().replace("s","f").replace(/\d+/,function(t){return parseInt(t)-1}),o=b(t,{tickformat:i});return function(t){return Math.abs(t)<1?u.tickText(o,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",function(){return A}).attr("class",function(t){return t}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var O,I=f.mode+f.align;f._hasDelta&&(O=function(){var e=b(t,{tickformat:f.delta.valueformat},f._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=function(t){var e=f.delta.relative?t.relativeDelta:t.delta;return e},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?f.delta.increasing.symbol:f.delta.decreasing.symbol)+e(t)},h=function(t){return t.delta>=0?f.delta.increasing.color:f.delta.decreasing.color};void 0===f._deltaLastValue&&(f._deltaLastValue=i(r[0]));var p=E.select("text.delta");function g(){p.text(o(i(r[0]),a)).call(d.fill,h(r[0])).call(c.convertToTspans,t)}p.call(s.font,f.delta.font).call(d.fill,h({delta:f._deltaLastValue})),y(M)?p.transition().duration(M.duration).ease(M.easing).tween("text",function(){var t=n.select(this),e=i(r[0]),s=f._deltaLastValue,l=P(f.delta.valueformat,a,s,e),c=n.interpolateNumber(s,e);return f._deltaLastValue=e,function(e){t.text(o(c(e),l)),t.call(d.fill,h({delta:c(e)}))}}).each("end",function(){g(),S&&S()}).each("interrupt",function(){g(),S&&S()}):g();return l=k(o(i(r[0]),a),f.delta.font,A,t),p}(),I+=f.delta.position+f.delta.font.size+f.delta.font.family+f.delta.valueformat,I+=f.delta.increasing.symbol+f.delta.decreasing.symbol,h=l);f._hasNumber&&(!function(){var e=b(t,{tickformat:f.number.valueformat},f._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=f.number.suffix,l=f.number.prefix,h=E.select("text.number");function p(){var e="number"==typeof r[0].y?l+a(r[0].y)+i:"-";h.text(e).call(s.font,f.number.font).call(c.convertToTspans,t)}y(M)?h.transition().duration(M.duration).ease(M.easing).each("end",function(){p(),S&&S()}).each("interrupt",function(){p(),S&&S()}).attrTween("text",function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);f._lastValue=r[0].y;var o=P(f.number.valueformat,a,r[0].lastY,r[0].y);return function(r){t.text(l+o(e(r))+i)}}):p();o=k(l+a(r[0].y)+i,f.number.font,A,t)}(),I+=f.number.font.size+f.number.font.family+f.number.valueformat+f.number.suffix+f.number.prefix,h=o);if(f._hasDelta&&f._hasNumber){var z,D,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=.75*f.delta.font.size;"left"===f.delta.position&&(z=T(f,"deltaPos",0,-1*(o.width*v[f.align]+l.width*(1-v[f.align])+B),I,Math.min),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:l.left+z,right:o.right,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"right"===f.delta.position&&(z=T(f,"deltaPos",0,o.width*(1-v[f.align])+l.width*v[f.align]+B,I,Math.max),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:o.left,right:l.right+z,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"bottom"===f.delta.position&&(z=null,D=l.height,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height,bottom:o.bottom+l.height}),"top"===f.delta.position&&(z=null,D=o.top,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height-l.height,bottom:o.bottom}),O.attr({dx:z,dy:D})}(f._hasNumber||f._hasDelta)&&E.attr("transform",function(){var t=i.numbersScaler(h);I+=t[2];var e,r=T(f,"numbersScale",1,t[0],I,Math.min);f._scaleNumbers||(r=1),e=f._isAngular?x-r*h.bottom:x-r*(h.top+h.bottom)/2,f._numbersTop=r*h.top+e;var n=h[w];"center"===w&&(n=(h.left+h.right)/2);var a=p-r*n;return _(a=T(f,"numbersTranslate",0,a,I,Math.max),e)+" scale("+r+")"})}(t,L,e,{numbersX:h,numbersY:A,numbersScaler:M,transitionOpts:r,onComplete:f}),P&&(S={range:C.gauge.axis.range,color:C.gauge.bgcolor,line:{color:C.gauge.bordercolor,width:0},thickness:1},E={range:C.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:C.gauge.bordercolor,width:C.gauge.borderwidth},thickness:1});var q=L.selectAll("g.angular").data(O?e:[]);q.exit().remove();var H=L.selectAll("g.angularaxis").data(O?e:[]);H.exit().remove(),O&&function(t,e,r,a){var s,l,c,h,f=r[0].trace,p=a.size,d=a.radius,g=a.innerRadius,v=a.gaugeBg,m=a.gaugeOutline,w=[p.l+p.w/2,p.t+p.h/2+d/2],k=a.gauge,T=a.layer,A=a.transitionOpts,M=a.onComplete,S=Math.PI/2;function E(t){var e=f.gauge.axis.range[0],r=f.gauge.axis.range[1],n=(t-e)/(r-e)*Math.PI-S;return n<-S?-S:n>S?S:n}function C(t){return n.svg.arc().innerRadius((g+d)/2-t/2*(d-g)).outerRadius((g+d)/2+t/2*(d-g)).startAngle(-S)}function L(t){t.attr("d",function(t){return C(t.thickness).startAngle(E(t.range[0])).endAngle(E(t.range[1]))()})}k.enter().append("g").classed("angular",!0),k.attr("transform",_(w[0],w[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),(s=b(t,f.gauge.axis)).type="linear",s.range=f.gauge.axis.range,s._id="xangularaxis",s.setScale();var P=function(t){return(s.range[0]-t.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},O={},I=u.makeLabelFns(s,0).labelStandoff;O.xFn=function(t){var e=P(t);return Math.cos(e)*I},O.yFn=function(t){var e=P(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(I+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*o)},O.anchorFn=function(t){var e=P(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},O.heightFn=function(t,e,r){var n=P(t);return-.5*(1+Math.sin(n))*r};var z=function(t){return _(w[0]+d*Math.cos(t),w[1]-d*Math.sin(t))};c=function(t){return z(P(t))};if(l=u.calcTicks(s),h=u.getTickSigns(s)[2],s.visible){h="inside"===s.ticks?-1:1;var D=(s.linewidth||1)/2;u.drawTicks(t,s,{vals:l,layer:T,path:"M"+h*D+",0h"+h*s.ticklen,transFn:function(t){var e=P(t);return z(e)+"rotate("+-i(e)+")"}}),u.drawLabels(t,s,{vals:l,layer:T,transFn:c,labelFns:O})}var R=[v].concat(f.gauge.steps),F=k.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(x),F.exit().remove();var B=C(f.gauge.bar.thickness),N=k.selectAll("g.value-arc").data([f.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j=N.select("path");y(A)?(j.transition().duration(A.duration).ease(A.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()}).attrTween("d",(V=B,U=E(r[0].lastY),q=E(r[0].y),function(){var t=n.interpolate(U,q);return function(e){return V.endAngle(t(e))()}})),f._lastValue=r[0].y):j.attr("d","number"==typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var V,U,q;j.call(x),N.exit().remove(),R=[];var H=f.gauge.threshold.value;H&&R.push({range:[H,H],color:f.gauge.threshold.color,line:{color:f.gauge.threshold.line.color,width:f.gauge.threshold.line.width},thickness:f.gauge.threshold.thickness});var G=k.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(x),G.exit().remove();var Y=k.selectAll("g.gauge-outline").data([m]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(L).call(x),Y.exit().remove()}(t,0,e,{radius:B,innerRadius:N,gauge:q,layer:H,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var G=L.selectAll("g.bullet").data(I?e:[]);G.exit().remove();var Y=L.selectAll("g.bulletaxis").data(I?e:[]);Y.exit().remove(),I&&function(t,e,r,n){var a,i,o,s,c,h=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,_=h.domain,w=n.transitionOpts,k=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform","translate("+m.l+", "+m.t+")"),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var T=m.h,A=h.gauge.bar.thickness*T,M=_.x[0],S=_.x[0]+(_.x[1]-_.x[0])*(h._hasNumber||h._hasDelta?1-l.bulletNumberDomainSize:1);(a=b(t,h.gauge.axis))._id="xbulletaxis",a.domain=[M,S],a.setScale(),i=u.calcTicks(a),o=u.makeTransFn(a),s=u.getTickSigns(a)[2],c=m.t+m.h,a.visible&&(u.drawTicks(t,a,{vals:"inside"===a.ticks?u.clipEnds(a,i):i,layer:p,path:u.makeTickPath(a,c,s),transFn:o}),u.drawLabels(t,a,{vals:i,layer:p,transFn:o,labelFns:u.makeLabelFns(a,c)}));function E(t){t.attr("width",function(t){return Math.max(0,a.c2p(t.range[1])-a.c2p(t.range[0]))}).attr("x",function(t){return a.c2p(t.range[0])}).attr("y",function(t){return.5*(1-t.thickness)*T}).attr("height",function(t){return t.thickness*T})}var C=[g].concat(h.gauge.steps),L=f.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(x),L.exit().remove();var P=f.selectAll("g.value-bullet").data([h.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",A).attr("y",(T-A)/2).call(x),y(w)?P.select("rect").transition().duration(w.duration).ease(w.easing).each("end",function(){k&&k()}).each("interrupt",function(){k&&k()}).attr("width",Math.max(0,a.c2p(Math.min(h.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,a.c2p(Math.min(h.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var O=r.filter(function(){return h.gauge.threshold.value}),I=f.selectAll("g.threshold-bullet").data(O);I.enter().append("g").classed("threshold-bullet",!0).append("line"),I.select("line").attr("x1",a.c2p(h.gauge.threshold.value)).attr("x2",a.c2p(h.gauge.threshold.value)).attr("y1",(1-h.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-h.gauge.threshold.thickness)/2)*T).call(d.stroke,h.gauge.threshold.line.color).style("stroke-width",h.gauge.threshold.line.width),I.exit().remove();var z=f.selectAll("g.gauge-outline").data([v]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(E).call(x),z.exit().remove()}(t,0,e,{gauge:G,layer:Y,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var W=L.selectAll("text.title").data(e);W.exit().remove(),W.enter().append("text").classed("title",!0),W.attr("text-anchor",function(){return I?g.right:g[C.title.align]}).text(C.title.text).call(s.font,C.title.font).call(c.convertToTspans,t),W.attr("transform",function(){var t,e=D.l+D.w*v[C.title.align],r=l.titlePadding,n=s.bBox(W.node());if(P){if(O)if(C.gauge.axis.visible)t=s.bBox(H.node()).top-r-n.bottom;else t=D.t+D.h/2-B/2-n.bottom-r;I&&(t=A-(n.top+n.bottom)/2,e=D.l-l.bulletPadding*D.w)}else t=C._numbersTop-r-n.bottom;return _(e,t)})})}},{"../../components/color":594,"../../components/drawing":615,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"./constants":1043,d3:164}],1047:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;var c=e.exports=l(s({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()},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764,"../../plots/template_attributes":843,"../mesh3d/attributes":1052}],1048:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length);for(var r=1/0,a=-1/0,i=e.value.length,o=0;o0;r--){var n=Math.min(e[r],e[r-1]),a=Math.max(e[r],e[r-1]);if(a>n&&n-1}function D(t,e){return null===t?e:t}function R(e,r,n){C();var a,i,o,s=[r],l=[n];if(k>=1)s=[r],l=[n];else if(k>0){var c=function(t,e){var r=t[0],n=t[1],a=t[2],i=function(t,e,r){for(var n=[],a=0;a-1?n[p]:E(d,g,v);f[p]=y>-1?y:P(d,g,v,D(e,m))}a=f[0],i=f[1],o=f[2],t._i.push(a),t._j.push(i),t._k.push(o),++h}}function F(t,e,r,n){var a=t[3];an&&(a=n);for(var i=(t[3]-a)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-i)*t[s]+i*e[s];return o}function B(t,e,r){return t>=e&&t<=r}function N(t){var e=.001*(S-M);return t>=M-e&&t<=S+e}function j(e){for(var r=[],n=0;n<4;n++){var a=e[n];r.push([t.x[a],t.y[a],t.z[a],t.value[a]])}return r}var V=3;function U(t,e,r,n,a,i){i||(i=1),r=[-1,-1,-1];var o=!1,s=[B(e[0][3],n,a),B(e[1][3],n,a),B(e[2][3],n,a)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return N(e[0][3])&&N(e[1][3])&&N(e[2][3])?(R(t,e,r),!0):iMath.abs(k-A)?[T,k]:[k,A];$(e,E[0],E[1])}}var C=[[Math.min(M,A),Math.max(M,A)],[Math.min(T,S),Math.max(T,S)]];["x","y","z"].forEach(function(e){for(var r=[],n=0;n0&&(c.push(x.id),"x"===e?h.push([x.distRatio,0,0]):"y"===e?h.push([0,x.distRatio,0]):h.push([0,0,x.distRatio]))}else l=nt(1,"x"===e?g-1:"y"===e?v-1:m-1);c.length>0&&(r[a]="x"===e?tt(null,c,i,o,h,r[a]):"y"===e?et(null,c,i,o,h,r[a]):rt(null,c,i,o,h,r[a]),a++),l.length>0&&(r[a]="x"===e?Z(null,l,i,o,r[a]):"y"===e?J(null,l,i,o,r[a]):K(null,l,i,o,r[a]),a++)}var b=t.caps[e];b.show&&b.fill&&(I(b.fill),r[a]="x"===e?Z(null,[0,g-1],i,o,r[a]):"y"===e?J(null,[0,v-1],i,o,r[a]):K(null,[0,m-1],i,o,r[a]),a++)}}),0===h&&L(),t._x=x,t._y=b,t._z=_,t._intensity=w,t._Xs=f,t._Ys=p,t._Zs=d}(),t}f.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._x[e],n=this.data._y[e],a=this.data._z[e],i=this.data._Ys.length,o=this.data._Zs.length,s=u(r,this.data._Xs).id,l=u(n,this.data._Ys).id,c=u(a,this.data._Zs).id,h=t.index=c+o*l+o*i*s;t.traceCoordinate=[this.data._x[h],this.data._y[h],this.data._z[h],this.data.value[h]];var f=this.data.hovertext||this.data.text;return Array.isArray(f)&&void 0!==f[h]?t.textLabel=f[h]:f&&(t.textLabel=f),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=p(t);var a={positions:l(n(r.xaxis,t._x,e.dataScale[0],t.xcalendar),n(r.yaxis,t._y,e.dataScale[1],t.ycalendar),n(r.zaxis,t._z,e.dataScale[2],t.zcalendar)),cells:l(t._i,t._j,t._k),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:o(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},c=s(t);a.vertexIntensity=t._intensity,a.vertexIntensityBounds=[c.min,c.max],a.colormap=i(t),this.mesh.update(a)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports={findNearestOnAxis:u,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,a=n({gl:r}),i=new h(t,a,e.uid);return a._trace=i,i.update(e),t.glplot.add(a),i}}},{"../../components/colorscale":606,"../../lib":719,"../../lib/gl_format_color":716,"../../lib/str2rgbarray":742,"../../plots/gl3d/zip3":818,"gl-mesh3d":281}],1050:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("../../components/colorscale/defaults");function s(t,e,r,n,i){var s=i("isomin"),l=i("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=i("x"),u=i("y"),h=i("z"),f=i("value");c&&c.length&&u&&u.length&&h&&h.length&&f&&f.length?(a.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach(function(t){var e="caps."+t;i(e+".show")&&i(e+".fill");var r="slices."+t;i(r+".show")&&(i(r+".fill"),i(r+".locations"))}),i("spaceframe.show")&&i("spaceframe.fill"),i("surface.show")&&(i("surface.count"),i("surface.fill"),i("surface.pattern")),i("contour.show")&&(i("contour.color"),i("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){i(t)}),o(t,e,n,i,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,a){s(t,e,0,a,function(r,a){return n.coerce(t,e,i,r,a)})},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":604,"../../lib":719,"../../registry":848,"./attributes":1047}],1051:[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"],meta:{}}},{"../../plots/gl3d":807,"./attributes":1047,"./calc":1048,"./convert":1049,"./defaults":1050}],1052:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},i.contours.x.show,{}),color:i.contours.x.color,width:i.contours.x.width,editType:"calc"},lightposition:{x:s({},i.lightposition.x,{dflt:1e5}),y:s({},i.lightposition.y,{dflt:1e5}),z:s({},i.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},i.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"})})},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../surface/attributes":1225}],1053:[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":602}],1054:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),a=t("delaunay-triangulate"),i=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function h(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,h=t.x.length,f=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||!v(t.i,h)||!v(t.j,h)||!v(t.k,h))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(f):t.alphahull>0?i(t.alphahull,f):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],i=e.length,o=0;ov):g=k>b,v=k;var T=l(b,_,w,k);T.pos=x,T.yc=(b+k)/2,T.i=y,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[w,_],p&&(T.tx=e.text[y]),d&&(T.htx=e.hovertext[y]),m.push(T)}else m.push({pos:x,empty:!0})}return e._extremes[s._id]=i.findExtremes(s,n.concat(h,u),{padded:!0}),m.length&&(m[0].t={labels:{open:a(t,"open:")+" ",high:a(t,"high:")+" ",low:a(t,"low:")+" ",close:a(t,"close:")+" "}}),m}e.exports={calc:function(t,e){var r=i.getFromId(t,e.xaxis),a=i.getFromId(t,e.yaxis),o=function(t,e,r){var a=r._minDiff;if(!a){var i,o=t._fullData,s=[];for(a=1/0,i=0;i"+c.labels[x]+n.hoverLabelText(s,b):((y=a.extendFlat({},f)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",h.push(y),v[b]=y)}return h}function f(t,e,r,a){var i=t.cd,o=t.ya,l=i[0].trace,h=i[0].t,f=u(t,e,r,a);if(!f)return[];var p=i[f.index],d=f.index=p.i,g=p.dir;function v(t){return h.labels[t]+n.hoverLabelText(o,l[t][d])}var m=p.hi||l.hoverinfo,y=m.split("+"),x="all"===m,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[v("open"),v("high"),v("low"),v("close")+" "+c[g]]:[];return _&&s(p,l,w),f.extraText=w.join("
"),f.y0=f.y1=o.c2p(p.yc,!0),[f]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?h(t,e,r,n):f(t,e,r,n)},hoverSplit:h,hoverOnPoints:f}},{"../../components/color":594,"../../components/fx":632,"../../constants/delta.js":689,"../../lib":719,"../../plots/cartesian/axes":767}],1061:[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":778,"./attributes":1057,"./calc":1058,"./defaults":1059,"./hover":1060,"./plot":1063,"./select":1064,"./style":1065}],1062:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib");e.exports=function(t,e,r,i){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"],i),s&&l&&c&&u){var h=Math.min(s.length,l.length,c.length,u.length);return o&&(h=Math.min(h,a.minRowLength(o))),e._length=h,h}}},{"../../lib":719,"../../registry":848}],1063:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib");e.exports=function(t,e,r,i){var o=e.xaxis,s=e.yaxis;a.makeTraceGroups(i,r,"trace ohlc").each(function(t){var e=n.select(this),r=t[0],i=r.t;if(!0!==r.trace.visible||i.empty)e.remove();else{var l=i.tickLen,c=e.selectAll("path").data(a.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",function(t){if(t.empty)return"M0,0Z";var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-l,!0),n=o.c2p(t.pos+l,!0);return"M"+r+","+s.c2p(t.o,!0)+"H"+e+"M"+e+","+s.c2p(t.h,!0)+"V"+s.c2p(t.l,!0)+"M"+n+","+s.c2p(t.c,!0)+"H"+e})}})}},{"../../lib":719,d3:164}],1064:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n=t.cd,a=t.xaxis,i=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,h){function f(r,a){return n.coerce(t,e,l,r,a)}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(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,h,f);o(e,h,f),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,"values",d),f("hoveron"),f("hovertemplate"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var g={family:h.font.family,size:Math.round(h.font.size),color:h.font.color};n.coerceFont(f,"labelfont",g);var v={family:h.font.family,size:Math.round(h.font.size/1.2),color:h.font.color};n.coerceFont(f,"tickfont",v)}},{"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/domain":792,"../parcoords/merge_length":1082,"./attributes":1066}],1070:[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":1066,"./base_plot":1067,"./calc":1068,"./defaults":1069,"./plot":1072}],1071:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plot_api/plot_api"),i=t("../../components/fx"),o=t("../../lib"),s=t("../../components/drawing"),l=t("tinycolor2"),c=t("../../lib/svg_text_utils");function u(t,e,r,a){var i=t.map(function(t,e,r){var n,a=r[0],i=e.margin||{l:80,r:80,t:100,b:80},o=a.trace,s=o.domain,l=e.width,c=e.height,u=Math.floor(l*(s.x[1]-s.x[0])),h=Math.floor(c*(s.y[1]-s.y[0])),f=s.x[0]*l+i.l,p=e.height-s.y[1]*e.height+i.t,d=o.line.shape;n="all"===o.hoverinfo?["count","probability"]:(o.hoverinfo||"").split("+");var g={trace:o,key:o.uid,model:a,x:f,y:p,width:u,height:h,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:i,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};a.dimensions&&(F(g),R(g));return g}.bind(0,e,r)),l=a.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(i,h),v=u.enter().append("g").attr("class","trace parcats");u.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"}),v.append("g").attr("class","paths");var m=u.select("g.paths").selectAll("path.path").data(function(t){return t.paths},h);m.attr("fill",function(t){return t.model.color});var b=m.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(t){return t.model.color}).attr("fill-opacity",0);x(b),m.attr("d",function(t){return t.svgD}),b.empty()||m.sort(p),m.exit().remove(),m.on("mouseover",d).on("mouseout",g).on("click",y),v.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data(function(t){return t.dimensions},h);k.enter().append("g").attr("class","dimension"),k.attr("transform",function(t){return"translate("+t.x+", 0)"}),k.exit().remove();var T=k.selectAll("g.category").data(function(t){return t.categories},h),A=T.enter().append("g").attr("class","category");T.attr("transform",function(t){return"translate(0, "+t.y+")"}),A.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),_(A);var M=T.selectAll("rect.bandrect").data(function(t){return t.bands},h);M.each(function(){o.raiseToTop(this)}),M.attr("fill",function(t){return t.color});var O=M.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(t){return t.color}).attr("fill-opacity",0);M.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"}),w(O),M.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var I=e._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",function(t){return f(t)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",I+" -1px 1px 2px, "+I+" 1px 1px 2px, "+I+" 1px -1px 2px, "+I+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",function(t){return f(t)?t.width+5:-5}).attr("y",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)}),A.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(t){return t.width/2}).attr("y",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)}),T.selectAll("rect.bandrect").on("mouseover",S).on("mouseout",E),T.exit().remove(),k.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on("dragstart",C).on("drag",L).on("dragend",P)),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 h(t){return t.key}function f(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function p(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),C=n.mouse(h)[0];i.loneHover({trace:f,x:_-d.left+g.left,y:w-d.top+g.top,text:E,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:C<_?"right":"left",hovertemplate:(f.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:f._input,fullData:f,count:T,probability:A}]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:h})}}}function g(t){if(!t.parcatsViewModel.dragDimension&&(x(n.select(this)),i.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(p),-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var e=v(t),r=m(t);t.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:e,event:n.event,constraints:r})}}function v(t){for(var e=[],r=O(t.parcatsViewModel),n=0;n1&&c.displayInd===l.dimensions.length-1?(r=o.left,a="left"):(r=o.left+o.width,a="right");var f=s.model.count,p=s.model.categoryLabel,d=f/s.parcatsViewModel.model.count,g={countLabel:f,categoryLabel:p,probabilityLabel:d.toFixed(3)},v=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&v.push(["Count:",g.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&v.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var m=v.join("
");return{trace:u,x:r-t.left,y:h-t.top,text:m,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:u.hovertemplate,hovertemplateLabels:g,eventData:[{data:u._input,fullData:u,count:f,category:p,probability:d}]}}function S(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,a=r._fullLayout,s=a._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;if("color"===c?(!function(t){var e=n.select(t).datum(),r=k(e);b(r),r.each(function(){o.raiseToTop(this)}),n.select(t.parentNode).selectAll("rect.bandrect").filter(function(t){return t.color===e.color}).each(function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),A(this,"plotly_hover",n.event)):(!function(t){n.select(t.parentNode).selectAll("rect.bandrect").each(function(t){var e=k(t);b(e),e.each(function(){o.raiseToTop(this)})}),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),T(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===c?e=M(s,this):"color"===c?e=function(t,e){var r,a,i=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],h=c.trace,f=i.y+i.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=i.left,a="left"):(r=i.left+i.width,a="right");var p=s.model.categoryLabel,d=o.parcatsViewModel.model.count,g=0;o.categoryViewModel.bands.forEach(function(t){t.color===o.color&&(g+=t.count)});var v=s.model.count,m=0;c.pathSelection.each(function(t){t.model.color===o.color&&(m+=t.model.count)});var y=g/d,x=g/m,b=g/v,_={countLabel:d,categoryLabel:p,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color \u2229 "+p+"): "+_.probabilityLabel),w.push("P("+p+" | color): "+x.toFixed(3)),w.push("P(color | "+p+"): "+b.toFixed(3)));var k=w.join("
"),T=l.mostReadable(o.color,["black","white"]);return{trace:h,x:r-t.left,y:f-t.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:T,fontSize:10,idealAlign:a,hovertemplate:h.hovertemplate,hovertemplateLabels:_,eventData:[{data:h._input,fullData:h,category:p,count:d,probability:y,categorycount:v,colorcount:m,bandcolorcount:g}]}}(s,this):"dimension"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){r.push(M(t,this))}),r}(s,this)),e&&i.loneHover(e,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r})}}function E(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(x(e.pathSelection),_(e.dimensionSelection.selectAll("g.category")),w(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),i.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(p),-1===e.hoverinfoItems.indexOf("skip"))){"color"===t.parcatsViewModel.hoveron?A(this,"plotly_unhover",n.event):T(this,"plotly_unhover",n.event)}}function C(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each(function(e){var r=n.mouse(this)[0],a=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=a&&a<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each(function(e){e.yh.y+h.height/2&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){i.model.dragX=n.event.x;var f=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[a];void 0!==f&&i.model.dragXp.x&&(i.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=i.model.displayInd}F(t.parcatsViewModel),R(t.parcatsViewModel),z(t.parcatsViewModel),I(t.parcatsViewModel)}}function P(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=O(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 a=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+a+"].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}),h=c.map(function(t){return t.categoryLabel});e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[h],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?A(t.potentialClickBand,"plotly_click",n.event.sourceEvent):T(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,F(t.parcatsViewModel),R(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each(function(){z(t.parcatsViewModel,!0),I(t.parcatsViewModel,!0)}).each("end",function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function O(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+a)+" "+l[s]+","+(e[s]+a)+" "+(t[s]+r[s])+","+(e[s]+a),u+="l-"+r[s]+",0 ";return u+="Z"}function R(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),a=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),i=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 h(t){var e=t.categoryInds.map(function(t,e){return a[e][t]});return o.map(function(t){return e[t]})}c.sort(function(e,r){var n=h(e),a=h(r);return"backward"===t.sortpaths&&(n.reverse(),a.reverse()),n.push(e.valueInds[0]),a.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),a.unshift(r.rawColor)),na?1:0});for(var f=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*(m.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*a;var i,o,s,l,c,u=[],h=t.model.maxCats,f=e.categories.length,p=e.count,d=t.height-8*(h-1),g=8*(h-f)/2,v=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(v.sort(function(t,e){return t.displayInd-e.displayInd}),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:i,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+i+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){u(r,t,n,e)}},{"../../components/drawing":615,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"../../plot_api/plot_api":754,d3:164,tinycolor2:538}],1072:[function(t,e,r){"use strict";var n=t("./parcats");e.exports=function(t,e,r,a){var i=t._fullLayout,o=i._paper,s=i._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,a)}},{"./parcats":1071}],1073:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/cartesian/layout_attributes"),i=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:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},a.tickvals,{editType:"plot"}),ticktext:s({},a.ticktext,{editType:"plot"}),tickformat:s({},a.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:"number",editType:"plot"},{valType:"number",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":601,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/layout_attributes":779,"../../plots/domain":792,"../../plots/font_attributes":793}],1074:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function h(t,e){return t*(1-u)+e*u}function f(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 a=t?-1:1,i=0,o=e.length-1;if(a<0){var s=i;i=o,o=s}for(var l=e[i],u=l,f=i;a*fe){f=r;break}}if(i=u,isNaN(i)&&(i=isNaN(h)||isNaN(f)?isNaN(h)?f:h:e-c[h][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[i],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 _(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(e.unitToPaddedPx.invert):i.newExtent=[i.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(e),x(t.parentNode)}function w(t,e){var r=b(e,e.height-a.mouse(t)[1]-2*n.verticalPadding),i="crosshair";r.clickableOrdinalRange?i="pointer":r.region&&(i=r.region+"-resize"),a.select(document.body).style("cursor",i)}function k(t){t.on("mousemove",function(t){a.event.preventDefault(),t.parent.inBrushDrag||w(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||m()}).call(a.behavior.drag().on("dragstart",function(t){!function(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.unitToPaddedPx.invert(r),o=e.brush,s=b(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]:i,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)}).on("drag",function(t){_(this,t)}).on("dragend",function(t){!function(t,e){var r=e.brush,n=r.filter,i=r.svgBrush;i._dragging||(w(t,e),_(t,e),e.brush.svgBrush.wasDragged=!1),i._dragging=!1,a.event.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,e.parent.inBrushDrag=!1,m(),!i.wasDragged)return i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&e.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,0===i.extent.length&&A(r)):A(r),i.brushCallback(e),x(t.parentNode),void i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(c?[i.newExtent]:[]),i.extent.length||A(r),i.brushCallback(e),c?x(t.parentNode,s):(s(),x(t.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)}))}function T(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function M(t){for(var e,r=t.slice(),n=[],a=r.shift();a;){for(e=a.slice();(a=r.shift())&&a[0]<=e[1];)e[1]=Math.max(e[1],a[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,a,i){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map(function(t){return t.slice().sort(s)}).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=M(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=a,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:i}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,i);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(p).call(d).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),e.call(k).attr("height",function(t){return t.height-n.verticalPadding});var r=t.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",function(t){return t.height}).call(y);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(y)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?M(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[f(0,r,t[0],[]),f(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":719,"../../lib/gup":717,"./constants":1077,d3:164}],1075:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/get_data").getModuleCalcData,i=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=a(t.calcdata,"parcoords")[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var a=n._has&&n._has("parcoords"),i=e._has&&e._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter(function(t,e){return e===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":696,"../../plots/get_data":802,"./plot":1084,d3:164}],1076:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale"),i=t("../../lib/gup").wrap;e.exports=function(t,e){var r,o;return a.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=a.extractOpts(e.line).colorscale,a.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rh&&(n.log("parcoords traces support up to "+h+" dimensions at the moment"),d.splice(h));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),v=function(t,e,r,o,s){var l=s("line.color",r);if(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(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),f(e,g,"values",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",m),n.coerceFont(u,"tickfont",m),n.coerceFont(u,"rangefont",m),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/cartesian/axes":767,"../../plots/domain":792,"./attributes":1073,"./axisbrush":1074,"./constants":1077,"./merge_length":1082}],1079:[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":719}],1080:[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":1073,"./base_plot":1075,"./calc":1076,"./defaults":1078,"./plot":1084}],1081:[function(t,e,r){"use strict";var n=t("glslify"),a=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 sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\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(mask,\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"]),i=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=1e-6,c=2048,u=new Uint8Array(4),h=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function p(t,e,r,n,a){var i=t._gl;i.enable(i.SCISSOR_TEST),i.scissor(e,r,n,a),t.clear({color:[0,0,0,0],depth:1})}function d(t,e,r,n,a,i){var o=i.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:u})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,a-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],p(t,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),r.clearOnly||(i.count=2*c,i.offset=2*l*n,e(i),l*n+c>>8*e)%256/255}function v(t,e,r){for(var n=new Array(8*e),a=0,i=0;ih&&(h=t[a].dim1.canvasX,o=a);0===s&&p(T,0,0,r.canvasWidth,r.canvasHeight);var f=function(t){var e,r,n,a=[[],[]];for(n=0;n<64;n++){var i=!t&&na._length&&(A=A.slice(0,a._length));var M,S=a.tickvals;function E(t,e){return{val:t,text:M[e]}}function C(t,e){return t.val-e.val}if(Array.isArray(S)&&S.length){M=a.ticktext,Array.isArray(M)&&M.length?M.length>S.length?M=M.slice(0,S.length):S.length>M.length&&(S=S.slice(0,M.length)):M=S.map(n.format(a.tickformat));for(var L=1;L=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:h};h!==z&&(u?a.hover(f):a.unhover&&a.unhover(f),z=h)}}),I.style("opacity",function(t){return t.pick?0:1}),u.style("background","rgba(255, 255, 255, 0)");var D=u.selectAll("."+g.cn.parcoords).data(O,h);D.exit().remove(),D.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),D.attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var R=D.selectAll("."+g.cn.parcoordsControlView).data(f,h);R.enter().append("g").classed(g.cn.parcoordsControlView,!0),R.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var F=R.selectAll("."+g.cn.yAxis).data(function(t){return t.dimensions},h);F.enter().append("g").classed(g.cn.yAxis,!0),R.each(function(t){S(F,t)}),I.each(function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=m(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)}}),F.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),F.call(n.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;P.linePickActive(!1),t.x=Math.max(-g.overdrag,Math.min(t.model.width+g.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,F.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}),S(F,e),F.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),n.select(this).attr("transform","translate("+t.x+", 0)"),F.each(function(r,n,a){a===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(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,S(F,e),n.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),P.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),F.exit().remove();var B=F.selectAll("."+g.cn.axisOverlays).data(f,h);B.enter().append("g").classed(g.cn.axisOverlays,!0),B.selectAll("."+g.cn.axis).remove();var N=B.selectAll("."+g.cn.axis).data(f,h);N.enter().append("g").classed(g.cn.axis,!0),N.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,a=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?a:null).tickFormat(function(e){return d.isOrdinal(t)?e:E(t.model.dimensions[t.visibleIndex],e)}).scale(r)),l.font(N.selectAll("text"),t.model.tickFont)}),N.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),N.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=B.selectAll("."+g.cn.axisHeading).data(f,h);j.enter().append("g").classed(g.cn.axisHeading,!0);var V=j.selectAll("."+g.cn.axisTitle).data(f,h);V.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),V.text(function(t){return t.label}).each(function(e){var r=n.select(this);l.font(r,e.model.labelFont),s.convertToTspans(r,t)}).attr("transform",function(t){var e=M(t.model.labelAngle,t.model.labelSide),r=g.axisTitleOffset;return(e.dir>0?"":"translate(0,"+(2*r+t.model.height)+")")+"rotate("+e.degrees+")translate("+-r*e.dx+","+-r*e.dy+")"}).attr("text-anchor",function(t){var e=M(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 U=B.selectAll("."+g.cn.axisExtent).data(f,h);U.enter().append("g").classed(g.cn.axisExtent,!0);var q=U.selectAll("."+g.cn.axisExtentTop).data(f,h);q.enter().append("g").classed(g.cn.axisExtentTop,!0),q.attr("transform","translate(0,"+-g.axisExtentOffset+")");var H=q.selectAll("."+g.cn.axisExtentTopText).data(f,h);H.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(A),H.text(function(t){return C(t,!0)}).each(function(t){l.font(n.select(this),t.model.rangeFont)});var G=U.selectAll("."+g.cn.axisExtentBottom).data(f,h);G.enter().append("g").classed(g.cn.axisExtentBottom,!0),G.attr("transform",function(t){return"translate(0,"+(t.model.height+g.axisExtentOffset)+")"});var Y=G.selectAll("."+g.cn.axisExtentBottomText).data(f,h);Y.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(A),Y.text(function(t){return C(t,!1)}).each(function(t){l.font(n.select(this),t.model.rangeFont)}),v.ensureAxisBrush(B)}},{"../../components/colorscale":606,"../../components/drawing":615,"../../lib":719,"../../lib/gup":717,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"./axisbrush":1074,"./constants":1077,"./helpers":1079,"./lines":1081,"color-rgba":123,d3:164}],1084:[function(t,e,r){"use strict";var n=t("./parcoords"),a=t("../../lib/prepare_regl"),i=t("./helpers").isVisible;function o(t,e,r){var n=e.indexOf(r),a=t.indexOf(n);return-1===a&&(a+=e.length),a}e.exports=function(t,e){var r=t._fullLayout;if(a(t)){var s={},l={},c={},u={},h=r._size;e.forEach(function(e,r){var n=e[0].trace;c[r]=n.index;var a=u[r]=n._fullInput.index;s[r]=t.data[a].dimensions,l[r]=t.data[a].dimensions.slice()});n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,a){var i=l[e][n],o=a.map(function(t){return t.slice()}),s="dimensions["+n+"].constraintrange",h=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===h[s]){var f=i.constraintrange;h[s]=f||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),i.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete i.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(i));s[e].sort(n),l[e].filter(function(t){return!i(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":732,"./helpers":1079,"./parcoords":1083}],1085:[function(t,e,r){"use strict";var n=t("../../plots/attributes"),a=t("../../plots/domain").attributes,i=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=i({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,{}),insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),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:a({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":593,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793,"../../plots/template_attributes":843}],1086:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="pie",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":828}],1087:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib").isArrayOrTypedArray,i=t("tinycolor2"),o=t("../../components/color"),s={};function l(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=o.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function c(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r"),name:f.hovertemplate||-1!==p.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:c.castOption(b.bgcolor,t.pts)||t.color,borderColor:c.castOption(b.bordercolor,t.pts),fontFamily:c.castOption(_.family,t.pts),fontSize:c.castOption(_.size,t.pts),fontColor:c.castOption(_.color,t.pts),nameLength:c.castOption(b.namelength,t.pts),textAlign:c.castOption(b.align,t.pts),hovertemplate:c.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[u(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[u(t,f)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,i=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[u(s,i)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,i=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[u(t,i)],a.click(e,n.event))})}function p(t,e,r){var n=c.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=c.castOption(t._input.textfont.color,e.pts));var a=c.castOption(t.insidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,o=c.castOption(t.insidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n||i.contrast(e.color),family:a,size:o}}function d(t,e){for(var r,n,a=0;a=1)return c;var u=a+1/(2*Math.tan(i)),h=l*Math.min(1/(Math.sqrt(u*u+.5)+u),o/(Math.sqrt(a*a+o/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/l)-h*a/l,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/a,d=p+1/(2*Math.tan(i)),g=l*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),v={scale:2*g/t.width,rCenter:Math.cos(g/l)-g/a/l,rotate:(180/Math.PI*e.midangle+810)%180-90},m=v.scale>f.scale?v:f;return c.scale<1&&m.scale>c.scale?m:c}function v(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function m(t,e){var r=e.pxmid[0],n=e.pxmid[1],a=t.width/2,i=t.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function y(t,e){var r,n,a,i=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=b(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*t.r,s.ty-=t.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),h=e.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(h+=u,o.x-=(1+a)*u,s.tx+=t.titleBox.width/2):-1!==i.title.position.indexOf("center")?h*=2:-1!==i.title.position.indexOf("right")&&(h+=u,o.x+=(1+a)*u,s.tx-=t.titleBox.width/2),r=h/t.titleBox.width,n=x(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function x(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 b(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 _(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/a.aspectratio):(u=r.r,c=u*a.aspectratio),c*=(1+a.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(i){var x=s.castOption(a,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:c.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:c.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:s.castOption(a,t.i,"customdata")}}(e),_=c.getFirstFilled(a.text,e.pts);(h(_)||""===_)&&(b.text=_),e.text=s.texttemplateString(x,b,t._fullLayout._d3locale,b,a._meta||{})}else e.text=""}}e.exports={plot:function(t,e){var r=t._fullLayout;d(e,t),_(e,r._size);var a=s.makeTraceGroups(r._pielayer,e,"trace").each(function(e){var a=n.select(this),u=e[0],h=u.trace;!function(t){var e,r,n,a=t[0],i=a.trace,o=i.rotation*Math.PI/180,s=2*Math.PI/a.vTotal,l="px0",c="px1";if("counterclockwise"===i.direction){for(e=0;ea.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-i.hole,r.rInscribed=v(r,a))}(e),a.attr("stroke-linejoin","round"),a.each(function(){var a=n.select(this).selectAll("g.slice").data(e);a.enter().append("g").classed("slice",!0),a.exit().remove();var d=[[[],[]],[[],[]]],v=!1;a.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=h.index,d[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var a=u.cx,i=u.cy,y=n.select(this),x=y.selectAll("path.surface").data([r]);if(x.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),y.call(f,t,e),h.pull){var b=+c.castOption(h.pull,r.pts)||0;b>0&&(a+=b*r.pxmid[0],i+=b*r.pxmid[1])}r.cxFinal=a,r.cyFinal=i;var _=h.hole;if(r.v===u.vTotal){var k="M"+(a+r.px0[0])+","+(i+r.px0[1])+E(r.px0,r.pxmid,!0,1)+E(r.pxmid,r.px0,!0,1)+"Z";_?x.attr("d","M"+(a+_*r.px0[0])+","+(i+_*r.px0[1])+E(r.px0,r.pxmid,!1,_)+E(r.pxmid,r.px0,!1,_)+"Z"+k):x.attr("d",k)}else{var T=E(r.px0,r.px1,!0,1);if(_){var A=1-_;x.attr("d","M"+(a+_*r.px1[0])+","+(i+_*r.px1[1])+E(r.px1,r.px0,!1,_)+"l"+A*r.px0[0]+","+A*r.px0[1]+T+"Z")}else x.attr("d","M"+a+","+i+"l"+r.px0[0]+","+r.px0[1]+T+"Z")}w(t,r,u);var M=c.castOption(h.textposition,r.pts),S=y.selectAll("g.slicetext").data(r.text&&"none"!==M?[0]:[]);S.enter().append("g").classed("slicetext",!0),S.exit().remove(),S.each(function(){var e=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,"outside"===M?function(t,e,r){var n=c.castOption(t.outsidetextfont.color,e.pts)||c.castOption(t.textfont.color,e.pts)||r.color,a=c.castOption(t.outsidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,i=c.castOption(t.outsidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:a,size:i}}(h,r,t._fullLayout.font):p(h,r,t._fullLayout.font)).call(l.convertToTspans,t);var f,d=o.bBox(e.node());"outside"===M?f=m(d,r):(f=g(d,r,u),"auto"===M&&f.scale<1&&(e.call(o.font,h.outsidetextfont),h.outsidetextfont.family===h.insidetextfont.family&&h.outsidetextfont.size===h.insidetextfont.size||(d=o.bBox(e.node())),f=m(d,r)));var y=a+r.pxmid[0]*f.rCenter+(f.x||0),x=i+r.pxmid[1]*f.rCenter+(f.y||0);f.outside&&(r.yLabelMin=x-d.height/2,r.yLabelMid=x,r.yLabelMax=x+d.height/2,r.labelExtraX=0,r.labelExtraY=0,v=!0),e.attr("transform","translate("+y+","+x+")"+(f.scale<1?"scale("+f.scale+")":"")+(f.rotate?"rotate("+f.rotate+")":"")+"translate("+-(d.left+d.right)/2+","+-(d.top+d.bottom)/2+")")})}function E(t,e,n,a){var i=a*(e[0]-t[0]),o=a*(e[1]-t[1]);return"a"+a*u.r+","+a*u.r+" 0 "+r.largeArc+(n?" 1 ":" 0 ")+i+","+o}});var x=n.select(this).selectAll("g.titletext").data(h.title.text?[0]:[]);x.enter().append("g").classed("titletext",!0),x.exit().remove(),x.each(function(){var e,a=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),i=h.title.text;h._meta&&(i=s.templateString(i,h._meta)),a.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,h.title.font).call(l.convertToTspans,t),e="middle center"===h.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}}(u):y(u,r._size),a.attr("transform","translate("+e.x+","+e.y+")"+(e.scale<1?"scale("+e.scale+")":"")+"translate("+e.tx+","+e.ty+")")}),v&&function(t,e){var r,n,a,i,o,s,l,u,h,f,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var a,u,h,p,d,g,v=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=v-m;if(b*l>0&&(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u=(c.castOption(e.pull,h.pts)||0)||((t.pxmid[1]-h.pxmid[1])*l>0?(p=h.cyFinal+o(h.px0[1],h.px1[1]),(b=p-m-t.labelExtraY)*l>0&&(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l>0&&(a=3*s*Math.abs(u-f.indexOf(t)),d=h.cxFinal+i(h.px0[0],h.px1[0]),(g=d+a-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=g)))}for(n=0;n<2;n++)for(a=n?v:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(a),h=t[1-n][r],f=h.concat(u),d=[],p=0;pMath.abs(f)?c+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(o+t.labelExtraX+u):c+="l"+t.labelExtraX+","+h+"v"+(f-h)+"h"+u}else c+="V"+(t.yLabelMid+t.labelExtraY)+"h"+u;s.ensureSingle(r,"path","textline").call(i.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:c,fill:"none"})}else r.select("path.textline").remove()})}(a,h)})});setTimeout(function(){a.selectAll("tspan").each(function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)},formatSliceLabel:w,transformInsideText:g,determineInsideTextFont:p,positionTitleOutside:y,prerenderTitles:d,layoutAreas:_,attachFxHandlers:f}},{"../../components/color":594,"../../components/drawing":615,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"./event_data":1089,"./helpers":1090,d3:164}],1095:[function(t,e,r){"use strict";var n=t("d3"),a=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(a,t,e)})})}},{"./style_one":1096,d3:164}],1096:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("./helpers").castOption;e.exports=function(t,e,r){var i=r.marker.line,o=a(i.color,e.pts)||n.defaultLine,s=a(i.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},{"../../components/color":594,"./helpers":1090}],1097:[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":1111}],1098:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),a=t("../../lib/str2rgbarray"),i=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,h=this.pickXYData=t.xy,f=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(h){if(n=h,e=h.length>>>1,f)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=a(t.marker.color),v=a(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=i(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=i(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":742,"../../plots/cartesian/autorange":766,"../scatter/get_trace_color":1120,"gl-pointcloud2d":293}],1099:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}i("x"),i("y"),i("xbounds"),i("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),i("text"),i("marker.color",r),i("marker.opacity"),i("marker.blend"),i("marker.sizemin"),i("marker.sizemax"),i("marker.border.color",r),i("marker.border.arearatio"),e._length=null}},{"../../lib":719,"./attributes":1097}],1100:[function(t,e,r){"use strict";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":805,"../scatter3d/calc":1138,"./attributes":1097,"./convert":1098,"./defaults":1099}],1101:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../../plots/attributes"),i=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,h=t("../../lib/extend").extendFlat,f=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK;(e.exports=f({hoverinfo:h({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),node:{label:{valType:"data_array",dflt:[]},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},line:{color:{valType:"color",dflt:i.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},line:{color:{valType:"color",dflt:i.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":593,"../../components/colorscale/attributes":601,"../../components/fx/attributes":624,"../../constants/docs":690,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793,"../../plots/template_attributes":843}],1102:[function(t,e,r){"use strict";var n=t("../../plot_api/edit_types").overrideAll,a=t("../../plots/get_data").getModuleCalcData,i=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"),h=t("../../registry");function f(t,e){var r=t._fullData[e],n=t._fullLayout,a=n.dragmode,i="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if("pan"!==a&&"zoom"!==a){s(o,i);var f={_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:f,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[f],yaxes:[p],doneFnCompleted:function(r){var n,a=t._fullData[e],i=a.node.groups.slice(),o=[];function s(t){for(var e=a._sankey.graph.nodes,r=0;rm&&(m=i.source[e]),i.target[e]>m&&(m=i.target[e]);var y,x=m+1;t.node._count=x;var b=t.node.groups,_={};for(e=0;e0&&s(S,x)&&s(E,x)&&(!_.hasOwnProperty(S)||!_.hasOwnProperty(E)||_[S]!==_[E])){_.hasOwnProperty(E)&&(E=_[E]),_.hasOwnProperty(S)&&(S=_[S]),E=+E,h[S=+S]=h[E]=!0;var C="";i.label&&i.label[e]&&(C=i.label[e]);var L=null;C&&f.hasOwnProperty(C)&&(L=f[C]),c.push({pointNumber:e,label:C,color:u?i.color[e]:i.color,concentrationscale:L,source:S,target:E,value:+M}),A.source.push(S),A.target.push(E)}}var P=x+b.length,O=o(r.color),I=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:z,color:O?r.color[e]:r.color})}var D=!1;return function(t,e,r){for(var i=a.init2dArray(t,0),o=0;o1})}(P,A.source,A.target)&&(D=!0),{circular:D,links:c,nodes:I,groups:b,groupLookup:_}}e.exports=function(t,e){var r=c(e);return i({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":606,"../../lib":719,"../../lib/gup":717,"strongly-connected-components":531}],1104:[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",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1105:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=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 h(t,e){function r(r,i){return n.coerce(t,e,a.link.colorscales,r,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(t,e,r,f){function p(r,i){return n.coerce(t,e,a,r,i)}var d=n.extendDeep(f.hoverlabel,t.hoverlabel),g=t.node,v=c.newContainer(e,"node");function m(t,e){return n.coerce(g,v,a.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,v,m,d),m("hovertemplate");var y=f.colorway;m("color",v.label.map(function(t,e){return i.addOpacity(function(t){return y[t%y.length]}(e),.8)}));var x=t.link||{},b=c.newContainer(e,"link");function _(t,e){return n.coerce(x,b,a.link,t,e)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,k=o(f.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(k,b.value.length)),u(x,b,{name:"colorscales",handleItemDefaults:h}),s(e,f,p),p("orientation"),p("valueformat"),p("valuesuffix"),v.x.length&&v.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},f.font)),e._length=null}},{"../../components/color":594,"../../components/fx/hoverlabel_defaults":631,"../../lib":719,"../../plot_api/plot_template":757,"../../plots/array_container_defaults":763,"../../plots/domain":792,"./attributes":1101,tinycolor2:538}],1106:[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":1101,"./base_plot":1102,"./calc":1103,"./defaults":1105,"./plot":1107,"./select.js":1109}],1107:[function(t,e,r){"use strict";var n=t("d3"),a=t("./render"),i=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function h(t,e){return t.filter(function(t){return t.key===e.traceId})}function f(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function p(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",function(t){if(!t.link.concentrationscale)return.4}),a&&h(e,t).selectAll("."+l.sankeyLink).filter(function(t){return t.link.label===a}).style("fill-opacity",function(t){if(!t.link.concentrationscale)return.4}),r&&h(e,t).selectAll("."+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",function(t){return t.tinyColorAlpha}),a&&h(e,t).selectAll("."+l.sankeyLink).filter(function(t){return t.link.label===a}).style("fill-opacity",function(t){return t.tinyColorAlpha}),r&&h(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,h=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.color,1),borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:n.event.x"),color:b(o,"bgcolor")||a.tinyColorHue,borderColor:b(o,"bordercolor"),fontFamily:b(o,"font.family"),fontSize:b(o,"font.size"),fontColor:b(o,"font.color"),nameLength:b(o,"namelength"),textAlign:b(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[a.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});f(y,.85),p(y)}}},unhover:function(e,a,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,a,o),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,t.emit("plotly_unhover",{event:n.event,points:[a.node]})),i.loneUnhover(r._hoverlayer.node()))},select:function(e,r,a){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,a),i.click(t,{target:!0})}}})}},{"../../components/color":594,"../../components/fx":632,"../../lib":719,"./constants":1104,"./render":1108,d3:164}],1108:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),h=t("../../lib"),f=t("../../lib/gup"),p=f.keyFun,d=f.repeat,g=f.unwrap,v=t("d3-interpolate").interpolateNumber,m=t("../../registry");function y(){var t=.5;return function(e){if(e.link.circular)return r=e.link,n=r.width/2,a=r.circularPathData,"top"===r.circularLinkType?"M "+a.targetX+" "+(a.targetY+n)+" L"+a.rightInnerExtent+" "+(a.targetY+n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 1 "+(a.rightFullExtent-n)+" "+(a.targetY-a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY-a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.leftInnerExtent+" "+(a.sourceY-n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 0 "+(a.leftFullExtent-n)+" "+(a.sourceY-a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 0 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY-a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.targetY-n)+"L"+a.targetX+" "+(a.targetY-n)+"Z":"M "+a.targetX+" "+(a.targetY-n)+" L"+a.rightInnerExtent+" "+(a.targetY-n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n)+" "+(a.targetY+a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.leftInnerExtent+" "+(a.sourceY+n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY+a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.targetY+n)+"L"+a.targetX+" "+(a.targetY+n)+"Z";var r,n,a,i=e.link.source.x1,o=e.link.target.x0,s=v(i,o),l=s(t),c=s(1-t),u=e.link.y0-e.link.width/2,h=e.link.y0+e.link.width/2,f=e.link.y1-e.link.width/2,p=e.link.y1+e.link.width/2;return"M"+i+","+u+"C"+l+","+u+" "+c+","+f+" "+o+","+f+"L"+o+","+p+"C"+c+","+p+" "+l+","+h+" "+i+","+h+"Z"}}function x(t){t.attr("transform",function(t){return"translate("+t.node.x0.toFixed(3)+", "+t.node.y0.toFixed(3)+")"})}function b(t){t.call(x)}function _(t,e){t.call(b),e.attr("d",y())}function w(t){t.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function k(t){return t.link.width>1||t.linkLineWidth>0}function T(t){return"translate("+t.translateX+","+t.translateY+")"+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function A(t){return"translate("+(t.horizontal?0:t.labelY)+" "+(t.horizontal?t.labelY:0)+")"}function M(t){return a.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function S(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function E(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function C(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function L(t){return t.horizontal&&t.left?"100%":"0%"}function P(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 O(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,z(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,a){!function(t){for(var e=0;e0&&a.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,o,a),function(t,e,r,a,i){window.requestAnimationFrame(function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var c=r.node.originalX;r.node.x0=c-r.visibleWidth/2,r.node.x1=c+r.visibleWidth/2,I(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),z(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),_(t.filter(D(r)),e))}}).on("dragend",function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e=a||(r=a-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),a=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}),a=[],i=-1,o=-1/0;for(_=0;_o+d&&(i+=1,e=s.x0),o=s.x0,a[i]||(a[i]=[]),a[i].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return a}(y=T.nodes)),a.update(T)}return{circular:b,key:r,trace:s,guid:h.randstr(),horizontal:f,width:v,height:m,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:v,dragPerpendicular:f?v:m,arrangement:s.arrangement,sankey:a,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,u)),_=e.selectAll("."+n.cn.sankey).data(b,p);_.exit().remove(),_.enter().append("g").classed(n.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",T),_.each(function(e,r){t._fullData[r]._sankey=e;var n="bgsankey-"+e.trace.uid+"-"+r;h.ensureSingle(t._fullLayout._draggers,"rect",n),t._fullData[r]._bgRect=a.select("."+n),t._fullData[r]._bgRect.style("pointer-events","all").attr("width",e.width).attr("height",e.height).attr("x",e.translateX).attr("y",e.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),_.transition().ease(n.ease).duration(n.duration).attr("transform",T);var I=_.selectAll("."+n.cn.sankeyLinks).data(d,p);I.enter().append("g").classed(n.cn.sankeyLinks,!0).style("fill","none");var z=I.selectAll("."+n.cn.sankeyLink).data(function(t){return t.graph.links.filter(function(t){return t.value}).map(function(t,e,r){var n=i(e.color),a=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:a,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:y,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}.bind(null,t))},p);z.enter().append("path").classed(n.cn.sankeyLink,!0).call(P,_,f.linkEvents),z.style("stroke",function(t){return k(t)?o.tinyRGB(i(t.linkLineColor)):t.tinyColorHue}).style("stroke-opacity",function(t){return k(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style("fill",function(t){return t.tinyColorHue}).style("fill-opacity",function(t){return t.tinyColorAlpha}).style("stroke-width",function(t){return k(t)?t.linkLineWidth:1}).attr("d",y()),z.style("opacity",function(){return t._context.staticPlot||v||m?1:0}).transition().ease(n.ease).duration(n.duration).style("opacity",1),z.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var D=_.selectAll("."+n.cn.sankeyNodeSet).data(d,p);D.enter().append("g").classed(n.cn.sankeyNodeSet,!0),D.style("cursor",function(t){switch(t.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=D.selectAll("."+n.cn.sankeyNode).data(function(t){var e=t.graph.nodes;return function(t){var e,r=[];for(e=0;e5?t.node.label:""}).attr("text-anchor",function(t){return t.horizontal&&t.left?"end":"start"}),U.transition().ease(n.ease).duration(n.duration).attr("startOffset",L).style("fill",C)}},{"../../components/color":594,"../../components/drawing":615,"../../lib":719,"../../lib/gup":717,"../../registry":848,"./constants":1104,"@plotly/d3-sankey":55,"@plotly/d3-sankey-circular":54,d3:164,"d3-force":157,"d3-interpolate":159,tinycolor2:538}],1109:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,a=n._sankey.graph.nodes,i=0;is&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;sM[u]&&u=0;a--){var i=t[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],1118:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./stack_defaults"),u=t("./marker_defaults"),h=t("./line_defaults"),f=t("./line_shape_defaults"),p=t("./text_defaults"),d=t("./fillcolor_defaults");e.exports=function(t,e,r,g){function v(r,a){return n.coerce(t,e,i,r,a)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&mG!=(F=O[L][1])>=G&&(z=O[L-1][0],D=O[L][0],F-R&&(I=z+(D-z)*(G-R)/(F-R),V=Math.min(V,I),U=Math.max(U,I)));V=Math.max(V,0),U=Math.min(U,f._length);var Y=s.defaultLine;return s.opacity(h.fillcolor)?Y=h.fillcolor:s.opacity((h.line||{}).color)&&(Y=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:Y,hovertemplate:!1}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":594,"../../components/fx":632,"../../lib":719,"../../registry":848,"./get_trace_color":1120}],1122:[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"),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":778,"./arrays_to_calcdata":1110,"./attributes":1111,"./calc":1112,"./cross_trace_calc":1116,"./cross_trace_defaults":1117,"./defaults":1118,"./hover":1121,"./marker_colorbar":1128,"./plot":1130,"./select":1131,"./style":1133,"./subtypes":1134}],1123:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s("line.color",r),a(t,"line"))?i(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":604,"../../components/colorscale/helpers":605,"../../lib":719}],1124:[function(t,e,r){"use strict";var n=t("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,s=i-.5,l=t("../../lib"),c=l.segmentsIntersect,u=l.constrain,h=t("./constants");e.exports=function(t,e){var r,n,i,f,p,d,g,v,m,y,x,b,_,w,k,T,A,M,S=e.xaxis,E=e.yaxis,C="log"===S.type,L="log"===E.type,P=S._length,O=E._length,I=e.connectGaps,z=e.baseTolerance,D=e.shape,R="linear"===D,F=e.fill&&"none"!==e.fill,B=[],N=h.minTolerance,j=t.length,V=new Array(j),U=0;function q(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),i=E.c2p(r.y);if(n===a){if(C&&(n=S.c2p(r.x,!0)),n===a)return!1;L&&i===a&&(n*=Math.abs(S._m*O*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),n*=1e3}if(i===a){if(L&&(i=E.c2p(r.y,!0)),i===a)return!1;i*=1e3}return[n,i]}function H(t,e,r,n){var a=r-t,i=n-e,o=.5-t,s=.5-e,l=a*a+i*i,c=a*o+i*s;if(c>0&&crt||t[1]at)return[u(t[0],et,rt),u(t[1],nt,at)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===at)||void 0)}function lt(t,e,r){return function(n,a){var i=ot(n),o=ot(a),s=[];if(i&&o&&st(i,o))return s;i&&s.push(i),o&&s.push(o);var c=2*l.constrain((n[t]+a[t])/2,e,r)-((i||n)[t]+(o||a)[t]);c&&((i&&o?c>0==i[t]>o[t]?i:o:i||o)[t]+=c);return s}}function ct(t){var e=t[0],r=t[1],n=e===V[U-1][0],a=r===V[U-1][1];if(!n||!a)if(U>1){var i=e===V[U-2][0],o=r===V[U-2][1];n&&(e===et||e===rt)&&i?o?U--:V[U-1]=t:a&&(r===nt||r===at)&&o?i?U--:V[U-1]=t:V[U++]=t}else V[U++]=t}function ut(t){V[U-1][0]!==t[0]&&V[U-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ht(t){if(A=t[0]/P,M=t[1]/O,W=t[0]rt?rt:0,X=t[1]at?at:0,W||X){if(U)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),V[U++]=e[1])}else Q=$(V[U-1],t)[0],V[U++]=Q;else V[U++]=[W||t[0],X||t[1]];var r=V[U-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,i=(a=t)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?et:rt,at]:[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]),V[U++]=t;var n,a,i,o}for("linear"===D||"spline"===D?$=function(t,e){for(var r=[],n=0,a=0;a<4;a++){var i=it[a],o=c(t[0],t[1],e[0],e[1],i[0],i[1],i[2],i[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,ft))break;i=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,f=d,g=!1):_=t.length||!d)break;ht(d),n=d}}else ht(f)}K&&ct([Z||K[0],J||K[1]]),B.push(V.slice(0,U))}return B}},{"../../constants/numerical":695,"../../lib":719,"./constants":1115}],1125:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1126:[function(t,e,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var a,i,o,s,l,c={},u=!1,h=-1,f=0,p=-1;for(i=0;i=0?l=p:(l=p=f,f++),l0?Math.max(e,a):0}}},{"fast-isnumeric":226}],1128:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1129:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),h=(t.line||{}).color;(c=c||{},h&&(r=h),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",r),a(t,"marker")&&i(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",h&&!Array.isArray(h)&&e.marker.color!==h?h:u?n.background:n.defaultLine),a(t,"marker.line")&&i(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":594,"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605,"./subtypes":1134}],1130:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../registry"),i=t("../../lib"),o=i.ensureSingle,s=i.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),h=t("./link_traces"),f=t("../../lib/polygon").tester;function p(t,e,r,h,p,d,g){var v;!function(t,e,r,a,o){var s=r.xaxis,l=r.yaxis,u=n.extent(i.simpleMap(s.range,s.r2c)),h=n.extent(i.simpleMap(l.range,l.r2c)),f=a[0].trace;if(!c.hasMarkers(f))return;var p=f.marker.maxdisplayed;if(0===p)return;var d=a.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),g=Math.ceil(d.length/p),v=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=h[0].trace,w=_.line,k=n.select(d),T=o(k,"g","errorbars"),A=o(k,"g","lines"),M=o(k,"g","points"),S=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(t,T,r,g),!0===_.visible){var E,C;y(k).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var P,O,I="",z=[],D=_._prevtrace;D&&(I=D._prevRevpath||"",C=D._nextFill,z=D._polygons);var R,F,B,N,j,V,U,q="",H="",G=[],Y=i.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(h),-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(h,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),U=_._polygons=new Array(G.length),v=0;v1){var r=n.select(this);if(r.datum(h),t)y(r.style("opacity",0).attr("d",P).call(l.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",P),l.singleLineStyle(h,a)}}}}}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(h),N&&V&&(L?("y"===L?N[1]=V[1]=b.c2p(0,!0):"x"===L&&(N[0]=V[0]=x.c2p(0,!0)),y(E).attr("d","M"+V+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(E).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&I?("tonext"===_.fill?y(C).attr("d",q+"Z"+I+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+I.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(h),S.datum(h),function(e,a,i){var o,u=i[0].trace,h=c.hasMarkers(u),f=c.hasText(u),p=tt(u),d=et,g=et;if(h||f){var v=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?K:J:_&&!w&&(v=Q),h&&(d=v),f&&(g=v)}var k,T=(o=e.selectAll("path.point").data(d,p)).enter().append("path").classed("point",!0);m&&T.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),h&&(k=l.makePointStyleFns(u)),o.each(function(e){var a=n.select(this),i=y(a);l.translatePoint(e,i,x,b)?(l.singlePointStyle(e,i,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,i,x,b,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):i.remove()}),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(g,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each(function(t){var e=n.select(this),a=y(e.select("text"));l.translatePoint(t,a,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,h);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,a,i,c){var u,f,d=!i,g=!!i&&i.duration>0,v=h(t,e,r);((u=a.selectAll("g.trace").data(v,function(t){return t[0].trace.uid})).enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each(function(e){var a=o(n.select(this),"g","fills");l.setClipUrl(a,r.layerClipId,t);var i=e[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each(function(t){i[t]=null}).remove(),u.order().each(function(t){i[t]=o(n.select(this),"path","js-fill")})})}(t,u,e),g)?(c&&(f=c()),n.transition().duration(i.duration).ease(i.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()}).each(function(){a.selectAll("g.trace").each(function(r,n){p(t,n,e,r,v,this,i)})})):u.each(function(r,n){p(t,n,e,r,v,this,i)});d&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":615,"../../lib":719,"../../lib/polygon":731,"../../registry":848,"./line_points":1124,"./link_traces":1126,"./subtypes":1134,d3:164}],1131:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,a,i,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r0){var f=a.c2l(u);a._lowerLogErrorBound||(a._lowerLogErrorBound=f),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,f)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[a(t.x,t.error_x,e[0],r.xaxis),a(t.y,t.error_y,e[1],r.yaxis),a(t.z,t.error_z,e[2],r.zaxis)],i=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function x(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function b(t,e){return e(4*t)}function _(t){return p[t]}function w(t,e,r,n,a){var i=null;if(l.isArrayOrTypedArray(t)){i=[];for(var o=0;o=0){var g=function(t,e,r){var n,a=(r+1)%3,i=(r+2)%3,o=[],l=[];for(n=0;n=0&&h("surfacecolor",f||p);for(var d=["x","y","z"],g=0;g<3;++g){var v="projection."+d[g];h(v+".show")&&(h(v+".opacity"),h(v+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,f||p||r,{axis:"z"}),m(t,e,f||p||r,{axis:"y",inherit:"z"}),m(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":719,"../../registry":848,"../scatter/line_defaults":1123,"../scatter/marker_defaults":1129,"../scatter/subtypes":1134,"../scatter/text_defaults":1135,"./attributes":1137}],1142:[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":693,"../../plots/gl3d":807,"./attributes":1137,"./calc":1138,"./convert":1140,"./defaults":1141}],1143:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/attributes"),i=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,h=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:h.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({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:i()}},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../scatter/attributes":1111}],1144:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=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,h,f=e._length,p=new Array(f),d=!1;for(c=0;c")}return o}function k(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,_.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":719,"../scatter/hover":1121}],1148:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":778,"../scatter/marker_colorbar":1128,"../scatter/select":1131,"../scatter/style":1133,"./attributes":1143,"./calc":1144,"./defaults":1145,"./event_data":1146,"./hover":1147,"./plot":1149}],1149:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../plots/cartesian/axes"),i=t("../../components/drawing");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,h={xaxis:a.getFromId(t,u.xaxis||"x"),yaxis:a.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,h,r,o),s=0;s")}(u,v,t,c[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/get_trace_color":1120,"./attributes":1150}],1155:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./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":797,"../scatter/marker_colorbar":1128,"../scatter/style":1133,"./attributes":1150,"./calc":1151,"./defaults":1152,"./event_data":1153,"./hover":1154,"./plot":1156,"./select":1157,"./style":1158}],1156:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../constants/numerical").BADNUM,o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("../../lib/geojson_utils"),c=t("../scatter/subtypes"),u=t("./style");function h(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),a=r.locationmode,l=0;l=g,k=2*_,T={},A=y.makeCalcdata(e,"x"),M=x.makeCalcdata(e,"y"),S=new Array(k);for(r=0;r<_;r++)o=A[r],s=M[r],S[2*r]=o===d?NaN:o,S[2*r+1]=s===d?NaN:s;if("log"===y.type)for(r=0;r1&&a.extendFlat(s.line,f.linePositions(t,r,n));if(s.errorX||s.errorY){var l=f.errorBarPositions(t,r,n,i,o);s.errorX&&a.extendFlat(s.errorX,l.x),s.errorY&&a.extendFlat(s.errorY,l.y)}s.text&&(a.extendFlat(s.text,{positions:n},f.textPosition(t,r,s.text,s.marker)),a.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),a.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,S,A,M),P=p(t,b);return u(m,e),w?L.marker&&(C=2*(L.marker.sizeAvg||Math.max(L.marker.size,3))):C=l(e,_),c(t,e,y,x,A,M,C),L.errorX&&v(e,y,L.errorX),L.errorY&&v(e,x,L.errorY),L.fill&&!P.fill2d&&(P.fill2d=!0),L.marker&&!P.scatter2d&&(P.scatter2d=!0),L.line&&!P.line2d&&(P.line2d=!0),!L.errorX&&!L.errorY||P.error2d||(P.error2d=!0),L.text&&!P.glText&&(P.glText=!0),L.marker&&(L.marker.snap=T.tree||g),P.lineOptions.push(L.line),P.errorXOptions.push(L.errorX),P.errorYOptions.push(L.errorY),P.fillOptions.push(L.fill),P.markerOptions.push(L.marker),P.markerSelectedOptions.push(L.markerSel),P.markerUnselectedOptions.push(L.markerUnsel),P.textOptions.push(L.text),P.textSelectedOptions.push(L.textSel),P.textUnselectedOptions.push(L.textUnsel),P.selectBatch.push([]),P.unselectBatch.push([]),T._scene=P,T.index=P.count,T.x=A,T.y=M,T.positions=S,P.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/autorange":766,"../../plots/cartesian/axis_ids":770,"../scatter/calc":1112,"../scatter/colorscale_calc":1114,"./constants":1161,"./convert":1162,"./scene_update":1168,"point-cluster":470}],1161:[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]}}},{}],1162:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("svg-path-sdf"),i=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,h=t("../scatter/subtypes"),f=t("../scatter/make_bubble_size_func"),p=t("./constants"),d=t("../../constants/interactions").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t("../../components/fx/helpers").appendArrayPointValue;function m(t,e){var r,a=t._length,i=t.textfont,o=t.textposition,l=Array.isArray(o)?o:[o],c=i.color,u=i.size,h=i.family,f={},p=t.texttemplate;if(p){f.text=[];var d=Array.isArray(p),g=d?Math.min(p.length,a):a,m=d?function(t){return p[t]}:function(){return p},y=e._fullLayout._d3locale;for(r=0;rp.TOO_MANY_POINTS?"rect":h.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var f=n[0],d=n[1];for(a=0;a1?l[a]:l[0]:l,d=Array.isArray(c)?c.length>1?c[a]:c[0]:c,v=g[p],m=g[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[a]=[v*y/f,x/f]}}return o}}},{"../../components/drawing":615,"../../components/fx/helpers":629,"../../constants/interactions":694,"../../lib":719,"../../lib/gl_format_color":716,"../../plots/cartesian/axis_ids":770,"../../registry":848,"../scatter/make_bubble_size_func":1127,"../scatter/subtypes":1134,"./constants":1161,"color-normalize":121,"fast-isnumeric":226,"svg-path-sdf":536}],1163:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("../scatter/constants"),s=t("../scatter/subtypes"),l=t("../scatter/xy_defaults"),c=t("../scatter/marker_defaults"),u=t("../scatter/line_defaults"),h=t("../scatter/fillcolor_defaults"),f=t("../scatter/text_defaults");e.exports=function(t,e,r,p){function d(r,a){return n.coerce(t,e,i,r,a)}var g=!!t.marker&&/-open/.test(t.marker.symbol),v=s.isBubble(t),m=l(t,e,p,d);if(m){var y=m-1;c--)s=x[a[c]],l=b[a[c]],u=m.c2p(s)-_,h=y.c2p(l)-w,(f=Math.sqrt(u*u+h*h))g.glText.length){var b=y-g.glText.length;for(f=0;fr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),g.line2d.update(g.lineOptions)),g.error2d){var w=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(w)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=s.repeat(null,y),g.fill2d&&(g.fillOptions=g.fillOptions.map(function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var a,i,o=n[0],s=o.trace,l=o.t,c=g.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(g.fillOrder[e]=u);var h,f,p=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;hh&&isNaN(d[f+1]);)f-=2;0!==d[h+1]&&(p=[d[h],0]),p=p.concat(d.slice(h,f+2)),0!==d[f+1]&&(p=p.concat([d[f],0]))}else if("tozerox"===s.fill){for(h=0;hh&&isNaN(d[f]);)f-=2;0!==d[h]&&(p=[0,d[h+1]]),p=p.concat(d.slice(h,f+2)),0!==d[f]&&(p=p.concat([0,d[f+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],a=0,i=0;i-1;for(f=0;f=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=a.modHalf(e[0],360),i=e[1],o=f.project([n,i]),l=o.x-u.c2p([d,i]),c=o.y-h.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[a.modHalf(v[0],360)+p,v[1]],y=u.c2p(m),x=h.c2p(m),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=i(c,g),t.extraText=function(t,e,r){if(t.hovertemplate)return;var n=(e.hi||t.hoverinfo).split("+"),a=-1!==n.indexOf("all"),i=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}a||i&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):i?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(a||-1!==n.indexOf("text"))&&o(e,t,c);return c.join("
")}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../scatter/get_trace_color":1120}],1175:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),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":822,"../scatter/marker_colorbar":1128,"../scattergeo/calc":1151,"./attributes":1170,"./defaults":1172,"./event_data":1173,"./hover":1174,"./plot":1176,"./select":1177}],1176:[function(t,e,r){"use strict";var n=t("./convert"),a=t("../../plots/mapbox/constants").traceLayerPrefix,i=["fill","line","circle","symbol"];function o(t,e){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:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+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,a,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup["trace-"+this.uid];if(c!==this.below){for(e=i.length-1;e>=0;e--)r=i[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=i[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,a=new o(t,r.uid),s=n(t.gd,e),l=a.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,a){var i=n(t,e,r,a);if(i&&!1!==i[0].index){var s=i[0];if(void 0===s.index)return i;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),s.hovertemplate=u.hovertemplate,i}},makeHoverPointText:o}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/hover":1121}],1182:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":831,"../scatter/marker_colorbar":1128,"../scatter/select":1131,"../scatter/style":1133,"./attributes":1178,"./calc":1179,"./defaults":1180,"./hover":1181,"./plot":1183}],1183:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){for(var i=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&&!f.fill2d&&(f.fill2d=!0),y.marker&&!f.scatter2d&&(f.scatter2d=!0),y.line&&!f.line2d&&(f.line2d=!0),y.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(y.line),f.fillOptions.push(y.fill),f.markerOptions.push(y.marker),f.markerSelectedOptions.push(y.markerSel),f.markerUnselectedOptions.push(y.markerUnsel),f.textOptions.push(y.text),f.textSelectedOptions.push(y.textSel),f.textUnselectedOptions.push(y.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=f,d.index=f.count,f.count++}}),i(t,e,r)}}},{"../../lib":719,"../scattergl/constants":1161,"../scattergl/convert":1162,"../scattergl/plot":1167,"../scattergl/scene_update":1168,"fast-isnumeric":226,"point-cluster":470}],1190:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../plots/template_attributes").texttemplateAttrs,i=t("../scatter/attributes"),o=t("../../plots/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../components/drawing/attributes").dash,c=t("../../lib/extend").extendFlat,u=i.marker,h=i.line,f=u.line;e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},i.hovertext,{}),line:{color:h.color,width:h.width,dash:l,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":601,"../../components/drawing/attributes":614,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../scatter/attributes":1111}],1191:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,h,f,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r"),s.hovertemplate=d.hovertemplate,o}function y(t,e){v.push(t._hovertitle+": "+e)}}},{"../../plots/cartesian/axes":767,"../scatter/hover":1121}],1195:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":844,"../scatter/marker_colorbar":1128,"../scatter/select":1131,"../scatter/style":1133,"./attributes":1190,"./calc":1191,"./defaults":1192,"./event_data":1193,"./hover":1194,"./plot":1196}],1196:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e,r){var a=e.plotContainer;a.select(".scatterlayer").selectAll("*").remove();var i={xaxis:e.xaxis,yaxis:e.yaxis,plot:a,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select("g.scatterlayer");n(t,i,r,o)}},{"../scatter/plot":1130}],1197:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,h=u.line,f=c(a("marker.line",{editTypeOverride:"calc"}),{width:c({},h.width,{editType:"calc"}),editType:"calc"}),p=c(a("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:f,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:l("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:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:i(),marker:p,xaxes:d("x"),yaxes:d("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:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../../plots/template_attributes":843,"../scatter/attributes":1111,"../scattergl/attributes":1159}],1198:[function(t,e,r){"use strict";var n=t("regl-line2d"),a=t("../../registry"),i=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine,u="splom";function h(t,e,r){for(var n=r.matrixOptions.data.length,a=e._visibleDims,i=r.viewOpts.ranges=new Array(n),o=0;of?2*(b.sizeAvg||Math.max(b.size,3)):i(e,x),p=0;pi&&l?r._splomSubplots[S]=1:a-1,A=!0;if("lasso"===y||"select"===y||!!f.selectedpoints||T){var M=f._length;if(f.selectedpoints){d.selectBatch=f.selectedpoints;var S=f.selectedpoints,E={};for(s=0;s2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function d(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function g(t,e){var r=t.fullSceneLayout,a=t.dataScale,u=e._len,h={};function g(t,e){var n=r[e],o=a[c[e]];return i.simpleMap(t,function(t){return n.d2l(t)*o})}h.vectors=l(g(e.u,"xaxis"),g(e.v,"yaxis"),g(e.w,"zaxis"),u);var v=f(e.x.slice(0,u)),m=f(e.y.slice(0,u)),y=f(e.z.slice(0,u));if(v.length*m.length*y.length>u)return{positions:[],cells:[]};var x=g(v,"xaxis"),b=g(m,"yaxis"),_=g(y,"zaxis");h.meshgrid=[x,b,_];var w=e._slen;if(w)h.startingPositions=l(g(e.starts.x.slice(0,w),"xaxis"),g(e.starts.y.slice(0,w),"yaxis"),g(e.starts.z.slice(0,w),"zaxis"));else{for(var k=b[0],T=p(x),A=p(_),M=new Array(T.length*A.length),S=0,E=0;E=0};v?(r=Math.min(g.length,y.length),l=function(t){return T(g[t])&&A(t)},u=function(t){return String(g[t])}):(r=Math.min(m.length,y.length),l=function(t){return T(m[t])&&A(t)},u=function(t){return String(m[t])}),b&&(r=Math.min(r,x.length));for(var M=0;M1){for(var L=i.randstr(),P=0;P<_.length;P++)""===_[P].pid&&(_[P].pid=L);_.unshift({hasMultipleRoots:!0,id:L,pid:"",label:""})}}else{var O,I=[];for(O in w)k[O]||I.push(O);if(1!==I.length)return i.warn("Multiple implied roots, cannot build "+e.type+" hierarchy.");O=I[0],_.unshift({hasImpliedRoot:!0,id:O,pid:"",label:O})}try{p=n.stratify().id(function(t){return t.id}).parentId(function(t){return t.pid})(_)}catch(t){return i.warn("Failed to build "+e.type+" hierarchy. Error: "+t.message)}var z=n.hierarchy(p),D=!1;if(b)switch(e.branchvalues){case"remainder":z.sum(function(t){return t.data.v});break;case"total":z.each(function(t){var e=t.data.data,r=e.v;if(t.children){var n=t.children.reduce(function(t,e){return t+e.data.data.v},0);if((e.hasImpliedRoot||e.hasMultipleRoots)&&(r=n),r"),name:T||I("name")?l.name:void 0,color:k("hoverlabel.bgcolor")||y.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:T,hovertemplateLabels:L,eventData:[h(a,l,f.eventDataKeys)]};v&&(R.x0=S-a.rInscribed*a.rpx1,R.x1=S+a.rInscribed*a.rpx1,R.idealAlign=a.pxmid[0]<0?"left":"right"),m&&(R.x=S,R.idealAlign=S<0?"left":"right"),o.loneHover(R,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}),d._hasHoverLabel=!0}if(m){var F=t.select("path.surface");f.styleOne(F,a,l,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:[h(a,l,f.eventDataKeys)],event:n.event})}}),t.on("mouseout",function(e){var a=r._fullLayout,i=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[h(s,i,f.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),d._hasHoverLabel=!1),m){var l=t.select("path.surface");f.styleOne(l,s,i,{hovered:!1})}}),t.on("click",function(t){var e=r._fullLayout,i=r._fullData[d.index];if(!1===l.triggerHandler(r,"plotly_"+d.type+"click",{points:[h(t,i,f.eventDataKeys)],event:n.event})||v&&(c.isHierarchyRoot(t)||c.isLeaf(t)))e.hovermode&&(r._hoverdata=[h(t,i,f.eventDataKeys)],o.click(r,n.event));else if(!r._dragging&&!r._transitioning){a.call("_storeDirectGUIEdit",i,e._tracePreGUI[i.uid],{level:i.level});var s=c.getPtId(t),u=c.isEntry(t)?c.findEntryWithChild(g,s):c.findEntryWithLevel(g,s),p={data:[{level:c.getPtId(u)}],traces:[d.index]},m={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),a.call("animate",r,p,m)}})}},{"../../components/fx":632,"../../components/fx/helpers":629,"../../lib":719,"../../lib/events":709,"../../registry":848,"../pie/helpers":1090,"./helpers":1219,d3:164}],1219:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/color"),i=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 a=t.children||[],i=0;i0)},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 a=e?[n.data[e]]:[n];return r.listPath(n,e).concat(a)},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":594,"../../lib":719,"../../lib/setcursor":739,"../pie/helpers":1090}],1220:[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":1128,"./attributes":1213,"./base_plot":1214,"./calc":1215,"./defaults":1217,"./layout_attributes":1221,"./layout_defaults":1222,"./plot":1223,"./style":1224}],1221:[function(t,e,r){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1222:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},{"../../lib":719,"./layout_attributes":1221}],1223:[function(t,e,r){"use strict";var n=t("d3"),a=t("d3-hierarchy"),i=t("../../components/drawing"),o=t("../../lib"),s=t("../../lib/svg_text_utils"),l=t("../pie/plot").transformInsideText,c=t("./style").styleOne,u=t("./fx"),h=t("./constants"),f=t("./helpers");function p(t,e,p,d){var g=t._fullLayout,v=f.hasTransition(d),m=n.select(p).selectAll("g.slice"),y=e[0],x=y.trace,b=y.hierarchy,_=f.findEntryWithLevel(b,x.level),w=f.getMaxDepth(x),k=g._size,T=x.domain,A=k.w*(T.x[1]-T.x[0]),M=k.h*(T.y[1]-T.y[0]),S=.5*Math.min(A,M),E=y.cx=k.l+k.w*(T.x[1]+T.x[0])/2,C=y.cy=k.t+k.h*(1-T.y[0])-M/2;if(!_)return m.remove();var L=null,P={};v&&m.each(function(t){P[f.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!L&&f.isEntry(t)&&(L=t)});var O=function(t){return a.partition().size([2*Math.PI,t.height+1])(t)}(_).descendants(),I=_.height+1,z=0,D=w;y.hasMultipleRoots&&f.isHierarchyRoot(_)&&(O=O.slice(1),I-=1,z=1,D+=1),O=O.filter(function(t){return t.y1<=D});var R=Math.min(I,w),F=function(t){return(t-z)/R*S},B=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},N=function(t){return o.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,E,C)},j=function(t){return E+t.pxmid[0]*t.transform.rCenter+(t.transform.x||0)},V=function(t){return C+t.pxmid[1]*t.transform.rCenter+(t.transform.y||0)};(m=m.data(O,f.getPtId)).enter().append("g").classed("slice",!0),v?m.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=f.getPtId(t),a=P[r],i=P[f.getPtId(_)];if(i){var o=t.x1>i.x1?2*Math.PI:0;e=t.rpx1U?2*Math.PI:0;e={x0:i,x1:i}}else e={rpx0:S,rpx1:S},o.extendFlat(e,G(t));else e={rpx0:0,rpx1:0};else e={x0:0,x1:0};return n.interpolate(e,a)}(t);return function(t){return N(e(t))}}):d.attr("d",N),p.call(u,_,t,e,{eventDataKeys:h.eventDataKeys,transitionTime:h.CLICK_TRANSITION_TIME,transitionEasing:h.CLICK_TRANSITION_EASING}).call(f.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),d.call(c,a,x);var m=o.ensureSingle(p,"g","slicetext"),b=o.ensureSingle(m,"text","",function(t){t.attr("data-notex",1)});b.text(r.formatSliceLabel(a,_,x,e,g)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,f.determineTextFont(x,a,g.font)).call(s.convertToTspans,t);var w=i.bBox(b.node());a.transform=l(w,a,y),a.translateX=j(a),a.translateY=V(a);var k=function(t,e){return"translate("+t.translateX+","+t.translateY+")"+(t.transform.scale<1?"scale("+t.transform.scale+")":"")+(t.transform.rotate?"rotate("+t.transform.rotate+")":"")+"translate("+-(e.left+e.right)/2+","+-(e.top+e.bottom)/2+")"};v?b.transition().attrTween("transform",function(t){var e=function(t){var e,r=P[f.getPtId(t)],a=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{scale:0,rotate:a.rotate,rCenter:a.rCenter,x:a.x,y:a.y}},L)if(t.parent)if(U){var i=t.x1>U?2*Math.PI:0;e.x0=e.x1=i}else o.extendFlat(e,G(t));else e.x0=e.x1=0;else e.x0=e.x1=0;var s=n.interpolate(e.rpx1,t.rpx1),l=n.interpolate(e.x0,t.x0),c=n.interpolate(e.x1,t.x1),u=n.interpolate(e.transform.scale,a.scale),h=n.interpolate(e.transform.rotate,a.rotate),p=0===a.rCenter?3:0===e.transform.rCenter?1/3:1,d=n.interpolate(e.transform.rCenter,a.rCenter);return function(t){var e=s(t),r=l(t),n=c(t),i=function(t){return d(Math.pow(t,p))}(t),o={pxmid:B(e,(r+n)/2),transform:{rCenter:i,x:a.x,y:a.y}},f={rpx1:s(t),translateX:j(o),translateY:V(o),transform:{scale:u(t),rotate:h(t),rCenter:i}};return f}}(t);return function(t){return k(e(t),w)}}):b.attr("transform",k(a,w))})}r.plot=function(t,e,r,a){var i,o,s=t._fullLayout._sunburstlayer,l=!r,c=f.hasTransition(r);((i=s.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"),i.order(),c)?(a&&(o=a()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){s.selectAll("g.trace").each(function(e){p(t,e,this,r)})})):i.each(function(e){p(t,e,this,r)});l&&i.exit().remove()},r.formatSliceLabel=function(t,e,r,n,a){var i=r.texttemplate,s=r.textinfo;if(!(i||s&&"none"!==s))return"";var l=a.separators,c=n[0],u=t.data.data,h=c.hierarchy,p=f.isHierarchyRoot(t),d=f.getParent(h,t),g=f.getValue(t);if(!i){var v,m=s.split("+"),y=function(t){return-1!==m.indexOf(t)},x=[];if(y("label")&&u.label&&x.push(u.label),u.hasOwnProperty("v")&&y("value")&&x.push(f.formatValue(u.v,l)),!p){y("current path")&&x.push(f.getPath(t.data));var b=0;y("percent parent")&&b++,y("percent entry")&&b++,y("percent root")&&b++;var _=b>1;if(b){var w,k=function(t){v=f.formatPercent(w,l),_&&(v+=" of "+t),x.push(v)};y("percent parent")&&!p&&(w=g/f.getValue(d),k("parent")),y("percent entry")&&(w=g/f.getValue(e),k("entry")),y("percent root")&&(w=g/f.getValue(h),k("root"))}}return y("text")&&(v=o.castOption(r,u.i,"text"),o.isValidTextValue(v)&&x.push(v)),x.join("
")}var T=o.castOption(r,u.i,"texttemplate");if(!T)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=f.formatValue(u.v,l)),A.currentPath=f.getPath(t.data),p||(A.percentParent=g/f.getValue(d),A.percentParentLabel=f.formatPercent(A.percentParent,l),A.parent=f.getPtLabel(d)),A.percentEntry=g/f.getValue(e),A.percentEntryLabel=f.formatPercent(A.percentEntry,l),A.entry=f.getPtLabel(e),A.percentRoot=g/f.getValue(h),A.percentRootLabel=f.formatPercent(A.percentRoot,l),A.root=f.getPtLabel(h),u.hasOwnProperty("color")&&(A.color=u.color);var M=o.castOption(r,u.i,"text");return(o.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=o.castOption(r,u.i,"customdata"),o.texttemplateString(T,A,a._d3locale,A,r._meta||{})}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../pie/plot":1094,"./constants":1216,"./fx":1218,"./helpers":1219,"./style":1224,d3:164,"d3-hierarchy":158}],1224:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib");function o(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=i.castOption(r,s,"marker.line.color")||a.defaultLine,c=i.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(a.fill,n.color).call(a.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){t._fullLayout._sunburstlayer.selectAll(".trace").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(o,t,r)})})},styleOne:o}},{"../../components/color":594,"../../lib":719,d3:164}],1225:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},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 u=e.exports=l(s({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:i(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})},hoverinfo:s({},o.hoverinfo)}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":594,"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764,"../../plots/template_attributes":843}],1226:[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":602}],1227:[function(t,e,r){"use strict";var n=t("gl-surface3d"),a=t("ndarray"),i=t("ndarray-homography"),o=t("ndarray-fill"),s=t("../../lib").isArrayOrTypedArray,l=t("../../lib/gl_format_color").parseColorScale,c=t("../../lib/str2rgbarray"),u=t("../../components/colorscale").extractOpts,h=t("../heatmap/interp2d"),f=t("../heatmap/find_empties");function p(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 d=p.prototype;d.getXat=function(t,e,r,n){var a=s(this.data.x)?s(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?a:n.d2l(a,0,r)},d.getYat=function(t,e,r,n){var a=s(this.data.y)?s(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?a:n.d2l(a,0,r)},d.getZat=function(t,e,r,n){var a=this.data.z[e][t];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[e][t]),void 0===r?a:n.d2l(a,0,r)},d.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),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,a],t.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],t.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=t.dataCoordinate[i];null!=o&&(t.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[a]&&void 0!==s[a][n]?t.textLabel=s[a][n]:t.textLabel=s||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var g=[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 v(t,e){if(t0){r=g[n];break}return r}function x(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),a=1,i=0;iw;)r--,r/=y(r),++r<_&&(r=w);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),c=1+n+1,u=1+o+1,h=a(new Float32Array(c*u),[c,u]),f=0;f0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(a[t]=!0,e=this.contourStart[t];ei&&(this.minValues[e]=i),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"}}},{}],1234:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/extend").extendFlat,i=t("fast-isnumeric");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=i,s=c+1,i=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var g=d.concat(p(r).map(function(){return c((d[0]||[""]).length)})),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=f(b,y-_+n.uplift),k=h(f(x,_),[]),T=h(w,k),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 i(n)?Number(n):1}),E=S.reduce(s,0);S=S.map(function(t){return t/E*m});var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:M,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:a({},e.cells,{values:r}),headerCells:a({},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 L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{"../../lib/extend":710,"./constants":1233,"fast-isnumeric":226}],1235:[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":710}],1236:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults;e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}i(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,a=r.slice(0,n),i=a.slice().sort(function(t,e){return t-e}),o=a.map(function(t){return i.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 h,f,p=u?"":_(t.calcdata.cells.prefix,e,r)||"",d=u?"":_(t.calcdata.cells.suffix,e,r)||"",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=p+(g?a.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(h=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===h?b(v):h),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(" "===n.wrapSplitCharacter?v.replace(/a&&n.push(i),a+=l}return n}(a,l,s);1===c.length&&(c[0]===a.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each(function(t,e){t.page=c[e],t.scrollY=l}),e.attr("transform",function(t){return"translate(0 "+(I(t.rowBlocks,t.page)-t.scrollY)+")"}),t&&(E(t,r,e,c,n.prevPages,n,0),E(t,r,e,c,n.prevPages,n,1),m(r,t))}}function S(t,e,r,i){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===i?s.scrollY+c*a.event.dy:i;var h=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return M(t,h,l),s.scrollY===u}}function E(t,e,r,n,a,i,o){n[o]!==a[o]&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var i=r.filter(function(t,e){return e===o&&n[e]!==a[e]});y(t,e,i,r),a[o]=n[o]}))}function C(t,e,r,i){return function(){var o=a.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,a,i=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+(a=(r=s.shift()).width+i)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=a;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0}),o.selectAll("tspan.line").remove(),x(o.select("."+n.cn.cellText),r,t,i),a.select(e.parentNode.parentNode).call(O)}}function L(t,e,r,i,o){return function(){if(!o.settledY){var s=a.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,f=Math.max(h,u);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,t.selectAll("."+n.cn.columnCell).call(O),M(null,t.filter(k),0),m(r,i,!0)),s.attr("transform",function(){var t=this.parentNode.getBoundingClientRect(),e=a.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),i=e.top-t.top+(r?r.matrix.f:n.cellPad);return"translate("+P(o,a.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+i+")"}),o.settledY=!0}}}function P(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function O(t){t.attr("transform",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+z(e,1/0)},0);return"translate(0 "+(z(R(t),t.key)+e)+")"}).selectAll("."+n.cn.cellRect).attr("height",function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function I(t,e){for(var r=0,n=e-1;n>=0;n--)r+=D(t[n]);return r}function z(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:a({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: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"},domain:o({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/domain":792,"../../plots/template_attributes":843,"../pie/attributes":1085,"../sunburst/attributes":1213,"./constants":1242}],1240:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="treemap",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":828}],1241:[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":1215}],1242:[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}},{}],1243:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=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,h=c.handleDefaults;e.exports=function(t,e,r,c){function f(r,i){return n.coerce(t,e,a,r,i)}var p=f("labels"),d=f("parents");if(p&&p.length&&d&&d.length){var g=f("values");g&&g.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),"squarify"===f("tiling.packing")&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var v=f("text");f("texttemplate"),e.texttemplate||f("textinfo",Array.isArray(v)?"text+label":"label"),f("hovertext"),f("hovertemplate");s(t,e,c,f,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var m=-1!==e.textposition.indexOf("bottom");f("marker.line.width")&&f("marker.line.color",c.paper_bgcolor);var y=f("marker.colors"),x=e._hasColorscale=u(t,"marker","colors");x?h(t,e,c,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(y||[]).length);var b=2*e.textfont.size;f("marker.pad.t",m?b/4:b),f("marker.pad.l",b/4),f("marker.pad.r",b/4),f("marker.pad.b",m?b:b/4),x&&h(t,e,c,f,{prefix:"marker.",cLetter:"c"}),e._hovered={marker:{line:{width:2,color:i.contrast(c.paper_bgcolor)}}},f("pathbar.visible")&&(n.coerceFont(f,"pathbar.textfont",c.font),f("pathbar.thickness",e.pathbar.textfont.size+2*l),f("pathbar.side"),f("pathbar.edgeshape")),o(e,c,f),e._length=null}else e.visible=!1}},{"../../components/color":594,"../../components/colorscale":606,"../../lib":719,"../../plots/domain":792,"../bar/constants":860,"../bar/defaults":862,"./attributes":1239}],1244:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),h=t("../sunburst/fx");e.exports=function(t,e,r,f,p){var d=p.barDifY,g=p.width,v=p.height,m=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,k=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],C=E.trace,L=E.hierarchy,P=g/C._entryDepth,O=u.listPath(r.data,"id"),I=s(L.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(I=I.filter(function(t){var e=O.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+v,t.onPathbar=!0,!0)})).reverse(),(f=f.data(I,u.getPtId)).enter().append("g").classed("pathbar",!0),k(f,!0,M,[g,v],x),f.order();var z=f;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._hoverX=m(s.x1-v/2),s._hoverY=y(s.y1-v/2);var f=n.select(this),p=a.ensureSingle(f,"path","surface",function(t){t.style("pointer-events","all")});w?p.transition().attrTween("d",function(t){var e=T(t,!0,M,[g,v]);return function(t){return x(e(t))}}):p.attr("d",x),f.call(h,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,C,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var d=a.ensureSingle(f,"g","slicetext"),k=a.ensureSingle(d,"text","",function(t){t.attr("data-notex",1)});k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,u.determineTextFont(C,s,S.font,C.pathdir)).call(o.convertToTspans,t),s.textBB=i.bBox(k.node()),s.transform=b(s,{onPathbar:!0}),u.isOutsideText(C,s)&&(s.transform.targetY-=u.getOutsideTextFontKey("size",C,s,S.font)-u.getInsideTextFontKey("size",C,s,S.font)),w?k.transition().attrTween("transform",function(t){var e=A(t,!0,M,[g,v]);return function(t){return _(e(t))}}):k.attr("transform",_(s))})}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../sunburst/fx":1218,"../sunburst/helpers":1219,"./constants":1242,"./partition":1249,"./style":1251,d3:164}],1245:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),h=t("../sunburst/fx"),f=t("../sunburst/plot").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,v=d.height,m=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,k=d.handleSlicesExit,T=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,C=-1!==E.textposition.indexOf("left"),L=-1!==E.textposition.indexOf("right"),P=-1!==E.textposition.indexOf("bottom"),O=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,I=s(r,[g,v],{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;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):(z=Math.min(z,e),D=Math.max(D,e))}),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append("g").classed("slice",!0),k(p,!1,{},[g,v],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:v}},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._hoverX=m(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),k=a.ensureSingle(d,"path","surface",function(t){t.style("pointer-events","all")});w?k.transition().attrTween("d",function(t){var e=T(t,!1,B(),[g,v]);return function(t){return x(e(t))}}):k.attr("d",x),d.call(h,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}),k.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?O?"":u.getPtLabel(s)||"":f(s,r,E,e,S)||"";var M=a.ensureSingle(d,"g","slicetext"),I=a.ensureSingle(M,"text","",function(t){t.attr("data-notex",1)});I.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":C||p?"start":"middle").call(i.font,u.determineTextFont(E,s,S.font)).call(o.convertToTspans,t),s.textBB=i.bBox(I.node()),s.transform=b(s,{isHeader:p}),w?I.transition().attrTween("transform",function(t){var e=A(t,!1,B(),[g,v]);return function(t){return _(e(t))}}):I.attr("transform",_(s))}),R}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../sunburst/fx":1218,"../sunburst/helpers":1219,"../sunburst/plot":1223,"./constants":1242,"./partition":1249,"./style":1251,d3:164}],1246:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"treemap",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":1128,"./attributes":1239,"./base_plot":1240,"./calc":1241,"./defaults":1243,"./layout_attributes":1247,"./layout_defaults":1248,"./plot":1250,"./style":1251}],1247:[function(t,e,r){"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1248:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("treemapcolorway",e.colorway),r("extendtreemapcolors")}},{"../../lib":719,"./layout_attributes":1247}],1249:[function(t,e,r){"use strict";var n=t("d3-hierarchy");e.exports=function(t,e,r){var a,i=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],c=r.pad[i?"right":"left"],u=r.pad[i?"left":"right"],h=r.pad[o?"top":"bottom"];s&&(a=c,c=l,l=a,a=u,u=h,h=a);var f=n.treemap().tile(function(t,e){switch(t){case"squarify":return n.treemapSquarify.ratio(e);case"binary":return n.treemapBinary;case"dice":return n.treemapDice;case"slice":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(c).paddingRight(u).paddingTop(l).paddingBottom(h).size(s?[e[1],e[0]]:e)(t);return(s||i||o)&&function t(e,r,n){var a;n.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a);n.flipX&&(a=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-a);n.flipY&&(a=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-a);var i=e.children;if(i)for(var o=0;o-1?T+S:-(M+S):0,C={x0:A,x1:A,y0:E,y1:E+M},L=function(t,e,r){var n=g.tiling.pad,a=function(t){return t-n<=e.x0},i=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return{x0:a(t.x0-n)?0:i(t.x0-n)?r[0]:t.x0,x1:a(t.x1+n)?0:i(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}},P=null,O={},I={},z=null,D=function(t,e){return e?O[f(t)]:I[f(t)]},R=function(t,e,r,n){if(e)return O[f(v)]||C;var a=I[g.level]||r;return function(t){return t.data.depth-y.data.depth=(n-=v.r-s)){var m=(r+n)/2;r=m-s,n=m+s}var y;u?a<(y=i-v.b)&&y"===X?(l.x-=i,c.x-=i,u.x-=i,h.x-=i):"/"===X?(u.x-=i,h.x-=i,o.x-=i/2,s.x-=i/2):"\\"===X?(l.x-=i,c.x-=i,o.x-=i/2,s.x-=i/2):"<"===X&&(o.x-=i,s.x-=i),W(l),W(h),W(o),W(c),W(u),W(s),"M"+G(l.x,l.y)+"L"+G(c.x,c.y)+"L"+G(s.x,s.y)+"L"+G(u.x,u.y)+"L"+G(h.x,h.y)+"L"+G(o.x,o.y)+"Z"},toMoveInsideSlice:Z,makeUpdateSliceInterpolator:K,makeUpdateTextInterpolator:Q,handleSlicesExit:$,hasTransition:m,strTransform:tt})}e.exports=function(t,e,r,i){var o,s,l=t._fullLayout._treemaplayer,c=!r;((o=l.selectAll("g.trace.treemap").data(e,function(t){return t[0].trace.uid})).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),a(r))?(i&&(s=i()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()}).each(function(){l.selectAll("g.trace").each(function(e){p(t,e,this,r)})})):o.each(function(e){p(t,e,this,r)});c&&o.exit().remove()}},{"../../lib":719,"../bar/constants":860,"../bar/plot":868,"../sunburst/helpers":1219,"./constants":1242,"./draw_ancestors":1244,"./draw_descendants":1245,d3:164}],1251:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib"),o=t("../sunburst/helpers");function s(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,h=u.i,f=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&&"rgba(0,0,0,0)"===f)d=0,s="rgba(0,0,0,0)",l=0;else if(s=i.castOption(r,h,"marker.line.color")||a.defaultLine,l=i.castOption(r,h,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var v,m=a.combine(a.addOpacity(r._backgroundColor,.75),f);if(!0===g){var y=o.getMaxDepth(r);v=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else v=e.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var x=0;x0){var y,x,b,_,w,k=t.xa,T=t.ya;"h"===f.orientation?(w=e,y="y",b=T,x="x",_=k):(w=r,y="x",b=k,x="y",_=T);var A=h[t.index];if(w>=A.span[0]&&w<=A.span[1]){var M=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,f,w),C=o.getPositionOnKdePath(A,f,S),L=b._offset,P=b._length;M[y+"0"]=C[0],M[y+"1"]=C[1],M[x+"0"]=M[x+"1"]=S,M[x+"Label"]=x+": "+a.hoverLabelText(_,w)+", "+h[0].t.labels.kde+" "+E.toFixed(3),M.spikeDistance=m[0].spikeDistance;var O=y+"Spike";M[O]=m[0][O],m[0].spikeDistance=void 0,m[0][O]=void 0,M.hovertemplate=!1,v.push(M),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+P),u[y+"2"]=n.constrain(L+C[1],L,L+P),u[x+"1"]=u[x+"2"]=_._offset+S}}d&&(v=v.concat(m))}-1!==p.indexOf("points")&&(c=i.hoverOnPoints(t,e,r));var I=l.selectAll(".violinline-"+f.uid).data(u?[0]:[]);return I.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),I.exit().remove(),I.attr(u),"closest"===s?c?[c]:v:c?(v.push(c),v):v}},{"../../lib":719,"../../plots/cartesian/axes":767,"../box/hover":886,"./helpers":1256}],1258:[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":778,"../box/defaults":884,"../box/select":891,"../scatter/style":1133,"./attributes":1252,"./calc":1253,"./cross_trace_calc":1254,"./defaults":1255,"./hover":1257,"./layout_attributes":1259,"./layout_defaults":1260,"./plot":1261,"./style":1262}],1259:[function(t,e,r){"use strict";var n=t("../box/layout_attributes"),a=t("../../lib").extendFlat;e.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":719,"../box/layout_attributes":888}],1260:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes"),i=t("../box/layout_defaults");e.exports=function(t,e,r){i._supply(t,e,r,function(r,i){return n.coerce(t,e,a,r,i)},"violin")}},{"../../lib":719,"../box/layout_defaults":889,"./layout_attributes":1259}],1261:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=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,h=e.xaxis,f=e.yaxis;function p(t){var e=s(t,{xaxis:h,yaxis:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0});return i.smoothopen(e[0],1)}a.makeTraceGroups(c,r,"trace violins").each(function(t){var r=n.select(this),i=t[0],s=i.t,c=i.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+"axis"],m=e[s.posLetter+"axis"],y="both"===c.side,x=y||"positive"===c.side,b=y||"negative"===c.side,_=r.selectAll("path.violin").data(a.identity);_.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(t){var e,r,a,i,o,l,h,f,_=n.select(this),w=t.density,k=w.length,T=t.pos+d,A=m.c2p(T);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(h=new Array(k),o=0;o")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,i=r.line.color,o=r.line.width;if(a(n))return n;if(a(i)&&o)return i}(h,d),[c]}function w(t){return n(p,t)}}},{"../../components/color":594,"../../constants/delta.js":689,"../../plots/cartesian/axes":767,"../bar/hover":864}],1274:[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":778,"../bar/select":869,"./attributes":1267,"./calc":1268,"./cross_trace_calc":1270,"./defaults":1271,"./event_data":1272,"./hover":1273,"./layout_attributes":1275,"./layout_defaults":1276,"./plot":1277,"./style":1278}],1275:[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"}}},{}],1276:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s0&&(g+=h?"M"+u[0]+","+p[1]+"V"+p[0]:"M"+u[1]+","+p[0]+"H"+u[0]),"between"!==f&&(r.isSum||o path").each(function(t){if(!t.isBlank){var e=l[t.dir].marker;n.select(this).call(i.fill,e.color).call(i.stroke,e.line.color).call(a.dashLine,e.line.dash,e.line.width).style("opacity",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".lines").each(function(){var t=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":594,"../../components/drawing":615,"../../constants/interactions":694,"../bar/style":871,d3:164}],1279:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),a=t("../lib"),i=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,i){if(i.enabled){for(var o=i.target,l=a.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 h;case"first":return f;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 f(t)>s};case">=":return function(t){return f(t)>=s};case"[]":return function(t){var e=f(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=f(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=f(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=f(t);return es[1]};case"](":return function(t){var e=f(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=f(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(f(t))};case"}{":return function(t){return-1===s.indexOf(f(t))}}}(r,i.getDataToCoordFunc(t,e,s,a),f),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(i=0;isepal_length=%{y}
petal_length=%{customdata[2]}
petal_width=%{customdata[3]}
species_id=%{customdata[0]}" + ) diff --git a/packages/python/plotly/plotly/tests/test_core/test_px/test_px_input.py b/packages/python/plotly/plotly/tests/test_core/test_px/test_px_input.py new file mode 100644 index 00000000000..08bb1a9cc95 --- /dev/null +++ b/packages/python/plotly/plotly/tests/test_core/test_px/test_px_input.py @@ -0,0 +1,290 @@ +import plotly.express as px +import numpy as np +import pandas as pd +import pytest +import plotly.graph_objects as go +import plotly +from plotly.express._core import build_dataframe +from pandas.util.testing import assert_frame_equal + +attrables = ( + ["x", "y", "z", "a", "b", "c", "r", "theta", "size", "dimensions"] + + ["custom_data", "hover_name", "hover_data", "text"] + + ["error_x", "error_x_minus"] + + ["error_y", "error_y_minus", "error_z", "error_z_minus"] + + ["lat", "lon", "locations", "animation_group"] +) +array_attrables = ["dimensions", "custom_data", "hover_data"] +group_attrables = ["animation_frame", "facet_row", "facet_col", "line_group"] + +all_attrables = attrables + group_attrables + ["color"] + + +def test_numpy(): + fig = px.scatter(x=[1, 2, 3], y=[2, 3, 4], color=[1, 3, 9]) + assert np.all(fig.data[0].x == np.array([1, 2, 3])) + assert np.all(fig.data[0].y == np.array([2, 3, 4])) + assert np.all(fig.data[0].marker.color == np.array([1, 3, 9])) + + +def test_numpy_labels(): + fig = px.scatter( + x=[1, 2, 3], y=[2, 3, 4], labels={"x": "time"} + ) # other labels will be kw arguments + assert fig.data[0]["hovertemplate"] == "time=%{x}
y=%{y}" + + +def test_with_index(): + tips = px.data.tips() + fig = px.scatter(tips, x=tips.index, y="total_bill") + assert fig.data[0]["hovertemplate"] == "index=%{x}
total_bill=%{y}" + fig = px.scatter(tips, x=tips.index, y=tips.total_bill) + assert fig.data[0]["hovertemplate"] == "index=%{x}
total_bill=%{y}" + fig = px.scatter(tips, x=tips.index, y=tips.total_bill, labels={"index": "number"}) + assert fig.data[0]["hovertemplate"] == "number=%{x}
total_bill=%{y}" + # We do not allow "x=index" + with pytest.raises(ValueError) as err_msg: + fig = px.scatter(tips, x="index", y="total_bill") + assert "To use the index, pass it in directly as `df.index`." in str( + err_msg.value + ) + tips = px.data.tips() + tips.index.name = "item" + fig = px.scatter(tips, x=tips.index, y="total_bill") + assert fig.data[0]["hovertemplate"] == "item=%{x}
total_bill=%{y}" + + +def test_pandas_series(): + tips = px.data.tips() + before_tip = tips.total_bill - tips.tip + fig = px.bar(tips, x="day", y=before_tip) + assert fig.data[0].hovertemplate == "day=%{x}
y=%{y}" + fig = px.bar(tips, x="day", y=before_tip, labels={"y": "bill"}) + assert fig.data[0].hovertemplate == "day=%{x}
bill=%{y}" + + +def test_several_dataframes(): + df = pd.DataFrame(dict(x=[0, 1], y=[1, 10], z=[0.1, 0.8])) + df2 = pd.DataFrame(dict(time=[23, 26], money=[100, 200])) + fig = px.scatter(df, x="z", y=df2.money, size="x") + assert fig.data[0].hovertemplate == "z=%{x}
y=%{y}
x=%{marker.size}" + fig = px.scatter(df2, x=df.z, y=df2.money, size=df.z) + assert fig.data[0].hovertemplate == "x=%{x}
money=%{y}
size=%{marker.size}" + # Name conflict + with pytest.raises(NameError) as err_msg: + fig = px.scatter(df, x="z", y=df2.money, size="y") + assert "A name conflict was encountered for argument y" in str(err_msg.value) + with pytest.raises(NameError) as err_msg: + fig = px.scatter(df, x="z", y=df2.money, size=df.y) + assert "A name conflict was encountered for argument y" in str(err_msg.value) + + # No conflict when the dataframe is not given, fields are used + df = pd.DataFrame(dict(x=[0, 1], y=[3, 4])) + df2 = pd.DataFrame(dict(x=[3, 5], y=[23, 24])) + fig = px.scatter(x=df.y, y=df2.y) + assert np.all(fig.data[0].x == np.array([3, 4])) + assert np.all(fig.data[0].y == np.array([23, 24])) + assert fig.data[0].hovertemplate == "x=%{x}
y=%{y}" + + df = pd.DataFrame(dict(x=[0, 1], y=[3, 4])) + df2 = pd.DataFrame(dict(x=[3, 5], y=[23, 24])) + df3 = pd.DataFrame(dict(y=[0.1, 0.2])) + fig = px.scatter(x=df.y, y=df2.y, size=df3.y) + assert np.all(fig.data[0].x == np.array([3, 4])) + assert np.all(fig.data[0].y == np.array([23, 24])) + assert fig.data[0].hovertemplate == "x=%{x}
y=%{y}
size=%{marker.size}" + + df = pd.DataFrame(dict(x=[0, 1], y=[3, 4])) + df2 = pd.DataFrame(dict(x=[3, 5], y=[23, 24])) + df3 = pd.DataFrame(dict(y=[0.1, 0.2])) + fig = px.scatter(x=df.y, y=df2.y, hover_data=[df3.y]) + assert np.all(fig.data[0].x == np.array([3, 4])) + assert np.all(fig.data[0].y == np.array([23, 24])) + assert ( + fig.data[0].hovertemplate == "x=%{x}
y=%{y}
hover_data_0=%{customdata[0]}" + ) + + +def test_name_heuristics(): + df = pd.DataFrame(dict(x=[0, 1], y=[3, 4], z=[0.1, 0.2])) + fig = px.scatter(df, x=df.y, y=df.x, size=df.y) + assert np.all(fig.data[0].x == np.array([3, 4])) + assert np.all(fig.data[0].y == np.array([0, 1])) + assert fig.data[0].hovertemplate == "y=%{marker.size}
x=%{y}" + + +def test_repeated_name(): + iris = px.data.iris() + fig = px.scatter( + iris, + x="sepal_width", + y="sepal_length", + hover_data=["petal_length", "petal_width", "species_id"], + custom_data=["species_id", "species"], + ) + assert fig.data[0].customdata.shape[1] == 4 + + +def test_arrayattrable_numpy(): + tips = px.data.tips() + fig = px.scatter( + tips, x="total_bill", y="tip", hover_data=[np.random.random(tips.shape[0])] + ) + assert ( + fig.data[0]["hovertemplate"] + == "total_bill=%{x}
tip=%{y}
hover_data_0=%{customdata[0]}" + ) + tips = px.data.tips() + fig = px.scatter( + tips, + x="total_bill", + y="tip", + hover_data=[np.random.random(tips.shape[0])], + labels={"hover_data_0": "suppl"}, + ) + assert ( + fig.data[0]["hovertemplate"] + == "total_bill=%{x}
tip=%{y}
suppl=%{customdata[0]}" + ) + + +def test_wrong_column_name(): + with pytest.raises(ValueError) as err_msg: + fig = px.scatter(px.data.tips(), x="bla", y="wrong") + assert "Value of 'x' is not the name of a column in 'data_frame'" in str( + err_msg.value + ) + + +def test_missing_data_frame(): + with pytest.raises(ValueError) as err_msg: + fig = px.scatter(x="arg1", y="arg2") + assert "String or int arguments are only possible" in str(err_msg.value) + + +def test_wrong_dimensions_of_array(): + with pytest.raises(ValueError) as err_msg: + fig = px.scatter(x=[1, 2, 3], y=[2, 3, 4, 5]) + assert "All arguments should have the same length." in str(err_msg.value) + + +def test_wrong_dimensions_mixed_case(): + with pytest.raises(ValueError) as err_msg: + df = pd.DataFrame(dict(time=[1, 2, 3], temperature=[20, 30, 25])) + fig = px.scatter(df, x="time", y="temperature", color=[1, 3, 9, 5]) + assert "All arguments should have the same length." in str(err_msg.value) + + +def test_wrong_dimensions(): + with pytest.raises(ValueError) as err_msg: + fig = px.scatter(px.data.tips(), x="tip", y=[1, 2, 3]) + assert "All arguments should have the same length." in str(err_msg.value) + # the order matters + with pytest.raises(ValueError) as err_msg: + fig = px.scatter(px.data.tips(), x=[1, 2, 3], y="tip") + assert "All arguments should have the same length." in str(err_msg.value) + with pytest.raises(ValueError): + fig = px.scatter(px.data.tips(), x=px.data.iris().index, y="tip") + # assert "All arguments should have the same length." in str(err_msg.value) + + +def test_multiindex_raise_error(): + index = pd.MultiIndex.from_product( + [[1, 2, 3], ["a", "b"]], names=["first", "second"] + ) + df = pd.DataFrame(np.random.random((6, 3)), index=index, columns=["A", "B", "C"]) + # This is ok + fig = px.scatter(df, x="A", y="B") + with pytest.raises(TypeError) as err_msg: + fig = px.scatter(df, x=df.index, y="B") + assert "pandas MultiIndex is not supported by plotly express" in str( + err_msg.value + ) + + +def test_build_df_from_lists(): + # Just lists + args = dict(x=[1, 2, 3], y=[2, 3, 4], color=[1, 3, 9]) + output = {key: key for key in args} + df = pd.DataFrame(args) + args["data_frame"] = None + out = build_dataframe(args, all_attrables, array_attrables) + assert_frame_equal(df.sort_index(axis=1), out["data_frame"].sort_index(axis=1)) + out.pop("data_frame") + assert out == output + + # Arrays + args = dict(x=np.array([1, 2, 3]), y=np.array([2, 3, 4]), color=[1, 3, 9]) + output = {key: key for key in args} + df = pd.DataFrame(args) + args["data_frame"] = None + out = build_dataframe(args, all_attrables, array_attrables) + assert_frame_equal(df.sort_index(axis=1), out["data_frame"].sort_index(axis=1)) + out.pop("data_frame") + assert out == output + + +def test_build_df_with_index(): + tips = px.data.tips() + args = dict(data_frame=tips, x=tips.index, y="total_bill") + out = build_dataframe(args, all_attrables, array_attrables) + assert_frame_equal(tips.reset_index()[out["data_frame"].columns], out["data_frame"]) + + +def test_splom_case(): + iris = px.data.iris() + fig = px.scatter_matrix(iris) + assert len(fig.data[0].dimensions) == len(iris.columns) + dic = {"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]} + fig = px.scatter_matrix(dic) + assert np.all(fig.data[0].dimensions[0].values == np.array(dic["a"])) + ar = np.arange(9).reshape((3, 3)) + fig = px.scatter_matrix(ar) + assert np.all(fig.data[0].dimensions[0].values == ar[:, 0]) + + +def test_int_col_names(): + # DataFrame with int column names + lengths = pd.DataFrame(np.random.random(100)) + fig = px.histogram(lengths, x=0) + assert np.all(np.array(lengths).flatten() == fig.data[0].x) + # Numpy array + ar = np.arange(100).reshape((10, 10)) + fig = px.scatter(ar, x=2, y=8) + assert np.all(fig.data[0].x == ar[:, 2]) + + +def test_data_frame_from_dict(): + fig = px.scatter({"time": [0, 1], "money": [1, 2]}, x="time", y="money") + assert fig.data[0].hovertemplate == "time=%{x}
money=%{y}" + assert np.all(fig.data[0].x == [0, 1]) + + +def test_arguments_not_modified(): + iris = px.data.iris() + petal_length = iris.petal_length + hover_data = [iris.sepal_length] + fig = px.scatter(iris, x=petal_length, y="petal_width", hover_data=hover_data) + assert iris.petal_length.equals(petal_length) + assert iris.sepal_length.equals(hover_data[0]) + + +def test_pass_df_columns(): + tips = px.data.tips() + fig = px.histogram( + tips, + x="total_bill", + y="tip", + color="sex", + marginal="rug", + hover_data=tips.columns, + ) + assert fig.data[1].hovertemplate.count("customdata") == len(tips.columns) + tips_copy = px.data.tips() + assert tips_copy.columns.equals(tips.columns) + + +def test_size_column(): + df = px.data.tips() + fig = px.scatter(df, x=df["size"], y=df.tip) + assert fig.data[0].hovertemplate == "size=%{x}
tip=%{y}" diff --git a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_annotations.py b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_annotations.py new file mode 100644 index 00000000000..beb02e48006 --- /dev/null +++ b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_annotations.py @@ -0,0 +1,252 @@ +from __future__ import absolute_import + +import types +from unittest import TestCase + +import plotly.graph_objs as go +from plotly.subplots import make_subplots + + +class TestSelectForEachUpdateAnnotations(TestCase): + def setUp(self): + self.fig = make_subplots( + rows=2, cols=2, specs=[[{}, {"secondary_y": True}], [{}, {"type": "polar"}]] + ) + + def assert_selected( + self, prop, inds, selector=None, row=None, col=None, secondary_y=None + ): + # ## Test select_* + # Get select_ method + prefix = "layout_" if prop == "images" else "" + fn = getattr(self.fig, "select_" + prefix + prop) + + # Perform selection + res = fn(selector=selector, row=row, col=col, secondary_y=secondary_y) + self.assertIsInstance(res, types.GeneratorType) + objs = list(res) + + # Check length of selected objects + self.assertEqual(len(objs), len(inds)) + + # Check individual annotations + for i, obj in zip(inds, objs): + self.assertEqual(self.fig.layout[prop][i], obj) + + # ## Test for_each_* + objs = [] + fn = getattr(self.fig, "for_each_" + prefix + prop[:-1]) + fn( + lambda v: objs.append(v), + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ) + self.assertEqual(len(objs), len(inds)) + for i, obj in zip(inds, objs): + self.assertEqual(self.fig.layout[prop][i], obj) + + def assert_update( + self, prop, inds, patch, selector=None, row=None, col=None, secondary_y=None + ): + # Copy figure and perform update + prefix = "layout_" if prop == "images" else "" + fig_orig = go.Figure(self.fig) + fig = go.Figure(self.fig) + fn = getattr(fig, "update_" + prefix + prop) + fn(patch, selector=selector, row=row, col=col, secondary_y=secondary_y) + + # Get original up updated object lis + objs_orig = fig_orig.layout[prop] + objs = fig.layout[prop] + + for i, (obj, obj_orig) in enumerate(zip(objs, objs_orig)): + if i in inds: + # Check that object changed from original + self.assertNotEqual(obj, obj_orig) + + # Apply update to original and check that they match now + obj_orig.update(patch) + self.assertEqual(obj, obj_orig) + else: + # Check object unchanged + self.assertEqual(obj, obj_orig) + + def test_add_annotation_no_grid(self): + # Paper annotation + fig = go.Figure() + fig.add_annotation(text="A") + annot = fig.layout.annotations[-1] + self.assertEqual(annot.text, "A") + self.assertEqual(annot.xref, "paper") + self.assertEqual(annot.yref, "paper") + + # Not valid to add annotation by row/col + with self.assertRaisesRegexp(Exception, "make_subplots"): + fig.add_annotation(text="B", row=1, col=1) + + def test_add_annotations(self): + # Paper annotation + self.fig.add_annotation(text="A") + annot = self.fig.layout.annotations[-1] + self.assertEqual(annot.text, "A") + self.assertEqual(annot.xref, "paper") + self.assertEqual(annot.yref, "paper") + + # (1, 1) annotation + self.fig.add_annotation(text="B", row=1, col=1) + annot = self.fig.layout.annotations[-1] + self.assertEqual(annot.text, "B") + self.assertEqual(annot.xref, "x") + self.assertEqual(annot.yref, "y") + + # (1, 2) annotation, primary y-axis + self.fig.add_annotation(text="C1", row=1, col=2) + annot = self.fig.layout.annotations[-1] + self.assertEqual(annot.text, "C1") + self.assertEqual(annot.xref, "x2") + self.assertEqual(annot.yref, "y2") + + # (1, 2) annotation, secondary y-axis + self.fig.add_annotation(text="C2", row=1, col=2, secondary_y=True) + annot = self.fig.layout.annotations[-1] + self.assertEqual(annot.text, "C2") + self.assertEqual(annot.xref, "x2") + self.assertEqual(annot.yref, "y3") + + # (2, 1) annotation + self.fig.add_annotation(text="D", row=2, col=1) + annot = self.fig.layout.annotations[-1] + self.assertEqual(annot.text, "D") + self.assertEqual(annot.xref, "x3") + self.assertEqual(annot.yref, "y4") + + # Try to add to (2, 2), which not a valid + with self.assertRaisesRegexp(ValueError, "of type polar"): + self.fig.add_annotation(text="D", row=2, col=2) + + def test_select_annotations_no_grid(self): + ( + self.fig.add_annotation(text="A1", arrowcolor="red") + .add_annotation(text="A2", arrowcolor="blue") + .add_annotation(text="A3", arrowcolor="blue") + ) + self.assert_selected("annotations", [0, 1, 2]) + self.assert_selected("annotations", [0], selector=dict(arrowcolor="red")) + self.assert_selected("annotations", [1, 2], selector=dict(arrowcolor="blue")) + + def test_select_annotations(self): + ( + self.fig.add_annotation(text="A1", arrowcolor="red") + .add_annotation(text="A2", arrowcolor="blue") + .add_annotation(text="B", arrowcolor="red", row=1, col=1) + .add_annotation(text="C1", row=1, col=2) + .add_annotation(text="C2", row=1, col=2, secondary_y=True) + .add_annotation(text="D", arrowcolor="blue", row=2, col=1) + ) + + # Test selections + self.assert_selected("annotations", [0, 1, 2, 3, 4, 5]) + self.assert_selected("annotations", [0, 2], selector=dict(arrowcolor="red")) + self.assert_selected("annotations", [2, 3, 4], row=1) + self.assert_selected("annotations", [2], selector=dict(arrowcolor="red"), row=1) + self.assert_selected("annotations", [0, 1], row="paper", col="paper") + self.assert_selected("annotations", [4], secondary_y=True) + + def test_select_shapes(self): + ( + self.fig.add_shape(opacity=0.1, fillcolor="red") + .add_shape(opacity=0.2, fillcolor="blue") + .add_shape(opacity=0.3, fillcolor="red", row=1, col=1) + .add_shape(opacity=0.4, row=1, col=2) + .add_shape(opacity=0.5, row=1, col=2, secondary_y=True) + .add_shape(opacity=0.6, fillcolor="blue", row=2, col=1) + ) + + # Test selections + self.assert_selected("shapes", [0, 1, 2, 3, 4, 5]) + self.assert_selected("shapes", [0, 2], selector=dict(fillcolor="red")) + self.assert_selected("shapes", [2, 3, 4], row=1) + self.assert_selected("shapes", [2], selector=dict(fillcolor="red"), row=1) + self.assert_selected("shapes", [0, 1], row="paper", col="paper") + self.assert_selected("shapes", [4], secondary_y=True) + + def test_select_images(self): + ( + self.fig.add_layout_image(opacity=0.1, source="red") + .add_layout_image(opacity=0.2, source="blue") + .add_layout_image(opacity=0.3, source="red", row=1, col=1) + .add_layout_image(opacity=0.4, row=1, col=2) + .add_layout_image(opacity=0.5, row=1, col=2, secondary_y=True) + .add_layout_image(opacity=0.6, source="blue", row=2, col=1) + ) + + # Test selections + self.assert_selected("images", [0, 1, 2, 3, 4, 5]) + self.assert_selected("images", [0, 2], selector=dict(source="red")) + self.assert_selected("images", [2, 3, 4], row=1) + self.assert_selected("images", [2], selector=dict(source="red"), row=1) + self.assert_selected("images", [0, 1], row="paper", col="paper") + self.assert_selected("images", [4], secondary_y=True) + + def test_update_annotations(self): + ( + self.fig.add_annotation(text="A1", arrowcolor="red") + .add_annotation(text="A2", arrowcolor="blue") + .add_annotation(text="B", arrowcolor="red", row=1, col=1) + .add_annotation(text="C1", row=1, col=2) + .add_annotation(text="C2", row=1, col=2, secondary_y=True) + .add_annotation(text="D", arrowcolor="blue", row=2, col=1) + ) + + self.assert_update( + "annotations", [0, 1, 2, 3, 4, 5], patch=dict(showarrow=False) + ) + self.assert_update( + "annotations", + [1, 5], + patch=dict(showarrow=False), + selector=dict(arrowcolor="blue"), + ) + self.assert_update("annotations", [2, 3, 4], patch=dict(showarrow=False), row=1) + self.assert_update("annotations", [2, 5], patch=dict(showarrow=False), col=1) + self.assert_update( + "annotations", [4], patch=dict(showarrow=False), secondary_y=True + ) + + def test_update_shapes(self): + ( + self.fig.add_shape(opacity=0.1, fillcolor="red") + .add_shape(opacity=0.2, fillcolor="blue") + .add_shape(opacity=0.3, fillcolor="red", row=1, col=1) + .add_shape(opacity=0.4, row=1, col=2) + .add_shape(opacity=0.5, row=1, col=2, secondary_y=True) + .add_shape(opacity=0.6, fillcolor="blue", row=2, col=1) + ) + + self.assert_update("shapes", [0, 1, 2, 3, 4, 5], patch=dict(opacity=0)) + self.assert_update( + "shapes", [1, 5], patch=dict(opacity=0), selector=dict(fillcolor="blue") + ) + self.assert_update("shapes", [2, 3, 4], patch=dict(opacity=0), row=1) + self.assert_update("shapes", [2, 5], patch=dict(opacity=0), col=1) + self.assert_update("shapes", [4], patch=dict(opacity=0), secondary_y=True) + + def test_update_images(self): + ( + self.fig.add_layout_image(opacity=0.1, source="red") + .add_layout_image(opacity=0.2, source="blue") + .add_layout_image(opacity=0.3, source="red", row=1, col=1) + .add_layout_image(opacity=0.4, row=1, col=2) + .add_layout_image(opacity=0.5, row=1, col=2, secondary_y=True) + .add_layout_image(opacity=0.6, source="blue", row=2, col=1) + ) + + self.assert_update("images", [0, 1, 2, 3, 4, 5], patch=dict(opacity=0)) + self.assert_update( + "images", [1, 5], patch=dict(opacity=0), selector=dict(source="blue") + ) + self.assert_update("images", [2, 3, 4], patch=dict(opacity=0), row=1) + self.assert_update("images", [2, 5], patch=dict(opacity=0), col=1) + self.assert_update("images", [4], patch=dict(opacity=0), secondary_y=True) diff --git a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_layout.py b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_layout.py index 595aa6ae8b0..3a637167c61 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_layout.py +++ b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_layout.py @@ -3,6 +3,11 @@ class TestUpdateLayout(TestCase): + def setUp(self): + import plotly.io as pio + + pio.templates.default = None + def test_update_layout_kwargs(self): # Create initial figure fig = go.Figure() @@ -26,3 +31,41 @@ def test_update_layout_dict(self): fig.update_layout(dict(title=dict(font=dict(family="Courier New")))) orig_fig.layout.update(title_font_family="Courier New") self.assertEqual(fig, orig_fig) + + def test_update_layout_overwrite(self): + fig = go.Figure( + layout=go.Layout( + annotations=[ + go.layout.Annotation(text="one"), + go.layout.Annotation(text="two"), + ] + ) + ) + + fig.update_layout( + overwrite=True, + annotations=[ + go.layout.Annotation(width=10), + go.layout.Annotation(width=20), + go.layout.Annotation(width=30), + go.layout.Annotation(width=40), + go.layout.Annotation(width=50), + ], + ) + + expected = { + "annotations": [ + {"width": 10}, + {"width": 20}, + {"width": 30}, + {"width": 40}, + {"width": 50}, + ] + } + + fig.layout.pop("template") + self.assertEqual(fig.layout.to_plotly_json(), expected) + + # Remove all annotations + fig.update_layout(overwrite=True, annotations=None) + self.assertEqual(fig.layout.annotations, ()) diff --git a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_subplots.py b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_subplots.py index 19f81db2e8e..14a4758b102 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_subplots.py +++ b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_subplots.py @@ -563,3 +563,12 @@ def test_update_by_type_and_grid_and_selector(self): row=1, selector={"title.text": "A"}, ) + + def test_update_subplot_overwrite(self): + fig = go.Figure(layout_xaxis_title_text="Axis title") + fig.update_xaxes(overwrite=True, title={"font": {"family": "Courier"}}) + + self.assertEqual( + fig.layout.xaxis.to_plotly_json(), + {"title": {"font": {"family": "Courier"}}}, + ) diff --git a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_traces.py b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_traces.py index 3bd16adac27..b1c8487ceae 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_traces.py +++ b/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_update_traces.py @@ -362,3 +362,18 @@ def test_update_traces_by_grid_and_selector(self): ) self.assert_update_traces([9], {"marker.size": 6}, col=1, secondary_y=True) + + def test_update_traces_overwrite(self): + fig = go.Figure( + data=[go.Scatter(marker_line_color="red"), go.Bar(marker_line_color="red")] + ) + + fig.update_traces(overwrite=True, marker={"line": {"width": 10}}) + + self.assertEqual( + fig.to_plotly_json()["data"], + [ + {"type": "scatter", "marker": {"line": {"width": 10}}}, + {"type": "bar", "marker": {"line": {"width": 10}}}, + ], + ) diff --git a/packages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py b/packages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py index 2d009798059..a08353a9026 100644 --- a/packages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py +++ b/packages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py @@ -15,7 +15,7 @@ shapely = optional_imports.get_module("shapely") shapefile = optional_imports.get_module("shapefile") gp = optional_imports.get_module("geopandas") -sk_measure = optional_imports.get_module("skimage.measure") +sk_measure = optional_imports.get_module("skimage") class TestDistplot(NumpyTestUtilsMixin, TestCaseNoTemplate): diff --git a/packages/python/plotly/plotly/validators/__init__.py b/packages/python/plotly/plotly/validators/__init__.py index 2619658f8b4..4874d5aea58 100644 --- a/packages/python/plotly/plotly/validators/__init__.py +++ b/packages/python/plotly/plotly/validators/__init__.py @@ -159,6 +159,17 @@ def __init__(self, plotly_name="layout", parent_name="", **kwargs): you can set `false` to disable. Colors provided in the trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether + given by `treemapcolorway` or inherited from + `colorway`) will be extended to three times its + original length by first repeating every color + 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing + the same color when you have many slices, but + you can set `false` to disable. Colors provided + in the trace, using `marker.colors`, are never + extended. font Sets the global font. Note that fonts used in traces and other layout components inherit from @@ -251,7 +262,7 @@ def __init__(self, plotly_name="layout", parent_name="", **kwargs): in various `text` attributes. Attributes such as the graph, axis and colorbar `title.text`, annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenues` and `sliders` + `rangeselector`, `updatemenus` and `sliders` `label` text all support `meta`. One can access `meta` fields using template strings: `%{meta[i]}` where `i` is the index of the @@ -383,6 +394,12 @@ def __init__(self, plotly_name="layout", parent_name="", **kwargs): transition Sets transition options used during Plotly.react updates. + treemapcolorway + Sets the default treemap slice colors. Defaults + to the main `colorway` used for trace colors. + If you specify a new list here it can still be + extended with lighter and darker colors, see + `extendtreemapcolors`. uirevision Used to allow user interactions with the plot to persist after `Plotly.react` calls that are @@ -533,7 +550,13 @@ def __init__(self, plotly_name="waterfall", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -686,6 +709,30 @@ def __init__(self, plotly_name="waterfall", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `initial`, `delta`, + `final` and `label`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . totals plotly.graph_objects.waterfall.Totals instance or dict with compatible properties @@ -866,7 +913,13 @@ def __init__(self, plotly_name="volume", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -1102,7 +1155,13 @@ def __init__(self, plotly_name="violin", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -1344,6 +1403,256 @@ def __init__(self, plotly_name="violin", parent_name="", **kwargs): import _plotly_utils.basevalidators +class TreemapValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="treemap", parent_name="", **kwargs): + super(TreemapValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Treemap"), + data_docs=kwargs.pop( + "data_docs", + """ + branchvalues + Determines how the items in `values` are + summed. When set to "total", items in `values` + are taken to be value of all its descendants. + When set to "remainder", items in `values` + corresponding to the root and the branches + sectors are taken to be the extra part not part + of the sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the + "leaves" and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be + useful when listening to hover, click and + selection events. Note that, "scatter" traces + also appends customdata items in the markers + DOM elements + customdatasrc + Sets the source reference on plot.ly for + customdata . + domain + plotly.graph_objects.treemap.Domain instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on + hover. If `none` or `skip` are set, no + information is displayed upon hovering. But, if + `none` is set, click and hover events are still + fired. + hoverinfosrc + Sets the source reference on plot.ly for + hoverinfo . + hoverlabel + plotly.graph_objects.treemap.Hoverlabel + instance or dict with compatible properties + hovertemplate + Template string used for rendering the + information that appear on hover box. Note that + this will override `hoverinfo`. Variables are + inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The + variables available in `hovertemplate` are the + ones emitted as event data described at this + link https://plot.ly/javascript/plotlyjs- + events/#event-data. Additionally, every + attributes that can be specified per-point (the + ones that are `arrayOk: true`) are available. + variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. + hovertemplatesrc + Sets the source reference on plot.ly for + hovertemplate . + hovertext + Sets hover text elements associated with each + sector. If a single string, the same string + appears for all data points. If an array of + string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` + must contain a "text" flag. + hovertextsrc + Sets the source reference on plot.ly for + hovertext . + ids + Assigns id labels to each datum. These ids for + object constancy of data points during + animation. Should be an array of strings, not + numbers or any other type. + idssrc + Sets the source reference on plot.ly for ids . + insidetextfont + Sets the font used for `textinfo` lying inside + the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on plot.ly for + labels . + level + Sets the level from which this trace hierarchy + is rendered. Set `level` to `''` to start from + the root node in the hierarchy. Must be an "id" + if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + marker + plotly.graph_objects.treemap.Marker instance or + dict with compatible properties + maxdepth + Sets the number of rendered sectors from any + given `level`. Set `maxdepth` to "-1" to render + all the levels in the hierarchy. + meta + Assigns extra meta information associated with + this trace that can be used in various text + attributes. Attributes such as trace `name`, + graph, axis and colorbar `title.text`, + annotation `text` `rangeselector`, + `updatemenues` and `sliders` `label` text all + support `meta`. To access the trace `meta` + values in an attribute in the same trace, + simply use `%{meta[i]}` where `i` is the index + or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or + key of the `meta` and `n` is the trace index. + metasrc + Sets the source reference on plot.ly for meta + . + name + Sets the trace name. The trace name appear as + the legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside + the sector. + parents + Sets the parent sectors for each of the + sectors. Empty string items '' are understood + to reference the root node in the hierarchy. If + `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, + plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on plot.ly for + parents . + pathbar + plotly.graph_objects.treemap.Pathbar instance + or dict with compatible properties + stream + plotly.graph_objects.treemap.Stream instance or + dict with compatible properties + text + Sets text elements associated with each sector. + If trace `textinfo` contains a "text" flag, + these elements will be seen on the chart. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on + the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on plot.ly for text + . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . + tiling + plotly.graph_objects.treemap.Tiling instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide + object constancy between traces during + animations and transitions. + uirevision + Controls persistence of some user-driven + changes to the trace: `constraintrange` in + `parcoords` traces, as well as some `editable: + true` modifications such as `name` and + `colorbar.title`. Defaults to + `layout.uirevision`. Note that other user- + driven trace attribute changes are controlled + by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and + `colorbar.(x|y)` (accessible with `config: + {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on + trace index if no `uid` is provided. So if your + app can add/remove traces before the end of the + `data` array, such that the same trace has a + different index, you can still preserve user- + driven changes if you give each trace a `uid` + that stays with it as it moves. + values + Sets the values associated with each of the + sectors. Use with `branchvalues` to determine + how the values are summed. + valuessrc + Sets the source reference on plot.ly for + values . + visible + Determines whether or not this trace is + visible. If "legendonly", the trace is not + drawn, but can appear as a legend item + (provided that the legend itself is visible). +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TableValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="table", parent_name="", **kwargs): super(TableValidator, self).__init__( @@ -1574,7 +1883,13 @@ def __init__(self, plotly_name="surface", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -1746,6 +2061,10 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the + "leaves" and/or "branches", otherwise 0. customdata Assigns extra data each datum. This may be useful when listening to hover, click and @@ -1780,18 +2099,26 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. + variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and + `percentParent`. Anything contained in tag + `` is displayed in the secondary box, + for example "{fullData.name}". + To hide the secondary box completely, use an + empty tag ``. hovertemplatesrc Sets the source reference on plot.ly for hovertemplate . @@ -1816,8 +2143,7 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): Sets the font used for `textinfo` lying inside the sector. labels - Sets the labels of each of the sunburst - sectors. + Sets the labels of each of the sectors. labelssrc Sets the source reference on plot.ly for labels . @@ -1825,19 +2151,18 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): plotly.graph_objects.sunburst.Leaf instance or dict with compatible properties level - Sets the level from which this sunburst trace - hierarchy is rendered. Set `level` to `''` to - start the sunburst from the root node in the - hierarchy. Must be an "id" if `ids` is filled - in, otherwise plotly attempts to find a - matching item in `labels`. + Sets the level from which this trace hierarchy + is rendered. Set `level` to `''` to start from + the root node in the hierarchy. Must be an "id" + if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. marker plotly.graph_objects.sunburst.Marker instance or dict with compatible properties maxdepth - Sets the number of rendered sunburst rings from - any given `level`. Set `maxdepth` to "-1" to - render all the levels in the hierarchy. + Sets the number of rendered sectors from any + given `level`. Set `maxdepth` to "-1" to render + all the levels in the hierarchy. meta Assigns extra meta information associated with this trace that can be used in various text @@ -1865,13 +2190,12 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): the sector. parents Sets the parent sectors for each of the - sunburst sectors. Empty string items '' are - understood to reference the root node in the - hierarchy. If `ids` is filled, `parents` items - are understood to be "ids" themselves. When - `ids` is not set, plotly attempts to find - matching items in `labels`, but beware they - must be unique. + sectors. Empty string items '' are understood + to reference the root node in the hierarchy. If + `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, + plotly attempts to find matching items in + `labels`, but beware they must be unique. parentssrc Sets the source reference on plot.ly for parents . @@ -1893,6 +2217,31 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `currentPath`, `root`, + `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -1921,8 +2270,8 @@ def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): that stays with it as it moves. values Sets the values associated with each of the - sunburst sectors. Use with `branchvalues` to - determine how the values are summed. + sectors. Use with `branchvalues` to determine + how the values are summed. valuessrc Sets the source reference on plot.ly for values . @@ -2034,7 +2383,13 @@ def __init__(self, plotly_name="streamtube", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -2245,7 +2600,13 @@ def __init__(self, plotly_name="splom", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -2497,7 +2858,13 @@ def __init__(self, plotly_name="scatterternary", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -2620,6 +2987,29 @@ def __init__(self, plotly_name="scatterternary", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `a`, `b`, `c` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -2744,7 +3134,13 @@ def __init__(self, plotly_name="scatterpolargl", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -2868,6 +3264,29 @@ def __init__(self, plotly_name="scatterpolargl", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . theta Sets the angular coordinates theta0 @@ -3004,7 +3423,13 @@ def __init__(self, plotly_name="scatterpolar", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -3128,6 +3553,29 @@ def __init__(self, plotly_name="scatterpolar", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `r`, `theta` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . theta Sets the angular coordinates theta0 @@ -3246,7 +3694,13 @@ def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -3371,6 +3825,29 @@ def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -3501,7 +3978,13 @@ def __init__(self, plotly_name="scattergl", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -3606,6 +4089,29 @@ def __init__(self, plotly_name="scattergl", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -3745,7 +4251,13 @@ def __init__(self, plotly_name="scattergeo", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -3879,6 +4391,30 @@ def __init__(self, plotly_name="scattergeo", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `lat`, `lon`, `location` + and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -3941,7 +4477,7 @@ def __init__(self, plotly_name="scattercarpet", parent_name="", **kwargs): Sets the source reference on plot.ly for b . carpet An identifier for this carpet, so that - `scattercarpet` and `scattercontour` traces can + `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie connectgaps Determines whether or not gaps (i.e. {nan} or @@ -4002,7 +4538,13 @@ def __init__(self, plotly_name="scattercarpet", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -4112,6 +4654,29 @@ def __init__(self, plotly_name="scattercarpet", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `a`, `b` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -4220,7 +4785,13 @@ def __init__(self, plotly_name="scatter3d", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -4336,6 +4907,29 @@ def __init__(self, plotly_name="scatter3d", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -4511,7 +5105,13 @@ def __init__(self, plotly_name="scatter", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -4671,6 +5271,29 @@ def __init__(self, plotly_name="scatter", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . tsrc Sets the source reference on plot.ly for t . uid @@ -5123,7 +5746,13 @@ def __init__(self, plotly_name="pie", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -5251,6 +5880,30 @@ def __init__(self, plotly_name="pie", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, + `percent` and `text`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . title plotly.graph_objects.pie.Title instance or dict with compatible properties @@ -5495,7 +6148,13 @@ def __init__(self, plotly_name="parcats", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -5904,7 +6563,13 @@ def __init__(self, plotly_name="mesh3d", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -6219,7 +6884,13 @@ def __init__(self, plotly_name="isosurface", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -6622,7 +7293,13 @@ def __init__(self, plotly_name="histogram2dcontour", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -6947,7 +7624,13 @@ def __init__(self, plotly_name="histogram2d", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -7251,7 +7934,13 @@ def __init__(self, plotly_name="histogram", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -7737,7 +8426,13 @@ def __init__(self, plotly_name="heatmap", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -7981,15 +8676,21 @@ def __init__(self, plotly_name="funnelarea", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. - variables `label`, `color`, `value`, `percent` - and `text`. Anything contained in tag `` + variables `label`, `color`, `value`, `text` and + `percent`. Anything contained in tag `` is displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag @@ -8091,6 +8792,30 @@ def __init__(self, plotly_name="funnelarea", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `label`, `color`, `value`, + `text` and `percent`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . title plotly.graph_objects.funnelarea.Title instance or dict with compatible properties @@ -8204,7 +8929,13 @@ def __init__(self, plotly_name="funnel", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -8349,6 +9080,31 @@ def __init__(self, plotly_name="funnel", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. variables `percentInitial`, + `percentPrevious`, `percentTotal`, `label` and + `value`. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . uid Assign an id to this trace, Use this to provide object constancy between traces during @@ -8500,7 +9256,13 @@ def __init__(self, plotly_name="densitymapbox", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -8771,18 +9533,6 @@ def __init__(self, plotly_name="contourcarpet", parent_name="", **kwargs): "constraint". Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on plot.ly for - hoverinfo . - hoverlabel - plotly.graph_objects.contourcarpet.Hoverlabel - instance or dict with compatible properties hovertext Same as `text`. hovertextsrc @@ -9026,7 +9776,13 @@ def __init__(self, plotly_name="contour", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -9326,7 +10082,13 @@ def __init__(self, plotly_name="cone", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -9590,7 +10352,13 @@ def __init__(self, plotly_name="choroplethmapbox", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -9829,7 +10597,13 @@ def __init__(self, plotly_name="choropleth", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -10019,7 +10793,7 @@ def __init__(self, plotly_name="carpet", parent_name="", **kwargs): Sets the source reference on plot.ly for b . carpet An identifier for this carpet, so that - `scattercarpet` and `scattercontour` traces can + `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie cheaterslope The shift applied to each successive row of @@ -10049,18 +10823,6 @@ def __init__(self, plotly_name="carpet", parent_name="", **kwargs): font The default font used for axis & tick labels on this carpet - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on plot.ly for - hoverinfo . - hoverlabel - plotly.graph_objects.carpet.Hoverlabel instance - or dict with compatible properties ids Assigns id labels to each datum. These ids for object constancy of data points during @@ -10409,7 +11171,13 @@ def __init__(self, plotly_name="box", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -10670,7 +11438,13 @@ def __init__(self, plotly_name="barpolar", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -10910,7 +11684,13 @@ def __init__(self, plotly_name="bar", parent_name="", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -11062,6 +11842,29 @@ def __init__(self, plotly_name="bar", parent_name="", **kwargs): textsrc Sets the source reference on plot.ly for text . + texttemplate + Template string used for rendering the + information text that appear on points. Note + that this will override `textinfo`. Variables + are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. + Every attributes that can be specified per- + point (the ones that are `arrayOk: true`) are + available. + texttemplatesrc + Sets the source reference on plot.ly for + texttemplate . tsrc Sets the source reference on plot.ly for t . uid @@ -11358,6 +12161,7 @@ def __init__(self, plotly_name="data", parent_name="", **kwargs): "sunburst": "Sunburst", "surface": "Surface", "table": "Table", + "treemap": "Treemap", "violin": "Violin", "volume": "Volume", "waterfall": "Waterfall", diff --git a/packages/python/plotly/plotly/validators/bar/__init__.py b/packages/python/plotly/plotly/validators/bar/__init__.py index d5c0733b443..527d9c7e892 100644 --- a/packages/python/plotly/plotly/validators/bar/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/__init__.py @@ -70,6 +70,7 @@ def __init__(self, plotly_name="y0", parent_name="bar", **kwargs): super(Y0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), role=kwargs.pop("role", "info"), **kwargs @@ -84,6 +85,7 @@ def __init__(self, plotly_name="y", parent_name="bar", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), role=kwargs.pop("role", "data"), **kwargs @@ -162,6 +164,7 @@ def __init__(self, plotly_name="x0", parent_name="bar", **kwargs): super(X0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), role=kwargs.pop("role", "info"), **kwargs @@ -176,6 +179,7 @@ def __init__(self, plotly_name="x", parent_name="bar", **kwargs): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), role=kwargs.pop("role", "data"), **kwargs @@ -273,6 +277,7 @@ def __init__(self, plotly_name="uid", parent_name="bar", **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), role=kwargs.pop("role", "info"), **kwargs @@ -296,6 +301,35 @@ def __init__(self, plotly_name="tsrc", parent_name="bar", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="bar", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="bar", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="bar", **kwargs): super(TextsrcValidator, self).__init__( @@ -908,6 +942,7 @@ def __init__(self, plotly_name="ids", parent_name="bar", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), role=kwargs.pop("role", "data"), **kwargs @@ -1212,6 +1247,7 @@ def __init__(self, plotly_name="dy", parent_name="bar", **kwargs): super(DyValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), role=kwargs.pop("role", "info"), **kwargs @@ -1226,6 +1262,7 @@ def __init__(self, plotly_name="dx", parent_name="bar", **kwargs): super(DxValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), role=kwargs.pop("role", "info"), **kwargs diff --git a/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py b/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py index 84f7da99360..ab5b7407141 100644 --- a/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py +++ b/packages/python/plotly/plotly/validators/bar/marker/line/__init__.py @@ -20,6 +20,7 @@ def __init__(self, plotly_name="width", parent_name="bar.marker.line", **kwargs) super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, + anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/packages/python/plotly/plotly/validators/carpet/__init__.py b/packages/python/plotly/plotly/validators/carpet/__init__.py index 5b07ad2ba11..f4f44deebb0 100644 --- a/packages/python/plotly/plotly/validators/carpet/__init__.py +++ b/packages/python/plotly/plotly/validators/carpet/__init__.py @@ -246,90 +246,6 @@ def __init__(self, plotly_name="ids", parent_name="carpet", **kwargs): import _plotly_utils.basevalidators -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="carpet", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__(self, plotly_name="hoverinfosrc", parent_name="carpet", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="carpet", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="font", parent_name="carpet", **kwargs): super(FontValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/contour/__init__.py b/packages/python/plotly/plotly/validators/contour/__init__.py index 80a9f1b9a0d..ffe5c72478a 100644 --- a/packages/python/plotly/plotly/validators/contour/__init__.py +++ b/packages/python/plotly/plotly/validators/contour/__init__.py @@ -571,7 +571,10 @@ def __init__(self, plotly_name="line", parent_name="contour", **kwargs): Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". """, ), **kwargs diff --git a/packages/python/plotly/plotly/validators/contourcarpet/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/__init__.py index c497c8b058f..dba40e7aa12 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/__init__.py @@ -359,8 +359,9 @@ def __init__(self, plotly_name="line", parent_name="contourcarpet", **kwargs): "data_docs", """ color - Sets the color of the contour level. Has no if - `contours.coloring` is set to "lines". + Sets the color of the contour level. Has no + effect if `contours.coloring` is set to + "lines". dash Sets the dash style of lines. Set to a dash type string ("solid", "dot", "dash", @@ -370,7 +371,10 @@ def __init__(self, plotly_name="line", parent_name="contourcarpet", **kwargs): Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) Defaults + to 0.5 when `contours.type` is "levels". + Defaults to 2 when `contour.type` is + "constraint". """, ), **kwargs @@ -454,92 +458,6 @@ def __init__(self, plotly_name="hovertext", parent_name="contourcarpet", **kwarg import _plotly_utils.basevalidators -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="hoverlabel", parent_name="contourcarpet", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), - data_docs=kwargs.pop( - "data_docs", - """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on plot.ly for align - . - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on plot.ly for - bgcolor . - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on plot.ly for - bordercolor . - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on plot.ly for - namelength . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="hoverinfosrc", parent_name="contourcarpet", **kwargs - ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): - def __init__(self, plotly_name="hoverinfo", parent_name="contourcarpet", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["x", "y", "z", "text", "name"]), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="contourcarpet", **kwargs): super(FillcolorValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/contourcarpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/hoverlabel/__init__.py deleted file mode 100644 index 2c73769a3ae..00000000000 --- a/packages/python/plotly/plotly/validators/contourcarpet/hoverlabel/__init__.py +++ /dev/null @@ -1,190 +0,0 @@ -import _plotly_utils.basevalidators - - -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="namelengthsrc", - parent_name="contourcarpet.hoverlabel", - **kwargs - ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): - def __init__( - self, plotly_name="namelength", parent_name="contourcarpet.hoverlabel", **kwargs - ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - min=kwargs.pop("min", -1), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__( - self, plotly_name="font", parent_name="contourcarpet.hoverlabel", **kwargs - ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Font"), - data_docs=kwargs.pop( - "data_docs", - """ - color - - colorsrc - Sets the source reference on plot.ly for color - . - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The plotly service (at https://plot.ly - or on-premise) generates images on a server, - where only a select number of fonts are - installed and supported. These include "Arial", - "Balto", "Courier New", "Droid Sans",, "Droid - Serif", "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on plot.ly for - family . - size - - sizesrc - Sets the source reference on plot.ly for size - . -""", - ), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, - plotly_name="bordercolorsrc", - parent_name="contourcarpet.hoverlabel", - **kwargs - ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, - plotly_name="bordercolor", - parent_name="contourcarpet.hoverlabel", - **kwargs - ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="bgcolorsrc", parent_name="contourcarpet.hoverlabel", **kwargs - ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): - def __init__( - self, plotly_name="bgcolor", parent_name="contourcarpet.hoverlabel", **kwargs - ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): - def __init__( - self, plotly_name="alignsrc", parent_name="contourcarpet.hoverlabel", **kwargs - ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "info"), - **kwargs - ) - - -import _plotly_utils.basevalidators - - -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__( - self, plotly_name="align", parent_name="contourcarpet.hoverlabel", **kwargs - ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, - array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), - role=kwargs.pop("role", "style"), - values=kwargs.pop("values", ["left", "right", "auto"]), - **kwargs - ) diff --git a/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py b/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py index 68d7b930e01..5fc239431b4 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py +++ b/packages/python/plotly/plotly/validators/contourcarpet/line/__init__.py @@ -6,7 +6,7 @@ def __init__(self, plotly_name="width", parent_name="contourcarpet.line", **kwar super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), + edit_type=kwargs.pop("edit_type", "style+colorbars"), min=kwargs.pop("min", 0), role=kwargs.pop("role", "style"), **kwargs @@ -56,7 +56,7 @@ def __init__(self, plotly_name="color", parent_name="contourcarpet.line", **kwar super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "style"), + edit_type=kwargs.pop("edit_type", "style+colorbars"), role=kwargs.pop("role", "style"), **kwargs ) diff --git a/packages/python/plotly/plotly/validators/funnel/__init__.py b/packages/python/plotly/plotly/validators/funnel/__init__.py index c3fc8f48236..92e78340850 100644 --- a/packages/python/plotly/plotly/validators/funnel/__init__.py +++ b/packages/python/plotly/plotly/validators/funnel/__init__.py @@ -174,6 +174,35 @@ def __init__(self, plotly_name="uid", parent_name="funnel", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="funnel", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="funnel", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="funnel", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/funnelarea/__init__.py b/packages/python/plotly/plotly/validators/funnelarea/__init__.py index 11e68c03945..c4cecebd38b 100644 --- a/packages/python/plotly/plotly/validators/funnelarea/__init__.py +++ b/packages/python/plotly/plotly/validators/funnelarea/__init__.py @@ -104,6 +104,37 @@ def __init__(self, plotly_name="title", parent_name="funnelarea", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="funnelarea", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="funnelarea", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="funnelarea", **kwargs): super(TextsrcValidator, self).__init__( @@ -218,7 +249,7 @@ def __init__(self, plotly_name="text", parent_name="funnelarea", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), + edit_type=kwargs.pop("edit_type", "plot"), role=kwargs.pop("role", "data"), **kwargs ) diff --git a/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py b/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py index 4321987d78e..f182f3c5fbd 100644 --- a/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py +++ b/packages/python/plotly/plotly/validators/histogram2dcontour/__init__.py @@ -686,7 +686,7 @@ def __init__(self, plotly_name="line", parent_name="histogram2dcontour", **kwarg Sets the amount of smoothing for the contour lines, where 0 corresponds to no smoothing. width - Sets the line width (in px). + Sets the contour line width in (in px) """, ), **kwargs diff --git a/packages/python/plotly/plotly/validators/indicator/__init__.py b/packages/python/plotly/plotly/validators/indicator/__init__.py index 8836dcbf1ae..bfc98c1494f 100644 --- a/packages/python/plotly/plotly/validators/indicator/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/__init__.py @@ -254,13 +254,13 @@ def __init__(self, plotly_name="gauge", parent_name="indicator", **kwargs): the gauge. shape Set the shape of the gauge - stepss + steps A tuple of - plotly.graph_objects.indicator.gauge.Steps + plotly.graph_objects.indicator.gauge.Step instances or dicts with compatible properties - stepsdefaults + stepdefaults When used in a template (as layout.template.dat - a.indicator.gauge.stepsdefaults), sets the + a.indicator.gauge.stepdefaults), sets the default property values to use for elements of indicator.gauge.steps threshold diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py index 0e5b5ad1457..78077f92e7e 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/__init__.py @@ -30,14 +30,14 @@ def __init__( import _plotly_utils.basevalidators -class StepsValidator(_plotly_utils.basevalidators.CompoundValidator): +class StepValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( - self, plotly_name="stepsdefaults", parent_name="indicator.gauge", **kwargs + self, plotly_name="stepdefaults", parent_name="indicator.gauge", **kwargs ): - super(StepsValidator, self).__init__( + super(StepValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Steps"), + data_class_str=kwargs.pop("data_class_str", "Step"), data_docs=kwargs.pop( "data_docs", """ @@ -50,19 +50,19 @@ def __init__( import _plotly_utils.basevalidators -class StepssValidator(_plotly_utils.basevalidators.CompoundArrayValidator): - def __init__(self, plotly_name="stepss", parent_name="indicator.gauge", **kwargs): - super(StepssValidator, self).__init__( +class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__(self, plotly_name="steps", parent_name="indicator.gauge", **kwargs): + super(StepsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - data_class_str=kwargs.pop("data_class_str", "Steps"), + data_class_str=kwargs.pop("data_class_str", "Step"), data_docs=kwargs.pop( "data_docs", """ color Sets the background color of the arc. line - plotly.graph_objects.indicator.gauge.steps.Line + plotly.graph_objects.indicator.gauge.step.Line instance or dict with compatible properties name When used in a template, named items are diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/steps/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py similarity index 96% rename from packages/python/plotly/plotly/validators/indicator/gauge/steps/__init__.py rename to packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py index b137d857f73..85cb7b1f731 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/steps/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/__init__.py @@ -3,7 +3,7 @@ class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( - self, plotly_name="thickness", parent_name="indicator.gauge.steps", **kwargs + self, plotly_name="thickness", parent_name="indicator.gauge.step", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, @@ -23,7 +23,7 @@ class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", - parent_name="indicator.gauge.steps", + parent_name="indicator.gauge.step", **kwargs ): super(TemplateitemnameValidator, self).__init__( @@ -40,7 +40,7 @@ def __init__( class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( - self, plotly_name="range", parent_name="indicator.gauge.steps", **kwargs + self, plotly_name="range", parent_name="indicator.gauge.step", **kwargs ): super(RangeValidator, self).__init__( plotly_name=plotly_name, @@ -63,7 +63,7 @@ def __init__( class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( - self, plotly_name="name", parent_name="indicator.gauge.steps", **kwargs + self, plotly_name="name", parent_name="indicator.gauge.step", **kwargs ): super(NameValidator, self).__init__( plotly_name=plotly_name, @@ -79,7 +79,7 @@ def __init__( class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( - self, plotly_name="line", parent_name="indicator.gauge.steps", **kwargs + self, plotly_name="line", parent_name="indicator.gauge.step", **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, @@ -105,7 +105,7 @@ def __init__( class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( - self, plotly_name="color", parent_name="indicator.gauge.steps", **kwargs + self, plotly_name="color", parent_name="indicator.gauge.step", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/indicator/gauge/steps/line/__init__.py b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py similarity index 95% rename from packages/python/plotly/plotly/validators/indicator/gauge/steps/line/__init__.py rename to packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py index 86fbd9476a0..2c981da6acd 100644 --- a/packages/python/plotly/plotly/validators/indicator/gauge/steps/line/__init__.py +++ b/packages/python/plotly/plotly/validators/indicator/gauge/step/line/__init__.py @@ -3,7 +3,7 @@ class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( - self, plotly_name="width", parent_name="indicator.gauge.steps.line", **kwargs + self, plotly_name="width", parent_name="indicator.gauge.step.line", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, @@ -20,7 +20,7 @@ def __init__( class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( - self, plotly_name="color", parent_name="indicator.gauge.steps.line", **kwargs + self, plotly_name="color", parent_name="indicator.gauge.step.line", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/layout/__init__.py b/packages/python/plotly/plotly/validators/layout/__init__.py index edb056b06b2..a8c04a8fadc 100644 --- a/packages/python/plotly/plotly/validators/layout/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/__init__.py @@ -1107,6 +1107,20 @@ def __init__(self, plotly_name="uirevision", parent_name="layout", **kwargs): import _plotly_utils.basevalidators +class TreemapcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): + def __init__(self, plotly_name="treemapcolorway", parent_name="layout", **kwargs): + super(TreemapcolorwayValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="transition", parent_name="layout", **kwargs): super(TransitionValidator, self).__init__( @@ -1990,7 +2004,10 @@ def __init__(self, plotly_name="margin", parent_name="layout", **kwargs): "data_docs", """ autoexpand - + Turns on/off margin expansion computations. + Legends, colorbars, updatemenus, sliders, axis + rangeselector and rangeslider are allowed to + push the margins by defaults. b Sets the bottom margin (in px). l @@ -2157,18 +2174,34 @@ def __init__(self, plotly_name="legend", parent_name="layout", **kwargs): respect to their associated text. x Sets the x position (in normalized coordinates) - of the legend. + of the legend. Defaults to 1.02 for vertical + legends and defaults to 0 for horizontal + legends. xanchor Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. + Value "auto" anchors legends to the right for + `x` values greater than or equal to 2/3, + anchors legends to the left for `x` values less + than or equal to 1/3 and anchors legends with + respect to their center otherwise. y Sets the y position (in normalized coordinates) - of the legend. + of the legend. Defaults to 1 for vertical + legends, defaults to "-0.1" for horizontal + legends on graphs w/o range sliders and + defaults to 1.1 for horizontal legends on graph + with one or multiple range sliders. yanchor Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", - "middle" or "bottom" of the legend. + "middle" or "bottom" of the legend. Value + "auto" anchors legends at their bottom for `y` + values less than or equal to 1/3, anchors + legends to at their top for `y` values greater + than or equal to 2/3 and anchors legends with + respect to their middle otherwise. """, ), **kwargs @@ -2712,6 +2745,22 @@ def __init__(self, plotly_name="font", parent_name="layout", **kwargs): import _plotly_utils.basevalidators +class ExtendtreemapcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="extendtreemapcolors", parent_name="layout", **kwargs + ): + super(ExtendtreemapcolorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class ExtendsunburstcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="extendsunburstcolors", parent_name="layout", **kwargs diff --git a/packages/python/plotly/plotly/validators/layout/template/__init__.py b/packages/python/plotly/plotly/validators/layout/template/__init__.py index cc2fb9d90fb..8ea55c3bd38 100644 --- a/packages/python/plotly/plotly/validators/layout/template/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/template/__init__.py @@ -156,6 +156,9 @@ def __init__(self, plotly_name="data", parent_name="layout.template", **kwargs): table A tuple of plotly.graph_objects.Table instances or dicts with compatible properties + treemap + A tuple of plotly.graph_objects.Treemap + instances or dicts with compatible properties violin A tuple of plotly.graph_objects.Violin instances or dicts with compatible properties diff --git a/packages/python/plotly/plotly/validators/layout/template/data/__init__.py b/packages/python/plotly/plotly/validators/layout/template/data/__init__.py index 1820c825f95..8a4b82b6469 100644 --- a/packages/python/plotly/plotly/validators/layout/template/data/__init__.py +++ b/packages/python/plotly/plotly/validators/layout/template/data/__init__.py @@ -61,6 +61,26 @@ def __init__( import _plotly_utils.basevalidators +class TreemapsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, plotly_name="treemap", parent_name="layout.template.data", **kwargs + ): + super(TreemapsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Treemap"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TablesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="table", parent_name="layout.template.data", **kwargs diff --git a/packages/python/plotly/plotly/validators/parcats/__init__.py b/packages/python/plotly/plotly/validators/parcats/__init__.py index a06bf78c579..0224d9a4b32 100644 --- a/packages/python/plotly/plotly/validators/parcats/__init__.py +++ b/packages/python/plotly/plotly/validators/parcats/__init__.py @@ -261,7 +261,13 @@ def __init__(self, plotly_name="line", parent_name="parcats", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- diff --git a/packages/python/plotly/plotly/validators/pie/__init__.py b/packages/python/plotly/plotly/validators/pie/__init__.py index 5fa663fc885..cc78509414c 100644 --- a/packages/python/plotly/plotly/validators/pie/__init__.py +++ b/packages/python/plotly/plotly/validators/pie/__init__.py @@ -104,6 +104,35 @@ def __init__(self, plotly_name="title", parent_name="pie", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="pie", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="pie", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="pie", **kwargs): super(TextsrcValidator, self).__init__( @@ -216,7 +245,7 @@ def __init__(self, plotly_name="text", parent_name="pie", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), + edit_type=kwargs.pop("edit_type", "plot"), role=kwargs.pop("role", "data"), **kwargs ) diff --git a/packages/python/plotly/plotly/validators/sankey/__init__.py b/packages/python/plotly/plotly/validators/sankey/__init__.py index 1658948f8be..68a00ec95af 100644 --- a/packages/python/plotly/plotly/validators/sankey/__init__.py +++ b/packages/python/plotly/plotly/validators/sankey/__init__.py @@ -209,7 +209,13 @@ def __init__(self, plotly_name="node", parent_name="sankey", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- @@ -343,7 +349,13 @@ def __init__(self, plotly_name="link", parent_name="sankey", **kwargs): "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format - for details on the formatting syntax. The + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plot.ly/javascript/plotlyjs- diff --git a/packages/python/plotly/plotly/validators/scatter/__init__.py b/packages/python/plotly/plotly/validators/scatter/__init__.py index 8ccbb2f1645..4aa4d5c362d 100644 --- a/packages/python/plotly/plotly/validators/scatter/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter/__init__.py @@ -271,6 +271,35 @@ def __init__(self, plotly_name="tsrc", parent_name="scatter", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="scatter", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scatter", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatter", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scatter3d/__init__.py b/packages/python/plotly/plotly/validators/scatter3d/__init__.py index 587e8e99b5e..9b101d1dcfa 100644 --- a/packages/python/plotly/plotly/validators/scatter3d/__init__.py +++ b/packages/python/plotly/plotly/validators/scatter3d/__init__.py @@ -233,6 +233,37 @@ def __init__(self, plotly_name="uid", parent_name="scatter3d", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatter3d", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scatter3d", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatter3d", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scattercarpet/__init__.py b/packages/python/plotly/plotly/validators/scattercarpet/__init__.py index 5d0feb5e6d8..8d96b7c5a78 100644 --- a/packages/python/plotly/plotly/validators/scattercarpet/__init__.py +++ b/packages/python/plotly/plotly/validators/scattercarpet/__init__.py @@ -100,6 +100,39 @@ def __init__(self, plotly_name="uid", parent_name="scattercarpet", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattercarpet", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scattercarpet", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattercarpet", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scattergeo/__init__.py b/packages/python/plotly/plotly/validators/scattergeo/__init__.py index e56828f12d8..ba285a9ff94 100644 --- a/packages/python/plotly/plotly/validators/scattergeo/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergeo/__init__.py @@ -69,6 +69,37 @@ def __init__(self, plotly_name="uid", parent_name="scattergeo", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattergeo", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scattergeo", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattergeo", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scattergl/__init__.py b/packages/python/plotly/plotly/validators/scattergl/__init__.py index 0cdc9dc4d73..8f1ad3f82ed 100644 --- a/packages/python/plotly/plotly/validators/scattergl/__init__.py +++ b/packages/python/plotly/plotly/validators/scattergl/__init__.py @@ -252,6 +252,37 @@ def __init__(self, plotly_name="uid", parent_name="scattergl", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattergl", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="scattergl", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattergl", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scattermapbox/__init__.py b/packages/python/plotly/plotly/validators/scattermapbox/__init__.py index 9fe039ccf2e..12908dc38bc 100644 --- a/packages/python/plotly/plotly/validators/scattermapbox/__init__.py +++ b/packages/python/plotly/plotly/validators/scattermapbox/__init__.py @@ -66,6 +66,39 @@ def __init__(self, plotly_name="uid", parent_name="scattermapbox", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scattermapbox", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scattermapbox", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattermapbox", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scatterpolar/__init__.py b/packages/python/plotly/plotly/validators/scatterpolar/__init__.py index 24cfedbbcee..1fe6983656a 100644 --- a/packages/python/plotly/plotly/validators/scatterpolar/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolar/__init__.py @@ -127,6 +127,39 @@ def __init__(self, plotly_name="theta", parent_name="scatterpolar", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatterpolar", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scatterpolar", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatterpolar", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py b/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py index b750e4368c9..4b4bd145d9f 100644 --- a/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterpolargl/__init__.py @@ -131,6 +131,39 @@ def __init__(self, plotly_name="theta", parent_name="scatterpolargl", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatterpolargl", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scatterpolargl", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatterpolargl", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/scatterternary/__init__.py b/packages/python/plotly/plotly/validators/scatterternary/__init__.py index 9102a8b0c71..bf59e22ccd4 100644 --- a/packages/python/plotly/plotly/validators/scatterternary/__init__.py +++ b/packages/python/plotly/plotly/validators/scatterternary/__init__.py @@ -74,6 +74,39 @@ def __init__(self, plotly_name="uid", parent_name="scatterternary", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="scatterternary", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="texttemplate", parent_name="scatterternary", **kwargs + ): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatterternary", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/sunburst/__init__.py b/packages/python/plotly/plotly/validators/sunburst/__init__.py index e9c3a385b24..c093afb6c3a 100644 --- a/packages/python/plotly/plotly/validators/sunburst/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/__init__.py @@ -73,6 +73,35 @@ def __init__(self, plotly_name="uid", parent_name="sunburst", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="sunburst", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="sunburst", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="sunburst", **kwargs): super(TextsrcValidator, self).__init__( @@ -94,7 +123,18 @@ def __init__(self, plotly_name="textinfo", parent_name="sunburst", **kwargs): parent_name=parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), - flags=kwargs.pop("flags", ["label", "text", "value"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), role=kwargs.pop("role", "info"), **kwargs ) @@ -155,7 +195,7 @@ def __init__(self, plotly_name="text", parent_name="sunburst", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, - edit_type=kwargs.pop("edit_type", "calc"), + edit_type=kwargs.pop("edit_type", "plot"), role=kwargs.pop("role", "data"), **kwargs ) @@ -348,16 +388,92 @@ def __init__(self, plotly_name="marker", parent_name="sunburst", **kwargs): data_docs=kwargs.pop( "data_docs", """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.sunburst.marker.ColorBar + instance or dict with compatible properties colors - Sets the color of each sector of this sunburst - chart. If not specified, the default trace - color set is used to pick the sector colors. + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. colorssrc Sets the source reference on plot.ly for colors . line plotly.graph_objects.sunburst.marker.Line instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. """, ), **kwargs @@ -392,7 +508,9 @@ def __init__(self, plotly_name="leaf", parent_name="sunburst", **kwargs): "data_docs", """ opacity - Sets the opacity of the leaves. + Sets the opacity of the leaves. With colorscale + it is defaulted to 1; otherwise it is defaulted + to 0.7 """, ), **kwargs @@ -641,7 +759,19 @@ def __init__(self, plotly_name="hoverinfo", parent_name="sunburst", **kwargs): array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), - flags=kwargs.pop("flags", ["label", "text", "value", "name"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "name", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), role=kwargs.pop("role", "info"), **kwargs ) @@ -709,6 +839,21 @@ def __init__(self, plotly_name="customdata", parent_name="sunburst", **kwargs): import _plotly_utils.basevalidators +class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="count", parent_name="sunburst", **kwargs): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + flags=kwargs.pop("flags", ["branches", "leaves"]), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="branchvalues", parent_name="sunburst", **kwargs): super(BranchvaluesValidator, self).__init__( diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py index 474bbd619e1..00ffa55f0ab 100644 --- a/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py +++ b/packages/python/plotly/plotly/validators/sunburst/marker/__init__.py @@ -1,6 +1,38 @@ import _plotly_utils.basevalidators +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="showscale", parent_name="sunburst.marker", **kwargs + ): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="sunburst.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="sunburst.marker", **kwargs): super(LineValidator, self).__init__( @@ -47,6 +79,23 @@ def __init__( import _plotly_utils.basevalidators +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="sunburst.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="colors", parent_name="sunburst.marker", **kwargs): super(ColorsValidator, self).__init__( @@ -56,3 +105,328 @@ def __init__(self, plotly_name="colors", parent_name="sunburst.marker", **kwargs role=kwargs.pop("role", "data"), **kwargs ) + + +import _plotly_utils.basevalidators + + +class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="sunburst.marker", **kwargs): + super(ColorBarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.sunburst.marker + .colorbar.Tickformatstop instances or dicts + with compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.sunburst.marker.colorbar.tickformatstopdefaul + ts), sets the default property values to use + for elements of + sunburst.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.sunburst.marker.colorbar.T + itle instance or dict with compatible + properties + titlefont + Deprecated: Please use + sunburst.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + sunburst.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__( + self, plotly_name="coloraxis", parent_name="sunburst.marker", **kwargs + ): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="sunburst.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="sunburst.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="sunburst.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="sunburst.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="sunburst.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py new file mode 100644 index 00000000000..4ad55c9a8a2 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/__init__.py @@ -0,0 +1,809 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="tickvalssrc", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, + plotly_name="ticktextsrc", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TickformatstopValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="borderwidth", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="bordercolor", + parent_name="sunburst.marker.colorbar", + **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="sunburst.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py new file mode 100644 index 00000000000..de9228c2c8f --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py @@ -0,0 +1,58 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="sunburst.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="sunburst.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="sunburst.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py new file mode 100644 index 00000000000..8a766f4ad1b --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py @@ -0,0 +1,100 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="sunburst.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py new file mode 100644 index 00000000000..26f2f550e44 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/__init__.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="sunburst.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="sunburst.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="sunburst.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py new file mode 100644 index 00000000000..bd3848eb1c1 --- /dev/null +++ b/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py @@ -0,0 +1,58 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="sunburst.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="sunburst.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="sunburst.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/__init__.py b/packages/python/plotly/plotly/validators/treemap/__init__.py new file mode 100644 index 00000000000..da0fa50e6dc --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/__init__.py @@ -0,0 +1,961 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="visible", parent_name="treemap", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", [True, False, "legendonly"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="valuessrc", parent_name="treemap", **kwargs): + super(ValuessrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="values", parent_name="treemap", **kwargs): + super(ValuesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="uirevision", parent_name="treemap", **kwargs): + super(UirevisionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class UidValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="uid", parent_name="treemap", **kwargs): + super(UidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TilingValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="tiling", parent_name="treemap", **kwargs): + super(TilingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tiling"), + data_docs=kwargs.pop( + "data_docs", + """ + flip + Determines if the positions obtained from + solver are flipped on each axis. + packing + Determines d3 treemap solver. For more info + please refer to + https://github.com/d3/d3-hierarchy#treemap- + tiling + pad + Sets the inner padding (in px). + squarifyratio + When using "squarify" `packing` algorithm, + according to https://github.com/d3/d3-hierarchy + /blob/master/README.md#squarify_ratio this + option specifies the desired aspect ratio of + the generated rectangles. The ratio must be + specified as a number greater than or equal to + one. Note that the orientation of the generated + rectangles (tall or wide) is not implied by the + ratio; for example, a ratio of two will attempt + to produce a mixture of rectangles whose + width:height ratio is either 2:1 or 1:2. When + using "squarify", unlike d3 which uses the + Golden Ratio i.e. 1.618034, Plotly applies 1 to + increase squares in treemap layouts. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="texttemplatesrc", parent_name="treemap", **kwargs): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="treemap", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="textsrc", parent_name="treemap", **kwargs): + super(TextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="textposition", parent_name="treemap", **kwargs): + super(TextpositionValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop( + "values", + [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right", + ], + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="textinfo", parent_name="treemap", **kwargs): + super(TextinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + extras=kwargs.pop("extras", ["none"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="treemap", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="text", parent_name="treemap", **kwargs): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="stream", parent_name="treemap", **kwargs): + super(StreamValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Stream"), + data_docs=kwargs.pop( + "data_docs", + """ + maxpoints + Sets the maximum number of points to keep on + the plots from an incoming stream. If + `maxpoints` is set to 50, only the newest 50 + points will be displayed on the plot. + token + The stream id number links a data trace on a + plot with a stream. See + https://plot.ly/settings for more details. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class PathbarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pathbar", parent_name="treemap", **kwargs): + super(PathbarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pathbar"), + data_docs=kwargs.pop( + "data_docs", + """ + edgeshape + Determines which shape is used for edges + between `barpath` labels. + side + Determines on which side of the the treemap the + `pathbar` should be presented. + textfont + Sets the font used inside `pathbar`. + thickness + Sets the thickness of `pathbar` (in px). If not + specified the `pathbar.textfont.size` is used + with 3 pixles extra padding on each side. + visible + Determines if the path bar is drawn i.e. + outside the trace `domain` and with one pixel + gap. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="parentssrc", parent_name="treemap", **kwargs): + super(ParentssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="parents", parent_name="treemap", **kwargs): + super(ParentsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="outsidetextfont", parent_name="treemap", **kwargs): + super(OutsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="opacity", parent_name="treemap", **kwargs): + super(OpacityValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + max=kwargs.pop("max", 1), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="name", parent_name="treemap", **kwargs): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="metasrc", parent_name="treemap", **kwargs): + super(MetasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class MetaValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="meta", parent_name="treemap", **kwargs): + super(MetaValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="maxdepth", parent_name="treemap", **kwargs): + super(MaxdepthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="marker", parent_name="treemap", **kwargs): + super(MarkerValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Marker"), + data_docs=kwargs.pop( + "data_docs", + """ + autocolorscale + Determines whether the colorscale is a default + palette (`autocolorscale: true`) or the palette + determined by `marker.colorscale`. Has an + effect only if colorsis set to a numerical + array. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette + will be chosen according to whether numbers in + the `color` array are all positive, all + negative or mixed. + cauto + Determines whether or not the color domain is + computed with respect to the input data (here + colors) or the bounds set in `marker.cmin` and + `marker.cmax` Has an effect only if colorsis + set to a numerical array. Defaults to `false` + when `marker.cmin` and `marker.cmax` are set by + the user. + cmax + Sets the upper bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmin` must be set as + well. + cmid + Sets the mid-point of the color domain by + scaling `marker.cmin` and/or `marker.cmax` to + be equidistant to this point. Has an effect + only if colorsis set to a numerical array. + Value should have the same units as colors. Has + no effect when `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has + an effect only if colorsis set to a numerical + array. Value should have the same units as + colors and if set, `marker.cmax` must be set as + well. + coloraxis + Sets a reference to a shared color axis. + References to these shared color axes are + "coloraxis", "coloraxis2", "coloraxis3", etc. + Settings for these shared color axes are set in + the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple + color scales can be linked to the same color + axis. + colorbar + plotly.graph_objects.treemap.marker.ColorBar + instance or dict with compatible properties + colors + Sets the color of each sector of this trace. If + not specified, the default trace color set is + used to pick the sector colors. + colorscale + Sets the colorscale. Has an effect only if + colorsis set to a numerical array. The + colorscale must be an array containing arrays + mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and + highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in + color space, use`marker.cmin` and + `marker.cmax`. Alternatively, `colorscale` may + be a palette name string of the following list: + Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl + ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E + arth,Electric,Viridis,Cividis. + colorssrc + Sets the source reference on plot.ly for + colors . + depthfade + Determines if the sector colors are faded + towards the background from the leaves up to + the headers. This option is unavailable when a + `colorscale` is present, defaults to false when + `marker.colors` is set, but otherwise defaults + to true. When set to "reversed", the fading + direction is inverted, that is the top elements + within hierarchy are drawn with fully saturated + colors while the leaves are faded towards the + background color. + line + plotly.graph_objects.treemap.marker.Line + instance or dict with compatible properties + pad + plotly.graph_objects.treemap.marker.Pad + instance or dict with compatible properties + reversescale + Reverses the color mapping if true. Has an + effect only if colorsis set to a numerical + array. If true, `marker.cmin` will correspond + to the last color in the array and + `marker.cmax` will correspond to the first + color. + showscale + Determines whether or not a colorbar is + displayed for this trace. Has an effect only if + colorsis set to a numerical array. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LevelValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__(self, plotly_name="level", parent_name="treemap", **kwargs): + super(LevelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="labelssrc", parent_name="treemap", **kwargs): + super(LabelssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="labels", parent_name="treemap", **kwargs): + super(LabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="insidetextfont", parent_name="treemap", **kwargs): + super(InsidetextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="idssrc", parent_name="treemap", **kwargs): + super(IdssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="ids", parent_name="treemap", **kwargs): + super(IdsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + anim=kwargs.pop("anim", True), + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertextsrc", parent_name="treemap", **kwargs): + super(HovertextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HovertextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertext", parent_name="treemap", **kwargs): + super(HovertextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hovertemplatesrc", parent_name="treemap", **kwargs): + super(HovertemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="hovertemplate", parent_name="treemap", **kwargs): + super(HovertemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="hoverlabel", parent_name="treemap", **kwargs): + super(HoverlabelValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), + data_docs=kwargs.pop( + "data_docs", + """ + align + Sets the horizontal alignment of the text + content within hover label box. Has an effect + only if the hover label text spans more two or + more lines + alignsrc + Sets the source reference on plot.ly for align + . + bgcolor + Sets the background color of the hover labels + for this trace + bgcolorsrc + Sets the source reference on plot.ly for + bgcolor . + bordercolor + Sets the border color of the hover labels for + this trace. + bordercolorsrc + Sets the source reference on plot.ly for + bordercolor . + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of + characters) of the trace name in the hover + labels for all traces. -1 shows the whole name + regardless of length. 0-3 shows the first 0-3 + characters, and an integer >3 will show the + whole name if it is less than that many + characters, but if it is longer, will truncate + to `namelength - 3` characters and add an + ellipsis. + namelengthsrc + Sets the source reference on plot.ly for + namelength . +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="hoverinfosrc", parent_name="treemap", **kwargs): + super(HoverinfosrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="hoverinfo", parent_name="treemap", **kwargs): + super(HoverinfoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "none"), + extras=kwargs.pop("extras", ["all", "none", "skip"]), + flags=kwargs.pop( + "flags", + [ + "label", + "text", + "value", + "name", + "current path", + "percent root", + "percent entry", + "percent parent", + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="domain", parent_name="treemap", **kwargs): + super(DomainValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Domain"), + data_docs=kwargs.pop( + "data_docs", + """ + column + If there is a layout grid, use the domain for + this column in the grid for this treemap trace + . + row + If there is a layout grid, use the domain for + this row in the grid for this treemap trace . + x + Sets the horizontal domain of this treemap + trace (in plot fraction). + y + Sets the vertical domain of this treemap trace + (in plot fraction). +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="customdatasrc", parent_name="treemap", **kwargs): + super(CustomdatasrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="customdata", parent_name="treemap", **kwargs): + super(CustomdataValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="count", parent_name="treemap", **kwargs): + super(CountValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + flags=kwargs.pop("flags", ["branches", "leaves"]), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="branchvalues", parent_name="treemap", **kwargs): + super(BranchvaluesValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["remainder", "total"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/domain/__init__.py b/packages/python/plotly/plotly/validators/treemap/domain/__init__.py new file mode 100644 index 00000000000..3a7aced7e7a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/domain/__init__.py @@ -0,0 +1,70 @@ +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="y", parent_name="treemap.domain", **kwargs): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__(self, plotly_name="x", parent_name="treemap.domain", **kwargs): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + items=kwargs.pop( + "items", + [ + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + {"valType": "number", "min": 0, "max": 1, "editType": "calc"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class RowValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="row", parent_name="treemap.domain", **kwargs): + super(RowValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__(self, plotly_name="column", parent_name="treemap.domain", **kwargs): + super(ColumnValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/carpet/hoverlabel/__init__.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py similarity index 88% rename from packages/python/plotly/plotly/validators/carpet/hoverlabel/__init__.py rename to packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py index 66c102142a5..2a2d6f1c58b 100644 --- a/packages/python/plotly/plotly/validators/carpet/hoverlabel/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/__init__.py @@ -3,7 +3,7 @@ class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="namelengthsrc", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="namelengthsrc", parent_name="treemap.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, @@ -19,7 +19,7 @@ def __init__( class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( - self, plotly_name="namelength", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="namelength", parent_name="treemap.hoverlabel", **kwargs ): super(NamelengthValidator, self).__init__( plotly_name=plotly_name, @@ -36,7 +36,7 @@ def __init__( class FontValidator(_plotly_utils.basevalidators.CompoundValidator): - def __init__(self, plotly_name="font", parent_name="carpet.hoverlabel", **kwargs): + def __init__(self, plotly_name="font", parent_name="treemap.hoverlabel", **kwargs): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, @@ -84,7 +84,7 @@ def __init__(self, plotly_name="font", parent_name="carpet.hoverlabel", **kwargs class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="bordercolorsrc", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="bordercolorsrc", parent_name="treemap.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, @@ -100,7 +100,7 @@ def __init__( class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( - self, plotly_name="bordercolor", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="bordercolor", parent_name="treemap.hoverlabel", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, @@ -117,7 +117,7 @@ def __init__( class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="bgcolorsrc", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="bgcolorsrc", parent_name="treemap.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, @@ -133,7 +133,7 @@ def __init__( class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( - self, plotly_name="bgcolor", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="bgcolor", parent_name="treemap.hoverlabel", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, @@ -150,7 +150,7 @@ def __init__( class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="alignsrc", parent_name="carpet.hoverlabel", **kwargs + self, plotly_name="alignsrc", parent_name="treemap.hoverlabel", **kwargs ): super(AlignsrcValidator, self).__init__( plotly_name=plotly_name, @@ -165,7 +165,7 @@ def __init__( class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): - def __init__(self, plotly_name="align", parent_name="carpet.hoverlabel", **kwargs): + def __init__(self, plotly_name="align", parent_name="treemap.hoverlabel", **kwargs): super(AlignValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, diff --git a/packages/python/plotly/plotly/validators/carpet/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py similarity index 86% rename from packages/python/plotly/plotly/validators/carpet/hoverlabel/font/__init__.py rename to packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py index 8ac30128e77..de1195a10aa 100644 --- a/packages/python/plotly/plotly/validators/carpet/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/hoverlabel/font/__init__.py @@ -3,7 +3,7 @@ class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="sizesrc", parent_name="carpet.hoverlabel.font", **kwargs + self, plotly_name="sizesrc", parent_name="treemap.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, @@ -19,7 +19,7 @@ def __init__( class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( - self, plotly_name="size", parent_name="carpet.hoverlabel.font", **kwargs + self, plotly_name="size", parent_name="treemap.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, @@ -37,7 +37,7 @@ def __init__( class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="familysrc", parent_name="carpet.hoverlabel.font", **kwargs + self, plotly_name="familysrc", parent_name="treemap.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, @@ -53,7 +53,7 @@ def __init__( class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( - self, plotly_name="family", parent_name="carpet.hoverlabel.font", **kwargs + self, plotly_name="family", parent_name="treemap.hoverlabel.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, @@ -72,7 +72,7 @@ def __init__( class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, plotly_name="colorsrc", parent_name="carpet.hoverlabel.font", **kwargs + self, plotly_name="colorsrc", parent_name="treemap.hoverlabel.font", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, @@ -88,7 +88,7 @@ def __init__( class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( - self, plotly_name="color", parent_name="carpet.hoverlabel.font", **kwargs + self, plotly_name="color", parent_name="treemap.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/contourcarpet/hoverlabel/font/__init__.py b/packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py similarity index 75% rename from packages/python/plotly/plotly/validators/contourcarpet/hoverlabel/font/__init__.py rename to packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py index 8cd7add979f..550b1b2b75c 100644 --- a/packages/python/plotly/plotly/validators/contourcarpet/hoverlabel/font/__init__.py +++ b/packages/python/plotly/plotly/validators/treemap/insidetextfont/__init__.py @@ -3,10 +3,7 @@ class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, - plotly_name="sizesrc", - parent_name="contourcarpet.hoverlabel.font", - **kwargs + self, plotly_name="sizesrc", parent_name="treemap.insidetextfont", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, @@ -22,13 +19,13 @@ def __init__( class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( - self, plotly_name="size", parent_name="contourcarpet.hoverlabel.font", **kwargs + self, plotly_name="size", parent_name="treemap.insidetextfont", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), + edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), role=kwargs.pop("role", "style"), **kwargs @@ -40,10 +37,7 @@ def __init__( class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, - plotly_name="familysrc", - parent_name="contourcarpet.hoverlabel.font", - **kwargs + self, plotly_name="familysrc", parent_name="treemap.insidetextfont", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, @@ -59,16 +53,13 @@ def __init__( class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( - self, - plotly_name="family", - parent_name="contourcarpet.hoverlabel.font", - **kwargs + self, plotly_name="family", parent_name="treemap.insidetextfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), + edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), role=kwargs.pop("role", "style"), strict=kwargs.pop("strict", True), @@ -81,10 +72,7 @@ def __init__( class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( - self, - plotly_name="colorsrc", - parent_name="contourcarpet.hoverlabel.font", - **kwargs + self, plotly_name="colorsrc", parent_name="treemap.insidetextfont", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, @@ -100,13 +88,13 @@ def __init__( class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( - self, plotly_name="color", parent_name="contourcarpet.hoverlabel.font", **kwargs + self, plotly_name="color", parent_name="treemap.insidetextfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array_ok=kwargs.pop("array_ok", True), - edit_type=kwargs.pop("edit_type", "none"), + edit_type=kwargs.pop("edit_type", "plot"), role=kwargs.pop("role", "style"), **kwargs ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/__init__.py new file mode 100644 index 00000000000..c0a06b1630f --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/__init__.py @@ -0,0 +1,466 @@ +import _plotly_utils.basevalidators + + +class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="showscale", parent_name="treemap.marker", **kwargs): + super(ShowscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="reversescale", parent_name="treemap.marker", **kwargs + ): + super(ReversescaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="pad", parent_name="treemap.marker", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Pad"), + data_docs=kwargs.pop( + "data_docs", + """ + b + Sets the padding form the bottom (in px). + l + Sets the padding form the left (in px). + r + Sets the padding form the right (in px). + t + Sets the padding form the top (in px). +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LineValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="line", parent_name="treemap.marker", **kwargs): + super(LineValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Line"), + data_docs=kwargs.pop( + "data_docs", + """ + color + Sets the color of the line enclosing each + sector. Defaults to the `paper_bgcolor` value. + colorsrc + Sets the source reference on plot.ly for color + . + width + Sets the width (in px) of the line enclosing + each sector. + widthsrc + Sets the source reference on plot.ly for width + . +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class DepthfadeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="depthfade", parent_name="treemap.marker", **kwargs): + super(DepthfadeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [True, False, "reversed"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="colorssrc", parent_name="treemap.marker", **kwargs): + super(ColorssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): + def __init__( + self, plotly_name="colorscale", parent_name="treemap.marker", **kwargs + ): + super(ColorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__(self, plotly_name="colors", parent_name="treemap.marker", **kwargs): + super(ColorsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorBarValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="colorbar", parent_name="treemap.marker", **kwargs): + super(ColorBarValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "ColorBar"), + data_docs=kwargs.pop( + "data_docs", + """ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing + this color bar. + dtick + Sets the step in-between ticks on this axis. + Use with `tick0`. Must be a positive number, or + special strings available to "log" and "date" + axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick + number. For example, to set a tick mark at 1, + 10, 100, 1000, ... set dtick to 1. To set tick + marks at 1, 100, 10000, ... set dtick to 2. To + set tick marks at 1, 5, 25, 125, 625, 3125, ... + set dtick to log_10(5), or 0.69897000433. "log" + has several special values; "L", where `f` + is a positive number, gives ticks linearly + spaced in value (but not position). For example + `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 + plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is + ignored for "D1" and "D2". If the axis `type` + is "date", then you must convert the time to + milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to + 86400000.0. "date" also has special values + "M" gives ticks spaced by a number of + months. `n` must be a positive integer. To set + ticks on the 15th of every third month, set + `tick0` to "2000-01-15" and `dtick` to "M3". To + set ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick + exponents. For example, consider the number + 1,000,000,000. If "none", it appears as + 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If + "SI", 1G. If "B", 1B. + len + Sets the length of the color bar This measure + excludes the padding of both ends. That is, the + color bar length is this length minus the + padding on both ends. + lenmode + Determines whether this color bar's length + (i.e. the measure in the color variation + direction) is set in units of plot "fraction" + or in *pixels. Use `len` to set the value. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks + will be chosen automatically to be less than or + equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of + the first tick is shown. If "last", only the + exponent of the last tick is shown. If "none", + no exponents appear. + showticklabels + Determines whether or not the tick labels are + drawn. + showtickprefix + If "all", all tick labels are displayed with a + prefix. If "first", only the first tick is + displayed with a prefix. If "last", only the + last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This + measure excludes the size of the padding, ticks + and labels. + thicknessmode + Determines whether this color bar's thickness + (i.e. the measure in the constant color + direction) is set in units of plot "fraction" + or in "pixels". Use `thickness` to set the + value. + tick0 + Sets the placement of the first tick on this + axis. Use with `dtick`. If the axis `type` is + "log", then you must take the log of your + starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when + `dtick`=*L* (see `dtick` for more info). If + the axis `type` is "date", it should be a date + string, like date data. If the axis `type` is + "category", it should be a number, using the + scale where each category is assigned a serial + number from zero in the order it appears. + tickangle + Sets the angle of the tick labels with respect + to the horizontal. For example, a `tickangle` + of -90 draws the tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 + formatting mini-languages which are very + similar to those in Python. For numbers, see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Formatting.md#d3_format + And for dates see: + https://github.com/d3/d3-3.x-api- + reference/blob/master/Time-Formatting.md#format + We add one item to d3's date formatter: "%{n}f" + for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with + tickformat "%H~%M~%S.%2f" would display + "09~15~23.46" + tickformatstops + A tuple of plotly.graph_objects.treemap.marker. + colorbar.Tickformatstop instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.dat + a.treemap.marker.colorbar.tickformatstopdefault + s), sets the default property values to use for + elements of + treemap.marker.colorbar.tickformatstops + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", + the number of ticks is set via `nticks`. If + "linear", the placement of the ticks is + determined by a starting position `tick0` and a + tick step `dtick` ("linear" is the default + value if `tick0` and `dtick` are provided). If + "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. + ("array" is the default value if `tickvals` is + provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If + "", this axis' ticks are not drawn. If + "outside" ("inside"), this axis' are drawn + outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position + via `tickvals`. Only has an effect if + `tickmode` is set to "array". Used with + `tickvals`. + ticktextsrc + Sets the source reference on plot.ly for + ticktext . + tickvals + Sets the values at which ticks on this axis + appear. Only has an effect if `tickmode` is set + to "array". Used with `ticktext`. + tickvalssrc + Sets the source reference on plot.ly for + tickvals . + tickwidth + Sets the tick width (in px). + title + plotly.graph_objects.treemap.marker.colorbar.Ti + tle instance or dict with compatible properties + titlefont + Deprecated: Please use + treemap.marker.colorbar.title.font instead. + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + titleside + Deprecated: Please use + treemap.marker.colorbar.title.side instead. + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + x + Sets the x position of the color bar (in plot + fraction). + xanchor + Sets this color bar's horizontal position + anchor. This anchor binds the `x` position to + the "left", "center" or "right" of the color + bar. + xpad + Sets the amount of padding (in px) along the x + direction. + y + Sets the y position of the color bar (in plot + fraction). + yanchor + Sets this color bar's vertical position anchor + This anchor binds the `y` position to the + "top", "middle" or "bottom" of the color bar. + ypad + Sets the amount of padding (in px) along the y + direction. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): + def __init__(self, plotly_name="coloraxis", parent_name="treemap.marker", **kwargs): + super(ColoraxisValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + dflt=kwargs.pop("dflt", None), + edit_type=kwargs.pop("edit_type", "calc"), + regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CminValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmin", parent_name="treemap.marker", **kwargs): + super(CminValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CmidValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmid", parent_name="treemap.marker", **kwargs): + super(CmidValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="cmax", parent_name="treemap.marker", **kwargs): + super(CmaxValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + implied_edits=kwargs.pop("implied_edits", {"cauto": False}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="cauto", parent_name="treemap.marker", **kwargs): + super(CautoValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, plotly_name="autocolorscale", parent_name="treemap.marker", **kwargs + ): + super(AutocolorscaleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py new file mode 100644 index 00000000000..e743e00f92b --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py @@ -0,0 +1,797 @@ +import _plotly_utils.basevalidators + + +class YpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ypad", parent_name="treemap.marker.colorbar", **kwargs + ): + super(YpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="yanchor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(YanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["top", "middle", "bottom"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class YValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="y", parent_name="treemap.marker.colorbar", **kwargs + ): + super(YValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XpadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="xpad", parent_name="treemap.marker.colorbar", **kwargs + ): + super(XpadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="xanchor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(XanchorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["left", "center", "right"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class XValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="x", parent_name="treemap.marker.colorbar", **kwargs + ): + super(XValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + max=kwargs.pop("max", 3), + min=kwargs.pop("min", -2), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TitleValidator(_plotly_utils.basevalidators.TitleValidator): + def __init__( + self, plotly_name="title", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TitleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Title"), + data_docs=kwargs.pop( + "data_docs", + """ + font + Sets this color bar's title font. Note that the + title's font used to be set by the now + deprecated `titlefont` attribute. + side + Determines the location of color bar's title + with respect to the color bar. Note that the + title's location used to be set by the now + deprecated `titleside` attribute. + text + Sets the title of the color bar. Note that + before the existence of `title.text`, the + title's contents used to be defined as the + `title` attribute itself. This behavior has + been deprecated. +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="tickwidth", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="tickvalssrc", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickvalssrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="tickvals", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickvalsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="ticktextsrc", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicktextsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): + def __init__( + self, plotly_name="ticktext", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicktextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "data"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="ticksuffix", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="ticks", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["outside", "inside", ""]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickprefix", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="tickmode", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {}), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["auto", "linear", "array"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="ticklen", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TicklenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickformatstopValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, + plotly_name="tickformatstopdefaults", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(TickformatstopValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): + def __init__( + self, + plotly_name="tickformatstops", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(TickformatstopsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), + data_docs=kwargs.pop( + "data_docs", + """ + dtickrange + range [*min*, *max*], where "min", "max" - + dtick values which describe some zoom level, it + is possible to omit "min" or "max" value by + passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are + created in the output figure in addition to any + items the figure already has in this array. You + can modify these items in the output figure by + making your own item with `templateitemname` + matching this `name` alongside your + modifications (including `visible: false` or + `enabled: false` to hide it). Has no effect + outside of a template. + templateitemname + Used to refer to a named item in this array in + the template. Named items from the template + will be created even without a matching item in + the input figure, but you can modify one by + making an item with `templateitemname` matching + its `name`, alongside your modifications + (including `visible: false` or `enabled: false` + to hide it). If there is no template or no + matching item, this item will be hidden unless + you explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, + the same as "tickformat" +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickformatValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="tickformat", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="tickfont", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Tickfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="tickcolor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): + def __init__( + self, plotly_name="tickangle", parent_name="treemap.marker.colorbar", **kwargs + ): + super(TickangleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="tick0", parent_name="treemap.marker.colorbar", **kwargs + ): + super(Tick0Validator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="thicknessmode", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ThicknessmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="treemap.marker.colorbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showticksuffix", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowticksuffixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showtickprefix", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowtickprefixValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="showticklabels", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowticklabelsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="showexponent", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ShowexponentValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["all", "first", "last", "none"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="separatethousands", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(SeparatethousandsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="outlinewidth", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(OutlinewidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="outlinecolor", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(OutlinecolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): + def __init__( + self, plotly_name="nticks", parent_name="treemap.marker.colorbar", **kwargs + ): + super(NticksValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="lenmode", parent_name="treemap.marker.colorbar", **kwargs + ): + super(LenmodeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["fraction", "pixels"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LenValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="len", parent_name="treemap.marker.colorbar", **kwargs + ): + super(LenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, + plotly_name="exponentformat", + parent_name="treemap.marker.colorbar", + **kwargs + ): + super(ExponentformatValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class DtickValidator(_plotly_utils.basevalidators.AnyValidator): + def __init__( + self, plotly_name="dtick", parent_name="treemap.marker.colorbar", **kwargs + ): + super(DtickValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="borderwidth", parent_name="treemap.marker.colorbar", **kwargs + ): + super(BorderwidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bordercolor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(BordercolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="bgcolor", parent_name="treemap.marker.colorbar", **kwargs + ): + super(BgcolorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py new file mode 100644 index 00000000000..81c4d38938c --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py @@ -0,0 +1,58 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="treemap.marker.colorbar.tickfont", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="treemap.marker.colorbar.tickfont", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="treemap.marker.colorbar.tickfont", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py new file mode 100644 index 00000000000..c008221a001 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py @@ -0,0 +1,100 @@ +import _plotly_utils.basevalidators + + +class ValueValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="value", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(ValueValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="templateitemname", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(TemplateitemnameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class NameValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="name", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(NameValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__( + self, + plotly_name="enabled", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(EnabledValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): + def __init__( + self, + plotly_name="dtickrange", + parent_name="treemap.marker.colorbar.tickformatstop", + **kwargs + ): + super(DtickrangeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + items=kwargs.pop( + "items", + [ + {"valType": "any", "editType": "colorbars"}, + {"valType": "any", "editType": "colorbars"}, + ], + ), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py new file mode 100644 index 00000000000..b33309018fa --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/__init__.py @@ -0,0 +1,71 @@ +import _plotly_utils.basevalidators + + +class TextValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="text", parent_name="treemap.marker.colorbar.title", **kwargs + ): + super(TextValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="side", parent_name="treemap.marker.colorbar.title", **kwargs + ): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", ["right", "top", "bottom"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__( + self, plotly_name="font", parent_name="treemap.marker.colorbar.title", **kwargs + ): + super(FontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Font"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + size + +""", + ), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py new file mode 100644 index 00000000000..43a934cf6e9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/colorbar/title/font/__init__.py @@ -0,0 +1,58 @@ +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, + plotly_name="size", + parent_name="treemap.marker.colorbar.title.font", + **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, + plotly_name="family", + parent_name="treemap.marker.colorbar.title.font", + **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, + plotly_name="color", + parent_name="treemap.marker.colorbar.title.font", + **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "colorbars"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py new file mode 100644 index 00000000000..bb32fda977a --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/line/__init__.py @@ -0,0 +1,65 @@ +import _plotly_utils.basevalidators + + +class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="widthsrc", parent_name="treemap.marker.line", **kwargs + ): + super(WidthsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class WidthValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="width", parent_name="treemap.marker.line", **kwargs + ): + super(WidthValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.marker.line", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.marker.line", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "style"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py b/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py new file mode 100644 index 00000000000..d0300723e69 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/marker/pad/__init__.py @@ -0,0 +1,58 @@ +import _plotly_utils.basevalidators + + +class TValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="t", parent_name="treemap.marker.pad", **kwargs): + super(TValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class RValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="r", parent_name="treemap.marker.pad", **kwargs): + super(RValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class LValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="l", parent_name="treemap.marker.pad", **kwargs): + super(LValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class BValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="b", parent_name="treemap.marker.pad", **kwargs): + super(BValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py new file mode 100644 index 00000000000..c3ebd07d366 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/outsidetextfont/__init__.py @@ -0,0 +1,100 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="treemap.outsidetextfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="treemap.outsidetextfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.outsidetextfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="treemap.outsidetextfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.outsidetextfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.outsidetextfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py b/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py new file mode 100644 index 00000000000..040c5c57653 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/__init__.py @@ -0,0 +1,108 @@ +import _plotly_utils.basevalidators + + +class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): + def __init__(self, plotly_name="visible", parent_name="treemap.pathbar", **kwargs): + super(VisibleValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="thickness", parent_name="treemap.pathbar", **kwargs + ): + super(ThicknessValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 12), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): + def __init__(self, plotly_name="textfont", parent_name="treemap.pathbar", **kwargs): + super(TextfontValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + data_class_str=kwargs.pop("data_class_str", "Textfont"), + data_docs=kwargs.pop( + "data_docs", + """ + color + + colorsrc + Sets the source reference on plot.ly for color + . + family + HTML font family - the typeface that will be + applied by the web browser. The web browser + will only be able to apply a font if it is + available on the system which it operates. + Provide multiple font families, separated by + commas, to indicate the preference in which to + apply fonts if they aren't available on the + system. The plotly service (at https://plot.ly + or on-premise) generates images on a server, + where only a select number of fonts are + installed and supported. These include "Arial", + "Balto", "Courier New", "Droid Sans",, "Droid + Serif", "Droid Sans Mono", "Gravitas One", "Old + Standard TT", "Open Sans", "Overpass", "PT Sans + Narrow", "Raleway", "Times New Roman". + familysrc + Sets the source reference on plot.ly for + family . + size + + sizesrc + Sets the source reference on plot.ly for size + . +""", + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="side", parent_name="treemap.pathbar", **kwargs): + super(SideValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop("values", ["top", "bottom"]), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class EdgeshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__( + self, plotly_name="edgeshape", parent_name="treemap.pathbar", **kwargs + ): + super(EdgeshapeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + values=kwargs.pop("values", [">", "<", "|", "/", "\\"]), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py new file mode 100644 index 00000000000..c1a2f4aa1db --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/__init__.py @@ -0,0 +1,100 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="sizesrc", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="size", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__( + self, plotly_name="family", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__( + self, plotly_name="color", parent_name="treemap.pathbar.textfont", **kwargs + ): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/stream/__init__.py b/packages/python/plotly/plotly/validators/treemap/stream/__init__.py new file mode 100644 index 00000000000..7600084f8ed --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/stream/__init__.py @@ -0,0 +1,30 @@ +import _plotly_utils.basevalidators + + +class TokenValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="token", parent_name="treemap.stream", **kwargs): + super(TokenValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "info"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="maxpoints", parent_name="treemap.stream", **kwargs): + super(MaxpointsValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "calc"), + max=kwargs.pop("max", 10000), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py b/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py new file mode 100644 index 00000000000..addb37947b9 --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/textfont/__init__.py @@ -0,0 +1,92 @@ +import _plotly_utils.basevalidators + + +class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__(self, plotly_name="sizesrc", parent_name="treemap.textfont", **kwargs): + super(SizesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class SizeValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="size", parent_name="treemap.textfont", **kwargs): + super(SizeValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="familysrc", parent_name="treemap.textfont", **kwargs + ): + super(FamilysrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FamilyValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="family", parent_name="treemap.textfont", **kwargs): + super(FamilyValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + no_blank=kwargs.pop("no_blank", True), + role=kwargs.pop("role", "style"), + strict=kwargs.pop("strict", True), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="colorsrc", parent_name="treemap.textfont", **kwargs + ): + super(ColorsrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class ColorValidator(_plotly_utils.basevalidators.ColorValidator): + def __init__(self, plotly_name="color", parent_name="treemap.textfont", **kwargs): + super(ColorValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "style"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py b/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py new file mode 100644 index 00000000000..cb7dba4fc0e --- /dev/null +++ b/packages/python/plotly/plotly/validators/treemap/tiling/__init__.py @@ -0,0 +1,63 @@ +import _plotly_utils.basevalidators + + +class SquarifyratioValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__( + self, plotly_name="squarifyratio", parent_name="treemap.tiling", **kwargs + ): + super(SquarifyratioValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 1), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class PadValidator(_plotly_utils.basevalidators.NumberValidator): + def __init__(self, plotly_name="pad", parent_name="treemap.tiling", **kwargs): + super(PadValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + min=kwargs.pop("min", 0), + role=kwargs.pop("role", "style"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class PackingValidator(_plotly_utils.basevalidators.EnumeratedValidator): + def __init__(self, plotly_name="packing", parent_name="treemap.tiling", **kwargs): + super(PackingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + values=kwargs.pop( + "values", + ["squarify", "binary", "dice", "slice", "slice-dice", "dice-slice"], + ), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class FlipValidator(_plotly_utils.basevalidators.FlaglistValidator): + def __init__(self, plotly_name="flip", parent_name="treemap.tiling", **kwargs): + super(FlipValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "plot"), + flags=kwargs.pop("flags", ["x", "y"]), + role=kwargs.pop("role", "info"), + **kwargs + ) diff --git a/packages/python/plotly/plotly/validators/waterfall/__init__.py b/packages/python/plotly/plotly/validators/waterfall/__init__.py index de88bb27095..d908784c43a 100644 --- a/packages/python/plotly/plotly/validators/waterfall/__init__.py +++ b/packages/python/plotly/plotly/validators/waterfall/__init__.py @@ -209,6 +209,37 @@ def __init__(self, plotly_name="totals", parent_name="waterfall", **kwargs): import _plotly_utils.basevalidators +class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): + def __init__( + self, plotly_name="texttemplatesrc", parent_name="waterfall", **kwargs + ): + super(TexttemplatesrcValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + edit_type=kwargs.pop("edit_type", "none"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + +class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): + def __init__(self, plotly_name="texttemplate", parent_name="waterfall", **kwargs): + super(TexttemplateValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + array_ok=kwargs.pop("array_ok", True), + edit_type=kwargs.pop("edit_type", "plot"), + role=kwargs.pop("role", "info"), + **kwargs + ) + + +import _plotly_utils.basevalidators + + class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="waterfall", **kwargs): super(TextsrcValidator, self).__init__( diff --git a/packages/python/plotly/plotlywidget/static/index.js b/packages/python/plotly/plotlywidget/static/index.js index ceea30dfc82..0c2feb9d6ac 100644 --- a/packages/python/plotly/plotlywidget/static/index.js +++ b/packages/python/plotly/plotlywidget/static/index.js @@ -12569,7 +12569,7 @@ module.exports = function identity(d) { return d; }; /* 19 */ /***/ (function(module, exports) { -module.exports = {"name":"plotlywidget","version":"1.1.0","description":"The plotly JupyterLab extension","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js","style/*.*"],"scripts":{"build":"npm run build:src","build:src":"rimraf dist && tsc","clean":"rimraf dist/ && rimraf ../../python/plotly/plotlywidget/static'","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0","typescript":"~3.1.1"},"dependencies":{"plotly.js":"^1.49.1","@jupyter-widgets/base":"^2.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin.js"}} +module.exports = {"name":"plotlywidget","version":"1.2.0","description":"The plotly JupyterLab extension","author":"The plotly.py team","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"https://github.com/plotly/plotly.py"},"keywords":["jupyter","widgets","ipython","ipywidgets","plotly"],"files":["src/**/*.js","dist/*.js","style/*.*"],"scripts":{"build":"npm run build:src","build:src":"rimraf dist && tsc","clean":"rimraf dist/ && rimraf ../../python/plotly/plotlywidget/static'","prepublish":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"webpack":"^3.10.0","rimraf":"^2.6.1","ify-loader":"^1.1.0","typescript":"~3.1.1"},"dependencies":{"plotly.js":"^1.50.1","@jupyter-widgets/base":"^2.0.0","lodash":"^4.17.4"},"jupyterlab":{"extension":"src/jupyterlab-plugin.js"}} /***/ }), /* 20 */ @@ -31548,12 +31548,12 @@ module.exports = function(module) { /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var require;var require;/** -* plotly.js v1.49.1 +* plotly.js v1.50.1 * Copyright 2012-2019, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ -!function(t){if(true)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=t()}}(function(){return function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return require(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return i(e[o][1][t]||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},{"../src/lib":719}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1265}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":864}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":876}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":886}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":591}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":895}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":914}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":928}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":935}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":941}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":956}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":967}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":697}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":977}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1266}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":987}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":996}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1267}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1009}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1018}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1030}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1036}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1040}],25:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./pie"),t("./sunburst"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./indicator":26,"./isosurface":27,"./mesh3d":28,"./ohlc":29,"./parcats":30,"./parcoords":31,"./pie":32,"./pointcloud":33,"./sankey":34,"./scatter3d":35,"./scattercarpet":36,"./scattergeo":37,"./scattergl":38,"./scattermapbox":39,"./scatterpolar":40,"./scatterpolargl":41,"./scatterternary":42,"./sort":43,"./splom":44,"./streamtube":45,"./sunburst":46,"./surface":47,"./table":48,"./violin":49,"./volume":50,"./waterfall":51}],26:[function(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1046}],27:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1052}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1057}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1062}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1071}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1081}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1092}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1101}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1107}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1143}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1149}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1156}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1167}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1176}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1183}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1189}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1196}],43:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1269}],44:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1205}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1213}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1219}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1228}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1236}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1244}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1252}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1260}],52:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),h=i(),f=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),new o({turntable:u,orbit:h,matrix:f},c)};var n=t("turntable-camera-controller"),i=t("orbit-camera-controller"),a=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n1||i>1)}function E(t,e,r){return t.sort(L),t.forEach(function(n,i){var a,o,s=0;if(Y(n,r)&&S(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}}),t}function C(t,r,i,a){var o=e.min(t.links,function(t){return t.source.y0});t.links.forEach(function(t){t.circular&&(t.circularPathData={})}),E(t.links.filter(function(t){return"top"==t.circularLinkType}),r,a),E(t.links.filter(function(t){return"bottom"==t.circularLinkType}),r,a),t.links.forEach(function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+w,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,Y(e,a)&&S(e))e.circularPathData.leftSmallArcRadius=w+e.width/2,e.circularPathData.leftLargeArcRadius=w+e.width/2,e.circularPathData.rightSmallArcRadius=w+e.width/2,e.circularPathData.rightLargeArcRadius=w+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter(function(t){return t.source.column==s&&t.circularLinkType==l});"bottom"==e.circularLinkType?c.sort(O):c.sort(P);var u=0;c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=w+e.width/2+u,e.circularPathData.leftLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),s=e.target.column,c=t.links.filter(function(t){return t.target.column==s&&t.circularLinkType==l}),"bottom"==e.circularLinkType?c.sort(I):c.sort(z),u=0,c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=w+e.width/2+u,e.circularPathData.rightLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(i,e.source.y1,e.target.y1)+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){var e="";e="top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY;return e}(e);else{var h=n.linkHorizontal().source(function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]}).target(function(t){return[t.target.x0,t.y1]});e.path=h(e)}})}function L(t,e){return D(t)==D(e)?"bottom"==t.circularLinkType?O(t,e):P(t,e):D(e)-D(t)}function P(t,e){return t.y0-e.y0}function O(t,e){return e.y0-t.y0}function z(t,e){return t.y1-e.y1}function I(t,e){return e.y1-t.y1}function D(t){return t.target.column-t.source.column}function R(t){return t.target.x0-t.source.x1}function F(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1+n:t.y1-n}function B(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1-n:t.y1+n}function N(t,e,r,n){t.links.forEach(function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach(function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=h*i.y0+f*i.y0+p*i.y1+d*i.y1,v=g-i.width/2,m=g+i.width/2;v>o.y0&&vo.y0&&mo.y1&&U(t,c,e,r)})):vo.y1&&(c=m-o.y0+10,o=U(o,c,e,r),t.nodes.forEach(function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&U(t,c,e,r)}))}})}})}function j(t,e){return t.y0>e.y0&&t.y0e.y0&&t.y1e.y1)}function U(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach(function(t){t.y1=t.y1+e}),t.sourceLinks.forEach(function(t){t.y0=t.y0+e})),t}function V(t,e,r,n){t.nodes.forEach(function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter(function(t){return b(t.source,r)==b(i,r)}),o=a.length;o>1&&a.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!H(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=B(e,t);return t.y1-r}if(e.target.column>t.target.column)return B(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0});var s=i.y0;a.forEach(function(t){t.y0=s+t.width/2,s+=t.width}),a.forEach(function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!H(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function Y(t,e){return b(t.source,e)==b(t.target,e)}t.sankeyCircular=function(){var t,n,a=0,b=0,A=1,S=1,E=24,L=v,P=o,O=m,z=y,I=32,D=2,R=null;function F(){var o={nodes:O.apply(null,arguments),links:z.apply(null,arguments)};!function(t){t.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var e=r.map(t.nodes,L);t.links.forEach(function(t,r){t.index=r;var n=t.source,i=t.target;"object"!==("undefined"==typeof n?"undefined":l(n))&&(n=t.source=x(e,n)),"object"!==("undefined"==typeof i?"undefined":l(i))&&(i=t.target=x(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)})}(o),function(t,e,r){var n=0;if(null===r){for(var a=[],o=0;o0?r+_+w:r,bottom:n=n>0?n+_+w:n,left:a=a>0?a+_+w:a,right:i=i>0?i+_+w:i}}(i),u=function(t,r){var n=e.max(t.nodes,function(t){return t.column}),i=A-a,o=S-b,s=i+r.right+r.left,l=o+r.top+r.bottom,c=i/s,u=o/l;return a=a*c+r.left,A=0==r.right?A:A*c,b=b*u+r.top,S*=u,t.nodes.forEach(function(t){t.x0=a+t.column*((A-a-E)/n),t.x1=t.x0+E}),u}(i,c);s*=u,i.links.forEach(function(t){t.width=t.value*s}),l.forEach(function(t){var e=t.length;t.forEach(function(t,n){t.depth==l.length-1&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):0==t.depth&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):t.partOfCycle?0==M(t,r)?(t.y0=S/2+n,t.y1=t.y0+t.value*s):"top"==t.circularLinkType?(t.y0=b+n,t.y1=t.y0+t.value*s):(t.y0=S-t.value*s-n,t.y1=t.y0+t.value*s):0==c.top||0==c.bottom?(t.y0=(S-b)/e*n,t.y1=t.y0+t.value*s):(t.y0=(S-b)/2-e/2+n,t.y1=t.y0+t.value*s)})})})(s),m();for(var c=1,u=o;u>0;--u)v(c*=.99,s),m();function v(t,r){var n=l.length;l.forEach(function(i){var a=i.length,o=i[0].depth;i.forEach(function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&M(i,r)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=S/2-s/2,i.y1=S/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=S/2-s/2,i.y1=S/2+s/2;else{var l=e.mean(i.sourceLinks,g),c=e.mean(i.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(i))*t;i.y0+=u,i.y1+=u}})})}function m(){l.forEach(function(e){var r,n,i,a=b,o=e.length;for(e.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+t;if((n=a-t-S)>0)for(a=r.y0-=n,r.y1-=n,i=o-2;i>=0;--i)r=e[i],(n=r.y1+t-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0})}}(o,I,L),B(o);for(var s=0;s<4;s++)V(o,S,L),q(o,0,L),N(o,b,S,L),V(o,S,L),q(o,0,L);return function(t,r,n){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach(function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)}),0==o||0==s){var l=e.min(i,function(t){return t.y0}),c=e.max(i,function(t){return t.y1}),u=c-l,h=n-r,f=h/u;i.forEach(function(t){var e=(t.y1-t.y0)*f;t.y0=(t.y0-l)*f,t.y1=t.y0+e}),a.forEach(function(t){t.y0=(t.y0-l)*f,t.y1=(t.y1-l)*f,t.width=t.width*f})}}(o,b,S),C(o,D,S,L),o}function B(t){t.nodes.forEach(function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)}),t.nodes.forEach(function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach(function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}return F.nodeId=function(t){return arguments.length?(L="function"==typeof t?t:s(t),F):L},F.nodeAlign=function(t){return arguments.length?(P="function"==typeof t?t:s(t),F):P},F.nodeWidth=function(t){return arguments.length?(E=+t,F):E},F.nodePadding=function(e){return arguments.length?(t=+e,F):t},F.nodes=function(t){return arguments.length?(O="function"==typeof t?t:s(t),F):O},F.links=function(t){return arguments.length?(z="function"==typeof t?t:s(t),F):z},F.size=function(t){return arguments.length?(a=b=0,A=+t[0],S=+t[1],F):[A-a,S-b]},F.extent=function(t){return arguments.length?(a=+t[0][0],A=+t[1][0],b=+t[0][1],S=+t[1][1],F):[[a,b],[A,S]]},F.iterations=function(t){return arguments.length?(I=+t,F):I},F.circularLinkGap=function(t){return arguments.length?(D=+t,F):D},F.nodePaddingRatio=function(t){return arguments.length?(n=+t,F):n},F.sortNodes=function(t){return arguments.length?(R=t,F):R},F.update=function(t){return T(t,L),B(t),t.links.forEach(function(t){t.circular&&(t.circularLinkType=t.y0+t.y1a&&(b=a);var o=e.min(i,function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)});i.forEach(function(t){t.forEach(function(t,e){t.y1=(t.y0=e)+t.value*o})}),t.links.forEach(function(t){t.width=t.value*o})})(),d();for(var a=1,o=A;o>0;--o)l(a*=.99),d(),s(a),d();function s(t){i.forEach(function(r){r.forEach(function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,f)/e.sum(r.targetLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function l(t){i.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function d(){i.forEach(function(t){var e,r,i,a=n,o=t.length;for(t.sort(c),i=0;i0&&(e.y0+=r,e.y1+=r),a=e.y1+b;if((r=a-b-y)>0)for(a=e.y0-=r,e.y1-=r,i=o-2;i>=0;--i)e=t[i],(r=e.y1+b-a)>0&&(e.y0-=r,e.y1-=r),a=e.y0})}}(a),E(a),a}function E(t){t.nodes.forEach(function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)}),t.nodes.forEach(function(t){var e=t.y0,r=e;t.sourceLinks.forEach(function(t){t.y0=e+t.width/2,e+=t.width}),t.targetLinks.forEach(function(t){t.y1=r+t.width/2,r+=t.width})})}return S.update=function(t){return E(t),t},S.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),S):_},S.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),S):w},S.nodeWidth=function(t){return arguments.length?(x=+t,S):x},S.nodePadding=function(t){return arguments.length?(b=+t,S):b},S.nodes=function(t){return arguments.length?(k="function"==typeof t?t:o(t),S):k},S.links=function(t){return arguments.length?(T="function"==typeof t?t:o(t),S):T},S.size=function(e){return arguments.length?(t=n=0,i=+e[0],y=+e[1],S):[i-t,y-n]},S.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],y=+e[1][1],S):[[t,n],[i,y]]},S.iterations=function(t){return arguments.length?(A=+t,S):A},S},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,i)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=a,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?i(r,t("d3-array"),t("d3-collection"),t("d3-shape")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{"d3-array":152,"d3-collection":153,"d3-shape":161}],55:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/meta"),i=6378137;function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=h,r.lengthToRadians=f,r.lengthToDegrees=function(t,e){return p(f(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return h(f(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var a=r.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!d(t))throw new Error("bbox must only contain numbers")})},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],58:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,c,u,h,f=0,p=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;yc||p>u||d>h)return l=i,c=r,u=p,h=d,void(o=0);var g=n.lineString([l,i],t.properties);if(!1===e(g,r,a,d,o))return!1;o++,l=i})&&void 0}}})}function u(t,e){if(!t)throw new Error("geojson is required");l(t,function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=t[o]),t[o]=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!x(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&m(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&_(i,r)||s)&&m(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}f.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(v((e=this).actual),128)+" "+e.operator+" "+g(v(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,a=d(r),o=i.indexOf("\n"+a);if(o>=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(t,e,r){t!=e&&m(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){x(t,e,!1)||m(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){x(t,e,!0)||m(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){x(t,e,!1)&&m(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){w(!0,t,e,r)},f.doesNotThrow=function(t,e,r){w(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n(function t(e,r){e||m(e,!0,r,"==",t)},f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":454,"util/":71}],69:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],70:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],71:[function(t,e,r){(function(e,n){var i=/%[sdj%]/g;r.format=function(t){if(!m(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(e);if(0===o.length){if(k(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return h(e)}var c,b="",T=!1,A=["{","}"];(p(e)&&(T=!0,A=["[","]"]),k(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return x(e)&&(b=" "+RegExp.prototype.toString.call(e)),_(e)&&(b=" "+Date.prototype.toUTCString.call(e)),w(e)&&(b=" "+h(e)),0!==o.length||T&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=T?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,A)):A[0]+b+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function _(t){return b(t)&&"[object Date]"===T(t)}function w(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function k(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=v,r.isString=m,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t},r.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":70,_process:482,inherits:69}],72:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],73:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o0?n-4:n,h=0;h>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===o&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,s[l++]=255&e);1===o&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;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},{}],75:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{"./lib/rationalize":85}],76:[function(t,e,r){"use strict";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],77:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{"./lib/rationalize":85}],78:[function(t,e,r){"use strict";var n=t("./is-rat"),i=t("./lib/is-bn"),a=t("./lib/num-to-bn"),o=t("./lib/str-to-bn"),s=t("./lib/rationalize"),l=t("./div");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,h;if(i(e))u=e.clone();else if("string"==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=a(e)}}if(n(r))u.mul(r[1]),h=r[0].clone();else if(i(r))h=r.clone();else if("string"==typeof r)h=o(r);else if(r)if(r===Math.floor(r))h=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;h=a(r)}else h=a(1);c>0?u=u.ushln(c):c<0&&(h=h.ushln(-c));return s(u,h)}},{"./div":77,"./is-rat":79,"./lib/is-bn":83,"./lib/num-to-bn":84,"./lib/rationalize":85,"./lib/str-to-bn":86}],79:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":83}],80:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":94}],81:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20)return 52;return r+32}},{"bit-twiddle":92,"double-bits":167}],83:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":94}],84:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("double-bits");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":94,"double-bits":167}],85:[function(t,e,r){"use strict";var n=t("./num-to-bn"),i=t("./bn-sign");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{"./bn-sign":80,"./num-to-bn":84}],86:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":94}],87:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":85}],88:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":80}],89:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":85}],90:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),i=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,h=n(l.ushln(u).divRound(r));return c*(s+h*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{"./lib/bn-to-num":81,"./lib/ctz":82}],91:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],92:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],93:[function(t,e,r){"use strict";var n=t("clamp");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,h,f,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(h=(f=t).getContext("2d"),r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t.canvas,h=t,r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=u[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n("undefined"!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,T=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],O=8191&P,z=P>>>13,I=0|o[8],D=8191&I,R=I>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ht=8191&ut,ft=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(f,U)|0))<<13)|0;c=((a=Math.imul(f,V))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(g,U)|0,a=Math.imul(g,V);var mt=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,H)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(f,W)|0))<<13)|0;c=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,V))+Math.imul(T,U)|0,a=Math.imul(T,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,K)|0;var bt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,H)|0,a=a+Math.imul(T,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(h,at)|0)|0)+((8191&(i=(i=i+Math.imul(h,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(z,U)|0,a=Math.imul(z,V),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,K)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(h,lt)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,W)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(m,at)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Tt=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(z,W)|0,a=a+Math.imul(z,X)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,a=a+Math.imul(g,ft)|0;var At=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(y,ht)|0,a=a+Math.imul(y,ft)|0;var Mt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,W),i=(i=Math.imul(B,X))+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,a=a+Math.imul(_,ft)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((a=a+Math.imul(y,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,K))+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(z,rt)|0,a=a+Math.imul(z,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ft)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(S,ht)|0,a=a+Math.imul(S,ft)|0;var Ct=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ft)|0;var Lt=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(z,ht)|0,a=a+Math.imul(z,ft)|0;var Pt=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((a=a+Math.imul(L,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ht)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ht)|0,a=a+Math.imul(R,ft)|0;var Ot=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(z,dt)|0))<<13)|0;c=((a=a+Math.imul(z,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ht),i=(i=Math.imul(B,ft))+Math.imul(N,ht)|0,a=Math.imul(N,ft);var zt=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((a=a+Math.imul(R,gt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863;var It=(c+(n=Math.imul(B,dt))|0)+((8191&(i=(i=Math.imul(B,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((a=Math.imul(N,gt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Tt,l[9]=At,l[10]=Mt,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=Pt,l[16]=Ot,l[17]=zt,l[18]=It,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-a|h>>>a,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(y,m),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return v[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof e||e,this)},{buffer:103}],95:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(u<=0)){var h,f=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,f,p))>0){if(1===u&&n)a.init(s),h=a.sweepComplete(u,r,0,s,f,p,0,s,f,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))>0&&(a.init(s+c),h=1===u?a.sweepBipartite(u,r,0,s,f,p,0,c,d,g):o(u,r,n,s,f,p,c,d,g),i.free(d),i.free(g))}i.free(f),i.free(p)}return h}}}function u(t,e){n.push([t,e])}},{"./lib/intersect":98,"./lib/sweep":102,"typedarray-pool":545}],97:[function(t,e,r){"use strict";var n="d",i="ax",a="vv",o="fp",s="es",l="rs",c="re",u="rb",h="ri",f="rp",p="bs",d="be",g="bb",v="bi",m="bp",y="rv",x="Q",b=[n,i,a,l,c,u,h,p,d,g,v];function _(t){var e="bruteForce"+(t?"Full":"Partial"),r=[],_=b.slice();t||_.splice(3,0,o);var w=["function "+e+"("+_.join()+"){"];function k(e,o){var _=function(t,e,r){var o="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),_=["function ",o,"(",b.join(),"){","var ",s,"=2*",n,";"],w="for(var i="+l+","+f+"="+s+"*"+l+";i<"+c+";++i,"+f+"+="+s+"){var x0="+u+"["+i+"+"+f+"],x1="+u+"["+i+"+"+f+"+"+n+"],xi="+h+"[i];",k="for(var j="+p+","+m+"="+s+"*"+p+";j<"+d+";++j,"+m+"+="+s+"){var y0="+g+"["+i+"+"+m+"],"+(r?"y1="+g+"["+i+"+"+m+"+"+n+"],":"")+"yi="+v+"[j];";return t?_.push(w,x,":",k):_.push(k,x,":",w),r?_.push("if(y1"+d+"-"+p+"){"),t?(k(!0,!1),w.push("}else{"),k(!1,!1)):(w.push("if("+o+"){"),k(!0,!0),w.push("}else{"),k(!0,!1),w.push("}}else{if("+o+"){"),k(!1,!0),w.push("}else{"),k(!1,!1),w.push("}")),w.push("}}return "+e);var T=r.join("")+w.join("");return new Function(T)()}r.partial=_(!1),r.full=_(!0)},{}],98:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,u,S,E,C,L){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length0;){var I=(O-=1)*b,D=w[I],R=w[I+1],F=w[I+2],B=w[I+3],N=w[I+4],j=w[I+5],U=O*_,V=k[U],q=k[U+1],H=1&j,G=!!(16&j),Y=u,W=S,X=C,Z=L;if(H&&(Y=C,W=L,X=u,Z=S),!(2&j&&(F=v(t,D,R,F,Y,W,q),R>=F)||4&j&&(R=m(t,D,R,F,Y,W,V))>=F)){var J=F-R,K=N-B;if(G){if(t*J*(J+K)=p0)&&!(p1>=hi)",["p0","p1"]),g=u("lo===p0",["p0"]),v=u("lo>>1,f=2*t,p=h,d=s[f*h+e];for(;c=x?(p=y,d=x):m>=_?(p=v,d=m):(p=b,d=_):x>=_?(p=y,d=x):_>=m?(p=v,d=m):(p=b,d=_);for(var w=f*(u-1),k=f*p,T=0;Tr&&i[h+e]>c;--u,h-=o){for(var f=h,p=h+o,d=0;d=0&&i.push("lo=e[k+n]");t.indexOf("hi")>=0&&i.push("hi=e[k+o]");return r.push(n.replace("_",i.join()).replace("$",t)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],101:[function(t,e,r){"use strict";e.exports=function(t,e){e<=4*n?i(0,e-1,t):function t(e,r,h){var f=(r-e+1)/6|0,p=e+f,d=r-f,g=e+r>>1,v=g-f,m=g+f,y=p,x=v,b=g,_=m,w=d,k=e+1,T=r-1,A=0;c(y,x,h)&&(A=y,y=x,x=A);c(_,w,h)&&(A=_,_=w,w=A);c(y,b,h)&&(A=y,y=b,b=A);c(x,b,h)&&(A=x,x=b,b=A);c(y,_,h)&&(A=y,y=_,_=A);c(b,_,h)&&(A=b,b=_,_=A);c(x,w,h)&&(A=x,x=w,w=A);c(x,b,h)&&(A=x,x=b,b=A);c(_,w,h)&&(A=_,_=w,w=A);var M=h[2*x];var S=h[2*x+1];var E=h[2*_];var C=h[2*_+1];var L=2*y;var P=2*b;var O=2*w;var z=2*p;var I=2*g;var D=2*d;for(var R=0;R<2;++R){var F=h[L+R],B=h[P+R],N=h[O+R];h[z+R]=F,h[I+R]=B,h[D+R]=N}o(v,e,h);o(m,r,h);for(var j=k;j<=T;++j)if(u(j,M,S,h))j!==k&&a(j,k,h),++k;else if(!u(j,E,C,h))for(;;){if(u(T,E,C,h)){u(T,M,S,h)?(s(j,k,T,h),++k,--T):(a(j,T,h),--T);break}if(--Tt;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function u(t,e,r,n){var i=n[t*=2];return i>>1;a(p,S);for(var E=0,C=0,k=0;k=o)d(c,u,C--,L=L-o|0);else if(L>=0)d(s,l,E--,L);else if(L<=-o){L=-L-o|0;for(var P=0;P>>1;a(p,E);for(var C=0,L=0,P=0,T=0;T>1==p[2*T+3]>>1&&(z=2,T+=1),O<0){for(var I=-(O>>1)-1,D=0;D>1)-1;0===z?d(s,l,C--,I):1===z?d(c,u,L--,I):2===z&&d(h,f,P--,I)}}},scanBipartite:function(t,e,r,n,i,c,u,h,f,v,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,T=1;n?T=o:k=o;for(var A=i;A>>1;a(p,C);for(var L=0,A=0;A=o?(O=!n,M-=o):(O=!!n,M-=1),O)g(s,l,L++,M);else{var z=y[M],I=b*M,D=m[I+e+1],R=m[I+e+1+t];t:for(var F=0;F>>1;a(p,k);for(var T=0,x=0;x=o)s[T++]=b-o;else{var M=d[b-=1],S=v*b,E=f[S+e+1],C=f[S+e+1+t];t:for(var L=0;L=0;--L)if(s[L]===b){for(var I=L+1;I0&&s.length>a){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled "error" event. ('+e+")");throw l.context=e,l}if(!(r=o[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=v(t,n),a=0;a=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],105:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(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 c(t)}return s(t,e,r)}function s(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|f(t,r),i=o(n),a=i.write(t,r);a!==n&&(i=i.slice(0,a));return i}(t,r);if(ArrayBuffer.isView(t))return u(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(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function f(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(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 n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var a=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(a)return i?-1:R(t).length;r=(""+r).toLowerCase(),a=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,r,n,i,a){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),j(n=+n)&&(n=a?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(a)return-1;n=t.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:g(t,r,n,i,a);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):g(t,[r],n,i,a);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 h=!0,f=0;fi&&(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,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(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+h<=r)switch(h){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,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.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 S(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},e.prototype.compare=function(t,r,n,i,a){if(N(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(this===t)return 0;for(var o=(a>>>=0)-(i>>>=0),s=(n>>>=0)-(r>>>=0),l=Math.min(o,s),c=this.slice(i,a),u=t.slice(r,n),h=0;h>>=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 v(this,t,e,r);case"utf8":case"utf-8":return m(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}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function A(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,r,n,i,a,o){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>a||rt.length)throw new RangeError("Index out of range")}function P(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 O(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,a){return e=+e,r>>>=0,a||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(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},e.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.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},e.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return a},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var a=t.charCodeAt(0);("utf8"===i&&a<128||"latin1"===i)&&(t=a)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=r;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 F(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":74,buffer:105,ieee754:412}],106:[function(t,e,r){"use strict";var n=t("./lib/monotone"),i=t("./lib/triangulation"),a=t("./lib/delaunay"),o=t("./lib/filter");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,"delaunay",!0),h=!!c(r,"interior",!0),f=!!c(r,"exterior",!0),p=!!c(r,"infinity",!1);if(!h&&!f||0===t.length)return[];var d=n(t,e);if(u||h!==f||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v0;){for(var u=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],d=1;d=0||(e.flip(s,u),i(t,e,r,h,s,f),i(t,e,r,s,f,h),i(t,e,r,f,u,h),i(t,e,r,u,h,f)))}}},{"binary-search-bounds":111,"robust-in-sphere":508}],108:[function(t,e,r){"use strict";var n,i=t("binary-search-bounds");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d<3;++d){var g=f[3*p+d];g>=0&&0===c[g]&&(h[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var v=l;l=s,s=v,l.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i1&&i(r[f[p-2]],r[f[p-1]],a)>0;)t.push([f[p-1],f[p-2],o]),p-=1;f.length=p,f.push(o);var d=u.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]m[0]&&i.push(new c(m,v,s,h),new c(v,m,o,h))}i.sort(u);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],h=0,_=i.length;h<_;++h){var w=i[h],k=w.type;k===a?f(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{"binary-search-bounds":111,"robust-orientation":510}],110:[function(t,e,r){"use strict";var n=t("binary-search-bounds");function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],112:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1,r=1;rr?r:t:te?e:t}},{}],116:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;ae[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var T=b;b=_,_=T}x[0]=b;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?e.push([M,E,A]):e.push([M,E]),M=E}i?e.push([M,_,A]):e.push([M,_])}return f}(t,e,f,v,r));return m(e,y,r),!!y||(f.length>0||v.length>0)}},{"./lib/rat-seg-intersect":117,"big-rat":78,"big-rat/cmp":76,"big-rat/to-float":90,"box-intersect":96,nextafter:451,"rat-vec":486,"robust-segment-intersect":513,"union-find":546}],117:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=s(e,t),h=s(n,r),f=u(a,h);if(0===o(f))return null;var p=s(t,r),d=u(h,p),g=i(d,f),v=c(a,g);return l(t,v)};var n=t("big-rat/mul"),i=t("big-rat/div"),a=t("big-rat/sub"),o=t("big-rat/sign"),s=t("rat-vec/sub"),l=t("rat-vec/add"),c=t("rat-vec/muls");function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":77,"big-rat/mul":87,"big-rat/sign":88,"big-rat/sub":89,"rat-vec/add":485,"rat-vec/muls":487,"rat-vec/sub":488}],118:[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:115}],119:[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]}},{}],120:[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:115,"color-rgba":122,dtype:169}],121:[function(t,e,r){(function(r){"use strict";var n=t("color-name"),i=t("is-plain-obj"),a=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),h=u.length,f=h<=4;c=1,f?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var p=e[1],d="rgb"===p,u=p.replace(/a$/,"");s=u;var h="cmyk"===u?4:"gray"===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:"rgb"===u?255*parseFloat(t)/100:parseFloat(t);if("h"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&&l.push(1),c=d?1:void 0===l[h]?1:l[h],l=l.slice(0,h)}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 g=a(t.r,t.red,t.R,null);null!==g?(s="rgb",l=[g,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s="hsl",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":119,defined:164,"is-plain-obj":422}],122:[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:115,"color-parse":121,"color-space/hsl":123}],123:[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":124}],124:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],125:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],126:[function(t,e,r){"use strict";var n=t("./colorScale"),i=t("lerp");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,l,c,u,h,f,p,d,g;t||(t={});p=(t.nshades||72)-1,f=t.format||"hex",(h=t.colormap)||(h="jet");if("string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>p+1)throw new Error(h+" map requires nshades to be at least size "+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),m=[];for(g=0;g0?-1:l(t,e,a)?-1:1:0===s?c>0?1:l(t,e,r)?1:-1:i(c-s)}var f=n(t,e,r);if(f>0)return o>0&&n(t,e,a)>0?1:-1;if(f<0)return o>0||n(t,e,a)>0?1:-1;var p=n(t,e,a);return p>0?1:l(t,e,r)?1:-1};var n=t("robust-orientation"),i=t("signum"),a=t("two-sum"),o=t("robust-product"),s=t("robust-sum");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},{"robust-orientation":510,"robust-product":511,"robust-sum":515,signum:516,"two-sum":544}],128:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],h=t[1],f=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return u+h+f+p-(d+g+v+m)||n(u,h,f,p)-n(d,g,v,m,d)||n(u+h,u+f,u+p,h+f,h+p,f+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(u+h+f,u+h+p,u+f+p,h+f+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],132:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(o,r)}};var n=t("incremental-convex-hull"),i=t("affine-hull")},{"affine-hull":62,"incremental-convex-hull":413}],134:[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"}},{}],135:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],136:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],137:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],138:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],139:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":141,"./stringify":142}],140:[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":135}],141:[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=f;var h=f.cache={};function f(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(h[t])return h[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return h[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=c(t,/\s+/);e=f.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach(function(t){r[t]=e}),h[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]):"/"===f[0]&&(f.shift(),r.lineHeight=p(f.shift())),!f.length)throw new Error("Missing required font-family.");return r.family=c(f.join(" "),/\s*,\s*/).map(n),h[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":140,"css-font-stretch-keywords":136,"css-font-style-keywords":137,"css-font-weight-keywords":138,"css-global-keywords":143,"css-system-font-keywords":144,"string-split-by":529,unquote:548}],142:[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},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},f="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function g(t){for(var e={},r=0;r=0;--p)a[p]=c*t[p]+u*e[p]+h*r[p]+f*n[p];return a}return c*t+u*e+h*r+f*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],146:[function(t,e,r){"use strict";var n=t("./lib/thunk.js");function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a0)throw new Error("cwise: pre() block may not reference array args");if(a0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(a),e.shimArgs.push("scalar"+a);else if("index"===o){if(e.indexArgs.push(a),a0)throw new Error("cwise: pre() block may not reference array index");if(a0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(a),ar.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,n(e)}},{"./lib/thunk.js":148}],147:[function(t,e,r){"use strict";var n=t("uniq");function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,h=0;for(n=0;n0&&l.push("var "+c.join(",")),n=a-1;n>=0;--n)u=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l0&&m.push("var "+y.join(",")),l=0;l3&&m.push(a(t.pre,t,s));var k=a(t.body,t,s),T=function(t){for(var e=0,r=t[0].length;e0,c=[],u=0;u0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",e[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",e[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",e[u],"]=j",u].join(""));for(u=0;u3&&m.push(a(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+m.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",T,function(t){for(var e=new Array(t.length),r=!0,n=0;n0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}(s)].join("");return new Function(["function ",A,"(",v.join(","),"){",m.join("\n"),"} return ",A].join(""))()}},{uniq:547}],148:[function(t,e,r){"use strict";var n=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;ue?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>=m?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=m?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=m?i*=10:a>=y?i*=5:a>=x&&(i*=2),e=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 T(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=T(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;ah;)f.pop(),--p;var d,g=new Array(p+1);for(a=0;a<=p;++a)(d=g[a]=[]).x0=a>0?f[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=T,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,h,f=-1,p=n.length,d=l[i++],g=r(),v=a();++fl.length)return r;var i,a=c[n-1];return null!=e&&n>=l.length?i=r.entries():(i=[],r.each(function(e,r){i.push({key:r,values:t(e,n)})})),null!=a?i.sort(function(t,e){return a(t.key,e.key)}):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],154:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),u=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),h=new RegExp("^rgba\\("+[i,i,i,a]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,a]+"\\)$"),p=new RegExp("^hsl\\("+[a,o,o]+"\\)$"),d=new RegExp("^hsla\\("+[a,o,o,a]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var e;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?y(e[1],e[2],e[3],e[4]):(e=f.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?m(g[t]):"transparent"===t?new _(NaN,NaN,NaN,0):null}function m(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=v(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function k(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function T(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r0&&c<1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==i?1:i)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function M(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),e(A,T,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new _(M(t>=240?t-240:t+120,i,n),M(t,i,n),M(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,E=180/Math.PI,C=.96422,L=1,P=.82521,O=4/29,z=6/29,I=3*z*z,D=z*z*z;function R(t){if(t instanceof B)return new B(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new B(t.l,0,0,t.opacity);var e=t.h*S;return new B(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,i=V(t.r),a=V(t.g),o=V(t.b),s=N((.2225045*i+.7168786*a+.0606169*o)/L);return i===a&&a===o?r=n=s:(r=N((.4360747*i+.3850649*a+.1430804*o)/C),n=N((.0139322*i+.0971045*a+.7141733*o)/P)),new B(116*s-16,500*(r-s),200*(s-n),t.opacity)}function F(t,e,r,n){return 1===arguments.length?R(t):new B(t,e,r,null==n?1:n)}function B(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t>D?Math.pow(t,1/3):t/I+O}function j(t){return t>z?t*t*t:I*(t-O)}function U(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function V(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof B||(t=R(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E;return new G(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(B,F,r(n,{brighter:function(t){return new B(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new B(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(U(3.1338561*(e=C*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=P*j(r))),U(-.9787684*e+1.9161415*t+.033454*r),U(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var Y=-.14861,W=1.78277,X=-.29227,Z=-.90649,J=1.97294,K=J*Z,$=J*W,Q=W*X-Z*Y;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(Q*n+K*e-$*r)/(Q+K-$),a=n-i,o=(J*(r-i)-X*a)/Z,s=Math.sqrt(o*o+a*a)/(J*i*(1-i)),l=s?Math.atan2(o,a)*E-120:NaN;return new et(l<0?l+360:l,s,i,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new _(255*(e+r*(Y*n+W*i)),255*(e+r*(X*n+Z*i)),255*(e+r*(J*n)),this.opacity)}})),t.color=v,t.rgb=b,t.hsl=T,t.lab=F,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new B(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],155:[function(t,e,r){var n;n=this,function(t){"use strict";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var r,n,i=new Array(r),a=0;af+c||np+c||au.index){var h=f-s.x-s.vx,v=p-s.y-s.vy,m=h*h+v*v;mt.r&&(t.r=t[e].r)}function f(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(t,r),e):f.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a=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),h=+t.value&&(u.value=t.value),f=[u];for(null==e&&(e=o);r=f.pop();)if(h&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)f.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;for(t=r.pop(),e=n.pop();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 h(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 k(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,f;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;sf&&(f=s),v=u*u*g,(p=Math.max(f/v,v/h))>d){u-=s;break}d=p}m.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,h=-1,f=o.length,p=t.value;++h1?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),h=c.x-t(c,u)/2,f=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-h)/(f-h)*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=A;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(E(t)).eachAfter(C(n,.5)).eachBefore(L(1)):i.eachBefore(E(S)).eachAfter(C(A,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(L(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=null==(r=e)?null:T(r),i):t;var r},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:M(+t),i):n},i},t.packSiblings=function(t){return k(t),t},t.packEnclose=h,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=T(e),r):t},r.parentId=function(t){return arguments.length?(e=T(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 q(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 q(n[i],i)),r.parent=e;return(o.parent=new q(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,h=i;i.eachBefore(function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)});var f=c===u?1:t(c,u)/2,p=f-c.x,d=e/(u.x+f+p),g=r/(h.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,h=s.m,f=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+h-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=h-u),a&&!N(l)&&(l.t=a,l.m+=c-f,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=A,o=A,s=A,l=A,c=A;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(h),i=[0],e&&t.eachBefore(P),t}function h(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,h=e.x1-r,f=e.y1-r;h=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}for(var h=c[e],f=n/2+h,p=e+1,d=r-1;p>>1;c[g]l-a){var y=(i*m+o*v)/n;t(e,p,v,i,a,y,l),t(p,r,m,y,a,o,l)}else{var x=(a*m+l*v)/n;t(e,p,v,i,a,o,x),t(p,r,m,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapSlice=H,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?H:O)(t,e,r,n,i)},t.treemapSquarify=W,t.treemapResquarify=X,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],158:[function(t,e,r){var n,i;n=this,i=function(t,e){"use strict";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=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 h(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:v(r,n)})),a=x.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:v(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:v(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:v(t,r)},{i:s-2,x:v(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r1e-6)if(Math.abs(h*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,v=p*p+d*d,m=Math.sqrt(g),y=Math.sqrt(f),x=a*Math.tan((e-Math.acos((g+f-v)/(2*m*y)))/2),b=x/y,_=x/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(r+b*h)),this._+="A"+a+","+a+",0,0,"+ +(h*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;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),h=t+c,f=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"+h+","+f:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+h+","+f),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=h)+","+(this._y1=f):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})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],160:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,h,f,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o,i=p,!(p=p[h=u<<1|c]))return i[h]=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[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=r>=(o=(v+y)/2))?v=o:y=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=p,i[h]=d,t}var r=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i};function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));for(ht||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),t>(i=r+l)||e>a);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(a=n+(l*=2),(r=i-l)>t||e>a);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),t>(i=r+l)||n>e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=a-(l*=2),(r=i-l)>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var i,a,o,s,l,c,u,h=this._x0,f=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,h,f,p,d)),null==n?n=1/0:(h=t-n,f=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(v=c.node)||(a=c.x0)>p||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=m)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_=(s=(d+v)/2))?d=s:v=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(r=e,f=h)}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[h]=i:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[f]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function v(t){return t.outerRadius}function m(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,s){var l=t-r,u=e-n,h=(s?a:-a)/c(l*l+u*u),f=h*u,p=-h*l,d=t+f,g=e+p,v=r+f,m=n+p,y=(d+v)/2,x=(g+m)/2,b=v-d,_=m-g,w=b*b+_*_,k=i-a,T=d*m-v*g,A=(_<0?-1:1)*c(o(0,k*k*w-T*T)),M=(T*_-b*A)/w,S=(-T*b-_*A)/w,E=(T*_+b*A)/w,C=(-T*b+_*A)/w,L=M-y,P=S-x,O=E-y,z=C-x;return L*L+P*P>O*O+z*z&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-p,x11:M*(i/k-1),y11:S*(i/k-1)}}function _(t){this._context=t}function w(t){return new _(t)}function k(t){return t[0]}function T(t){return t[1]}function A(){var t=k,n=T,i=r(!0),a=null,o=w,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=h;++l)!(l=h;--f)c.point(m[f],y[f]);c.lineEnd(),c.areaEnd()}v&&(m[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):m[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+""||null}function h(){return A().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 h().x(t).y(i)},u.lineY1=function(){return h().x(t).y(a)},u.lineX1=function(){return h().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 S(t,e){return et?1:e>=t?0:NaN}function E(t){return t}_.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=P(w);function L(t){this._curve=t}function P(t){function e(e){return new L(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(P(t)):e()._curve},t}function z(){return O(A().curve(C))}function I(){var t=M().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(P(t)):e()._curve},t}function D(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}L.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 R=Array.prototype.slice;function F(t){return t.source}function B(t){return t.target}function N(t){var n=F,i=B,a=k,o=T,s=null;function l(){var r,l=R.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 j(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function V(t,e,r,n,i){var a=D(e,r),o=D(e,r=(r+i)/2),s=D(n,r),l=D(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/h);t.moveTo(r,0),t.arc(0,0,r,0,p)}},H={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()}},G=Math.sqrt(1/3),Y=2*G,W={draw:function(t,e){var r=Math.sqrt(e/Y),n=r*G;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},X=Math.sin(h/10)/Math.sin(7*h/10),Z=Math.sin(p/10)*X,J=-Math.cos(p/10)*X,K={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=Z*r,i=J*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=p*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)}},Q=Math.sqrt(3),tt={draw:function(t,e){var r=-Math.sqrt(e/(3*Q));t.moveTo(0,2*r),t.lineTo(-Q*r,-r),t.lineTo(Q*r,-r),t.closePath()}},et=-.5,rt=Math.sqrt(3)/2,nt=1/Math.sqrt(12),it=3*(nt/2+1),at={draw:function(t,e){var r=Math.sqrt(e/it),n=r/2,i=r*nt,a=n,o=r*nt+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(et*n-rt*i,rt*n+et*i),t.lineTo(et*a-rt*o,rt*a+et*o),t.lineTo(et*s-rt*l,rt*s+et*l),t.lineTo(et*n+rt*i,et*i-rt*n),t.lineTo(et*a+rt*o,et*o-rt*a),t.lineTo(et*s+rt*l,et*l-rt*s),t.closePath()}},ot=[q,H,W,$,K,tt,at];function st(){}function lt(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 ct(t){this._context=t}function ut(t){this._context=t}function ht(t){this._context=t}function ft(t,e){this._basis=new ct(t),this._beta=e}ct.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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ut.prototype={areaStart:st,areaEnd:st,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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.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 pt=function t(e){function r(t){return 1===e?new ct(t):new ft(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function dt(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 gt(t,e){this._context=t,this._k=(1-e)/6}gt.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:dt(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:dt(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 gt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:st,areaEnd:st,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:dt(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 yt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function xt(t,e){this._context=t,this._k=(1-e)/6}xt.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:dt(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 bt=function t(e){function r(t){return new xt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _t(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>u){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>u){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function wt(t,e){this._context=t,this._alpha=e}wt.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:_t(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 wt(t,e):new gt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:st,areaEnd:st,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:_t(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 At=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 Mt(t,e){this._context=t,this._alpha=e}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._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:_t(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 St=function t(e){function r(t){return e?new Mt(t,e):new xt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Et(t){this._context=t}function Ct(t){return t<0?-1:1}function Lt(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 Pt(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 It(t){this._context=new Dt(t)}function Dt(t){this._context=t}function Rt(t){this._context=t}function Ft(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 Ut(t,e){return t[e]}function Vt(t){var e=t.map(qt);return jt(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 Ht(t){var e=t.map(Gt);return jt(t).sort(function(t,r){return e[t]-e[r]})}function Gt(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=v,_=r(0),w=null,k=m,T=y,A=x,M=null;function S(){var r,g,v,m=+t.apply(this,arguments),y=+o.apply(this,arguments),x=k.apply(this,arguments)-f,S=T.apply(this,arguments)-f,E=n(S-x),C=S>x;if(M||(M=r=e.path()),yu)if(E>p-u)M.moveTo(y*a(x),y*l(x)),M.arc(0,0,y,x,S,!C),m>u&&(M.moveTo(m*a(S),m*l(S)),M.arc(0,0,m,S,x,C));else{var L,P,O=x,z=S,I=x,D=S,R=E,F=E,B=A.apply(this,arguments)/2,N=B>u&&(w?+w.apply(this,arguments):c(m*m+y*y)),j=s(n(y-m)/2,+_.apply(this,arguments)),U=j,V=j;if(N>u){var q=d(N/m*l(B)),H=d(N/y*l(B));(R-=2*q)>u?(I+=q*=C?1:-1,D-=q):(R=0,I=D=(x+S)/2),(F-=2*H)>u?(O+=H*=C?1:-1,z-=H):(F=0,O=z=(x+S)/2)}var G=y*a(O),Y=y*l(O),W=m*a(D),X=m*l(D);if(j>u){var Z,J=y*a(z),K=y*l(z),$=m*a(I),Q=m*l(I);if(E1?0:v<-1?h:Math.acos(v))/2),at=c(Z[0]*Z[0]+Z[1]*Z[1]);U=s(j,(m-at)/(it-1)),V=s(j,(y-at)/(it+1))}}F>u?V>u?(L=b($,Q,G,Y,y,V,C),P=b(J,K,W,X,y,V,C),M.moveTo(L.cx+L.x01,L.cy+L.y01),Vu&&R>u?U>u?(L=b(W,X,J,K,m,-U,C),P=b(G,Y,$,Q,m,-U,C),M.lineTo(L.cx+L.x01,L.cy+L.y01),U0&&(d+=h);for(null!=e?g.sort(function(t,r){return e(v[t],v[r])}):null!=n&&g.sort(function(t,e){return n(r[t],r[e])}),s=0,c=d?(y-f*b)/d:0;s0?h*c:0)+b,v[l]={data:r[l],index:s,value:h,startAngle:m,endAngle:u,padAngle:x};return v}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.areaRadial=I,t.radialArea=I,t.lineRadial=z,t.radialLine=z,t.pointRadial=D,t.linkHorizontal=function(){return N(j)},t.linkVertical=function(){return N(U)},t.linkRadial=function(){var t=N(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){var t=r(q),n=r(64),i=null;function a(){var r;if(i||(i=r=e.path()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),r)return i=null,r+""||null}return a.type=function(e){return arguments.length?(t="function"==typeof e?e:r(e),a):t},a.size=function(t){return arguments.length?(n="function"==typeof t?t:r(+t),a):n},a.context=function(t){return arguments.length?(i=null==t?null:t,a):i},a},t.symbols=ot,t.symbolCircle=q,t.symbolCross=H,t.symbolDiamond=W,t.symbolSquare=$,t.symbolStar=K,t.symbolTriangle=tt,t.symbolWye=at,t.curveBasisClosed=function(t){return new ut(t)},t.curveBasisOpen=function(t){return new ht(t)},t.curveBasis=function(t){return new ct(t)},t.curveBundle=pt,t.curveCardinalClosed=yt,t.curveCardinalOpen=bt,t.curveCardinal=vt,t.curveCatmullRomClosed=At,t.curveCatmullRomOpen=St,t.curveCatmullRom=kt,t.curveLinearClosed=function(t){return new Et(t)},t.curveLinear=w,t.curveMonotoneX=function(t){return new zt(t)},t.curveMonotoneY=function(t){return new It(t)},t.curveNatural=function(t){return new Rt(t)},t.curveStep=function(t){return new Bt(t,.5)},t.curveStepAfter=function(t){return new Bt(t,1)},t.curveStepBefore=function(t){return new Bt(t,0)},t.stack=function(){var t=r([]),e=jt,n=Nt,i=Ut;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=0,o=t[0].length;a1)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l=0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):n[0]=a},t.stackOffsetNone=Nt,t.stackOffsetSilhouette=function(t,e){if((r=t.length)>0){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=0&&r._call.call(null,t),r=r._next;--n}function m(){l=(s=u.now())+c,n=i=0;try{v()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,x(a)}(),l=0}}function y(){var t=u.now(),e=t-s;e>o&&(c-=e,s=t)}function x(t){n||(i&&(i=clearTimeout(i)),t-l>24?(t<1/0&&(i=setTimeout(m,t-u.now()-c)),a&&(a=clearInterval(a))):(a||(s=u.now(),a=setInterval(y,o)),n=1,h(m)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=f,t.timer=g,t.timerFlush=v,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart(function a(o){o+=i,n.restart(a,i+=e,r),t(o)},e,r),n)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],163:[function(t,e,r){!function(){var t={version:"3.5.17"},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+"")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+"")},u.setProperty=function(t,e,r){h.call(this,t,e+"",r)}}function f(t,e){return te?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=f,t.descending=function(t,e){return et?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(f);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return f(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,h,f=-1,p=a.length,d=i[s++],g=new b;++f=i.length)return e;var n=[],o=a[r++];return e.forEach(function(e,i){n.push({key:e,values:t(i,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return V(t,W),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var r=t.matches||t[z(t,"matchesSelector")];return(Y=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,Y=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var W=t.selection.prototype=[];function X(t){return"function"==typeof t?t:function(){return H(t,this)}}function Z(t){return"function"==typeof t?t:function(){return G(t,this)}}W.select=function(t){var e,r,n,i,a=[];t=X(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),K.hasOwnProperty(r)?{space:K[r],local:t}:t}},W.attr=function(e,r){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each($(r,e[r]));return this}return this.each($(e,r))},W.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=et(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},W.sort=function(t){t=function(t){arguments.length||(t=f);return function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?D:function(){var r,n=new RegExp("^__on([^.]+)"+t.requote(e)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ht,t.selection.enter.prototype=ft,ft.append=W.append,ft.empty=W.empty,ft.node=W.node,ft.call=W.call,ft.size=W.size,ft.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s=n&&(n=e+1);!(o=s[n])&&++n0?1:t<0?-1:0}function Ot(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function zt(t){return t>1?0:t<-1?At:Math.acos(t)}function It(t){return t>1?Et:t<-1?-Et:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Ft=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,h=l-a,f=u*u+h*h;if(f0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map(function(t){return(t-f.x)/f.k}).map(l.invert)),h&&h.domain(u.range().map(function(t){return(t-f.y)/f.k}).map(u.invert))}function E(t){v++||t({type:"zoomstart"})}function C(t){S(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(t){--v||(t({type:"zoomend"}),r=null)}function P(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),a),C(r)}).on(x,function(){i.on(y,null).on(x,null),s(n),L(r)}),a=k(t.mouse(e)),s=xt(e);hs.call(e),E(r)}function O(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=".zoom-"+t.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=f.k,n.forEach(function(t){t.identifier in i&&(i[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,h=n.length;o1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];a=b*b+_*_}}function v(){var o,l,c,u,h=t.touches(r);hs.call(r);for(var f=0,p=h.length;f360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=fe((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Yt=Gt.prototype=new Ut;function Wt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Wt(t.h,t.c,t.l):fe((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Yt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Yt.rgb=function(){return Wt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,Jt=.95047,Kt=1,$t=1.08883,Qt=Xt.prototype=new Ut;function te(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*Jt)-1.5371385*(n=re(n)*Kt)-.4985314*(a=re(a)*$t)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function ee(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ae?new ae(t.r,t.g,t.b):ue(""+t,ae,Ht):new ae(t,e,r)}function oe(t){return new ae(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+""}Qt.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},Qt.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},Qt.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ae;var le=ae.prototype=new Ut;function ce(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(de(i[0]),de(i[1]),de(i[2]))}return(a=ge.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function he(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new Vt(n,i,l)}function fe(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/Jt),i=ne((.2126729*t+.7151522*e+.072175*r)/Kt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/$t)))}function pe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+"",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(t,e,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,"on"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=ve,t.xhr=me(P),t.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,r){return e(i(t),r)}:i})},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function h(){if(c>=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Me(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ee(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ce[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Pe=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ee(e,r))).toFixed(Math.max(0,Math.min(20,Ee(e*(1+1e-15),r))))}});function Oe(t){return t+""}var ze=t.time={},Ie=Date;function De(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Fe(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o68?1900:2e3),r+i[0].length):-1}function Je(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function $e(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=y(e)/60|0,i=y(e)%60;return r+Ve(n,"0",2)+Ve(i,"0",2)}function ar(t,e,r){Ue.lastIndex=0;var n=Ue.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:P;return function(e){var n=Le.exec(e),i=n[1]||" ",s=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],h=+n[6],f=n[7],p=n[8],d=n[9],g=1,v="",m="",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||"0"===i&&"="===s)&&(u=i="0",s="="),d){case"n":f=!0,d="g";break;case"%":g=100,m="%",d="f";break;case"p":g=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+d.toLowerCase());case"c":x=!1;case"d":y=!0,p=0;break;case"s":g=-1,d="r"}"$"===c&&(v=a[0],m=a[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Pe.get(d)||Oe;var b=u&&f;return function(e){var n=m;if(y&&e%1)return"";var a=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+m}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(".");if(k<0){var T=x?e.lastIndexOf("e"):-1;T<0?(_=e,w=""):(_=e.substring(0,T),w=e.substring(T))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&&f&&(_=o(_,1/0));var A=v.length+_.length+w.length+(b?0:a.length),M=A"===s?M+a+e:"^"===s?M.substring(0,A>>=1)+a+e+M.substring(A):a+(b?e:M+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,i=e.time,a=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,i,a,o=[],s=-1,l=0;++s=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(Ie=De);return r._=t,e(r)}finally{Ie=Date}}return r.parse=function(t){try{Ie=De;var r=e.parse(t);return r&&r._}finally{Ie=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var f=t.map(),p=qe(o),d=He(o),g=qe(s),v=He(s),m=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach(function(t,e){f.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ve(t.getDate(),e,2)},e:function(t,e){return Ve(t.getDate(),e,2)},H:function(t,e){return Ve(t.getHours(),e,2)},I:function(t,e){return Ve(t.getHours()%12||12,e,2)},j:function(t,e){return Ve(1+ze.dayOfYear(t),e,3)},L:function(t,e){return Ve(t.getMilliseconds(),e,3)},m:function(t,e){return Ve(t.getMonth()+1,e,2)},M:function(t,e){return Ve(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Ve(t.getSeconds(),e,2)},U:function(t,e){return Ve(ze.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ve(ze.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ve(t.getFullYear()%100,e,2)},Y:function(t,e){return Ve(t.getFullYear()%1e4,e,4)},Z:ir,"%":function(){return"%"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=v.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){m.lastIndex=0;var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return h(t,_.c.toString(),e,r)},d:$e,e:$e,H:tr,I:tr,j:Qe,L:nr,m:Ke,M:er,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:Ye,w:Ge,W:We,x:function(t,e,r){return h(t,_.x.toString(),e,r)},X:function(t,e,r){return h(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:Je,"%":ar};return u}(e)}};var sr=t.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function hr(t,e){t&&pr.hasOwnProperty(t.type)&&pr[t.type](t,e)}t.geo.stream=function(t,e){t&&fr.hasOwnProperty(t.type)?fr[t.type](t,e):hr(t,e)};var fr={Feature:function(t,e){hr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,h=n*l+u*Math.cos(s),f=u*o*Math.sin(s);Er.add(Math.atan2(f,h)),r=t,n=l,i=c}Cr.point=function(o,s){Cr.point=a,r=(t=o)*Ct,n=Math.cos(s=(e=s)*Ct/2+At/4),i=Math.sin(s)},Cr.lineEnd=function(){a(t,e)}}function Pr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zr(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 Ir(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Fr(t){return[Math.atan2(t[1],t[0]),It(t[2])]}function Br(t,e){return y(t[0]-e[0])kt?i=90:c<-kt&&(r=-90),h[0]=e,h[1]=n}};function p(t,a){u.push(h=[e=t,n=t]),ai&&(i=a)}function d(t,o){var s=Pr([t*Ct,o*Ct]);if(l){var c=zr(l,s),u=zr([c[1],-c[0],0],c);Rr(u),u=Fr(u);var h=t-a,f=h>0?1:-1,d=u[0]*Lt*f,g=y(h)>180;if(g^(f*ai&&(i=v);else if(g^(f*a<(d=(d+360)%360-180)&&di&&(i=o);g?t_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(tn&&(n=t)):t>a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,a=t}function g(){f.point=d}function v(){h[0]=e,h[1]=n,f.point=p,l=null}function m(t,e){if(l){var r=t-a;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){m(o,s),Cr.lineEnd(),y(c)>kt&&(e=-(n=180)),h[0]=e,h[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=h=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){mr=yr=xr=br=_r=wr=kr=Tr=Ar=Mr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Mr,i=Sr,a=r*r+n*n+i*i;return a=0;--s)i.point((h=u[s])[0],h[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,k=w*_,T=k>At,A=d*x;if(Er.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),a+=T?_+w*Mt:_,T^f>=r^m>=r){var M=zr(Pr(h),Pr(t));Rr(M);var S=zr(i,M);Rr(S);var E=(T^_>=0?-1:1)*It(S[2]);(n>E||n===E&&(M[0]||M[1]))&&(o+=T^_>=0?1:-1)}if(!v++)break;f=m,d=x,g=b,h=t}}return(a<-kt||a0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Kr))}return u}}function Kr(t){return t.length>1}function $r(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Qr(t,e){return((t=t.x)[0]<0?t[1]-Et-kt:Et-t[1])-((e=e.x)[0]<0?e[1]-Et-kt:Et-e[1])}var tn=Jr(Yr,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?At:-At,l=y(a-r);y(l-At)0?Et:-Et),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=At&&(y(r-i)kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Et,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])>kt){var a=t[0]0)){if(a/=f,f<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=r-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a0)){if(a/=p,p<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>h)return;a>u&&(u=a)}else if(p>0){if(a0&&(i.a={x:l+u*f,y:c+u*p}),h<1&&(i.b={x:l+h*f,y:c+h*p}),i}}}}}}var rn=1e9;function nn(e,r,n,i){return function(l){var c,u,h,f,p,d,g,v,m,y,x,b=l,_=$r(),w=en(e,r,n,i),k={point:M,lineStart:function(){k.point=S,u&&u.push(h=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){c&&(S(f,p),d&&m&&_.rejoin(),c.push(_.buffer()));k.point=M,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;in&&Ot(c,a,t)>0&&++e:a[1]<=n&&Ot(c,a,t)<0&&--e,c=a;return 0!==e}([e,i]),n=x&&r,a=c.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),T(null,null,1,l),l.lineEnd()),a&&Wr(c,o,r,T,l),l.polygonEnd()),c=u=h=null}};function T(t,o,l,c){var u=0,h=0;if(null==t||(u=a(t,l))!==(h=a(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?i:r)}while((u=(u+l+4)%4)!==h);else c.point(o[0],o[1])}function A(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function M(t,e){A(t,e)&&l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&&h.push([t,e]),y)f=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&m)l.point(t,e);else{var n={a:{x:g,y:v},b:{x:t,y:e}};w(n)?(m||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,v=e,m=r}return k};function a(t,i){return y(t[0]-e)0?0:3:y(t[0]-n)0?2:1:y(t[1]-r)0?1:0:i>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Cn(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,It((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],h=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,h-.238*e],[u+.455*e,h+.238*e]]).stream(l).point,n=o.translate([u-.307*e,h+.201*e]).clipExtent([[u-.425*e+kt,h+.12*e+kt],[u-.214*e-kt,h+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,h+.212*e]).clipExtent([[u-.214*e+kt,h+.166*e+kt],[u-.115*e-kt,h+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,hn,fn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){thn&&(hn=t);efn&&(fn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function vn(){var t=mn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=mn(e),r},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function n(r,n){e.push("M",r,",",n,t)}function i(t,n){e.push("M",t,",",n),r.point=a}function a(t,r){e.push("L",t,",",r)}function o(){r.point=n}function s(){e.push("Z")}return r}function mn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Tr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Tr+=o,Ar+=(o=n*t-r*e)*(r+t),Mr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function Tn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Mt)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Ct),n=16;function i(e){return(n?function(e){var r,i,o,s,l,c,u,h,f,p,d,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){h=NaN,v.point=x,e.lineStart()}function x(r,i){var o=Pr([r,i]),s=t(r,i);a(h,f,u,p,d,g,h=s[0],f=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(h,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=k}function w(t,e){x(r=t,e),i=h,o=f,s=p,l=d,c=g,v.point=x}function k(){a(h,f,u,p,d,g,i,o,r,s,l,c,n,e),v.lineEnd=b,b()}return v}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function a(n,i,o,s,l,c,u,h,f,p,d,g,v,m){var x=u-n,b=h-i,_=x*x+b*b;if(_>4*e&&v--){var w=s+p,k=l+d,T=c+g,A=Math.sqrt(w*w+k*k+T*T),M=Math.asin(T/=A),S=y(y(T)-1)e||y((x*P+b*O)/_-.5)>.3||s*p+l*d+c*g0&&16,i):Math.sqrt(e)},i}function Mn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function En(t){return Cn(function(){return t})()}function Cn(e){var r,n,i,a,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]}),c=150,u=480,h=250,f=0,p=0,d=0,g=0,v=0,m=tn,x=P,b=null,_=null;function w(t){return[(t=i(t[0]*Ct,t[1]*Ct))[0]*c+a,o-t[1]*c]}function k(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function T(){i=Gr(n=zn(d,g,v),r);var t=r(f,p);return a=u-t[0]*c,o=h+t[1]*c,A()}function A(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Ln(m(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(m=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e>0,n=y(e)>kt;return Jr(i,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var p,d=[h,f],g=i(h,f),v=r?g?0:o(h,f):g?o(h+(h<0?At:-At),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=a(e,d),(Br(e,p)||Br(d,p))&&(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var m;v&s||!(m=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&Br(e,d)||t.point(d[0],d[1]),e=d,l=g,s=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}},Fn(t,6*Ct),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)>e}function a(t,r,n){var i=[1,0,0],a=zr(Pr(t),Pr(r)),o=Or(a,a),s=a[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,h=zr(i,a),f=Dr(i,c);Ir(f,Dr(a,u));var p=h,d=Or(f,p),g=Or(p,p),v=d*d-g*(Or(f,f)-1);if(!(v<0)){var m=Math.sqrt(v),x=Dr(p,(-d-m)/g);if(Ir(x,f),x=Fr(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],T=r[1];w<_&&(b=_,_=w,w=b);var A=w-_,M=y(A-At)0^x[1]<(y(x[0]-_)At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+m)/g);return Ir(S,f),[x,Fr(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}}((b=+t)*Ct),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):P,A()):_},w.scale=function(t){return arguments.length?(c=+t,T()):c},w.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],T()):[u,h]},w.center=function(t){return arguments.length?(f=t[0]%360*Ct,p=t[1]%360*Ct,T()):[f*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Ct,g=t[1]%360*Ct,v=t.length>2?t[2]%360*Ct:0,T()):[d*Lt,g*Lt,v*Lt]},t.rebind(w,l,"precision"),function(){return r=e.apply(this,arguments),w.invert=r.invert&&k,T()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Ct,r*Ct)})}function Pn(t,e){return[t,e]}function On(t,e){return[t>At?t-Mt:t<-At?t+Mt:t,e]}function zn(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):On}function In(t){return function(e,r){return[(e+=t)>At?e-Mt:e<-At?e+Mt:e,r]}}function Dn(t){var e=In(t);return e.invert=In(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),It(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),It(u*r-s*n)]},o}function Fn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Bn(r,i),a=Bn(r,a),(o>0?ia)&&(i+=o*Mt)):(i=t+o*Mt,a=t-.5*l);for(var c,u=i;o>0?u>a:u2?t[2]*Ct:0),e.invert=function(e){return(e=t.invert(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e},e},On.invert=Pn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t="function"==typeof r?r.apply(this,arguments):r,n=zn(-t[0]*Ct,-t[1]*Ct,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Fn((t=+r)*Ct,n*Ct),i):t},i.precision=function(r){return arguments.length?(e=Fn(t*Ct,(n=+r)*Ct),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ct,i=t[1]*Ct,a=e[1]*Ct,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((r=h*o)*r+(r=c*u-l*h*s)*r),l*u+c*h*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,h,f,p=10,d=p,g=90,v=360,m=2.5;function x(){return{type:"MultiLineString",coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(h).concat(t.range(Math.ceil(l/v)*v,s,v).map(f)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)>kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter(function(t){return y(t%v)>kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},x.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(f(s).slice(1),h(n).reverse().slice(1),f(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(m)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),x.precision(m)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],x):[g,v]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(m=+t,c=Nn(o,a,90),u=jn(r,e,m),h=Nn(l,s,90),f=jn(i,n,m),x):m},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Un,i=Vn;function a(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r="function"==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Ct,n=t[1]*Ct,i=e[0]*Ct,a=e[1]*Ct,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),h=o*Math.sin(r),f=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rt(a-n)+o*l*Rt(i-r))),g=1/Math.sin(d),(v=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*f,i=r*h+e*p,a=r*s+e*c;return[Math.atan2(i,n)*Lt,Math.atan2(a,Math.sqrt(n*n+i*i))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,v;var r,n,i,a,o,s,l,c,u,h,f,p,d,g,v},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Ct),o=Math.cos(i),s=y((n*=Ct)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}qn.point=function(i,a){t=i*Ct,e=Math.sin(a*=Ct),r=Math.cos(a),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return En(Gn)}).raw=Gn;var Yn=Hn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},P);function Wn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return Jn;function o(t,e){a>0?e<-Et+kt&&(e=-Et+kt):e>Et-kt&&(e=Et-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=Pt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Et]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)1&&Ot(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function ii(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return En(Qn)}).raw=Qn,ti.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Et]},(t.geo.transverseMercator=function(){var t=Kn(ti),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ti,t.geom={},t.geom.hull=function(t){var e=ei,r=ri;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ve(e),a=ve(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+h;nkt)s=s.L;else{if(!((i=a-wi(s,o))>kt)){n>-kt?(e=s.P,r=s):i>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=mi(t);if(hi.insert(e,l),e||r){if(e===r)return Si(e),r=mi(e.site),hi.insert(l,r),l.edge=r.edge=Li(e.site,l.site),Mi(e),void Mi(r);if(r){Si(e),Si(r);var c=e.site,u=c.x,h=c.y,f=t.x-u,p=t.y-h,d=r.site,g=d.x-u,v=d.y-h,m=2*(f*v-p*g),y=f*f+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+u,y:(f*x-g*y)/m+h};Pi(r.edge,c,d,b),l.edge=Li(c,t,null,b),r.edge=Li(t,d,null,b),Mi(e),Mi(r)}else l.edge=Li(e.site,l.site)}}function _i(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,h=1/a-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-a/2)))/h+n:(n+s)/2}function wi(t,e){var r=t.N;if(r)return _i(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Ti(t,e){return e.angle-t.angle}function Ai(){Ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Mi(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,h=2*(l*(v=a.y-s)-c*u);if(!(h>=-Tt)){var f=l*l+c*c,p=u*u+v*v,d=(v*f-c*p)/h,g=(l*p-u*f)/h,v=g+s,m=gi.pop()||new Ai;m.arc=t,m.site=i,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=pi._;x;)if(m.y=s)return;if(f>d){if(a){if(a.y>=c)return}else a={x:v,y:l};r={x:v,y:c}}else{if(a){if(a.y1)if(f>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xkt||y(i-r)>kt)&&(s.splice(o,0,new Oi((m=a.site,x=u,b=y(n-h)kt?{x:h,y:y(e-h)kt?{x:y(r-d)kt?{x:f,y:y(e-f)kt?{x:y(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Bi(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Bi(s(t)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Ti),u=-1,h=c.length,f=c[h-1].edge,p=f.l===l?f.r:f.l;++ua&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Gi(r,n)})),a=Xi.lastIndex;return ag&&(g=l.x),l.y>v&&(v=l.y),c.push(l.x),u.push(l.y);else for(h=0;hg&&(g=b),_>v&&(v=_),c.push(b),u.push(_)}var w=g-p,k=v-d;function T(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,h=n>=c,f=h<<1|u;t.leaf=!1,u?i=l:o=l,h?a=c:s=c,T(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}}),e,r,n,i,a,o,s)}w>k?v=d+w:g=p+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}};if(M.visit=function(t){!function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=.5*(n+a),l=.5*(i+o),c=r.nodes;c[0]&&t(e,c[0],n,i,s,l),c[1]&&t(e,c[1],s,i,a,l),c[2]&&t(e,c[2],n,l,s,o),c[3]&&t(e,c[3],s,l,a,o)}}(t,M,p,d,g,v)},M.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,h,f,p){if(!(u>a||h>o||f=_)<<1|e>=b,k=w+4;w=0&&!(n=t.interpolators[i](e,r)););return n}function Ji(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function aa(t){return 1-Math.cos(t*Et)}function oa(t){return Math.pow(2,10*(t-1))}function sa(t){return 1-Math.sqrt(1-t*t)}function la(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ca(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ua(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=fa(i),s=ha(i,a),l=fa(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]=0?t.slice(0,n):t,a=n>=0?t.slice(n+1):"in";return i=$i.get(i)||Ki,a=Qi.get(a)||P,e=a(i.apply(null,r.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Wt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+""}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return te(n+o*t,i+s*t,a+l*t)+""}},t.interpolateRound=ca,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(t){if(null!=t){r.setAttribute("transform",t);var e=r.transform.baseVal.consolidate()}return new ua(e?e.matrix:pa)})(e)},ua.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pa={a:1,b:0,c:0,d:1,e:0,f:0};function da(t){return t.length?t.pop()+",":""}function ga(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(da(r)+"rotate(",null,")")-2,x:Gi(t,e)})):e&&r.push(da(r)+"rotate("+e+")")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(da(r)+"skewX(",null,")")-2,x:Gi(t,e)}):e&&r.push(da(r)+"skewX("+e+")")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(da(r)+"scale(",null,",",null,")");n.push({i:i-4,x:Gi(t[0],e[0])},{i:i-2,x:Gi(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(da(r)+"scale("+e+")")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Te(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,u=c[0],d=c[1];for(t=0;t=0;)r.push(i[n])}function Ca(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Ca(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ea(t,function(t){t.children&&(t.value=0)}),Ca(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=e);return n}function qa(t){return t.reduce(Ha,0)}function Ha(t,e){return t+e[1]}function Ga(t,e){return Ya(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ya(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Wa(e){return[t.min(e),t.max(e)]}function Xa(t,e){return t.value-e.value}function Za(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ja(t,e){t._pack_next=e,e._pack_prev=t}function Ka(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function $a(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(e.forEach(Qa),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(eo(r,n,i=e[2]),x(i),Za(r,i),r._pack_prev=i,Za(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&((s=c[t.bisect(f,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=ve(t),a):n},a.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Ya(e,t)}:ve(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xa),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Ca(s,function(t){t.r=+u(t.value)}),Ca(s,$a),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ca(s,function(t){t.r+=h}),Ca(s,$a),Ca(s,function(t){t.r-=h})}return function t(e,r,n,i){var a=e.children;e.x=r+=i*e.x;e.y=n+=i*e.y;e.r*=i;if(a)for(var o=-1,s=a.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)});var g=r(f,p)/2-f.x,v=n[0]/(p.x+r(p,f)/2+g),m=n[1]/(d.depth||1);Ea(u,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,h=s.m,f=l.m;s=io(s),a=no(a),s&&a;)l=no(l),(o=io(o)).a=t,(i=s.z+h-a.z-c+r(s._,a._))>0&&(ao(oo(s,t,n),t,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!io(o)&&(o.t=s,o.m+=h-u),a&&!no(l)&&(l.t=a,l.m+=c-f,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Sa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Ca(c,function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var h=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),f=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=h.x-r(h,f)/2,d=f.x+r(f,h)/2;return Ca(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Sa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=so,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,g))<=f?(c.pop(),f=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,f=1/0);s.length&&(d(s,g,a,!0),s.length=s.area=0),e.forEach(h)}}function f(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(f)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?vo:ho,s=i?ma:va;return a=t(e,r,s,n),o=t(r,e,s,Zi),l}function l(t){return a(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ca)};l.clamp=function(t){return arguments.length?(i=t,s()):i};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,i)};return s()}([0,1],[0,1],Zi,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(i=t[0]>=0,r.domain((a=t.map(Number)).map(o)),l):a};l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n};l.nice=function(){var t=fo(a.map(o),i?Math:Ao);return r.domain(t),a=t.map(s),l};l.ticks=function(){var t=co(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),h=n%1?2:n;if(isFinite(u-c)){if(i){for(;c0;f--)e.push(s(c)*f);for(c=0;e[c]l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return To;arguments.length<2?r=To:"function"!=typeof r&&(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n0?i[t-1]:r[0],th?0:1;if(c=St)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,g,v,m,y,x,b,_,w,k,T,A,M=0,S=0,E=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===Oo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=It(v/c*Math.sin(m))),s&&(M=It(v/s*Math.sin(m)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(h-S),_=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=At?0:1;if(S&&Bo(y,x,b,_)===p^C){var L=(u+h)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(h-M),k=s*Math.sin(h-M),T=s*Math.cos(u+M),A=s*Math.sin(u+M);var P=Math.abs(u-h+2*M)<=At?0:1;if(M&&Bo(w,k,T,A)===1-p^P){var O=(u+h)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=A=null}}else w=k=0;if(f>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s0?0:1}function No(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,h=t[1]+c,f=e[0]+l,p=e[1]+c,d=(u+f)/2,g=(h+p)/2,v=f-u,m=p-h,y=v*v+m*m,x=r-n,b=u*p-f*h,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,T=(b*m+v*_)/y,A=(-b*v+m*_)/y,M=w-d,S=k-g,E=T-d,C=A-g;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ei,r=ri,n=Yr,i=Vo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,f=ve(e),p=ve(r);function d(){l.push("M",i(t(c),o))}for(;++u1&&i.push("H",n[0]);return i.join("")},"step-before":Ho,"step-after":Go,basis:Xo,"basis-open":function(t){if(t.length<4)return Vo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(Zo($o,a)+","+Zo($o,o)),--n;for(;++n9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Vo(t){return t.length>1?t.join("L"):t+"Z"}function qo(t){return t.join("L")+"Z"}function Ho(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cAt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=ve(t),a):r},a.source=function(e){return arguments.length?(t=ve(e),a):t},a.target=function(t){return arguments.length?(e=ve(t),a):e},a.startAngle=function(t){return arguments.length?(n=ve(t),a):n},a.endAngle=function(t){return arguments.length?(i=ve(t),a):i},a},t.svg.diagonal=function(){var t=Un,e=Vn,r=is;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=is,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=as;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Ct);W.transition=function(t){for(var e,r,n=ds||++ms,i=bs(t),a=[],o=gs||{time:Date.now(),ease:ia,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(t,o);if(a>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}h||(a=i.time,o=Te(function(t){var e=h.delay;if(o.t=e+a,e<=t)return f(t-e);o.c=f},0,a),h=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}vs.call=W.call,vs.empty=W.empty,vs.node=W.node,vs.size=W.size,t.transition=function(e,r){return e&&e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=vs,vs.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function g(t){t.select(".extent").attr("y",l[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function v(){var h,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,k=!/^(e|w)$/.test(_)&&a,T=y.classed("extent"),A=xt(m),M=t.mouse(m),S=t.select(o(m)).on("keydown.brush",function(){32==t.event.keyCode&&(T||(h=null,M[0]-=s[1],M[1]-=l[1],T=2),B())}).on("keyup.brush",function(){32==t.event.keyCode&&2==T&&(M[0]+=s[1],M[1]+=l[1],T=0,B())});if(t.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);v=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else t.event.altKey&&(h=M.slice());function L(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),T||(t.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(e[0]1?{floor:function(e){for(;s(e=t.floor(e));)e=zs(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=zs(+e+1);return e}}:t))},i.ticks=function(t,e){var r=co(i.domain()),n=null==t?a(r,10):"number"==typeof t?a(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],zs(+r[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Os(e.copy(),r,n)},mo(i,e)}function zs(t){return new Date(t)}Es.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ps:Ls,Ps.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ps.toString=Ls.toString,ze.second=Fe(function(t){return new Ie(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),ze.seconds=ze.second.range,ze.seconds.utc=ze.second.utc.range,ze.minute=Fe(function(t){return new Ie(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),ze.minutes=ze.minute.range,ze.minutes.utc=ze.minute.utc.range,ze.hour=Fe(function(t){var e=t.getTimezoneOffset()/60;return new Ie(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),ze.hours=ze.hour.range,ze.hours.utc=ze.hour.utc.range,ze.month=Fe(function(t){return(t=ze.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),ze.months=ze.month.range,ze.months.utc=ze.month.utc.range;var Is=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[ze.second,1],[ze.second,5],[ze.second,15],[ze.second,30],[ze.minute,1],[ze.minute,5],[ze.minute,15],[ze.minute,30],[ze.hour,1],[ze.hour,3],[ze.hour,6],[ze.hour,12],[ze.day,1],[ze.day,2],[ze.week,1],[ze.month,1],[ze.month,3],[ze.year,1]],Rs=Es.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Yr]]),Fs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(zs)},floor:P,ceil:P};Ds.year=ze.year,ze.scale=function(){return Os(t.scale.linear(),Ds,Rs)};var Bs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Cs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Yr]]);function js(t){return JSON.parse(t.responseText)}function Us(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Bs.year=ze.year.utc,ze.scale.utc=function(){return Os(t.scale.linear(),Bs,Ns)},t.text=me(function(t){return t.responseText}),t.json=function(t,e){return ye(t,"application/json",js,e)},t.html=function(t,e){return ye(t,"text/html",Us,e)},t.xml=me(function(t){return t.responseXML}),"object"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],164:[function(t,e,r){e.exports=function(){for(var t=0;t=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0});if(1&s)for(var u=0;u<_.length;++u){var b=_[u],f=b[0];b[0]=b[1],b[1]=f}return _}},{"incremental-convex-hull":413,uniq:547}],166:[function(t,e,r){"use strict";e.exports=a;var n=(a.canvas=document.createElement("canvas")).getContext("2d"),i=o([32,126]);function a(t,e){Array.isArray(t)&&(t=t.join(", "));var r,a={},s=16,l=.05;e&&(2===e.length&&"number"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=i),n.font=s+"px "+t;for(var c=0;cs*l){var p=(f-h)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:105}],168:[function(t,e,r){var n=t("abs-svg-path"),i=t("normalize-svg-path"),a={M:"moveTo",C:"bezierCurveTo"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{"abs-svg-path":60,"normalize-svg-path":452}],169:[function(t,e,r){e.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],170:[function(t,e,r){"use strict";e.exports=function(t,e){switch("undefined"==typeof e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=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=k?f.call(k,T,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r0?1:-1}},{}],183:[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":180}],184:[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":183}],185:[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,h=arguments[2],f=arguments[3];return r=Object(i(r)),n(c),u=s(r),f&&u.sort("function"==typeof f?a.call(f,r):void 0),"function"!=typeof t&&(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,h,r[t],t,r,n):e})}}},{"./valid-callable":203,"./valid-value":205}],186:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":187,"./shim":188}],187:[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")}},{}],188:[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}},{}],209:[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}},{}],210:[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}},{}],211:[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"))},{"./":214,d:151,"es5-ext/object/set-prototype-of":200,"es5-ext/string/#/contains":206,"es6-symbol":219}],212:[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,h,f,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),h=function(){f=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,m,u.value,h),f)return;u=t.next()}else for(d=t.length,p=0;p=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,h),!f);++p);else c.call(t,function(t){return l.call(e,m,t,h),f})}},{"./get":213,"es5-ext/function/is-arguments":177,"es5-ext/object/valid-callable":203,"es5-ext/string/is-string":209}],213:[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":211,"./string":216,"./valid-iterable":217,"es5-ext/function/is-arguments":177,"es5-ext/string/is-string":209,"es6-symbol":219}],214:[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"),h=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(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,f(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)):h(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})}))),h(n.prototype,u.iterator,l(function(){return this}))},{d:151,"d/auto-bind":150,"es5-ext/array/#/clear":173,"es5-ext/object/assign":186,"es5-ext/object/valid-callable":203,"es5-ext/object/valid-value":205,"es6-symbol":219}],215:[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":177,"es5-ext/object/is-value":194,"es5-ext/string/is-string":209,"es6-symbol":219}],216:[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"))},{"./":214,d:151,"es5-ext/object/set-prototype-of":200,"es6-symbol":219}],217:[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":215}],218:[function(t,e,r){(function(n,i){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){"use strict";function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&&(s?s(v):_())};var c="undefined"!=typeof window?window:void 0,u=c||{},h=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof n&&"[object process]"==={}.toString.call(n),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var g=new Array(1e3);function v(){for(var t=0;t=r-1){f=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var u=s.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)n.push(a(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var p=a(c[f-1],u[f-1],arguments[f]);n.push(p),i.push((p-n[o++])*h)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,h=u>1e-6?1/u:0;this._time.push(t);for(var f=r;f>0;--f){var p=arguments[f];n.push(a(l[f-1],c[f-1],n[o++]+p)),i.push(p*h)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--h)n.push(a(l[h],c[h],n[o]+u*i[o])),i.push(0),o+=1}}},{"binary-search-bounds":91,"cubic-hermite":145}],227:[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&&(f=o[0]/2,p+=o[1]);return r}},{"css-font/stringify":142}],229:[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,h=u.getContext("2d"),f={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,h.font=t;var d={top:0};h.clearRect(0,0,p,p),h.textBaseline="top",h.fillStyle="black",h.fillText("H",0,0);var g=a(h.getImageData(0,0,p,p));h.clearRect(0,0,p,p),h.textBaseline="bottom",h.fillText("H",0,p);var v=a(h.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-v+g,h.clearRect(0,0,p,p),h.textBaseline="alphabetic",h.fillText("H",0,p);var m=p-a(h.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=m,h.clearRect(0,0,p,p),h.textBaseline="middle",h.fillText("H",0,.5*p);var y=a(h.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="hanging",h.fillText("H",0,.5*p);var x=a(h.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="ideographic",h.fillText("H",0,p);var b=a(h.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,f.upper&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.upper,0,0),d.upper=a(h.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),f.lower&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.lower,0,0),d.lower=a(h.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),f.tittle&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.tittle,0,0),d.tittle=a(h.getImageData(0,0,p,p))),f.ascent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.ascent,0,0),d.ascent=a(h.getImageData(0,0,p,p))),f.descent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.descent,0,0),d.descent=o(h.getImageData(0,0,p,p))),f.overshoot){h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.overshoot,0,0);var _=o(h.getImageData(0,0,p,p));d.overshoot=_-m}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement("canvas"),n.cache={}},{}],230:[function(t,e,r){"use strict";e.exports=function(t){return new c(t||d,null)};var n=0,i=1;function a(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function o(t){return new a(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new a(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],h=[];o;){var f=r(t,o.key);u.push(o),h.push(f),o=f<=0?o.left:o.right}u.push(new a(n,t,e,null,null,1));for(var p=u.length-2;p>=0;--p){o=u[p];h[p]<=0?u[p]=new a(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new a(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p>1;--p){var d=u[p-1];o=u[p];if(d._color===i||o._color===i)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(v=g.right)||v._color!==n){if(g._color=n,g.left=d.right,d._color=i,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).left===g?m.left=d:m.right=d;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else{if(!(v=g.right)||v._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=i,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).left===g?m.left=o:m.right=o;break}d._color=i,g.right=s(i,v),g._color=n,p-=1}else if(d.right===o){if(!(v=g.left)||v._color!==n){if(g._color=n,g.right=d.left,d._color=i,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).right===g?m.right=d:m.left=d;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}else{var v;if(!(v=g.left)||v._color!==n){var m;if(d.left=o.right,g._color=n,g.right=o.left,o._color=i,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).right===g?m.right=o:m.left=o;break}d._color=i,g.left=s(i,v),g._color=n,p-=1}}return u[0]._color=i,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&&(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(r(e,i.key)<=0){var a;if(i.left&&(a=t(e,r,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);if(s<=0){if(a.left&&(o=t(e,r,n,i,a.left)))return o;if(l>0&&(o=i(a.key,a.value)))return o}if(l>0&&a.right)return t(e,r,n,i,a.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(u,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),u.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=h.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return te?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new h(this.tree,this._stack.slice())},f.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new a(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u>=0;--u){(r=t[u]).left===t[u+1]?e[u]=new a(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&&r.right){var h=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var f=e[h-1];e.push(new a(r._color,f.key,f.value,r.left,r.right,r._count)),e[h-1].key=r.key,e[h-1].value=r.value;for(u=e.length-2;u>=h;--u)r=e[u],e[u]=new a(r._color,r.key,r.value,r.left,e[u+1],r._count);e[h-1].left=e[h]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&&(d.right=null),e.pop();for(u=0;u=0;--u){if(e=t[u],0===u)return void(e._color=i);if((r=t[u-1]).left===e){if((a=r.right).right&&a.right._color===n)return c=(a=r.right=o(a)).right=o(a.right),r.right=a.left,a.left=r,a.right=c,a._color=r._color,e._color=i,r._color=i,c._color=i,l(r),l(a),u>1&&((h=t[u-2]).left===r?h.left=a:h.right=a),void(t[u-1]=a);if(a.left&&a.left._color===n)return c=(a=r.right=o(a)).left=o(a.left),r.right=c.left,a.left=c.right,c.left=r,c.right=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((h=t[u-2]).left===r?h.left=c:h.right=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.right=s(n,a));r.right=s(n,a);continue}a=o(a),r.right=a.left,a.left=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((h=t[u-2]).left===r?h.left=a:h.right=a),t[u-1]=a,t[u]=r,u+11&&((h=t[u-2]).right===r?h.right=a:h.left=a),void(t[u-1]=a);if(a.right&&a.right._color===n)return c=(a=r.left=o(a)).right=o(a.right),r.left=c.right,a.right=c.left,c.right=r,c.left=a,c._color=r._color,r._color=i,a._color=i,e._color=i,l(r),l(a),l(c),u>1&&((h=t[u-2]).right===r?h.right=c:h.left=c),void(t[u-1]=c);if(a._color===i){if(r._color===n)return r._color=i,void(r.left=s(n,a));r.left=s(n,a);continue}var h;a=o(a),r.left=a.right,a.right=r,a._color=r._color,r._color=n,l(r),l(a),u>1&&((h=t[u-2]).right===r?h.right=a:h.left=a),t[u-1]=a,t[u]=r,u+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),f.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),f.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new a(n._color,n.key,t,n.left,n.right,n._count);for(var i=e.length-2;i>=0;--i)(n=e[i]).left===e[i+1]?r[i]=new a(n._color,n.key,n.value,r[i+1],n.right,n._count):r[i]=new a(n._color,n.key,n.value,n.left,r[i+1],n._count);return new c(this.tree._compare,r[0])},f.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],231:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=607/128,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number("0/0");for(var e=a[0],r=a.length-1;r>0;--r)e+=a[r]/(t+r);var n=t+i+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},e.exports.log=o},{}],232:[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;o0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};h.isOpaque=function(){return!0},h.isTransparent=function(){return!1},h.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];h.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,u=o(r,n,i,a,s),h=u.cubeEdges,f=u.axis,b=n[12],_=n[13],w=n[14],k=n[15],T=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*k)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=h[A],this.lastCubeProps.axis[A]=f[A];var M=p;for(A=0;A<3;++A)d(p[A],A,this.bounds,h,f);e=this.gl;var S,E=g;for(A=0;A<3;++A)this.backgroundEnable[A]?E[A]=f[A]:E[A]=0;this._background.draw(r,n,i,a,E,this.backgroundColor),this._lines.bind(r,n,i,this);for(A=0;A<3;++A){var C=[0,0,0];f[A]>0?C[A]=a[1][A]:C[A]=a[0][A];for(var L=0;L<2;++L){var P=(A+1+L)%3,O=(A+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,O,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(L=0;L<2;++L){P=(A+1+L)%3,O=(A+1+(1^L))%3;this.zeroEnable[O]&&Math.min(a[0][O],a[1][O])<=0&&Math.max(a[0][O],a[1][O])>=0&&this._lines.drawZero(P,O,this.bounds,C,this.zeroLineColor[O],this.zeroLineWidth[O]*this.pixelRatio)}}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var z=c(m,M[A].primalMinor),I=c(y,M[A].mirrorMinor),D=this.lineTickLength;for(L=0;L<3;++L){var R=T/r[5*L];z[L]*=D[L]*R,I[L]*=D[L]*R}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,I,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);var F,B;function N(t){(B=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0?N(n):a>0&&l<0?N(n):a<0&&l>0?N(n):a<0&&l<0?N(n):o>0&&s>0?N(i):o>0&&s<0?N(i):o<0&&s>0?N(i):o<0&&s<0&&N(i)}for(A=0;A<3;++A){var U=M[A].primalMinor,V=M[A].mirrorMinor,q=c(x,M[A].primalOffset);for(L=0;L<3;++L)this.lineTickEnable[A]&&(q[L]+=T*U[L]*Math.max(this.lineTickLength[L],0)/r[5*L]);var H=[0,0,0];if(H[A]=1,this.tickEnable[A]){-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,F=1,"auto"===(S=[this.tickAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]),B=[0,0,0],j(A,U,V);for(L=0;L<3;++L)q[L]+=T*U[L]*this.tickPad[L]/r[5*L];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],q,this.tickColor[A],H,B,S)}if(this.labelEnable[A]){F=0,B=[0,0,0],this.labels[A].length>4&&(N(A),F=1),"auto"===(S=[this.labelAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]);for(L=0;L<3;++L)q[L]+=T*U[L]*this.labelPad[L]/r[5*L];q[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],q,this.labelColor[A],[0,0,0],B,S)}}this._text.unbind()},h.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":234,"./lib/cube.js":235,"./lib/lines.js":236,"./lib/text.js":238,"./lib/ticks.js":239}],234:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],f=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=p,f[l]=p;for(var d=-1;d<=1;d+=2){h[c]=d;for(var g=-1;g<=1;g+=2)h[u]=g,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),s+=1}var v=c;c=u,u=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":237,"gl-buffer":241,"gl-vao":327}],235:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,p){i(s,e,t),i(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=a[x][2];for(var b=0;b<2;++b){u[1]=a[b][1];for(var _=0;_<2;++_)u[0]=a[_][0],f(l[y],u,s),y+=1}}for(var w=-1,x=0;x<8;++x){for(var k=l[x][3],T=0;T<3;++T)c[x][T]=l[x][T]/k;p&&(c[x][2]*=-1),k<0&&(w<0?w=x:c[x][2]E&&(w|=1<E&&(w|=1<c[x][1]&&(R=x));for(var F=-1,x=0;x<3;++x){var B=R^1<c[N][0]&&(N=B)}}var j=g;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^N)]=R&N;var U=7^N;U===w||U===D?(U=7^F,j[n.log2(N^U)]=U&N):j[n.log2(F^U)]=U&F;for(var V=v,q=w,A=0;A<3;++A)V[A]=q&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(t){return i(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":301,glslify:409}],238:[function(t,e,r){(function(r){"use strict";e.exports=function(t,e,r,a,s,l){var u=n(t),h=i(t,[{buffer:u,size:3}]),f=o(t);f.attributes.position.location=0;var p=new c(t,f,u,h);return p.update(e,r,a,s,l),p};var n=t("gl-buffer"),i=t("gl-vao"),a=t("vectorize-text"),o=t("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,h=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var c=l[r];c||(c=l[r]={});var u=c[e];u||(u=c[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var h=(n||12)/12,f=u.positions,p=u.cells,d=0,g=p.length;d=0;--m){var y=f[v[m]];o.push(h*y[0],-h*y[1],t)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){h[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),f[d]=(o.length/3|0)-h[d],c[d]=o.length/3|0;for(var g=0;g=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var h=""+c;h.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?h:h.subarray(0,t.length),e),n.free(h)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:450,"ndarray-ops":444,"typedarray-pool":545}],242:[function(t,e,r){"use strict";var n=t("gl-vec3"),i=function(t,e){for(var r=0;r=e)return r-1;return r},a=n.create(),o=n.create(),s=function(t,e,r){return tr?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],h=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=i(r[0],c),v=i(r[1],u),m=i(r[2],h),y=g+1,x=v+1,b=m+1;if(l&&(g=s(g,0,f-1),y=s(y,0,f-1),v=s(v,0,p-1),x=s(x,0,p-1),m=s(m,0,d-1),b=s(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][v])/(r[1][x]-r[1][v]),k=(h-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],z=e[S+T+C],I=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(a,O,z,_),n.lerp(B,B,a,w),n.lerp(a,I,D,_),n.lerp(o,R,F,_),n.lerp(a,a,o,w),n.lerp(B,B,a,k),B};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],i=[],a=0;as&&(s=n.length(b)),x&&(y=Math.min(y,2*n.distance(g,_)/(n.length(v)+n.length(b)))),g=_,v=b,m.push(b)}var w=[c,h,p],k=[u,f,d];e&&(e[0]=w,e[1]=k),0===s&&(s=1);var T=1/s;isFinite(y)&&!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var i=n.create();return void 0!==t&&n.set(i,t,e,r),i}(0,1,0),M=t.coneSize||.5;t.absoluteConeSize&&(M=t.absoluteConeSize*T),o.coneScale=M;x=0;for(var S=0;x=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),h=i(t),f=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:3}]),x=i(t),_=i(t),w=i(t),k=i(t),T=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),M=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=i(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,a(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":244,colormap:126,"gl-buffer":241,"gl-mat4/invert":265,"gl-mat4/multiply":267,"gl-shader":301,"gl-texture2d":322,"gl-vao":327,ndarray:450,normals:453,"simplicial-complex-contour":518,"typedarray-pool":545}],244:[function(t,e,r){var n=t("glslify"),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float coneScale;\n\nuniform float coneOffset;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nuniform float vectorScale;\nuniform float coneScale;\nuniform float coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:409}],245:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34000:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],246:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":245}],247:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho||!1?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function h(t,e,r,n){for(var i=u[n],a=0;a0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+h(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":248,"gl-buffer":241,"gl-vao":327}],248:[function(t,e,r){"use strict";var n=t("glslify"),i=t("gl-shader"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":301,glslify:409}],249:[function(t,e,r){"use strict";var n=t("gl-texture2d");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;au||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var f=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&h>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");f=t.FLOAT}else n.preferFloat&&h>0&&p&&(f=t.FLOAT);var g=!0;"depth"in n&&(g=!!n.depth);var v=!1;"stencil"in n&&(v=!!n.stencil);return new d(t,e,r,f,h,g,v,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function h(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?d?t.depth=f(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=f(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;mi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},h.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,h=this.bounds,p=h[0]=r[0],d=h[1]=o[0],g=1/((h[2]=r[r.length-1])-p),v=1/((h[3]=o[o.length-1])-d),m=e[0],y=e[1];this.shape=[m,y];var x=(m-1)*(y-1)*(f.length>>>1);this.numVertices=x;for(var b=a.mallocUint8(4*x),_=a.mallocFloat32(2*x),w=a.mallocUint8(2*x),k=a.mallocUint32(x),T=0,A=0;A max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\nlowp vec4 encode_float_1540259130(highp float v) {\n highp float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{"gl-shader":301,glslify:409}],255:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),f=l(new Array(1024),[256,1,4]),p=0;p<1024;++p)f.data[p]=255;var d=a(e,f);d.wrap=e.REPEAT;var g=new v(e,r,o,s,c,d);return g.update(t),g};var n=t("gl-buffer"),i=t("gl-vao"),a=t("gl-texture2d"),o=t("glsl-read-float"),s=t("binary-search-bounds"),l=t("ndarray"),c=t("./lib/shaders"),u=c.createShader,h=c.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var m=v.prototype;m.isTransparent=function(){return this.hasAlpha},m.isOpaque=function(){return!this.hasAlpha},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],c=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=t.position||t.positions;if(f){var d=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,v=!0}continue t}h[0][r]=Math.min(h[0][r],b[r],_[r]),h[1][r]=Math.max(h[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=c;if(c+=p(b,_),v){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);u+=2,v=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],c,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],c,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(c),o.push(f[f.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in t){var T=t.dashes.slice();for(T.unshift(0),e=1;e1.0001)return null;v+=g[u]}if(Math.abs(v-1)>.001)return null;return[h,function(t,e){for(var r=[0,0,0],n=0;n max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},{glslify:409}],280:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./lib/shaders"),g=t("./lib/closest-point"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_,k,T,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=T,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=k.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function E(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(t){this.pickId=t},T.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;ai[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t],r.uniforms.angle=m[t],a.drawArrays(a.TRIANGLES,i[T],i[A]-i[T]))),y[t]&&k&&(u[1^t]-=M*p*x[t],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),u[1^t]=M*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=M*p*g[t+2],Ti[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],a.drawArrays(a.TRIANGLES,i[T],i[A]-i[T]))),y[t+2]&&k&&(u[1^t]+=M*p*x[t+2],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(f=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],h=a[o],g=a[o+2]-h,v=i[o],m=i[o+2]-v;p[o]=2*l/u*g/m,f[o]=2*(s-c)/u*g/m}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=f,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],h=[-1/0],f=l[o];for(e=0;e=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],f[d]):o.drawLine(e[0],g,e[2],g,p[d],f[d])}}for(d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}},!0)},d.enableMouseListeners(),d};var n=t("right-now"),i=t("3d-view"),a=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset"),l=t("has-passive-events")},{"3d-view":52,"has-passive-events":411,"mouse-change":435,"mouse-event-offset":436,"mouse-wheel":438,"right-now":504}],289:[function(t,e,r){var n=t("glslify"),i=t("gl-shader"),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":301,glslify:409}],290:[function(t,e,r){"use strict";var n=t("./camera.js"),i=t("gl-axes3d"),a=t("gl-axes3d/properties"),o=t("gl-spikes3d"),s=t("gl-select-static"),l=t("gl-fbo"),c=t("a-big-triangle"),u=t("mouse-change"),h=t("mouse-wheel"),f=t("gl-mat4/perspective"),p=t("gl-mat4/ortho"),d=t("./lib/shader"),g=t("is-mobile")({tablet:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function y(t){return"boolean"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;if(!e)if(e=document.createElement("canvas"),t.container){var r=t.container;r.appendChild(e)}else document.body.appendChild(e);var x=t.gl;x||(x=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:g}));if(!x)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],_=new v,w=l(x,[x.drawingBufferWidth,x.drawingBufferHeight],{preferFloat:!g}),k=d(x),T=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,A={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:T},M=t.axes||{},S=i(x,M);S.enable=!M.disable;var E=t.spikes||{},C=o(x,E),L=[],P=[],O=[],z=[],I=!0,D=!0,R=new Array(16),F=new Array(16),B={view:null,projection:R,model:F,_ortho:!1},D=!0,N=[x.drawingBufferWidth,x.drawingBufferHeight],j=t.cameraObject||n(e,A),U={gl:x,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:_,camera:j,axes:S,axesPixels:null,spikes:C,bounds:b,objects:L,shape:N,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:y(t.autoResize),autoBounds:y(t.autoBounds),autoScale:!!t.autoScale,autoCenter:y(t.autoCenter),clipToBounds:y(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:B,oncontextloss:null,mouseListener:null,_stopped:!1},V=[x.drawingBufferWidth/U.pixelRatio|0,x.drawingBufferHeight/U.pixelRatio|0];function q(){if(!U._stopped&&U.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*U.pixelRatio),a=0|Math.ceil(n*U.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",I=!0}}}U.autoResize&&q();function H(){for(var t=L.length,e=z.length,r=0;r0&&0===O[e-1];)O.pop(),z.pop().dispose()}function G(){if(U.contextLost)return!0;x.isContextLost()&&(U.contextLost=!0,U.mouseListener.enabled=!1,U.selection.object=null,U.oncontextloss&&U.oncontextloss())}window.addEventListener("resize",q),U.update=function(t){U._stopped||(t=t||{},I=!0,D=!0)},U.add=function(t){U._stopped||(t.axes=S,L.push(t),P.push(-1),I=!0,D=!0,H())},U.remove=function(t){if(!U._stopped){var e=L.indexOf(t);e<0||(L.splice(e,1),P.pop(),I=!0,D=!0,H())}},U.dispose=function(){if(!U._stopped&&(U._stopped=!0,window.removeEventListener("resize",q),e.removeEventListener("webglcontextlost",G),U.mouseListener.enabled=!1,!U.contextLost)){S.dispose(),C.dispose();for(var t=0;te?1.1:1/1.1;U.aspect[0]*=r,U.aspect[1]*=r,U.aspect[2]*=r,U.redraw()}},!0),U._mouseRotating=!1,U._prevButtons=0,U.enableMouseListeners=function(){U.mouseListener=u(e,function(t,e,r){if(!U._stopped){var n=z.length,i=L.length,a=_.object;_.distance=1/0,_.mouse[0]=e,_.mouse[1]=r,_.object=null,_.screen=null,_.dataCoordinate=_.dataPosition=null;var o=!1;if(t&&U._prevButtons)U._mouseRotating=!0;else{U._mouseRotating&&(D=!0),U._mouseRotating=!1;for(var s=0;s_.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:409}],292:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("typedarray-pool"),o=t("./lib/shader");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),h=new s(t,a,l,c,u);return h.update(e),t.addObject(h),h};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var h=n.getParameter(n.BLEND),f=n.getParameter(n.DITHER);return h&&!this.blend&&n.disable(n.BLEND),f&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),h&&!this.blend&&n.enable(n.BLEND),f&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":291,"gl-buffer":241,"gl-shader":301,"typedarray-pool":545}],293:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],h=e[2],f=e[3],p=r[0],d=r[1],g=r[2],v=r[3];(a=c*p+u*d+h*g+f*v)<0&&(a=-a,p=-p,d=-d,g=-g,v=-v);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*h+l*g,t[3]=s*f+l*v,t}},{}],294:[function(t,e,r){"use strict";e.exports=function(t){return t||0===t?t.toString():""}},{}],295:[function(t,e,r){"use strict";var n=t("vectorize-text");e.exports=function(t,e,r){var a=i[e];a||(a=i[e]={});if(t in a)return a[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,c,u=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:a,fragment:l,attributes:u},f={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},v={vertex:s,fragment:c,attributes:u};function m(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return m(t,h)},r.createOrtho=function(t){return m(t,f)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{"gl-shader":301,glslify:409}],297:[function(t,e,r){"use strict";var n=t("is-string-blank"),i=t("gl-buffer"),a=t("gl-vao"),o=t("typedarray-pool"),s=t("gl-mat4/multiply"),l=t("./lib/shaders"),c=t("./lib/glyphs"),u=t("./lib/get-simple-string"),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return f(n,n),f(n,n),f(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t){return!0===t?1:t>1?1:t}function v(t,e,r,n,i,a,o,s,l,c,u,h){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),h=i(e),f=i(e),p=i(e),d=i(e),g=a(e,[{buffer:h,size:3,type:e.FLOAT},{buffer:f,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),m=new v(e,r,n,o,h,f,p,d,g,s,c,u);return m.update(t),m};var m=v.prototype;m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],k=h.slice(),T=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,d=e.axesBounds,g=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=u,l.projection=f,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=g,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var v=0;v<3;++v)if(a[v]){l.scale=e.projectScale[v],l.opacity=e.projectOpacity[v];for(var m=k,C=0;C<16;++C)m[C]=0;for(C=0;C<4;++C)m[5*C]=1;m[5*v]=0,i[v]<0?m[12+v]=d[0][v]:m[12+v]=d[1][v],s(m,c,m),l.model=m;var L=(v+1)%3,P=(v+2)%3,O=M(x),z=M(b);O[L]=1,z[P]=1;var I=p(0,0,0,S(_,O)),D=p(0,0,0,S(w,z));if(Math.abs(I[1])>Math.abs(D[1])){var R=I;I=D,D=R,R=O,O=z,z=R;var F=L;L=P,P=F}I[0]<0&&(O[L]=-1),D[1]>0&&(z[P]=-1);var B=0,N=0;for(C=0;C<4;++C)B+=Math.pow(c[4*L+C],2),N+=Math.pow(c[4*P+C],2);O[L]/=Math.sqrt(B),z[P]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=z,l.fragClipBounds[0]=E(T,g[0],v,-1e8),l.fragClipBounds[1]=E(T,g[1],v,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function P(t,e,r,n,i,a,o){var s=r.gl;if((a===r.projectHasAlpha||o)&&C(e,r,n,i),a===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||h,l.view=n.view||h,l.projection=n.projection||h,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=L,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=i,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*i),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(t,e,r,i){var a;a=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},m.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},m.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=g(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=g(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||"normal",c=t.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else{i=[],a=[];for(n=0;n0){var z=0,I=x,D=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(m)&&Array.isArray(m[0]);t:for(n=0;n<_;++n){y+=1;for(w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue t;h[k]=Math.max(h[k],w[k]),u[k]=Math.min(u[k],w[k])}T=(N=O(f,n,l,this.pixelRatio)).mesh,A=N.lines,M=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(U=F?n0?1-M[0][0]:Y<0?1+M[1][0]:1,W*=W>0?1-M[0][1]:W<0?1+M[1][1]:1],Z=T.cells||[],J=T.positions||[];for(k=0;k0){var m=r*u;o.drawBox(h-m,f-m,p+m,f+m,a),o.drawBox(h-m,d-m,p+m,d+m,a),o.drawBox(h-m,f-m,h+m,d+m,a),o.drawBox(p-m,f-m,p+m,d+m,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":298,"gl-buffer":241,"gl-shader":301}],300:[function(t,e,r){"use strict";e.exports=function(t,e){var r=n(t,e),a=i.mallocUint8(e[0]*e[1]*4);return new c(t,r,a)};var n=t("gl-fbo"),i=t("typedarray-pool"),a=t("ndarray"),o=t("bit-twiddle").nextPow2,s=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_fthis.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;ar)for(t=r;te)for(t=e;t=0){for(var k=0|w.type.charAt(w.type.length-1),T=new Array(k),A=0;A=0;)M+=1;_[y]=M}var S=new Array(r.length);function E(){f.program=o.program(p,f._vref,f._fref,b,_);for(var t=0;t=0){var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);o(t,e,p[0],i,d,a,h)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+f);var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);s(t,e,p,i,d,a,h)}}}return a};var n=t("./GLError");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=["gl","v"],c=[],u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+a+"fv(locations["+e+"],false,obj"+t+")"}throw new i("","Unknown uniform data type for "+name+": "+r)}var a=r.charCodeAt(r.length-1)-48;if(a<2||a>4)throw new i("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+a+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+a+"fv(locations["+e+"],obj"+t+")";default:throw new i("","Unrecognized data type for vector "+name+": "+r)}}}function c(e){for(var n=["return function updateProperty(obj){"],i=function t(e,r){if("object"!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+""===i?o+="["+i+"]":o+="."+i,"object"==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}("",e),a=0;a4)throw new i("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[u].type);var p}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float tubeScale;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:409}],312:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./shaders"),g=d.meshShader,v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,y,x,b,_,w,k,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=i,this.triangleVectors=a,this.triangleColors=s,this.triangleNormals=c,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=u,this.triangleCount=0,this.lineWidth=1,this.edgePositions=h,this.edgeColors=p,this.edgeUVs=d,this.edgeIds=f,this.edgeVAO=g,this.edgeCount=0,this.pointPositions=v,this.pointColors=x,this.pointUVs=b,this.pointSizes=_,this.pointIds=y,this.pointVAO=w,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1],this.pixelRatio=1}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,i=t.projection||m,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=i(t),h=i(t),f=i(t),p=i(t),d=i(t),v=i(t),m=a(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:4}]),x=i(t),_=i(t),w=i(t),k=i(t),T=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=i(t),M=i(t),S=i(t),E=i(t),C=i(t),L=a(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=i(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,a(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":311,colormap:126,"gl-buffer":241,"gl-mat4/invert":265,"gl-mat4/multiply":267,"gl-shader":301,"gl-texture2d":322,"gl-vao":327,ndarray:450,normals:453,"simplicial-complex-contour":518,"typedarray-pool":545}],313:[function(t,e,r){"use strict";var n=t("gl-vec3"),i=t("gl-vec4"),a=function(t,e,r,a){for(var o=0,s=0;so&&(o=u)}var h=t.map(function(t){return function(t,e,r,a){var o,s,l,c=t.points,u=t.velocities,h=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var f=[],p=[],d=[],g=[],v=[],m=[],y=0,x=0,b=i.create(),_=i.create(),w=0;w0)for(k=0;k<8;k++){var T=(k+1)%8;f.push(g[k],v[k],v[T],v[T],g[T],g[k]),d.push(_,b,b,b,_,_),m.push(y,x,x,x,y,y),p.push([f.length-6,f.length-5,f.length-4],[f.length-3,f.length-2,f.length-1])}var A=g;g=v,v=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:f,cells:p,vectors:d,vertexIntensity:m}}(t,r,a,o)}),f=[],p=[],d=[],g=[];for(s=0;se)return r-1}return r},c=n.create(),u=n.create(),h=function(t,e,r){return tr?r:t},f=function(t,e,r,i){var a=t[0],o=t[1],s=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],a),v=l(r[1],o),m=l(r[2],s),y=g+1,x=v+1,b=m+1;if(r[0][g]===a&&(y=g),r[1][v]===o&&(x=v),r[2][m]===s&&(b=m),i&&(g=h(g,0,f-1),y=h(y,0,f-1),v=h(v,0,p-1),x=h(x,0,p-1),m=h(m,0,d-1),b=h(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(a-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][v])/(r[1][x]-r[1][v]),k=(s-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],z=e[S+T+C],I=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(c,O,z,_),n.lerp(B,B,c,w),n.lerp(c,I,D,_),n.lerp(u,R,F,_),n.lerp(c,c,u,w),n.lerp(B,B,c,k),B},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r=h&&r<=g&&n>=f&&n<=v&&i>=d&&i<=m},x=10*n.distance(e[0],e[1])/i,b=x*x,_=1,w=0;n.create();r.length>=2&&(_=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=0;sw&&!isNaN(I)&&isFinite(I)&&(w=I),C.push(I),u.push({points:A,velocities:M,divergences:C});for(var P=0;P<100*i&&A.lengthb&&n.scale(O,O,x/Math.sqrt(z)),n.add(O,O,T),S=t.getVelocity(O),n.squaredDistance(E,O)-b>-1e-4*b){A.push(O),E=O,M.push(S);L=t.getDivergence(O,S);(I=n.length(L))>w&&!isNaN(I)&&isFinite(I)&&(w=I),C.push(I)}T=O}}for(k=0;k max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":301,glslify:409}],315:[function(t,e,r){arguments[4][111][0].apply(r,arguments)},{dup:111}],316:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=i(e),f=a(e,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,h,f,p,d,[0,0,0]),m={levels:[[],[],[]]};for(var k in t)m[k]=t[k];return m.colormap=m.colormap||"jet",v.update(m),v};var n=t("bit-twiddle"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("typedarray-pool"),l=t("colormap"),c=t("ndarray-ops"),u=t("ndarray-pack"),h=t("ndarray"),f=t("surface-nets"),p=t("gl-mat4/multiply"),d=t("gl-mat4/invert"),g=t("binary-search-bounds"),v=t("ndarray-gradient"),m=t("./lib/shaders"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(t,e,r,n,i,a,o,l,c,u,f,p,d,g,v){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=v,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.isTransparent=function(){return this.opacity<1},C.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},C.pickSlots=1,C.setPickBase=function(t){this.pickId=t};var L=[0,0,0],P={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=P.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var c=P.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return P.showSurface=o,P.showContour=s,P}var z={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},I=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=z;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=I;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=O(n,this);if(u.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!e){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var f=this._contourVAO;for(f.bind(),i=0;i<3;++i)for(h.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?a:1-a,f=0;f<2;++f)for(var p=i+u,d=s+f,v=h*(f?l:1-l),m=0;m<3;++m)c[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},C.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},C.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=B(t.contourWidth,Number)),"showContour"in t&&(this.showContour=B(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=B(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=j(t.contourColor)),"contourProject"in t&&(this.contourProject=B(t.contourProject,function(t){return B(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=j(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=B(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=B(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=h(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var d=p[o];for(b=0;b<2;++b)if(d.shape[b]!==a[b])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var m=g[o];if((Array.isArray(m)||m.length)&&(m=h(m)),m.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var y=h(m.data,a);y.stride[o]=m.stride[0],y.stride[1^o]=0,this.padField(this._field[o],y)}}else{for(o=0;o<2;++o){var x=[0,0];x[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b0){for(var kt=0;kt<5;++kt)rt.pop();G-=1}continue t}rt.push(st[0],st[1],ut[0],ut[1],st[2]),G+=1}}ot.push(G)}this._contourOffsets[nt]=at,this._contourCounts[nt]=ot}var Tt=s.mallocFloat(rt.length);for(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:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=h(t.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var c=t.family.join(", "),u=[t.style];t.style!=t.variant&&u.push(t.variant),t.variant!=t.weight&&u.push(t.weight),_&&t.weight!=t.stretch&&u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[i]=e.font[r]}}),(a||o)&&this.font.forEach(function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)}),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),f=0;f2){for(var w=!t.position[0].length,T=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],k.normalViewport||(i*=-1),i})),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var 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=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{"bit-twiddle":92,"color-normalize":120,"css-font":139,"detect-kerning":166,"es6-weak-map":318,"flatten-vertex-data":227,"font-atlas":228,"font-measure":229,"gl-util/context":323,"is-plain-obj":422,"object-assign":454,"parse-rect":459,"parse-unit":461,"pick-by-alias":465,regl:502,"to-px":539,"typedarray-pool":545}],318:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?WeakMap:t("./polyfill")},{"./is-implemented":319,"./polyfill":321}],319:[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)))))}},{}],320:[function(t,e,r){"use strict";e.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],321:[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"),h=t("es6-iterator/for-of"),f=t("es6-symbol").toStringTag,p=t("./is-native-implemented"),d=Array.isArray,g=Object.defineProperty,v=Object.prototype.hasOwnProperty,m=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,m(this)):this,i(e)&&(d(e)||(e=u(e))),g(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(h(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!!v.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:c(function(t){if(v.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:c(function(t){return v.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,f,c("c","WeakMap"))},{"./is-native-implemented":320,d:151,"es5-ext/object/is-value":194,"es5-ext/object/set-prototype-of":200,"es5-ext/object/valid-object":204,"es5-ext/object/valid-value":205,"es5-ext/string/random-uniq":210,"es6-iterator/for-of":212,"es6-iterator/get":213,"es6-symbol":219}],322:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("ndarray-ops"),a=t("typedarray-pool");e.exports=function(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if("number"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new f(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=d(o,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var h,p,v=0;if(2===o.length)v=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])v=t.ALPHA;else if(2===o[2])v=t.LUMINANCE_ALPHA;else if(3===o[2])v=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)h=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];p=a.malloc(m,r);var x=n(p,o,y,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):u(x,e),h=p.subarray(0,m)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,v,o[0],o[1],0,v,c,h),l||a.free(p);return new f(t,b,o[0],o[1],v,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){i.muls(t,e,255)};function h(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function f(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=f.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new f(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,c,h){var f=h.dtype,p=h.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var g=0,v=0,m=d(p,h.stride.slice());"float32"===f?g=t.FLOAT:"float64"===f?(g=t.FLOAT,m=!1,f="float32"):"uint8"===f?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,m=!1,f="uint8");if(2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],h=n(h.data,p,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}p[2]}v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s);if(v!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=h.size,x=c.indexOf(o)<0;x&&c.push(o);if(g===l&&m)0===h.offset&&h.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data.subarray(h.offset,h.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data.subarray(h.offset,h.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,h):i.assign(_,h),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:450,"ndarray-ops":444,"typedarray-pool":545}],323:[function(t,e,r){(function(r){"use strict";var n=t("pick-by-alias");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*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)}if(!t.gl)try{t.gl=t.canvas.getContext("webgl",t.attrs)}catch(e){try{t.gl=t.canvas.getContext("experimental-webgl",t.attrs)}catch(e){t.gl=t.canvas.getContext("webgl-experimental",t.attrs)}}return t.gl}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":465}],324:[function(t,e,r){"use strict";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=t("./fromValues"),i=t("./normalize"),a=t("./dot")},{"./dot":339,"./fromValues":345,"./normalize":356}],330:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],331:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],332:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],333:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],334:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],335:[function(t,e,r){e.exports=t("./distance")},{"./distance":336}],336:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],337:[function(t,e,r){e.exports=t("./divide")},{"./divide":338}],338:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],339:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],340:[function(t,e,r){e.exports=1e-6},{}],341:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t("./epsilon")},{"./epsilon":340}],342:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],343:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],344:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],357:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],358:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],359:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],360:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],361:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],362:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],363:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],364:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],365:[function(t,e,r){e.exports=t("./squaredDistance")},{"./squaredDistance":367}],366:[function(t,e,r){e.exports=t("./squaredLength")},{"./squaredLength":368}],367:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],368:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],369:[function(t,e,r){e.exports=t("./subtract")},{"./subtract":370}],370:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],371:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],372:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],373:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t}},{}],374:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],375:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],376:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],377:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],378:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],379:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],380:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],381:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],382:[function(t,e,r){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),inverse:t("./inverse"),normalize:t("./normalize"),dot:t("./dot"),lerp:t("./lerp"),random:t("./random"),transformMat4:t("./transformMat4"),transformQuat:t("./transformQuat")}},{"./add":374,"./clone":375,"./copy":376,"./create":377,"./distance":378,"./divide":379,"./dot":380,"./fromValues":381,"./inverse":383,"./length":384,"./lerp":385,"./max":386,"./min":387,"./multiply":388,"./negate":389,"./normalize":390,"./random":391,"./scale":392,"./scaleAndAdd":393,"./set":394,"./squaredDistance":395,"./squaredLength":396,"./subtract":397,"./transformMat4":398,"./transformQuat":399}],383:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],384:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],385:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],386:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],387:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],388:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],389:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],390:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],391:[function(t,e,r){var n=t("./normalize"),i=t("./scale");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{"./normalize":390,"./scale":392}],392:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],393:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],394:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],395:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],396:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],397:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],398:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],399:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t[3]=e[3],t}},{}],400:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],401:[function(t,e,r){var n=t("glsl-tokenizer"),i=t("atob-lite");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return F(r),P+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function G(){return"."===e?(S.push(e),M=g,r=e,T+1):/[eE]/.test(e)?(S.push(e),M=g,r=e,T+1):"x"===e&&1===S.length&&"0"===S[0]?(M=_,S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function Y(){return"f"===e&&(S.push(e),r=e,T+=1),/[eE]/.test(e)?(S.push(e),r=e,T+1):"-"===e&&/[eE]/.test(r)?(S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function W(){if(/[^\d\w_]/.test(e)){var t=S.join("");return M=R.indexOf(t)>-1?y:D.indexOf(t)>-1?m:v,F(S.join("")),M=l,T}return S.push(e),r=e,T+1}};var n=t("./lib/literals"),i=t("./lib/operators"),a=t("./lib/builtins"),o=t("./lib/literals-300es"),s=t("./lib/builtins-300es"),l=999,c=9999,u=0,h=1,f=2,p=3,d=4,g=5,v=6,m=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":404,"./lib/builtins-300es":403,"./lib/literals":406,"./lib/literals-300es":405,"./lib/operators":407}],403:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":404}],404:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],405:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":406}],406:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],407:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],408:[function(t,e,r){var n=t("./index");e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{"./index":402}],409:[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,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,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,f=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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-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}},{}],413:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new a(l,new Array(i+1),!1),f=h.adjacent,p=new Array(i+2),u=0;u<=i;++u){for(var d=l.slice(),g=0;g<=i;++g)g===u&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new a(d,new Array(i+1),!0);f[u]=m,p[u]=m}p[i+1]=h;for(var u=0;u<=i;++u)for(var d=f[u].vertices,y=f[u].adjacent,g=0;g<=i;++g){var x=d[g];if(x<0)y[g]=h;else for(var b=0;b<=i;++b)f[b].vertices.indexOf(x)<0&&(y[g]=f[b])}for(var _=new c(i,o,p),w=!!e,u=i+1;u0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var i=new Function("test",e.join("")),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var f=u[h];i[h]=f<0?e:a[f]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=a[u];a[u]=t;var p=this.orient();if(a[u]=f,p<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var f=[];h.length>0;){var p=(e=h.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,c.push(m),h.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),T=new a(w,k,!0);u.push(T);var A=_.indexOf(e);if(!(A<0)){_[A]=T,k[g]=m,w[v]=-1,k[v]=e,d[v]=T,T.flip();for(b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}f.push(new o(S,T,b))}}}}}}f.sort(s);for(v=0;v+1=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":510,"simplicial-complex":520}],414:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=0,a=1;function o(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function h(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?i:(r.splice(n,1),c(t,r),a)}function f(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function d(t,e){for(var r=0;r>1],i=[],a=[],s=[];for(r=0;r3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,v),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?h(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?h(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,a):(c===a&&(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return a}for(s=n.ge(this.leftPoints,t,v);sthis.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return ethis.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":91}],415:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r13)&&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}},{}],424:[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))}},{}],425:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],426:[function(t,e,r){var n,i;n=this,i=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){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r0;)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 g(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 v(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 y(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function x(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 b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?y(t,b):t}var _={};function w(t){_[t]||("undefined"!=typeof console&&console.warn(t),_[t]=!0)}function k(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}function M(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var S,E,C,L=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),P=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,O=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,z={now:L,frame:function(t){var e=P(t);return{cancel:function(){return O(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){return S||(S=self.document.createElement("a")),S.href=t,S.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio}},I={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},D={supported:!1,testSupport:function(t){!R&&C&&(F?B(t):E=t)}},R=!1,F=!1;function B(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,C),t.isContextLost())return;D.supported=!0}catch(t){}t.deleteTexture(e),R=!0}self.document&&((C=self.document.createElement("img")).onload=function(){E&&B(E),E=null,F=!0},C.onerror=function(){R=!0,E=null},C.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var N="01",j=function(t){this._transformRequestFn=t,this._createSkuToken()};j.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",N,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},j.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},j.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},j.prototype.normalizeStyleURL=function(t,e){return Y(t,e)},j.prototype.normalizeGlyphsURL=function(t,e){return W(t,e)},j.prototype.normalizeSourceURL=function(t,e){return X(t,e)},j.prototype.normalizeSpriteURL=function(t,e,r,n){return Z(t,e,r,n)},j.prototype.normalizeTileURL=function(t,e,r){return this._isSkuTokenExpired()&&this._createSkuToken(),K(t,e,r,this._skuToken)},j.prototype.canonicalizeTileURL=function(t){return Q(t)},j.prototype.canonicalizeTileset=function(t,e){return tt(t,e)};var U="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes";function V(t,e){var r=rt(I.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!I.REQUIRE_ACCESS_TOKEN)return nt(t);if(!(e=e||I.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+U);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+U);return t.params.push("access_token="+e),nt(t)}function q(t){return 0===t.indexOf("mapbox:")}var H=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function G(t){return H.test(t)}var Y=function(t,e){if(!q(t))return t;var r=rt(t);return r.path="/styles/v1"+r.path,V(r,e)},W=function(t,e){if(!q(t))return t;var r=rt(t);return r.path="/fonts/v1"+r.path,V(r,e)},X=function(t,e){if(!q(t))return t;var r=rt(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),V(r,e)},Z=function(t,e,r,n){var i=rt(t);return q(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,V(i,n)):(i.path+=""+e+r,nt(i))},J=/(\.(png|jpg)\d*)(?=$)/,K=function(t,e,r,n){if(!e||!q(e))return t;var i=rt(t),a=z.devicePixelRatio>=2||512===r?"@2x":"",o=D.supported?".webp":"$1";return i.path=i.path.replace(J,""+a+o),i.path="/v4"+i.path,I.REQUIRE_ACCESS_TOKEN&&I.ACCESS_TOKEN&&n&&i.params.push("sku="+n),V(i)},$=/\.[\w]+$/,Q=function(t){var e=rt(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match($))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var n=e.params.filter(function(t){return!t.match(/^access_token=/)});return n.length&&(r+="?"+n.join("&")),r},tt=function(t,e){if(!q(e))return t.tiles||[];for(var r=[],n=0,i=t.tiles;n=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},at.prototype.processRequests=function(){},at.prototype.postEvent=function(t,e,r){var n=this;if(I.EVENTS_URL){var i=rt(I.EVENTS_URL);i.params.push("access_token="+(I.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.1.1",skuId:N,userId:this.anonId},o=e?h(a,e):a,s={url:nt(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([o])};this.pendingRequest=St(s,function(t){n.pendingRequest=null,r(t),n.saveEventData(),n.processRequests()})}},at.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()};var ot,st=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){this.skuToken=r,I.EVENTS_URL&&I.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return q(t)||G(t)})&&this.queueRequest({id:e,timestamp:Date.now()})},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var e=this.queue.shift(),r=e.id,n=e.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=d()),this.postEvent(n,{skuToken:this.skuToken},function(e){e||r&&(t.success[r]=!0)}))}},e}(at),lt=new(function(t){function e(){t.call(this,"appUserTurnstile")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t){I.EVENTS_URL&&I.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return q(t)||G(t)})&&this.queueRequest(Date.now())},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var e=it(I.ACCESS_TOKEN),r=e?e.u:I.ACCESS_TOKEN,n=r!==this.eventData.tokenU;g(this.anonId)||(this.anonId=d(),n=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),o=new Date(i),s=(i-this.eventData.lastSuccess)/864e5;n=n||s>=1||s<-1||a.getDate()!==o.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},function(e){e||(t.eventData.lastSuccess=i,t.eventData.tokenU=r)})}},e}(at)),ct=lt.postTurnstileEvent.bind(lt),ut=new st,ht=ut.postMapLoadEvent.bind(ut),ft="mapbox-tiles",pt=500,dt=50,gt=42e4;function vt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var mt=1/0,yt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(yt);var xt=function(t){function e(e,r,n){401===r&&G(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);function bt(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var _t=bt()?function(){return self.worker&&self.worker.referrer}:function(){var t=self.location.origin;if(t&&"null"!==t&&"file://"!==t)return t+self.location.pathname};function wt(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:_t(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf("sku=")>0&&G(r);"json"===t.type&&i.headers.set("Accept","application/json");var l=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&w(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 xt(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&&function(t,e,r){if(self.caches){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")||"");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()-rDate.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})})}(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var kt,Tt,At=function(t,e){if(!/^file:/.test(t.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return wt(t,e);if(bt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}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.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 xt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},Mt=function(t,e){return At(h(t,{type:"arrayBuffer"}),e)},St=function(t,e){return At(h(t,{method:"POST"}),e)};kt=[],Tt=0;var Et=function(t,e){if(Tt>=I.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return kt.push(r),r}Tt++;var n=!1,i=function(){if(!n)for(n=!0,Tt--;kt.length&&Tt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},zt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var It={$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"},"*":{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}},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:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{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"},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:"string",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-offset"}],"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-anchor"},{"!":"text-offset"},{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",requires:["text-field"],values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",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-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":{}}},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:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"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"},"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"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"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:"string",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:"string",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:"string",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,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:"string",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"}}},Dt=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Rt(t){var e=t.key,r=t.value;return r?[new Dt(e,r,"constants have been deprecated as of v8")]:[]}function Ft(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 te=[qt,Ht,Gt,Yt,Wt,Kt,Xt,$t(Zt)];function ee(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ee(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=te;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),h=i.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),g=o(h[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),f];default:return null}}return null}}catch(t){}}).parseCSSColor,ne=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};ne.parse=function(t){if(t){if(t instanceof ne)return t;if("string"==typeof t){var e=re(t);if(e)return new ne(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ne.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+")"},ne.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]},ne.black=new ne(0,0,0,1),ne.white=new ne(1,1,1,1),ne.transparent=new ne(0,0,0,0),ne.red=new ne(1,0,0,1);var ie=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"})};ie.prototype.compare=function(t,e){return this.collator.compare(t,e)},ie.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ae=function(t,e,r){this.text=t,this.scale=e,this.fontStack=r},oe=function(t){this.sections=t};function se(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function le(t){if(null===t)return qt;if("string"==typeof t)return Gt;if("boolean"==typeof t)return Yt;if("number"==typeof t)return Ht;if(t instanceof ne)return Wt;if(t instanceof ie)return Jt;if(t instanceof oe)return Kt;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n2){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=Zt;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=$t(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 de=function(t){this.type=Kt,this.sections=t};de.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],n=1;n4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":se(e[0],e[1],e[2],e[3])))return new ne(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new he(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=0)return!1;var r=!0;return t.eachChild(function(t){r&&!ke(t,e)&&(r=!1)}),r}be.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Yt);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Yt);if(!i)return null;var a=null;return r.locale&&!(a=e.parse(r.locale,1,Gt))?null:new be(n,i,a)},be.prototype.evaluate=function(t){return new ie(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},be.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},be.prototype.possibleOutputs=function(){return[void 0]},be.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Te=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Te.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Te(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Te.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Te.prototype.eachChild=function(){},Te.prototype.possibleOutputs=function(){return[void 0]},Te.prototype.serialize=function(){return["var",this.name]};var Ae=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new Vt),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=n,this.errors=i,this.expectedType=r};function Me(t,e){for(var r,n,i=t.length-1,a=0,o=i,s=0;a<=o;)if(r=t[s=Math.floor((a+o)/2)],n=t[s+1],r<=e){if(s===i||ee))throw new he("Input is not a number.");o=s-1}return 0}Ae.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)},Ae.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new pe(e,[t]):"coerce"===r?new ve(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||"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 ue)&&function t(e){if(e instanceof Te)return t(e.boundExpression);if(e instanceof xe&&"error"===e.name)return!1;if(e instanceof be)return!1;var r=e instanceof ve||e instanceof pe,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof ue}),!!n&&(_e(e)&&ke(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]))}(a)){var l=new ye;try{a=new ue(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.")},Ae.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 Ae(this.registry,n,e||null,i,this.errors)},Ae.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 Ut(n,t))},Ae.prototype.checkSubtype=function(t,e){var r=ee(t,e);return r&&this.error(r),r};var Se=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 Se(i,r,n)},Se.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[Me(e,n)].evaluate(t)},Se.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 Ce=Object.freeze({number:Ee,color:function(t,e,r){return new ne(Ee(t.r,e.r,r),Ee(t.g,e.g,r),Ee(t.b,e.b,r),Ee(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return Ee(t,e[n],r)})}}),Le=.95047,Pe=1,Oe=1.08883,ze=4/29,Ie=6/29,De=3*Ie*Ie,Re=Ie*Ie*Ie,Fe=Math.PI/180,Be=180/Math.PI;function Ne(t){return t>Re?Math.pow(t,1/3):t/De+ze}function je(t){return t>Ie?t*t*t:De*(t-ze)}function Ue(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ve(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qe(t){var e=Ve(t.r),r=Ve(t.g),n=Ve(t.b),i=Ne((.4124564*e+.3575761*r+.1804375*n)/Le),a=Ne((.2126729*e+.7151522*r+.072175*n)/Pe);return{l:116*a-16,a:500*(i-a),b:200*(a-Ne((.0193339*e+.119192*r+.9503041*n)/Oe)),alpha:t.a}}function He(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=Pe*je(e),r=Le*je(r),n=Oe*je(n),new ne(Ue(3.2404542*r-1.5371385*e-.4985314*n),Ue(-.969266*r+1.8760108*e+.041556*n),Ue(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var Ge={forward:qe,reverse:He,interpolate:function(t,e,r){return{l:Ee(t.l,e.l,r),a:Ee(t.a,e.a,r),b:Ee(t.b,e.b,r),alpha:Ee(t.alpha,e.alpha,r)}}},Ye={forward:function(t){var e=qe(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Be;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*Fe,r=t.c;return He({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:Ee(t.c,e.c,r),l:Ee(t.l,e.l,r),alpha:Ee(t.alpha,e.alpha,r)}}},We=Object.freeze({lab:Ge,hcl:Ye}),Xe=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,Ht)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Wt:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(f,d,c);if(!g)return null;c=c||g.type,l.push([h,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new Xe(c,r,n,i,l):e.error("Type "+Qt(c)+" is not interpolatable.")},Xe.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=Me(e,n),o=e[a],s=e[a+1],l=Xe.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return"interpolate"===this.operator?Ce[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?Ye.reverse(Ye.interpolate(Ye.forward(c),Ye.forward(u),l)):Ge.reverse(Ge.interpolate(Ge.forward(c),Ge.forward(u),l))},Xe.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new he("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new he("Array index must be an integer, but found "+e+" instead.");return r[e]},$e.prototype.eachChild=function(t){t(this.index),t(this.input)},$e.prototype.possibleOutputs=function(){return[void 0]},$e.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Qe=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};Qe.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 f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,le(f)))return null}else r=le(f);if(void 0!==i[String(f)])return c.error("Branch labels must be unique.");i[String(f)]=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,Zt);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 Qe(r,n,d,i,a,g):null},Qe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(le(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Qe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Qe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Qe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i",function(t,e,r){return e>r},function(t,e,r,n){return n.compare(e,r)>0}),lr=nr("<=",function(t,e,r){return e<=r},function(t,e,r,n){return n.compare(e,r)<=0}),cr=nr(">=",function(t,e,r){return e>=r},function(t,e,r,n){return n.compare(e,r)>=0}),ur=function(t,e,r,n,i){this.type=Gt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};ur.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Ht);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,Gt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Gt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,Ht)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Ht))?null:new ur(r,i,a,o,s)},ur.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))},ur.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)},ur.prototype.possibleOutputs=function(){return[void 0]},ur.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 hr=function(t){this.type=Ht,this.input=t};hr.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 "+Qt(r.type)+" instead."):new hr(r):null},hr.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 he("Expected value to be of type string or array, but found "+Qt(le(e))+" instead.")},hr.prototype.eachChild=function(t){t(this.input)},hr.prototype.possibleOutputs=function(){return[void 0]},hr.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var fr={"==":ir,"!=":ar,">":sr,"<":or,">=":cr,"<=":lr,array:pe,at:$e,boolean:pe,case:tr,coalesce:Je,collator:be,format:de,interpolate:Xe,"interpolate-hcl":Xe,"interpolate-lab":Xe,length:hr,let:Ke,literal:ue,match:Qe,number:pe,"number-format":ur,object:pe,step:Se,string:pe,"to-boolean":ve,"to-color":ve,"to-number":ve,"to-string":ve,var:Te};function pr(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=se(r,n,i,o);if(s)throw new he(s);return new ne(r/255*o,n/255*o,i/255*o,o)}function dr(t,e){return t in e}function gr(t,e){var r=e[t];return void 0===r?null:r}function vr(t){return{type:t}}function mr(t){return{result:"success",value:t}}function yr(t){return{result:"error",value:t}}function xr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function br(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function _r(t){return!!t.expression&&t.expression.interpolated}function wr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function kr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Tr(t){return t}function Ar(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Mr(t,e,r,n,i){return Ar(typeof r===i?n[r]:void 0,t.default,e.default)}function Sr(t,e,r){if("number"!==wr(r))return Ar(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=Me(t.stops.map(function(t){return t[0]}),r);return t.stops[i][1]}function Er(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==wr(r))return Ar(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=Me(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=Ce[e.type]||Tr;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=We[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 Cr(t,e,r){return"color"===e.type?r=ne.parse(r):"formatted"===e.type?r=oe.fromString(r.toString()):wr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Ar(r,t.default,e.default)}xe.register(fr,{error:[{kind:"error"},[Gt],function(t,e){var r=e[0];throw new he(r.evaluate(t))}],typeof:[Gt,[Zt],function(t,e){return Qt(le(e[0].evaluate(t)))}],"to-rgba":[$t(Ht,4),[Wt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Wt,[Ht,Ht,Ht],pr],rgba:[Wt,[Ht,Ht,Ht,Ht],pr],has:{type:Yt,overloads:[[[Gt],function(t,e){return dr(e[0].evaluate(t),t.properties())}],[[Gt,Xt],function(t,e){var r=e[0],n=e[1];return dr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Zt,overloads:[[[Gt],function(t,e){return gr(e[0].evaluate(t),t.properties())}],[[Gt,Xt],function(t,e){var r=e[0],n=e[1];return gr(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Zt,[Gt],function(t,e){return gr(e[0].evaluate(t),t.featureState||{})}],properties:[Xt,[],function(t){return t.properties()}],"geometry-type":[Gt,[],function(t){return t.geometryType()}],id:[Zt,[],function(t){return t.id()}],zoom:[Ht,[],function(t){return t.globals.zoom}],"heatmap-density":[Ht,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Ht,[],function(t){return t.globals.lineProgress||0}],accumulated:[Zt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Ht,vr(Ht),function(t,e){for(var r=0,n=0,i=e;n":[Yt,[Gt,Zt],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->":[Yt,[Zt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[Yt,[Gt,Zt],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-<=":[Yt,[Zt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[Yt,[Gt,Zt],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->=":[Yt,[Zt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[Yt,[Zt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Yt,[],function(t){return null!==t.id()}],"filter-type-in":[Yt,[$t(Gt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Yt,[$t(Zt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Yt,[Gt,$t(Zt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Yt,[Gt,$t(Zt)],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:Yt,overloads:[[[Yt,Yt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[vr(Yt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in fr}function Or(t,e){var r=new Ae(fr,[],e?function(t){var e={color:Wt,string:Gt,number:Ht,enum:Gt,boolean:Yt,formatted:Kt};return"array"===t.type?$t(e[t.value]||Zt,t.length):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?mr(new Lr(n,e)):yr(r.errors)}Lr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this.expression.evaluate(this._evaluator)},Lr.prototype.evaluate=function(t,e,r){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null;try{var n=this.expression.evaluate(this._evaluator);if(null==n)return this._defaultValue;if(this._enumValues&&!(n in this._enumValues))throw new he("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(n)+" instead.");return n}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var zr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!we(e.expression)};zr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},zr.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)};var Ir=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!we(e.expression),r instanceof Xe&&(this.interpolationType=r.interpolation)};function Dr(t,e){if("error"===(t=Or(t,e)).result)return t;var r=t.value.expression,n=_e(r);if(!n&&!xr(e))return yr([new Ut("","data expressions not supported")]);var i=ke(r,["zoom"]);if(!i&&!br(e))return yr([new Ut("","zoom expressions not supported")]);var a=function t(e){var r=null;if(e instanceof Ke)r=t(e.result);else if(e instanceof Je)for(var n=0,i=e.args;nn.maximum?[new Dt(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function jr(t){var e,r,n,i=t.valueSpec,a=Nt(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l=!s,c="array"===wr(t.value.stops)&&"array"===wr(t.value.stops[0])&&"object"===wr(t.value.stops[0][0]),u=Fr({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 Dt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Br({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===wr(r)&&0===r.length&&e.push(new Dt(t.key,r,"array must have at least one stop")),e},default:function(t){return ln({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&u.push(new Dt(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||u.push(new Dt(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!_r(t.valueSpec)&&u.push(new Dt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!xr(t.valueSpec)?u.push(new Dt(t.key,t.value,"property functions not supported")):s&&!br(t.valueSpec)&&u.push(new Dt(t.key,t.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==t.value.property||u.push(new Dt(t.key,t.value,'"property" property is required')),u;function h(t){var e=[],a=t.value,s=t.key;if("array"!==wr(a))return[new Dt(s,a,"array expected, "+wr(a)+" found")];if(2!==a.length)return[new Dt(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==wr(a[0]))return[new Dt(s,a,"object expected, "+wr(a[0])+" found")];if(void 0===a[0].zoom)return[new Dt(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Dt(s,a,"object stop key must have value")];if(n&&n>Nt(a[0].zoom))return[new Dt(s,a[0].zoom,"stop zoom values must appear in ascending order")];Nt(a[0].zoom)!==n&&(n=Nt(a[0].zoom),r=void 0,o={}),e=e.concat(Fr({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Nr,value:f}}))}else e=e.concat(f({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Pr(jt(a[1]))?e.concat([new Dt(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(ln({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function f(t,n){var s=wr(t.value),l=Nt(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Dt(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 Dt(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 xr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Dt(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":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 Wr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Xr(t[1],t[2],"=="):"!="===r?Kr(Xr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Xr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Wr))):"all"===r?["all"].concat(t.slice(1).map(Wr)):"none"===r?["all"].concat(t.slice(1).map(Wr).map(Kr)):"in"===r?Zr(t[1],t.slice(2)):"!in"===r?Kr(Zr(t[1],t.slice(2))):"has"===r?Jr(t[1]):"!has"!==r||Kr(Jr(t[1]))}function Xr(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 Zr(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(Yr)]]:["filter-in-small",t,["literal",e]]}}function Jr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Kr(t){return["!",t]}function $r(t){return qr(jt(t.value))?Ur(Ft({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==wr(r))return[new Dt(n,r,"array expected, "+wr(r)+" found")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Dt(n,r,"filter array must have at least 1 element")];switch(o=o.concat(Vr({key:n+"[0]",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Nt(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Nt(r[1])&&o.push(new Dt(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new Dt(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=wr(r[1]))&&o.push(new Dt(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[f]=!0,a.push(c[f])):o[f]=!1}}},bn.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),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=h;p++){var d=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},bn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},bn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},bn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=xn+this.cells.length+1+1,r=0,n=0;n=0)){var h=t[u];c[u]=wn[l].shallow.indexOf(u)>=0?h:An(h,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 Mn(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof _n)return t;if(Array.isArray(t))return t.map(Mn);if("object"==typeof t){var e=t.$name||"Object",r=wn[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:Mn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var Sn=function(){this.first=!0};Sn.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 Cn(t){for(var e=0,r=t;e=65097&&t<=65103)||En["CJK Compatibility Ideographs"](t)||En["CJK Compatibility"](t)||En["CJK Radicals Supplement"](t)||En["CJK Strokes"](t)||!(!En["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||En["CJK Unified Ideographs Extension A"](t)||En["CJK Unified Ideographs"](t)||En["Enclosed CJK Letters and Months"](t)||En["Hangul Compatibility Jamo"](t)||En["Hangul Jamo Extended-A"](t)||En["Hangul Jamo Extended-B"](t)||En["Hangul Jamo"](t)||En["Hangul Syllables"](t)||En.Hiragana(t)||En["Ideographic Description Characters"](t)||En.Kanbun(t)||En["Kangxi Radicals"](t)||En["Katakana Phonetic Extensions"](t)||En.Katakana(t)&&12540!==t||!(!En["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)||!(!En["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||En["Unified Canadian Aboriginal Syllabics"](t)||En["Unified Canadian Aboriginal Syllabics Extended"](t)||En["Vertical Forms"](t)||En["Yijing Hexagram Symbols"](t)||En["Yi Syllables"](t)||En["Yi Radicals"](t)))}function zn(t){return!(On(t)||function(t){return!!(En["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||En["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)||En["Letterlike Symbols"](t)||En["Number Forms"](t)||En["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)||En["Control Pictures"](t)&&9251!==t||En["Optical Character Recognition"](t)||En["Enclosed Alphanumerics"](t)||En["Geometric Shapes"](t)||En["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||En["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||En["CJK Symbols and Punctuation"](t)||En.Katakana(t)||En["Private Use Area"](t)||En["CJK Compatibility Forms"](t)||En["Small Form Variants"](t)||En["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 In(t,e){return!(!e&&(t>=1424&&t<=2303||En["Arabic Presentation Forms-A"](t)||En["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||En.Khmer(t))}var Dn,Rn=!1,Fn=null,Bn=!1,Nn=new zt,jn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Bn||null!=jn.applyArabicShaping}},Un=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 Sn,this.transition={})};Un.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 Vn=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(kr(t))return new Rr(t,e);if(Pr(t)){var r=Dr(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=ne.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Vn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Vn.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var qn=function(t){this.property=t,this.value=new Vn(t,void 0)};qn.prototype.transitioned=function(t,e){return new Gn(this.property,this.value,e,h({},t.transition,this.transition),t.now)},qn.prototype.untransitioned=function(){return new Gn(this.property,this.value,null,{},0)};var Hn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Hn.prototype.getValue=function(t){return b(this._values[t].value.value)},Hn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new qn(this._values[t].property)),this._values[t].value=new Vn(this._values[t].property,null===e?void 0:b(e))},Hn.prototype.getTransition=function(t){return b(this._values[t].transition)},Hn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new qn(this._values[t].property)),this._values[t].transition=b(e)||void 0},Hn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e=1)return 1;var e=i*i,r=e*i;return 4*(i<.5?r:3*(i-e)+r-.75)}())}return r};var Yn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Yn.prototype.possiblyEvaluate=function(t){for(var e=new Zn(this._properties),r=0,n=Object.keys(this._values);rn.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Kn),Qn=function(t){this.specification=t};Qn.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Un(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Un(Math.floor(e.zoom),e)),t.expression.evaluate(new Un(Math.floor(e.zoom+1),e)),e)}},Qn.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Qn.prototype.interpolate=function(t){return t};var ti=function(t){this.specification=t};ti.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},ti.prototype.interpolate=function(){return!1};var ei=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],n=this.defaultPropertyValues[e]=new Vn(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new qn(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};kn("DataDrivenProperty",Kn),kn("DataConstantProperty",Jn),kn("CrossFadedDataDrivenProperty",$n),kn("CrossFadedProperty",Qn),kn("ColorRampProperty",ti);var ri=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter=function(){return!0},"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 Wn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Hn(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.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(vn,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(gn,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();return this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t),this._transitionablePaint._values[t].value.isDataDriven()||o||a},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},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){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(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)&&mn(this,t.call(pn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:It,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 Xn&&xr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(zt),ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ii=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},ai=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function oi(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i,a=(i=t.type,ni[i].BYTES_PER_ELEMENT),o=r=si(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:si(r,Math.max(n,e)),alignment:e}}function si(t,e){return Math.ceil(t/e)*e}ai.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},ai.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},ai.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ai.prototype.clear=function(){this.length=0},ai.prototype.resize=function(t){this.reserve(t),this.length=t},ai.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)}},ai.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var li=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}(ai);li.prototype.bytesPerElement=4,kn("StructArrayLayout2i4",li);var ci=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}(ai);ci.prototype.bytesPerElement=8,kn("StructArrayLayout4i8",ci);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.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}(ai);ui.prototype.bytesPerElement=12,kn("StructArrayLayout2i4i12",ui);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=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}(ai);hi.prototype.bytesPerElement=8,kn("StructArrayLayout2i4ub8",hi);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.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,a,o,s)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l){var c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=n,this.uint16[c+3]=i,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(ai);fi.prototype.bytesPerElement=16,kn("StructArrayLayout8ui16",fi);var pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,i,a,o,s)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l){var c=8*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(ai);pi.prototype.bytesPerElement=16,kn("StructArrayLayout4i4ui16",pi);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.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}(ai);di.prototype.bytesPerElement=12,kn("StructArrayLayout3f12",di);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.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}(ai);gi.prototype.bytesPerElement=4,kn("StructArrayLayout1ul4",gi);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,c,u){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,h){var f=12*t,p=6*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=i,this.int16[f+4]=a,this.int16[f+5]=o,this.uint32[p+3]=s,this.uint16[f+8]=l,this.uint16[f+9]=c,this.int16[f+10]=u,this.int16[f+11]=h,t},e}(ai);vi.prototype.bytesPerElement=24,kn("StructArrayLayout6i1ul2ui2i24",vi);var 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.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}(ai);mi.prototype.bytesPerElement=12,kn("StructArrayLayout2i2i2i12",mi);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.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}(ai);yi.prototype.bytesPerElement=12,kn("StructArrayLayout2ub2f12",yi);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,h,f,p,d){var g=this.length;return this.resize(g+1),this.emplace(g,t,e,r,n,i,a,o,s,l,c,u,h,f,p,d)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g){var v=22*t,m=11*t,y=44*t;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[m+2]=a,this.uint32[m+3]=o,this.uint32[m+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[m+7]=h,this.float32[m+8]=f,this.uint8[y+36]=p,this.uint8[y+37]=d,this.uint32[m+10]=g,t},e}(ai);xi.prototype.bytesPerElement=44,kn("StructArrayLayout2i2ui3ul3ui2f2ub1ul44",xi);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.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,h,f,p,d,g,v,m){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g,v,m,y){var x=22*t,b=11*t;return this.int16[x+0]=e,this.int16[x+1]=r,this.int16[x+2]=n,this.int16[x+3]=i,this.int16[x+4]=a,this.int16[x+5]=o,this.uint16[x+6]=s,this.uint16[x+7]=l,this.uint16[x+8]=c,this.uint16[x+9]=u,this.uint16[x+10]=h,this.uint16[x+11]=f,this.uint16[x+12]=p,this.uint16[x+13]=d,this.uint16[x+14]=g,this.uint32[b+8]=v,this.float32[b+9]=m,this.float32[b+10]=y,t},e}(ai);bi.prototype.bytesPerElement=44,kn("StructArrayLayout6i9ui1ul2f44",bi);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.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}(ai);_i.prototype.bytesPerElement=4,kn("StructArrayLayout1f4",_i);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)},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}(ai);wi.prototype.bytesPerElement=6,kn("StructArrayLayout3i6",wi);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}(ai);ki.prototype.bytesPerElement=8,kn("StructArrayLayout1ul2ui8",ki);var Ti=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}(ai);Ti.prototype.bytesPerElement=6,kn("StructArrayLayout3ui6",Ti);var Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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}(ai);Ai.prototype.bytesPerElement=4,kn("StructArrayLayout2ui4",Ai);var 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.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}(ai);Mi.prototype.bytesPerElement=2,kn("StructArrayLayout1ui2",Mi);var Si=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}(ai);Si.prototype.bytesPerElement=8,kn("StructArrayLayout2f8",Si);var Ei=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}(ai);Ei.prototype.bytesPerElement=16,kn("StructArrayLayout4f16",Ei);var Ci=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(ii);Ci.prototype.size=24;var Li=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 Ci(this,t)},e}(vi);kn("CollisionBoxArray",Li);var Pi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},Object.defineProperties(e.prototype,r),e}(ii);Pi.prototype.size=44;var Oi=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 Pi(this,t)},e}(xi);kn("PlacedSymbolArray",Oi);var zi=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},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+4]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+5]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+12]},r.numHorizontalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+13]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+13]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+14]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+8]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+8]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+9]},r.textBoxScale.set=function(t){this._structArray.float32[this._pos4+9]=t},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+10]},r.radialTextOffset.set=function(t){this._structArray.float32[this._pos4+10]=t},Object.defineProperties(e.prototype,r),e}(ii);zi.prototype.size=44;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.get=function(t){return new zi(this,t)},e}(bi);kn("SymbolInstanceArray",Ii);var Di=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(ii);Di.prototype.size=4;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.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new Di(this,t)},e}(_i);kn("GlyphOffsetArray",Ri);var Fi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(ii);Fi.prototype.size=6;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.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new Fi(this,t)},e}(wi);kn("SymbolLineVertexArray",Bi);var Ni=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(ii);Ni.prototype.size=8;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.get=function(t){return new Ni(this,t)},e}(ki);kn("FeatureIndexArray",ji);var Ui=oi([{name:"a_pos",components:2,type:"Int16"}],4).members,Vi=function(t){void 0===t&&(t=[]),this.segments=t};function qi(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}Vi.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>Vi.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Vi.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>Vi.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},Vi.prototype.get=function(){return this.segments},Vi.prototype.destroy=function(){for(var t=0,e=this.segments;t>1;this.ids[n]>=t?r=n:e=n+1}for(var i=[];this.ids[e]===t;){var a=this.positions[3*e],o=this.positions[3*e+1],s=this.positions[3*e+2];i.push({index:a,start:o,end:s}),e++}return i},Hi.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){if(!(n>=i)){for(var a=e[n+i>>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;Gi(e,o,s),Gi(r,3*o,3*s),Gi(r,3*o+1,3*s+1),Gi(r,3*o+2,3*s+2)}t(e,r,n,s),t(e,r,s+1,i)}}(r,n,0,r.length-1),e.push(r.buffer,n.buffer),{ids:r,positions:n}},Hi.deserialize=function(t){var e=new Hi;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},kn("FeaturePositionMap",Hi);var Yi=function(t,e){this.gl=t.gl,this.location=e},Wi=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Yi),Xi=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Yi),Zi=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Yi),Ji=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Yi),Ki=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Yi),$i=function(t){function e(e,r){t.call(this,e,r),this.current=ne.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Yi),Qi=new Float32Array(16),ta=function(t){function e(e,r){t.call(this,e,r),this.current=Qi}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Yi);function ea(t){return[qi(255*t.r,255*t.g),qi(255*t.b,255*t.a)]}var ra=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0};ra.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},ra.prototype.setConstantPatternPositions=function(){},ra.prototype.populatePaintArray=function(){},ra.prototype.updatePaintArray=function(){},ra.prototype.upload=function(){},ra.prototype.destroy=function(){},ra.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},ra.prototype.getBinding=function(t,e){return"color"===this.type?new $i(t,e):new Xi(t,e)},ra.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:An(e),names:r,type:n}},ra.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new ra(Mn(e),r,n)};var na=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};na.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},na.prototype.populatePaintArray=function(){},na.prototype.updatePaintArray=function(){},na.prototype.upload=function(){},na.prototype.destroy=function(){},na.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},na.prototype.setUniforms=function(t,e,r,n,i){var a=this.patternPositions;"u_pattern_to"===i&&a.patternTo&&e.set(a.patternTo),"u_pattern_from"===i&&a.patternFrom&&e.set(a.patternFrom)},na.prototype.getBinding=function(t,e){return new Ki(t,e)};var ia=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new n};ia.prototype.defines=function(){return[]},ia.prototype.setConstantPatternPositions=function(){},ia.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,n=r.length;r.reserve(t);var i=this.expression.evaluate(new Un(0),e,{});if("color"===this.type)for(var a=ea(i),o=n;ofa.max||o.yfa.max)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function da(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var ga=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 li,this.indexArray=new Ti,this.segments=new Vi,this.programConfigurations=new la(Ui,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function va(t,e){for(var r=0;r1){if(ba(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Ta(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 Aa(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 Ma(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=k(t,e,r[0]);return a!==k(t,e,r[1])||a!==k(t,e,r[2])||a!==k(t,e,r[3])}function Sa(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].maxValue}function Ea(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ca(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=ha||c<0||c>=ha)){var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=u.vertexLength;da(this.layoutVertexArray,l,c,-1,-1),da(this.layoutVertexArray,l,c,1,-1),da(this.layoutVertexArray,l,c,1,1),da(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),u.vertexLength+=4,u.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},kn("CircleBucket",ga,{omit:["layers"]});var La={paint:new ei({"circle-radius":new Kn(It.paint_circle["circle-radius"]),"circle-color":new Kn(It.paint_circle["circle-color"]),"circle-blur":new Kn(It.paint_circle["circle-blur"]),"circle-opacity":new Kn(It.paint_circle["circle-opacity"]),"circle-translate":new Jn(It.paint_circle["circle-translate"]),"circle-translate-anchor":new Jn(It.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Jn(It.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Jn(It.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Kn(It.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Kn(It.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Kn(It.paint_circle["circle-stroke-opacity"])})},Pa="undefined"!=typeof Float32Array?Float32Array:Array;function Oa(){var t=new Pa(9);return Pa!=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}function za(){var t=new Pa(3);return Pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ia(t,e,r){var n=new Pa(3);return n[0]=t,n[1]=e,n[2]=r,n}Math.PI;function Da(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 Ra(){var t=new Pa(4);return Pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}za(),function(){var t;t=new Pa(4),Pa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();za(),Ia(1,0,0),Ia(0,1,0),Ra(),Ra(),Oa(),function(){var t;t=new Pa(2),Pa!=Float32Array&&(t[0]=0,t[1]=0)}();var Fa=function(t){function e(e){t.call(this,e,La)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ga(t)},e.prototype.queryRadius=function(t){var e=t;return Sa("circle-radius",this,e)+Sa("circle-stroke-width",this,e)+Ea(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=Ca(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"),h=u?l:function(t,e){return l.map(function(t){return Ba(t,e)})}(0,s),f=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 ro(f,p,r,n,i,c),p}function to(t,e,r,n,i){var a,o;if(i===wo(t,e,r,n)>0)for(a=e;a=e;a-=n)o=xo(a,t[a],t[a+1],o);return o&&go(o,o.next)&&(bo(o),o=o.next),o}function eo(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!go(n,n.next)&&0!==po(n.prev,n,n.next))n=n.next;else{if(bo(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function ro(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=co(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?io(t,n,i,a):no(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),bo(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?ro(t=ao(t,e,r),e,r,n,i,a,2):2===o&&oo(t,e,r,n,i,a):ro(eo(t),e,r,n,i,a,1);break}}}function no(t){var e=t.prev,r=t,n=t.next;if(po(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(ho(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&po(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function io(t,e,r,n){var i=t.prev,a=t,o=t.next;if(po(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,h=co(s,l,e,r,n),f=co(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&po(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&po(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&po(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&ho(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&po(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function ao(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!go(i,a)&&vo(i,n,n.next,a)&&mo(i,a)&&mo(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),bo(n),bo(n.next),n=t=a),n=n.next}while(n!==t);return n}function oo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&fo(o,s)){var l=yo(o,s);return o=eo(o,o.next),l=eo(l,l.next),ro(o,e,r,n,i,a),void ro(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function so(t,e){return t.x-e.x}function lo(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&&ho(ar.x)&&mo(n,t)&&(r=n,f=l),n=n.next;return r}(t,e)){var r=yo(e,t);eo(r,r.next)}}function co(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 uo(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 fo(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&&vo(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&mo(t,e)&&mo(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function po(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function go(t,e){return t.x===e.x&&t.y===e.y}function vo(t,e,r,n){return!!(go(t,e)&&go(r,n)||go(t,n)&&go(r,e))||po(t,e,r)>0!=po(t,e,n)>0&&po(r,n,t)>0!=po(r,n,e)>0}function mo(t,e){return po(t.prev,t,t.next)<0?po(t,e,t.next)>=0&&po(t,t.prev,e)>=0:po(t,e,t.prev)<0||po(t,t.next,e)<0}function yo(t,e){var r=new _o(t.i,t.x,t.y),n=new _o(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 xo(t,e,r,n){var i=new _o(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 bo(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 _o(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 wo(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);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var h=e[r],f=n,p=i;for(To(e,n,r),a(e[i],h)>0&&To(e,n,i);f0;)p--}0===a(e[n],h)?To(e,n,p):To(e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}(t,e,r||0,n||t.length-1,i||Ao)}function To(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Ao(t,e){return te?1:0}function Mo(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},Ka.default=$a;var Lo=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 li,this.indexArray=new Ti,this.indexArray2=new Ai,this.programConfigurations=new la(Ja,t.layers,t.zoom),this.segments=new Vi,this.segments2=new Vi,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};Lo.prototype.populate=function(t,e){this.features=[],this.hasPattern=Eo("fill",this.layers,e);for(var r=0,n=t;r>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},Do.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]},Do.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=Do.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 Uo(t,e,r){if(3===t){var n=new Bo(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}No.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 Io(this._pbf,e,this.extent,this._keys,this._values)};var Vo={VectorTile:function(t,e){this.layers=t.readFields(Uo,{},e)},VectorTileFeature:Io,VectorTileLayer:Bo},qo=Vo.VectorTileFeature.types,Ho=Math.pow(2,13);function Go(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ho)+o,i*Ho*2,a*Ho*2,Math.round(s))}var Yo=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 ui,this.indexArray=new Ti,this.programConfigurations=new la(zo,t.layers,t.zoom),this.segments=new Vi,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Wo(t,e){return t.x===e.x&&(t.x<0||t.x>ha)||t.y===e.y&&(t.y<0||t.y>ha)}function Xo(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>ha})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>ha})}Yo.prototype.populate=function(t,e){this.features=[],this.hasPattern=Eo("fill-extrusion",this.layers,e);for(var r=0,n=t;r=1){var m=p[g-1];if(!Wo(v,m)){u.vertexLength+4>Vi.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=v.sub(m)._perp()._unit(),x=m.dist(v);d+x>32768&&(d=0),Go(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,0,d),Go(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,1,d),d+=x,Go(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,d),Go(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,d);var b=u.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),u.vertexLength+=4,u.primitiveLength+=2}}}}if(u.vertexLength+s>Vi.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===qo[t.type]){for(var _=[],w=[],k=u.vertexLength,T=0,A=o;T>6)}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.features=[],this.hasPattern=!1,this.layoutVertexArray=new hi,this.indexArray=new Ti,this.programConfigurations=new la(Qo,t.layers,t.zoom),this.segments=new Vi,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function ss(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(is-1)}os.prototype.populate=function(t,e){this.features=[],this.hasPattern=Eo("line",this.layers,e);for(var r=0,n=t;r=2&&t[u-1].equals(t[u-2]);)u--;for(var h=0;hh){var L=g.dist(_);if(L>2*f){var P=g.sub(g.sub(_)._mult(f/L)._round());this.distance+=P.dist(_),this.addCurrentVertex(P,this.distance,k.mult(1),0,0,!1,d,l),_=P}}var O=_&&w,z=O?r:w?y:x;if(O&&"round"===z&&(Ei&&(z="bevel"),"bevel"===z&&(E>2&&(z="flipbevel"),E100)M=T.clone().mult(-1);else{var I=k.x*T.y-k.y*T.x>0?-1:1,D=E*k.add(T).mag()/k.sub(T).mag();M._perp()._mult(D*I)}this.addCurrentVertex(g,this.distance,M,0,0,!1,d,l),this.addCurrentVertex(g,this.distance,M.mult(-1),0,0,!1,d,l)}else if("bevel"===z||"fakeround"===z){var R=k.x*T.y-k.y*T.x>0,F=-Math.sqrt(E*E-1);if(R?(m=0,v=F):(v=0,m=F),b||this.addCurrentVertex(g,this.distance,k,v,m,!1,d,l),"fakeround"===z){for(var B=Math.floor(8*(.5-(S-.5))),N=void 0,j=0;j=0;U--)N=k.mult((U+1)/(B+1))._add(T)._unit(),this.addPieSliceVertex(g,this.distance,N,R,d,l)}w&&this.addCurrentVertex(g,this.distance,T,-v,-m,!1,d,l)}else"butt"===z?(b||this.addCurrentVertex(g,this.distance,k,0,0,!1,d,l),w&&this.addCurrentVertex(g,this.distance,T,0,0,!1,d,l)):"square"===z?(b||(this.addCurrentVertex(g,this.distance,k,1,1,!1,d,l),this.e1=this.e2=-1),w&&this.addCurrentVertex(g,this.distance,T,-1,-1,!1,d,l)):"round"===z&&(b||(this.addCurrentVertex(g,this.distance,k,0,0,!1,d,l),this.addCurrentVertex(g,this.distance,k,1,1,!0,d,l),this.e1=this.e2=-1),w&&(this.addCurrentVertex(g,this.distance,T,-1,-1,!0,d,l),this.addCurrentVertex(g,this.distance,T,0,0,!1,d,l)));if(C&&A2*f){var q=g.add(w.sub(g)._mult(f/V)._round());this.distance+=q.dist(g),this.addCurrentVertex(q,this.distance,T.mult(1),0,0,!1,d,l),g=q}}b=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,s)}},os.prototype.addCurrentVertex=function(t,e,r,n,i,a,o,s){var l,c=this.layoutVertexArray,u=this.indexArray;s&&(e=ss(e,s)),l=r.clone(),n&&l._sub(r.perp()._mult(n)),as(c,t,l,a,!1,n,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),i&&l._sub(r.perp()._mult(i)),as(c,t,l,a,!0,-i,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>is/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,i,a,o))},os.prototype.addPieSliceVertex=function(t,e,r,n,i,a){r=r.mult(n?-1:1);var o=this.layoutVertexArray,s=this.indexArray;a&&(e=ss(e,a)),as(o,t,r,!1,n,0,e),this.e3=i.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),i.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},kn("LineBucket",os,{omit:["layers","features"]});var ls=new ei({"line-cap":new Jn(It.layout_line["line-cap"]),"line-join":new Kn(It.layout_line["line-join"]),"line-miter-limit":new Jn(It.layout_line["line-miter-limit"]),"line-round-limit":new Jn(It.layout_line["line-round-limit"])}),cs={paint:new ei({"line-opacity":new Kn(It.paint_line["line-opacity"]),"line-color":new Kn(It.paint_line["line-color"]),"line-translate":new Jn(It.paint_line["line-translate"]),"line-translate-anchor":new Jn(It.paint_line["line-translate-anchor"]),"line-width":new Kn(It.paint_line["line-width"]),"line-gap-width":new Kn(It.paint_line["line-gap-width"]),"line-offset":new Kn(It.paint_line["line-offset"]),"line-blur":new Kn(It.paint_line["line-blur"]),"line-dasharray":new Qn(It.paint_line["line-dasharray"]),"line-pattern":new $n(It.paint_line["line-pattern"]),"line-gradient":new ti(It.paint_line["line-gradient"])}),layout:ls},us=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 Un(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=h({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Kn))(cs.paint.properties["line-width"].specification);us.useIntegerZoom=!0;var hs=function(t){function e(e){t.call(this,e,cs)}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=Ya(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=us.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new os(t)},e.prototype.queryRadius=function(t){var e=t,r=fs(Sa("line-width",this,e),Sa("line-gap-width",this,e)),n=Sa("line-offset",this,e);return r/2+Math.abs(n)+Ea(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=Ca(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*fs(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 ps=oi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),ds=oi([{name:"a_projected_pos",components:3,type:"Float32"}],4),gs=(oi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),oi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),vs=(oi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),oi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),ms=oi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function ys(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()),jn.applyArabicShaping&&(t=jn.applyArabicShaping(t)),t}(t.text,e,r)}),t}oi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"}]),oi([{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:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),oi([{type:"Float32",name:"offsetX"}]),oi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var xs={"!":"\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"},bs=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(i);kn("Anchor",bs);var _s=256;function ws(t,e){var r=e.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new Un(t+1))};if("source"===r.kind)return{kind:"source"};for(var n=r.zoomStops,i=r.interpolationType,a=0;a0)&&("constant"!==i.value.kind||i.value.value.length>0),l="constant"!==o.value.kind||o.value.value&&o.value.value.length>0,c=n.get("symbol-sort-key");if(this.features=[],s||l){for(var u=e.iconDependencies,h=e.glyphDependencies,f=new Un(this.zoom),p=0,d=t;p=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;this.addCollisionDebugVertices(a,o,s,l,c?this.collisionCircle:this.collisionBox,i.anchorPoint,r,c)}},Os.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t0},Os.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Os.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Os.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Os.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,n=e.vertexStartIndex;n1||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.addIndicesForPlacedTextSymbol(t)}),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(a.verticalPlacedTextSymbolIndex);var o=this.icon.placedSymbolArray.get(i);if(o.numGlyphs){var s=o.vertexStartIndex;this.icon.indexArray.emplaceBack(s,s+1,s+2),this.icon.indexArray.emplaceBack(s+1,s+2,s+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},kn("SymbolBucket",Os,{omit:["layers","collisionBoxArray","features","compareText"]}),Os.MAX_GLYPHS=65535,Os.addDynamicAttributes=Cs;var zs=new ei({"symbol-placement":new Jn(It.layout_symbol["symbol-placement"]),"symbol-spacing":new Jn(It.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Jn(It.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Kn(It.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Jn(It.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Jn(It.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Jn(It.layout_symbol["icon-ignore-placement"]),"icon-optional":new Jn(It.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Jn(It.layout_symbol["icon-rotation-alignment"]),"icon-size":new Kn(It.layout_symbol["icon-size"]),"icon-text-fit":new Jn(It.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Jn(It.layout_symbol["icon-text-fit-padding"]),"icon-image":new Kn(It.layout_symbol["icon-image"]),"icon-rotate":new Kn(It.layout_symbol["icon-rotate"]),"icon-padding":new Jn(It.layout_symbol["icon-padding"]),"icon-keep-upright":new Jn(It.layout_symbol["icon-keep-upright"]),"icon-offset":new Kn(It.layout_symbol["icon-offset"]),"icon-anchor":new Kn(It.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Jn(It.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Jn(It.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Jn(It.layout_symbol["text-rotation-alignment"]),"text-field":new Kn(It.layout_symbol["text-field"]),"text-font":new Kn(It.layout_symbol["text-font"]),"text-size":new Kn(It.layout_symbol["text-size"]),"text-max-width":new Kn(It.layout_symbol["text-max-width"]),"text-line-height":new Jn(It.layout_symbol["text-line-height"]),"text-letter-spacing":new Kn(It.layout_symbol["text-letter-spacing"]),"text-justify":new Kn(It.layout_symbol["text-justify"]),"text-radial-offset":new Kn(It.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Jn(It.layout_symbol["text-variable-anchor"]),"text-anchor":new Kn(It.layout_symbol["text-anchor"]),"text-max-angle":new Jn(It.layout_symbol["text-max-angle"]),"text-rotate":new Kn(It.layout_symbol["text-rotate"]),"text-padding":new Jn(It.layout_symbol["text-padding"]),"text-keep-upright":new Jn(It.layout_symbol["text-keep-upright"]),"text-transform":new Kn(It.layout_symbol["text-transform"]),"text-offset":new Kn(It.layout_symbol["text-offset"]),"text-allow-overlap":new Jn(It.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Jn(It.layout_symbol["text-ignore-placement"]),"text-optional":new Jn(It.layout_symbol["text-optional"])}),Is={paint:new ei({"icon-opacity":new Kn(It.paint_symbol["icon-opacity"]),"icon-color":new Kn(It.paint_symbol["icon-color"]),"icon-halo-color":new Kn(It.paint_symbol["icon-halo-color"]),"icon-halo-width":new Kn(It.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Kn(It.paint_symbol["icon-halo-blur"]),"icon-translate":new Jn(It.paint_symbol["icon-translate"]),"icon-translate-anchor":new Jn(It.paint_symbol["icon-translate-anchor"]),"text-opacity":new Kn(It.paint_symbol["text-opacity"]),"text-color":new Kn(It.paint_symbol["text-color"]),"text-halo-color":new Kn(It.paint_symbol["text-halo-color"]),"text-halo-width":new Kn(It.paint_symbol["text-halo-width"]),"text-halo-blur":new Kn(It.paint_symbol["text-halo-blur"]),"text-translate":new Jn(It.paint_symbol["text-translate"]),"text-translate-anchor":new Jn(It.paint_symbol["text-translate-anchor"])}),layout:zs},Ds=function(t){function e(e){t.call(this,e,Is)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("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"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,n=this.layout.get(t).evaluate(e,{}),i=this._unevaluatedLayout._values[t];return i.isDataDriven()||Pr(i.value)?n:(r=e.properties,n.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):""}))},e.prototype.createBucket=function(t){return new Os(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(ri),Rs={paint:new ei({"background-color":new Jn(It.paint_background["background-color"]),"background-pattern":new Qn(It.paint_background["background-pattern"]),"background-opacity":new Jn(It.paint_background["background-opacity"])})},Fs=function(t){function e(e){t.call(this,e,Rs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ri),Bs={paint:new ei({"raster-opacity":new Jn(It.paint_raster["raster-opacity"]),"raster-hue-rotate":new Jn(It.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Jn(It.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Jn(It.paint_raster["raster-brightness-max"]),"raster-saturation":new Jn(It.paint_raster["raster-saturation"]),"raster-contrast":new Jn(It.paint_raster["raster-contrast"]),"raster-resampling":new Jn(It.paint_raster["raster-resampling"]),"raster-fade-duration":new Jn(It.paint_raster["raster-fade-duration"])})},Ns=function(t){function e(e){t.call(this,e,Bs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ri),js=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(ri),Us={circle:Fa,heatmap:Wa,hillshade:Za,fill:Oo,"fill-extrusion":Jo,line:hs,symbol:Ds,background:Fs,raster:Ns};function Vs(t){for(var e=0,r=0,n=0,i=t;n=0;f--){var p=o[f];if(!(h.w>p.w||h.h>p.h)){if(h.x=p.x,h.y=p.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===p.w&&h.h===p.h){var d=o.pop();f>1,u=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,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)},$s=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-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},Qs=tl;function tl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function el(t){return t.type===tl.Bytes?t.readVarint()+t.pos:t.pos+1}function rl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function nl(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 il(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function gl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}tl.Varint=0,tl.Fixed64=1,tl.Bytes=2,tl.Fixed32=5,tl.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=pl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=gl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*pl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*gl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ks(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ks(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return rl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return rl(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return rl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n="",i=e;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,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==tl.Bytes)return t.push(this.readVarint(e));var r=el(this);for(t=t||[];this.pos127;);else if(e===tl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===tl.Fixed32)this.pos+=4;else{if(e!==tl.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;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;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&&nl(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),$s(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),$s(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&&nl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,tl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,al,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ll,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,sl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,cl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ul,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,fl,e)},writeBytesField:function(t,e){this.writeTag(t,tl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,tl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,tl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var vl=3;function ml(t,e,r){1===t&&r.readMessage(yl,e)}function yl(t,e,r){if(3===t){var n=r.readMessage(xl,{}),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 qa({width:o+2*vl,height:s+2*vl},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function xl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var bl=vl,_l=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,v(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function wl(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}_l.prototype.send=function(t,e,r,n){var i=this,a=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[a]=r);var o=[];if(this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(a),data:An(e,o)},o),r)return{cancel:function(){i.callbacks[a]=null,i.target.postMessage({targetMapId:n,sourceMapId:i.mapId,type:"",id:String(a)})}}},_l.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var a=function(t,e){delete r.callbacks[i];var n=[];r.target.postMessage({sourceMapId:r.mapId,type:"",id:String(i),error:t?An(t):null,data:An(e,n)},n)};if(""===n.type||""===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(Mn(n.error)):e&&e(null,Mn(n.data));else if(void 0!==n.id&&this.parent[n.type]){this.callbacks[n.id]=null;var o=this.parent[n.type](n.sourceMapId,Mn(n.data),a);o&&null===this.callbacks[n.id]&&(this.callbacks[n.id]=o.cancel)}else if(void 0!==n.id&&this.parent.getWorkerSource){var s=n.type.split("."),l=Mn(n.data);this.parent.getWorkerSource(n.sourceMapId,s[0],l.source)[s[1]](l,a)}else this.parent[n.type](Mn(n.data))}},_l.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var kl=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]))};kl.prototype.setNorthEast=function(t){return this._ne=t instanceof Tl?new Tl(t.lng,t.lat):Tl.convert(t),this},kl.prototype.setSouthWest=function(t){return this._sw=t instanceof Tl?new Tl(t.lng,t.lat):Tl.convert(t),this},kl.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Tl)e=t,r=t;else{if(!(t instanceof kl))return Array.isArray(t)?t.every(Array.isArray)?this.extend(kl.convert(t)):this.extend(Tl.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Tl(e.lng,e.lat),this._ne=new Tl(r.lng,r.lat)),this},kl.prototype.getCenter=function(){return new Tl((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},kl.prototype.getSouthWest=function(){return this._sw},kl.prototype.getNorthEast=function(){return this._ne},kl.prototype.getNorthWest=function(){return new Tl(this.getWest(),this.getNorth())},kl.prototype.getSouthEast=function(){return new Tl(this.getEast(),this.getSouth())},kl.prototype.getWest=function(){return this._sw.lng},kl.prototype.getSouth=function(){return this._sw.lat},kl.prototype.getEast=function(){return this._ne.lng},kl.prototype.getNorth=function(){return this._ne.lat},kl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},kl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},kl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},kl.convert=function(t){return!t||t instanceof kl?t:new kl(t)};var Tl=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")};function Al(t){return 2*Math.PI*6378137*Math.cos(t*Math.PI/180)}function Ml(t){return(180+t)/360}function Sl(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function El(t,e){return t/Al(e)}function Cl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}Tl.prototype.wrap=function(){return new Tl(u(this.lng,-180,180),this.lat)},Tl.prototype.toArray=function(){return[this.lng,this.lat]},Tl.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Tl.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 kl(new Tl(this.lng-r,this.lat-e),new Tl(this.lng+r,this.lat+e))},Tl.convert=function(t){if(t instanceof Tl)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Tl(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Tl(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 Ll=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Ll.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Tl.convert(t);return new Ll(Ml(r.lng),Sl(r.lat),El(e,r.lat))},Ll.prototype.toLngLat=function(){return new Tl(360*this.x-180,Cl(this.y))},Ll.prototype.toAltitude=function(){return this.z*Al(Cl(this.y))};var Pl=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Il(0,t,e,r)};Pl.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Pl.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=wl(256*r,256*(n=Math.pow(2,i)-n-1),i),o=wl(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 zl(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new zl(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},zl.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},zl.prototype.children=function(t){if(this.overscaledZ>=t)return[new zl(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 zl(e,this.wrap,e,r,n),new zl(e,this.wrap,e,r+1,n),new zl(e,this.wrap,e,r,n+1),new zl(e,this.wrap,e,r+1,n+1)]},zl.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)},Dl.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Dl.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Dl.prototype.getPixels=function(){return new Ha({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Dl.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)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e&&e>=0)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},jl.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},i=this.stateChanges[t]||{},a=h({},n[r],i[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var o=this.deletedStates[t][e];if(null===o)return{};for(var s in o)delete a[s]}return a},jl.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},jl.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var i={};for(var a in this.stateChanges[n])this.state[n][a]||(this.state[n][a]={}),h(this.state[n][a],this.stateChanges[n][a]),i[a]=this.state[n][a];r[n]=i}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var c in this.deletedStates[o]){if(null===this.deletedStates[o][c])this.state[o][c]={};else for(var u=0,f=Object.keys(this.deletedStates[o][c]);u=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Ul.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Vo.VectorTile(new Qs(this.rawTileData)).layers,this.sourceLayerCoder=new Fl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ul.prototype.query=function(t,e,r){var n=this;this.loadVTLayers();for(var a=t.params||{},o=ha/t.tileSize/t.scale,s=Gr(a.filter),l=t.queryGeometry,c=t.queryPadding*o,u=Vl(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=Vl(t.cameraQueryGeometry),p=0,d=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,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,h=c;u=0)return!0;return!1}(a,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(i(new Un(this.tileID.overscaledZ),u))for(var h=0;h>l.z,u=new i(l.x*c,l.y*c),h=new i(u.x+c,u.y+c),f=this.segments.prepareSegment(4,r,n);r.emplaceBack(u.x,u.y,u.x,u.y),r.emplaceBack(h.x,u.y,h.x,u.y),r.emplaceBack(u.x,h.y,u.x,h.y),r.emplaceBack(h.x,h.y,h.x,h.y);var p=f.vertexLength;n.emplaceBack(p,p+1,p+2),n.emplaceBack(p+1,p+2,p+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,Rl.members),this.maskedIndexBuffer=e.createIndexBuffer(n)}},Hl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Hl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Hl.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=A(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),i=!1;if(this.expirationTime>n)i=!1;else if(e)if(this.expirationTime=0&&n>=t&&Zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Wl.prototype.substring=function(t,e){var r=new Wl;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Wl.prototype.toString=function(){return this.text},Wl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)};var Zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Jl={};function Kl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,l=0,c=0;c-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+=h.dist(f)}return!0}function ac(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=Ee(h.x,f.x,d),v=Ee(h.y,f.y,d),m=new bs(g,v,f.angleTo(h),u);return m._round(),!o||ic(t,m,s,o,e)?m:void 0}l+=p}}function cc(t,e,r,n,i,a,o,s,l){var c=oc(n,a,o),u=sc(n,i),h=u*o,f=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&_=0&&w=0&&p+u<=h){var k=new bs(_,w,x,g);k._round(),i&&!ic(e,k,o,i,a)||d.push(k)}}f+=y}return l||d.length||s||(d=t(e,f/2,n,i,a,o,s,!0,c)),d}(t,f?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,h,f,!1,l)}Jl[10]=!0,Jl[32]=!0,Jl[38]=!0,Jl[40]=!0,Jl[41]=!0,Jl[43]=!0,Jl[45]=!0,Jl[47]=!0,Jl[173]=!0,Jl[183]=!0,Jl[8203]=!0,Jl[8208]=!0,Jl[8211]=!0,Jl[8231]=!0;var uc=function(t,e,r,n,a,o,s,l,c,u,h,f){var p=s.top*l-c,d=s.bottom*l+c,g=s.left*l-c,v=s.right*l+c;if(this.boxStartIndex=t.length,u){var m=d-p,y=v-g;m>0&&(m=Math.max(10*l,m),this._addLineCollisionCircles(t,e,r,r.segment,y,m,n,a,o,h))}else{if(f){var x=new i(g,p),b=new i(v,p),_=new i(g,d),w=new i(v,d),k=f*Math.PI/180;x._rotate(k),b._rotate(k),_._rotate(k),w._rotate(k),g=Math.min(x.x,b.x,_.x,w.x),v=Math.max(x.x,b.x,_.x,w.x),p=Math.min(x.y,b.y,_.y,w.y),d=Math.max(x.y,b.y,_.y,w.y)}t.emplaceBack(r.x,r.y,g,p,v,d,n,a,o,0,0)}this.boxEndIndex=t.length};uc.prototype._addLineCollisionCircles=function(t,e,r,n,i,a,o,s,l,c){var u=a/2,h=Math.floor(i/u)||1,f=1+.4*Math.log(c)/Math.LN2,p=Math.floor(h*f/2),d=-a/2,g=r,v=n+1,m=d,y=-i/2,x=y-i/4;do{if(--v<0){if(m>y)return;v=0;break}m-=e[v].dist(g),g=e[v]}while(m>x);for(var b=e[v].dist(e[v+1]),_=-p;_i&&(k+=w-i),!(k=e.length)return;b=e[v].dist(e[v+1])}var T=k-m,A=e[v],M=e[v+1].sub(A)._unit()._mult(T)._add(A)._round(),S=Math.abs(k-d)0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function fc(t,e){return te?1:0}function pc(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 h=o-n,f=s-a,p=Math.min(h,f),d=p/2,g=new hc([],dc);if(0===p)return new i(n,a);for(var v=n;vy.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 gc(b.p.x-d,b.p.y-d,d,t)),g.push(new gc(b.p.x+d,b.p.y-d,d,t)),g.push(new gc(b.p.x-d,b.p.y+d,d,t)),g.push(new gc(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 dc(t,e){return e.max-t.max}function gc(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,ka(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}hc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},hc.prototype.pop=function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},hc.prototype.peek=function(){return this.data[0]},hc.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},hc.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 vc=e(function(t){t.exports=function(t,e){var r,n,i,a,o,s,l,c;for(r=3&t.length,n=t.length-r,i=e,o=3432918353,s=461845907,c=0;c>>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}}),mc=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}}),yc=vc,xc=vc,bc=mc;yc.murmur3=xc,yc.murmur2=bc;var _c=7;function wc(t,e){var r=0,n=0,i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-_c;break;case"bottom-right":case"bottom-left":n=-i+_c;break;case"bottom":n=-e+_c;break;case"top":n=e-_c}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]}function kc(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 Tc(t,e,r,n,a,o,s){var l=o.layoutTextSize.evaluate(e,{}),c=o.layoutIconSize.evaluate(e,{}),u=o.textMaxSize.evaluate(e,{});void 0===u&&(u=l);var h=t.layers[0].layout,f=h.get("icon-offset").evaluate(e,{}),p=Sc(r.horizontal),d=l/24,g=t.tilePixelRatio*d,v=t.tilePixelRatio*u/24,m=t.tilePixelRatio*c,y=t.tilePixelRatio*h.get("symbol-spacing"),x=h.get("text-padding")*t.tilePixelRatio,b=h.get("icon-padding")*t.tilePixelRatio,_=h.get("text-max-angle")/180*Math.PI,k="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),T="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),A=h.get("symbol-placement"),M=y/2,S=function(l,c){c.x<0||c.x>=ha||c.y<0||c.y>=ha||function(t,e,r,n,a,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_){var k,T,A=t.addToLineVertexArray(e,r),M=0,S=0,E=0,C={},L=yc(""),P=(o.layout.get("text-radial-offset").evaluate(x,{})||0)*Gl;for(var O in n.horizontal){var z=n.horizontal[O];if(!k){L=yc(z.text);var I=o.layout.get("text-rotate").evaluate(x,{});k=new uc(s,r,e,l,c,u,z,h,f,p,t.overscaling,I)}var D=1===z.lineCount;if(S+=Mc(t,e,z,o,p,x,d,A,n.vertical?Yl.horizontal:Yl.horizontalOnly,D?Object.keys(n.horizontal):[O],C,b,_),D)break}n.vertical&&(E+=Mc(t,e,n.vertical,o,p,x,d,A,Yl.vertical,["vertical"],C,b,_));var R=k?k.boxStartIndex:t.collisionBoxArray.length,F=k?k.boxEndIndex:t.collisionBoxArray.length;if(a){var B=function(t,e,r,n,a,o){var s,l,c,u,h=e.image,f=r.layout,p=e.top-1/h.pixelRatio,d=e.left-1/h.pixelRatio,g=e.bottom+1/h.pixelRatio,v=e.right+1/h.pixelRatio;if("none"!==f.get("icon-text-fit")&&a){var m=v-d,y=g-p,x=f.get("text-size").evaluate(o,{})/24,b=a.left*x,_=a.right*x,w=a.top*x,k=_-b,T=a.bottom*x-w,A=f.get("icon-text-fit-padding")[0],M=f.get("icon-text-fit-padding")[1],S=f.get("icon-text-fit-padding")[2],E=f.get("icon-text-fit-padding")[3],C="width"===f.get("icon-text-fit")?.5*(T-y):0,L="height"===f.get("icon-text-fit")?.5*(k-m):0,P="width"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?k:m,O="height"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?T:y;s=new i(b+L-E,w+C-A),l=new i(b+L+M+P,w+C-A),c=new i(b+L+M+P,w+C+S+O),u=new i(b+L-E,w+C+S+O)}else s=new i(d,p),l=new i(v,p),c=new i(v,g),u=new i(d,g);var z=r.layout.get("icon-rotate").evaluate(o,{})*Math.PI/180;if(z){var I=Math.sin(z),D=Math.cos(z),R=[D,-I,I,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:h.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,a,o,0,Sc(n.horizontal),x),N=o.layout.get("icon-rotate").evaluate(x,{});T=new uc(s,r,e,l,c,u,a,g,v,!1,t.overscaling,N),M=4*B.length;var j=t.iconSizeData,U=null;"source"===j.kind?(U=[_s*o.layout.get("icon-size").evaluate(x,{})])[0]>Ac&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===j.kind&&((U=[_s*_.compositeIconSizes[0].evaluate(x,{}),_s*_.compositeIconSizes[1].evaluate(x,{})])[0]>Ac||U[1]>Ac)&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),t.addSymbols(t.icon,B,U,y,m,x,!1,e,A.lineStartIndex,A.lineLength)}var V=T?T.boxStartIndex:t.collisionBoxArray.length,q=T?T.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=Os.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),t.symbolInstances.emplaceBack(e.x,e.y,C.right>=0?C.right:-1,C.center>=0?C.center:-1,C.left>=0?C.left:-1,C.vertical||-1,L,R,F,V,q,l,S,E,M,0,h,P)}(t,c,l,r,n,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,x,k,s,m,b,T,f,e,a,o)};if("line"===A)for(var E=0,C=function(t,e,r,n,a){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new i(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=a&&f.y>=a||(h.y>=a?h=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round():f.y>=a&&(f=new i(h.x+(f.x-h.x)*((a-h.y)/(f.y-h.y)),a)._round()),c&&h.equals(c[c.length-1])||(c=[h],o.push(c)),c.push(f)))))}return o}(e.geometry,0,0,ha,ha);E1){var F=lc(R,_,r.vertical||p,n,24,v);F&&S(R,F)}}else if("Polygon"===e.type)for(var B=0,N=Mo(e.geometry,0);BAc&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===g.kind&&((v=[_s*p.compositeTextSizes[0].evaluate(o,{}),_s*p.compositeTextSizes[1].evaluate(o,{})])[0]>Ac||v[1]>Ac)&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),t.addSymbols(t.text,d,v,s,a,o,c,e,l.lineStartIndex,l.lineLength);for(var m=0,y=u;m=0;o--)if(n.dist(a[o])dt&&(t.send("enforceCacheSizeLimit",pt),mt=0)},t.clamp=c,t.clearTileCache=function(t){var e=self.caches.delete(ft);t&&e.catch(t).then(function(){return t()})},t.clone=function(t){var e=new Pa(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=b,t.config=I,t.create=function(){var t=new Pa(16);return Pa!=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=Oa,t.create$2=function(){var t=new Pa(4);return Pa!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Or,t.createLayout=oi,t.createStyleLayer=function(t){return"custom"===t.type?new js(t):new Us[t.type](t)},t.deepEqual=o,t.ease=l,t.emitValidationErrors=mn,t.endsWith=m,t.enforceCacheSizeLimit=function(t){self.caches&&self.caches.open(ft).then(function(e){e.keys().then(function(r){for(var n=0;n=M.maxzoom||"none"!==M.visibility&&(o(A,this.zoom),(d[M.id]=M.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g),c.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send("getGlyphs",{uid:this.uid,stacks:S},function(t,e){u||(u=t,h=e,L.call(s))}):h={};var E=Object.keys(g.iconDependencies);E.length?n.send("getImages",{icons:E},function(t,e){u||(u=t,f=e,L.call(s))}):f={};var C=Object.keys(g.patternDependencies);function L(){if(u)return a(u);if(h&&f&&p){var e=new i(h),r=new t.ImageAtlas(f,p);for(var n in d){var s=d[n];s instanceof t.SymbolBucket?(o(s.layers,this.zoom),t.performSymbolLayout(s,h,e.positions,f,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof t.LineBucket||s instanceof t.FillBucket||s instanceof t.FillExtrusionBucket)&&(o(s.layers,this.zoom),s.addFeatures(g,r.patternPositions))}this.status="done",a(null,{buckets:t.values(d).filter(function(t){return!t.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}C.length?n.send("getImages",{icons:C},function(t,e){u||(u=t,p=e,L.call(s))}):p={},L.call(this)};var s="undefined"!=typeof performance,l={getEntriesByName:function(t){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(s&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(s&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},c=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},l.mark(this._marks.start)};function u(e,r){var n=t.getArrayBuffer(e.request,function(e,n,i,a){e?r(e):n&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(n)),rawData:n,cacheControl:i,expires:a})});return function(){n.cancel(),r()}}c.prototype.finish=function(){l.mark(this._marks.end);var t=l.getEntriesByName(this._marks.measure);return 0===t.length&&(l.measure(this._marks.measure,this._marks.start,this._marks.end),t=l.getEntriesByName(this._marks.measure),l.clearMarks(this._marks.start),l.clearMarks(this._marks.end),l.clearMeasures(this._marks.measure)),t},l.Performance=c;var h=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||u,this.loading={},this.loaded={}};h.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new l.Performance(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 h=o.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[i]=s})},h.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,i=this;if(r&&r[n]){var a=r[n];a.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,i.layerIndex,i.actor,n)),e(t,r)};"parsing"===a.status?a.reloadCallback=o:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.actor,o):o())}},h.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()},h.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var f=function(){this.loaded={}};f.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=new t.DEMData(n,a,i);this.loaded=this.loaded||{},this.loaded[n]=o,r(null,o)},f.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var p={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function d(t){var e=0;if(t&&t.length>0){e+=Math.abs(g(t[0]));for(var r=1;r2){for(o=0;o=0}(t)===e?t:t.reverse()}var _=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=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))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function F(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),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+h)),Math.min(a,Math.floor(n+(s-l)*u/s+h)),o)}var f=r[2*n+o],p=i,d=a;for(N(e,r,i,n),r[2*a+o]>f&&N(e,r,i,a);pf;)d--}r[2*i+o]===f?N(e,r,i,d):N(e,r,++d,a),d<=n&&(i=d+1),n<=d&&(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}}(o,s,n,0,o.length-1,0)};H.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var h=c.pop(),f=c.pop(),p=c.pop();if(f-p<=o)for(var d=p;d<=f;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[d]);else{var g=Math.floor((p+f)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[g]);var v=(h+1)%2;(0===h?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(v)),(0===h?i>=s:a>=l)&&(c.push(g+1),c.push(f),c.push(v))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},H.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(),h=o.pop();if(u-h<=a)for(var f=h;f<=u;f++)U(e[2*f],e[2*f+1],r,n)<=l&&s.push(t[f]);else{var p=Math.floor((h+u)/2),d=e[2*p],g=e[2*p+1];U(d,g,r,n)<=l&&s.push(t[p]);var v=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(h),o.push(p-1),o.push(v)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var G={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},Y=function(t){this.options=Q(Object.create(G),t),this.trees=new Array(this.options.maxZoom+1)};function W(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function X(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:K(n),y:$(i),zoom:1/0,index:e,parentId:-1}}function Z(t){return{type:"Feature",id:t.id,properties:J(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 J(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Q(Q({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function K(t){return t/360+.5}function $(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 Q(t,e){for(var r in e)t[r]=e[r];return t}function tt(t){return t.x}function et(t){return t.y}function rt(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 nt(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)it(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],h=e[n],f=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 lt(t,e,r,n){for(var i=0;i1?1:r}function ht(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"===f||"MultiPoint"===f)ft(h,g,r,n,i);else if("LineString"===f)pt(h,g,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)gt(h,g,r,n,i,!1);else if("Polygon"===f)gt(h,g,r,n,i,!0);else if("MultiPolygon"===f)for(var v=0;v=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function pt(t,e,r,n,i,a,o){for(var s,l,c=dt(t),u=0===i?mt:yt,h=t.start,f=0;fr&&(l=u(c,p,d,v,m,r),o&&(c.start=h+s*l)):y>n?x=r&&(l=u(c,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,v,m,n),b=!0),!a&&b&&(o&&(c.end=h+s*l),e.push(c),c=dt(t)),o&&(h+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)>=r&&y<=n&&vt(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&vt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function dt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function gt(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),h>o.maxY&&(o.maxY=h)}return o}function Tt(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 H(s,tt,et,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},Y.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,h=l.range(K(r),$(a),K(i),$(n));u>5,r=t%32,n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);var a=i.points[e];if(!a)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,c=i.within(a.x,a.y,o);l1&&console.time("creation"),f=this.tiles[h]=kt(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,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,T=1+_;g=v=m=y=null,x=ht(t,u,r-_,r+k,0,f.minX,f.maxX,l),b=ht(t,u,r+w,r+T,0,f.minX,f.maxX,l),t=null,x&&(g=ht(x,u,n-_,n+k,1,f.minY,f.maxY,l),v=ht(x,u,n+w,n+T,1,f.minY,f.maxY,l),x=null),b&&(m=ht(b,u,n-_,n+k,1,f.minY,f.maxY,l),y=ht(b,u,n+w,n+T,1,f.minY,f.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},Mt.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,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[St(c,u,h)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,h),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?_t(this.tiles[s],i):null):null};var Ct=function(e){function r(t,r,n){e.call(this,t,r,Et),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var 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 l.Performance(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."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(y(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(y(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=x(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(y(x,e))),t}(e,r);default:return e}}(o,!0);try{e._geoJSONIndex=n.cluster?new Y(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 f=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{var l=a.requests[s];l||(l=a.requests[s]=[],y.loadGlyphRange(r,s,n.url,n.requestManager,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=l;nthis.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.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n,this.workerID),this},r.prototype._updateWorkerData=function(e){var r=this,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.workerID=this.dispatcher.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.dispatcher.send(r.type+".coalesce",{source:n.source},null,r.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(e,r){var n=this,i=void 0===e.workerID?"loadTile":"reloadTile",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};e.workerID=this.dispatcher.send(i,a,function(t,a){return e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),L=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;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){i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())})},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;othis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},B.prototype.has=function(t){return t.wrapped().key in this.data},B.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},B.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},B.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},B.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},B.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var N=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};N.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},N.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},N.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var j={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},U=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};U.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},U.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},U.prototype.enableAttributes=function(t,e){for(var r=0;r1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._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){for(var r=t.overscaledZ-1;r>=e;r--){var n=t.scaledTo(r);if(!n)return;var i=String(n.key),a=this._tiles[i];if(a&&a.hasData())return a;if(this._cache.has(n))return this._cache.get(n)}},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=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(Pt(this._source.type)){for(var c={},u={},h=0,f=Object.keys(l);hthis._source.maxzoom){var v=d.children(this._source.maxzoom)[0],m=this.getTile(v);if(m&&m.hasData()){n[v.key]=v;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._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,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(),h=1/0,f=1/0,p=-1/0,d=-1/0,g=0,v=c;g=0&&m[1].y+v>=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}(t.Evented);function Lt(t,e){return t%32-e%32||e-t}function Pt(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(Jn.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt=function(){this.active={}};zt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function Kt(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],f=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;f.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;mMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function te(e,r,n,i,a,o,s,l,c,u,h,f,p,d){var g,v=r/24,m=e.lineOffsetX*v,y=e.lineOffsetY*v;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=$t(v,l,m,y,n,h,f,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=Zt(w.first.point,s).point,T=Zt(w.last.point,s).point;if(i&&!n){var A=Qt(e.writingMode,k,T,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?L.point:ee(f,C,S,1,a),O=Qt(e.writingMode,S,P,d);if(O)return O}var z=re(v*l.getoffsetX(e.glyphStartIndex),m,y,n,h,f,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!z)return{notEnoughRoom:!0};g=[z]}for(var I=0,D=g;I0?1:-1,v=0;i&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?l+s:l+s+1,y=m,x=a,b=a,_=0,w=0,k=Math.abs(d);_+w<=k;){if((m+=g)=c)return null;if(b=x,void 0===(x=f[m])){var T=new t.Point(u.getx(m),u.gety(m)),A=Zt(T,h);if(A.signedDistanceFromCamera>0)x=f[m]=A.point;else{var M=m-g;x=ee(0===_?o:new t.Point(u.getx(M),u.gety(M)),T,b,k-_+1,h)}}_+=w,w=b.dist(x)}var S=(k-_)/w,E=x.sub(b),C=E.mult(S)._add(b);return C._add(E._unit()._perp()._mult(n*g)),{point:C,angle:v+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:m-g===y?0:u.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:k-_}:null}}Yt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Yt.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)},Yt.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)},Yt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Yt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Yt.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},Yt.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},Yt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Yt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Yt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Yt.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,h=0,f=c;h=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 v=this.circles,m=0,y=g;mo*o+s*s},Yt.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 h=l-s,f=u-c;return h*h+f*f<=r*r};var ne=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ie(t,e){for(var r=0;rS)se(e,E,!1);else{var z=this.projectPoint(c,C,L),I=P*T;if(d.length>0){var D=z.x-d[d.length-4],R=z.y-d[d.length-3];if(I*I*2>D*D+R*R&&E+8-M&&F=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},oe.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(g=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={radialOffset:a,width:n,height:i,anchor:e,textBoxScale:o,prevAnchor:g},this.markUsedJustification(d,e,p),m},ge.prototype.placeLayerBucket=function(e,r,n,i,a,o,s,l,c,u){var h=this,f=e.layers[0].layout,p=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom),d=f.get("text-optional"),g=f.get("icon-optional"),v=f.get("text-allow-overlap"),m=f.get("icon-allow-overlap"),y=v&&(m||!e.hasIconData()||g),x=m&&(v||!e.hasTextData()||d),b=this.collisionGroups.get(e.sourceID),_="map"===f.get("text-rotation-alignment"),w="map"===f.get("text-pitch-alignment"),k="viewport-y"===f.get("symbol-z-order");!e.collisionArrays&&u&&e.deserializeCollisionBoxes(u);var T=function(i,u){if(!c[i.crossTileID])if(l)h.placements[i.crossTileID]=new he(!1,!1,!1);else{var m=!1,k=!1,T=!0,A=null,M=null,S=null,E=0,C=0;u.textFeatureIndex&&(E=u.textFeatureIndex);var L=u.textBox;if(L)if(f.get("text-variable-anchor")){var P=L.x2-L.x1,O=L.y2-L.y1,z=i.textBoxScale,I=f.get("text-variable-anchor");if(h.prevPlacement&&h.prevPlacement.variableOffsets[i.crossTileID]){var D=h.prevPlacement.variableOffsets[i.crossTileID];I[0]!==D.anchor&&(I=I.filter(function(t){return t!==D.anchor})).unshift(D.anchor)}for(var R=0,F=I;R0;T=A&&A.offscreen;var j=u.textCircles;if(j){var U=e.text.placedSymbolArray.get(i.centerJustifiedTextSymbolIndex),V=t.evaluateSizeForFeature(e.textSizeData,p,U);M=h.collisionIndex.placeCollisionCircles(j,f.get("text-allow-overlap"),a,o,U,e.lineVertexArray,e.glyphOffsetArray,V,r,n,s,w,b.predicate),m=f.get("text-allow-overlap")||M.circles.length>0,T=T&&M.offscreen}u.iconFeatureIndex&&(C=u.iconFeatureIndex),u.iconBox&&(k=(S=h.collisionIndex.placeCollisionBox(u.iconBox,f.get("icon-allow-overlap"),o,r,b.predicate)).box.length>0,T=T&&S.offscreen);var q=d||0===i.numHorizontalGlyphVertices&&0===i.numVerticalGlyphVertices,H=g||0===i.numIconVertices;q||H?H?q||(k=k&&m):m=k&&m:k=m=k&&m,m&&A&&h.collisionIndex.insertCollisionBox(A.box,f.get("text-ignore-placement"),e.bucketInstanceId,E,b.ID),k&&S&&h.collisionIndex.insertCollisionBox(S.box,f.get("icon-ignore-placement"),e.bucketInstanceId,C,b.ID),m&&M&&h.collisionIndex.insertCollisionCircles(M.circles,f.get("text-ignore-placement"),e.bucketInstanceId,E,b.ID),h.placements[i.crossTileID]=new he(m||y,k||x,T||e.justReloaded),c[i.crossTileID]=!0}};if(k)for(var A=e.getSortedSymbolIndexes(this.transform.angle),M=A.length-1;M>=0;--M){var S=A[M];T(e.symbolInstances.get(S),e.collisionArrays[S])}else for(var E=0;E=0&&(e.text.placedSymbolArray.get(s).crossTileID=a>=0&&s!==a?0:n.crossTileID)}},ge.prototype.commit=function(t){this.commitTime=t;var e=this.prevPlacement,r=!1,n=e&&0!==this.fadeDuration?(this.commitTime-e.commitTime)/this.fadeDuration:1,i=e?e.opacities:{},a=e?e.variableOffsets:{};for(var o in this.placements){var s=this.placements[o],l=i[o];l?(this.opacities[o]=new ue(l,n,s.text,s.icon),r=r||s.text!==l.text.placed||s.icon!==l.icon.placed):(this.opacities[o]=new ue(null,n,s.text,s.icon,s.skipFade),r=r||s.text||s.icon)}for(var c in i){var u=i[c];if(!this.opacities[c]){var h=new ue(u,n,!1,!1);h.isHidden()||(this.opacities[c]=h,r=r||u.text.placed||u.icon.placed)}}for(var f in a)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=a[f]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},ge.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n0||g>0,b=p.numIconVertices>0;if(x){for(var _=Te(y.text),w=(d+g)/4,k=0;k=0&&(e.text.placedSymbolArray.get(t).hidden=T)});var A=this.variableOffsets[p.crossTileID];A&&this.markUsedJustification(e,A.anchor,p)}if(b){for(var M=Te(y.icon),S=0;St},ge.prototype.setStale=function(){this.stale=!0};var me=Math.pow(2,25),ye=Math.pow(2,24),xe=Math.pow(2,17),be=Math.pow(2,16),_e=Math.pow(2,9),we=Math.pow(2,8),ke=Math.pow(2,1);function Te(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*me+e*ye+r*xe+e*be+r*_e+e*we+r*ke+e}var Ae=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ae.prototype.continuePlacement=function(t,e,r,n,i){for(;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 Ae),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Me.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Se=512/t.EXTENT/2,Ee=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,h=l.x,f=l.y,p=l.sdf,d=l.pixelRatio,g=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,g,{x:h,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:g,pixelRatio:d,sdf:p}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e.sprite,this.map._requestManager,function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var a=Ft(this.stylesheet.layers);this._order=a.map(function(t){return t.id}),this._layers={};for(var o=0,s=a;o0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return n.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.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.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(Oe(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}})}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._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.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],o=parseInt(e.id,10);if(void 0!==a){var s=a.getSource().type;"geojson"===s&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||i?isNaN(o)||o<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):a.setFeatureState(i,o,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,s=parseInt(e.id,10);"vector"!==a||o?void 0!==e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):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,s,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],a=parseInt(e.id,10);if(void 0!==i)if("vector"!==i.getSource().type||n){if(!(isNaN(a)||a<0))return i.getFeatureState(n,a);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else 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]&&(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 v=i.length-1;v>=0;v--){var m=i[v].feature;if(n[m.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;}"),Ge=lr("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;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);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),Ye=lr("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),We=lr("#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);}"),Xe=lr("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;}"),Ze=lr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),Je=lr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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);}"),Ke=lr("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;}"),$e=lr("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\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\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 vec4 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\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\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 pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),Qe=lr("#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;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/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;}"),tr=lr("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;}"),er=lr("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);}"),rr=lr("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);}"),nr=lr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 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 pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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 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,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));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;\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 vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_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);}"),ir=lr("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);}"),ar=lr("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;}"),or=lr("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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),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));}"),sr=lr("#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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),0.0,1.0);float gamma_scale=gl_Position.w;vec2 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;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function lr(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 cr=Object.freeze({prelude:Fe,background:Be,backgroundPattern:Ne,circle:je,clippingMask:Ue,heatmap:Ve,heatmapTexture:qe,collisionBox:He,collisionCircle:Ge,debug:Ye,fill:We,fillOutline:Xe,fillOutlinePattern:Ze,fillPattern:Je,fillExtrusion:Ke,fillExtrusionPattern:$e,hillshadePrepare:Qe,hillshade:tr,line:er,lineGradient:rr,linePattern:nr,lineSDF:ir,raster:ar,symbolIcon:or,symbolSDF:sr}),ur=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};ur.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,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}hr.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,h,f,p,d,g){var v,m=t.gl;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,h,{zoom:f});for(var x=(v={},v[m.LINES]=2,v[m.TRIANGLES]=3,v[m.LINE_STRIP]=1,v)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new ur)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),m.drawElements(e,w.primitiveLength*x,m.UNSIGNED_SHORT,w.primitiveOffset*x*2)}};var pr=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}},dr=function(e,r,n,i,a,o,s){return t.extend(pr(e,r,n,i),fr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},gr=function(t){return{u_matrix:t}},vr=function(e,r,n,i){return t.extend(gr(e),fr(n,r,i))},mr=function(t,e){return{u_matrix:t,u_world:e}},yr=function(e,r,n,i,a){return t.extend(vr(e,r,n,i),{u_world:a})},xr=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=le(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}},br=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)}},_r=function(t,e,r){var n=le(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}},wr=function(t,e){return{u_matrix:t,u_color:e}},kr=function(t){return{u_matrix:t}},Tr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:le(e,1,r),u_intensity:n}},Ar=function(t,e,r){var n=r.paint.get("hillshade-shadow-color"),i=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),o=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Sr(t,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),o],u_shadow:n,u_highlight:i,u_accent:a}},Mr=function(e,r){var n=e.dem.stride,i=t.create();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function Sr(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 Er=function(e,r,n){var i=e.transform;return{u_matrix:zr(e,r,n),u_ratio:1/le(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Cr=function(e,r,n){return t.extend(Er(e,r,n),{u_image:0})},Lr=function(e,r,n,i){var a=e.transform,o=Or(r,a);return{u_matrix:zr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/le(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[t.browser.devicePixelRatio,o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Pr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=Or(r,o),c="round"===n.layout.get("line-cap"),u=s.getDash(i.from,c),h=s.getDash(i.to,c),f=u.width*a.fromScale,p=h.width*a.toScale;return t.extend(Er(e,r,n),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/p,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:a.t})};function Or(t,e){return 1/le(t,1,e.tileZoom)}function zr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Ir=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:function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(i.paint.get("raster-hue-rotate"))};var a,o};var Dr=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}},Rr=function(e,r,n,i,a,o,s,l,c,u,h){var f=a.transform;return t.extend(Dr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+h})},Fr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Br=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from),a=r.imageManager.getPattern(t.to),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,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=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/le(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,f>>16],u_pixel_coord_lower:[65535&h,65535&f]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Nr={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.Uniform4f(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.Uniform4f(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.Uniform4f(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:br,collisionCircle:br,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},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)}},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.Uniform4f(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.Uniform1f(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.Uniform1f(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.Uniform1f(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 jr(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),i=0;i0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),h=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),p=f&&e.refreshedUponExpiration?1:t.clamp(f?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}}function Qr(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=Tt.disabled,c=At.disabled,u=e.colorModeForRenderPass(),h="$debug";s.draw(i,a.LINE_STRIP,l,c,u,St.disabled,wr(o,t.Color.red),h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var f=r.getTileByID(n.key).latestRawTileData,p=f&&f.byteLength||0,d=Math.floor(p/1024),g=function(t,e,r,n){n=n||1;var i,a,o,s,l,c,u,h,f=[];for(i=0,a=t.length;i":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},en={symbol:function(t,e,r,n,i){if("translucent"===t.renderPass){var a=At.disabled,o=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Yr(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,o,i),0!==r.paint.get("text-opacity").constantOr(1)&&Yr(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,o,i),e.map.showCollisionBoxes&&function(t,e,r,n){Vr(t,e,r,n,!1),Vr(t,e,r,n,!0)}(t,e,r,n)}},circle:function(t,e,r,n){if("translucent"===t.renderPass){var i=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),o=r.paint.get("circle-stroke-opacity");if(0!==i.constantOr(1)||0!==a.constantOr(1)&&0!==o.constantOr(1))for(var s=t.context,l=s.gl,c=t.depthModeForSublayer(0,Tt.ReadOnly),u=At.disabled,h=t.colorModeForRenderPass(),f=0;fe.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function an(t,e,r,n,i){var a=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=a;fl.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&an(c,s,n,i,a),l.dy&&an(c,l,n,i,a)}rn.prototype.resize=function(e,r){var n=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,a=this.style._order;i256&&this.clearStencil(),r.setColorMode(Mt.disabled),r.setDepthMode(Tt.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 At({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},rn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new At({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},rn.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Mt([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Mt.unblended:Mt.alphaBlended},rn.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return Tt.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new Tt(r||this.context.gl.LEQUAL,e,[n,n])},rn.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var M=this.style._layers[n[this.currentLayer]],S=i[M.source],E=s[M.source];this._renderTileClippingMasks(M,E),this.renderLayer(this,S,M,E)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},rn.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},rn.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new hr(this.context,cr[t],e,Nr[t],this._showOverdrawInspector)),this.cache[r]},rn.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()},rn.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)};var sn=function(e,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=e||0,this._maxZoom=r||22,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._posMatrixCache={},this._alignedPosMatrixCache={}},ln={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};sn.prototype.clone=function(){var t=new sn(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},ln.minZoom.get=function(){return this._minZoom},ln.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},ln.maxZoom.get=function(){return this._maxZoom},ln.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},ln.renderWorldCopies.get=function(){return this._renderWorldCopies},ln.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},ln.worldSize.get=function(){return this.tileSize*this.scale},ln.centerPoint.get=function(){return this.size._div(2)},ln.size.get=function(){return new t.Point(this.width,this.height)},ln.bearing.get=function(){return-this.angle/Math.PI*180},ln.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))},ln.pitch.get=function(){return this._pitch/Math.PI*180},ln.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},ln.fov.get=function(){return this._fov/Math.PI*180},ln.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())},ln.zoom.get=function(){return this._zoom},ln.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())},ln.center.get=function(){return this._center},ln.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},sn.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},sn.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},sn.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=new t.Point(a*i.x-.5,a*i.y-.5);return function(e,r,n,i){void 0===i&&(i=!0);var a=1<=0&&l<=a)for(c=r;co&&(i=o-v)}if(this.lngRange){var m=p.x,y=c.x/2;m-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}},sn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),i=this.point,a=i.x,o=i.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=new Float64Array(16);t.perspective(l,this._fov,this.width/this.height,1,s),t.scale(l,l,[1,-1,1]),t.translate(l,l,[0,0,-this.cameraToCenterDistance]),t.rotateX(l,l,this._pitch),t.rotateZ(l,l,this.angle),t.translate(l,l,[-a,-o,0]),this.mercatorMatrix=t.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),t.scale(l,l,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;var c=this.width%2/2,u=this.height%2/2,h=Math.cos(this.angle),f=Math.sin(this.angle),p=a-Math.round(a)+h*c+f*u,d=o-Math.round(o)+h*u+f*c,g=new Float64Array(l);if(t.translate(g,g,[p>.5?p-1:p,d>.5?d-1:d,0]),this.alignedProjMatrix=g,l=t.create(),t.scale(l,l,[this.width/2,-this.height/2,1]),t.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=t.create(),t.scale(l,l,[1,-1,1]),t.translate(l,l,[-1,-1,0]),t.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(l=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}},sn.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},sn.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},sn.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&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},cn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var un=function(e){function n(n,i,a,o){void 0===o&&(o={});var s=r.mousePos(i.getCanvasContainer(),a),l=i.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:a},o)),this._defaultPrevented=!1,this.target=i}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),hn=function(e){function n(n,i,a){var o=r.touchPos(i.getCanvasContainer(),a),s=o.map(function(t){return i.unproject(t)}),l=o.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.Point(0,0)),c=i.unproject(l);e.call(this,n,{points:o,point:l,lngLats:s,lngLat:c,originalEvent:a}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),fn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),pn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};pn.prototype.setZoomRate=function(t){this._defaultZoomRate=t},pn.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},pn.prototype.isEnabled=function(){return!!this._enabled},pn.prototype.isActive=function(){return!!this._active},pn.prototype.isZooming=function(){return!!this._zooming},pn.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},pn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},pn.prototype.onWheel=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.isActive()||this._start(e)),e.preventDefault()}},pn.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},pn.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var 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=this._map._requestRenderFrame(this._onScrollFrame))}},pn.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?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="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&s&&l){var u=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=l(u);r.zoom=t.number(s,o,h),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else r.zoom=o,c=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},pn.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};var dn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};dn.prototype.isEnabled=function(){return!!this._enabled},dn.prototype.isActive=function(){return!!this._active},dn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},dn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},dn.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},dn.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)180&&(p=180);var d=p/180;c+=h*p*(d/2),Math.abs(r._normalizeBearing(c,0))0&&r-e[0][0]>160;)e.shift()};var mn=t.bezier(0,0,.3,1),yn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};yn.prototype.isEnabled=function(){return"disabled"!==this._state},yn.prototype.isActive=function(){return"active"===this._state},yn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},yn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},yn.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},yn.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},yn.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},yn.prototype._onMove=function(e){e.preventDefault();var n=r.mousePos(this._el,e);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:mn,noMoveStart:!0},{originalEvent:t})}}},yn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},yn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var xn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function bn(t){return t*(2-t)}xn.prototype.isEnabled=function(){return!!this._enabled},xn.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},xn.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},xn.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,i=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),i=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),i=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:bn,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-i,100*-a],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var _n=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};_n.prototype.isEnabled=function(){return!!this._enabled},_n.prototype.isActive=function(){return!!this._active},_n.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},_n.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},_n.prototype.onTouchStart=function(t){var e=this;if(this.isEnabled()&&!(t.points.length>1))if(this._tapped){var r=t.points[0],n=this._tappedPoint;if(n&&n.dist(r)<=30){t.originalEvent.preventDefault();var i=function(){e._tapped&&e._zoom(t),e._map.off("touchcancel",a),e._resetTapped()},a=function(){e._map.off("touchend",i),e._resetTapped()};this._map.once("touchend",i),this._map.once("touchcancel",a)}else this._resetTapped()}else this._tappedPoint=t.points[0],this._tapped=setTimeout(function(){e._tapped=null,e._tappedPoint=null},300)},_n.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},_n.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},_n.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},_n.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var wn=t.bezier(0,0,.15,1),kn=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};kn.prototype.isEnabled=function(){return!!this._enabled},kn.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},kn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},kn.prototype.disableRotation=function(){this._rotationDisabled=!0},kn.prototype.enableRotation=function(){this._rotationDisabled=!1},kn.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var n=r.mousePos(this._el,e.touches[0]),i=r.mousePos(this._el,e.touches[1]),a=n.add(i).div(2);this._startVec=n.sub(i),this._startAround=this._map.transform.pointLocation(a),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},kn.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),n=r.mousePos(this._el,t.touches[1]),i=e.sub(n);return{vec:i,center:e.add(n).div(2),scale:i.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*i.angleWith(this._startVec)/Math.PI}},kn.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,i=r.scale,a=r.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==i||Math.abs(1-i)>.15;Math.abs(a)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},kn.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),i=n.center,a=n.bearing,o=n.scale,s=r.pointLocation(i),l=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+a),r.zoom=r.scaleZoom(this._startScale*o),r.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),o,i])}},kn.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var n=this._gestureIntent,i=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new t.Event(n+"end",{originalEvent:e})),this._drainInertiaBuffer();var a=this._inertia,o=this._map;if(a.length<2)o.snapToNorth({},{originalEvent:e});else{var s=a[a.length-1],l=a[0],c=o.transform.scaleZoom(i*s[1]),u=o.transform.scaleZoom(i*l[1]),h=c-u,f=(s[0]-l[0])/1e3,p=s[2];if(0!==f&&c!==u){var d=.15*h/f;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),v=c+d*g/2e3;v<0&&(v=0),o.easeTo({zoom:v,duration:g,easing:wn,around:this._aroundCenter?o.getCenter():o.unproject(p),noMoveStart:!0},{originalEvent:e})}else o.snapToNorth({},{originalEvent:e})}}},kn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Tn={scrollZoom:pn,boxZoom:dn,dragRotate:vn,dragPan:yn,keyboard:xn,doubleClickZoom:_n,touchZoomRotate:kn},An=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())e?1:0}),["bottom","left","right","top"])){var o=this.transform,s=o.project(t.LngLat.convert(e)),l=o.project(t.LngLat.convert(r)),c=s.rotate(-n*Math.PI/180),u=l.rotate(-n*Math.PI/180),h=new t.Point(Math.max(c.x,u.x),Math.max(c.y,u.y)),f=new t.Point(Math.min(c.x,u.x),Math.min(c.y,u.y)),p=h.sub(f),d=(o.width-i.padding.left-i.padding.right)/p.x,g=(o.height-i.padding.top-i.padding.bottom)/p.y;if(!(g<0||d<0)){var v=Math.min(o.scaleZoom(o.scale*Math.min(d,g)),i.maxZoom),m=t.Point.convert(i.offset),y=(i.padding.left-i.padding.right)/2,x=(i.padding.top-i.padding.bottom)/2,b=new t.Point(m.x+y,m.y+x).mult(o.scale/o.zoomScale(v));return{center:o.unproject(s.add(l).div(2).sub(b)),zoom:v,bearing:n}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,i,a){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,i),i,a)},r.prototype._fitInternal=function(e,r,n){return e?(r=t.extend(e,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return"zoom"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),"bearing"in e&&n.bearing!==+e.bearing&&(a=!0,n.bearing=+e.bearing),"pitch"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),i&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),a&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),o&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:a,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:s,h=i.centerPoint.add(t.Point.convert(e.offset)),f=i.pointLocation(h),p=t.LngLat.convert(e.center||f);this._normalizeCenter(p);var d,g,v=i.project(f),m=i.project(p).sub(v),y=i.zoomScale(l-a);return e.around&&(d=t.LngLat.convert(e.around),g=i.locationPoint(d)),this._zooming=l!==a,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(i.zoom=t.number(a,l,e)),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e)),d)i.setLocationAtPoint(d,g);else{var f=i.zoomScale(i.zoom-a),p=l>a?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=i.unproject(v.add(m.mult(e*x)).mult(f));i.setLocationAtPoint(i.renderWorldCopies?b.wrap():b,h)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),i&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},r.prototype.flyTo=function(e,r){var n=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):a,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:s,h=i.zoomScale(l-a),f=i.centerPoint.add(t.Point.convert(e.offset)),p=i.pointLocation(f),d=t.LngLat.convert(e.center||p);this._normalizeCenter(d);var g=i.project(p),v=i.project(d).sub(g),m=e.curve,y=Math.max(i.width,i.height),x=y/h,b=v.mag();if("minZoom"in e){var _=t.clamp(Math.min(e.minZoom,a,l),i.minZoom,i.maxZoom),w=y/i.zoomScale(_-a);m=Math.sqrt(w/b*2)}var k=m*m;function T(t){var e=(x*x-y*y+(t?-1:1)*k*k*b*b)/(2*(t?x:y)*k*b);return Math.log(Math.sqrt(e*e+1)-e)}function A(t){return(Math.exp(t)-Math.exp(-t))/2}function M(t){return(Math.exp(t)+Math.exp(-t))/2}var S=T(0),E=function(t){return M(S)/M(S+m*t)},C=function(t){return y*((M(S)*(A(e=S+m*t)/M(e))-A(S))/k)/b;var e},L=(T(1)-S)/m;if(Math.abs(b)<1e-6||!isFinite(L)){if(Math.abs(y-x)<1e-6)return this.easeTo(e,r);var P=xe.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,!1),this._ease(function(e){var h=e*L,p=1/E(h);i.zoom=1===e?l:a+i.scaleZoom(p),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,u,e));var m=1===e?d:i.unproject(g.add(v.mult(C(h))).mult(p));i.setLocationAtPoint(i.renderWorldCopies?m.wrap():m,f),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(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),Mn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Mn.prototype.getDefaultPosition=function(){return"bottom-right"},Mn.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},Mn.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},Mn.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: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)}},Mn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Sn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Sn.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","Mapbox logo"),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},Sn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Sn.prototype.getDefaultPosition=function(){return"bottom-left"},Sn.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Sn.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}},Sn.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 En=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};En.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},En.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 minZoom");var a=new sn(e.minZoom,e.maxZoom,e.renderWorldCopies);if(n.call(this,a,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 En,this._controls=[],this._mapId=t.uniqueId(),this._requestManager=new t.RequestManager(e.transformRequest),"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 Ln))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 i._update(!1)}),this.on("moveend",function(){return i._update(!1)}),this.on("zoom",function(){return i._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var n=t.getCanvasContainer(),i=null,a=!1,o=null;for(var s in Tn)t[s]=new Tn[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(n,"mouseout",function(e){t.fire(new un("mouseout",t,e))}),r.addEventListener(n,"mousedown",function(i){a=!0,o=r.mousePos(n,i);var s=new un("mousedown",t,i);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(i),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(i),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(i))}),r.addEventListener(n,"mouseup",function(e){var r=t.dragRotate.isActive();i&&!r&&t.fire(new un("contextmenu",t,i)),i=null,a=!1,t.fire(new un("mouseup",t,e))}),r.addEventListener(n,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new un("mousemove",t,e))}}),r.addEventListener(n,"mouseover",function(e){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new un("mouseover",t,e))}),r.addEventListener(n,"touchstart",function(r){var n=new hn("touchstart",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),r.addEventListener(n,"touchmove",function(e){t.fire(new hn("touchmove",t,e))},{passive:!1}),r.addEventListener(n,"touchend",function(e){t.fire(new hn("touchend",t,e))}),r.addEventListener(n,"touchcancel",function(e){t.fire(new hn("touchcancel",t,e))}),r.addEventListener(n,"click",function(i){var a=r.mousePos(n,i);(a.equals(o)||a.dist(o)-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];return this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),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?0:t)>=0&&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.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},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.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},i.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},i.prototype.on=function(t,e,r){var i=this;if(void 0===r)return n.prototype.on.call(this,t,e);var a=function(){var n;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 un(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 un(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new un(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)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(a),a.delegates)this.on(o,a.delegates[o]);return this},i.prototype.off=function(t,e,r){if(void 0===r)return n.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var i=this._delegatedListeners[t],a=0;a180;){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}Dn.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.classList.toggle("mapboxgl-ctrl-icon-disabled",t===this._map.getMaxZoom()),this._zoomOutButton.classList.toggle("mapboxgl-ctrl-icon-disabled",t===this._map.getMinZoom())},Dn.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Dn.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new vn(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Dn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Dn.prototype._createButton=function(t,e,n){var i=r.create("button",t,this._container);return i.type="button",i.title=e,i.setAttribute("aria-label",e),i.addEventListener("click",n),i};var Fn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Bn(t,e,r){var n=t.classList;for(var i in Fn)n.remove("mapboxgl-"+r+"-anchor-"+i);n.add("mapboxgl-"+r+"-anchor-"+e)}var Nn,jn=function(e){function n(n,i){if(e.call(this),(n instanceof t.window.HTMLElement||i)&&(n=t.extend({element:n},i)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var a=r.createNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var c=0,u=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c5280?Yn(e,c,f/5280,"mi"):Yn(e,c,f,"ft")}else r&&"nautical"===r.unit?Yn(e,c,h/1852,"nm"):Yn(e,c,h,"m")}function Yn(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))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),t.style.width=e*l+"px",t.innerHTML=s+n}Hn.prototype.getDefaultPosition=function(){return"bottom-left"},Hn.prototype._onMove=function(){Gn(this._map,this._container,this.options)},Hn.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},Hn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Hn.prototype.setUnit=function(t){this.options.unit=t,Gn(this._map,this._container,this.options)};var Wn=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"),this._className="mapboxgl-ctrl"};Wn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Wn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Wn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Wn.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Wn.prototype._updateTitle=function(){var t=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Wn.prototype._isFullscreen=function(){return this._fullscreen},Wn.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(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Wn.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 Xn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Zn=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Xn),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){var r=this;return this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",function(t){r._update(t.point)}),this._map.on("mouseup",function(t){r._update(t.point)}),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("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),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._map&&(this._map.on("move",this._update),this._map.off("mousemove"),this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this._trackPointer=!1,this._update(),this},n.prototype.trackPointer=function(){var t=this;return this._trackPointer=!0,this._pos=null,this._map&&(this._map.off("move",this._update),this._map.on("mousemove",function(e){t._update(e.point)}),this._map.on("drag",function(e){t._update(e.point)}),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.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._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._onClickClose))},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.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Rn(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 h=a.add(s[o]).round();r.setTransform(this._container,Fn[o]+" translate("+h.x+"px,"+h.y+"px)"),Bn(this._container,o,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(t.Evented),Jn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:On,NavigationControl:Dn,GeolocateControl:Vn,AttributionControl:Mn,ScaleControl:Hn,FullscreenControl:Wn,Popup:Zn,Marker:jn,Style:De,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,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 zt.workerCount},set workerCount(t){zt.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 Jn}),r},"object"==typeof r&&"undefined"!=typeof e?e.exports=i():(n=n||self).mapboxgl=i()},{}],427:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1<p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{"./normalize":429,"gl-mat4/clone":259,"gl-mat4/create":260,"gl-mat4/determinant":261,"gl-mat4/invert":265,"gl-mat4/transpose":276,"gl-vec3/cross":334,"gl-vec3/dot":339,"gl-vec3/length":349,"gl-vec3/normalize":356}],429:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],430:[function(t,e,r){var n=t("gl-vec3/lerp"),i=t("mat4-recompose"),a=t("mat4-decompose"),o=t("gl-mat4/determinant"),s=t("quat-slerp"),l=h(),c=h(),u=h();function h(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,h){if(0===o(e)||0===o(r))return!1;var f=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!p||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{"gl-mat4/determinant":261,"gl-vec3/lerp":350,"mat4-decompose":428,"mat4-recompose":431,"quat-slerp":483}],431:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":260,"gl-mat4/fromRotationTranslation":263,"gl-mat4/identity":264,"gl-mat4/multiply":267,"gl-mat4/scale":274,"gl-mat4/translate":275}],432:[function(t,e,r){"use strict";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],433:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=t("mat4-interpolate"),a=t("gl-mat4/invert"),o=t("gl-mat4/rotateX"),s=t("gl-mat4/rotateY"),l=t("gl-mat4/rotateZ"),c=t("gl-mat4/lookAt"),u=t("gl-mat4/translate"),h=(t("gl-mat4/scale"),t("gl-vec3/normalize")),f=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],f=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)f[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&f[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=f[c];else i(o,f,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],h(g,g);var v=this.computedInverse;a(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=m[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,i=0,f=o.length;i0;--p)r[h++]=s[p];return r};var n=t("robust-orientation")[3]},{"robust-orientation":510}],435:[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 h(){(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 f(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",g),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",h),t.addEventListener("keyup",f),t.addEventListener("keydown",f),t.addEventListener("keypress",f),t!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",g),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",h),t.removeEventListener("keyup",f),t.removeEventListener("keydown",f),t.removeEventListener("keypress",f),t!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t("mouse-event")},{"mouse-event":437}],436:[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}},{}],437:[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< 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var E=t.getters||[],C=new Array(M),L=0;L=0?C[L]=!0:C[L]=!1;return function(t,e,r,M,S,E){var C=E.length,L=S.length;if(L<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var P="extractContour"+S.join("_"),O=[],z=[],I=[],D=0;D0&&N.push(l(D,S[R-1])+"*"+s(S[R-1])),z.push(d(D,S[R])+"=("+N.join("-")+")|0")}for(var D=0;D=0;--D)j.push(s(S[D]));z.push(w+"=("+j.join("*")+")|0",b+"=mallocUint32("+w+")",x+"=mallocUint32("+w+")",k+"=0"),z.push(g(0)+"=0");for(var R=1;R<1<0;T=T-1&d)w.push(x+"["+k+"+"+m(T)+"]");w.push(y(0));for(var T=0;T=0;--e)G(e,0);for(var r=[],e=0;e0){",p(S[e]),"=1;");t(e-1,r|1<=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),a.push("1"),o.push("s["+l+"]-2"));var c=".lo("+a.join()+").hi("+o.join()+")";if(0===a.length&&(c=""),i>0){n.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");n.push("){grad",i,"(src.pick(",s.join(),")",c);for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",c);n.push(");")}for(var l=0;l1){dst.set(",s.join(),",",u,",0.5*(src.get(",f.join(),")-src.get(",p.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>1){diff(",h,",src.pick(",f.join(),")",c,",src.pick(",p.join(),")",c,");}else{zero(",h,");};");break;case"mirror":0===i?n.push("dst.set(",s.join(),",",u,",0);"):n.push("zero(",h,");");break;case"wrap":var d=s.slice(),g=s.slice();e[l]<0?(d[u]="s["+u+"]-2",g[u]="0"):(d[u]="s["+u+"]-1",g[u]="1"),0===i?n.push("if(s[",u,"]>2){dst.set(",s.join(),",",u,",0.5*(src.get(",d.join(),")-src.get(",g.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>2){diff(",h,",src.pick(",d.join(),")",c,",src.pick(",g.join(),")",c,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}i>0&&n.push("};")}for(var s=0;s<1<>",rrshift:">>>"};!function(){for(var t in s){var e=s[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in l){var e=l[t];r[t]=o({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:i,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":146}],445:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":446,ndarray:450}],446:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":146}],447:[function(t,e,r){"use strict";var n=t("typedarray-pool"),i=32;function a(t){switch(t){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r0?s.push(["d",d,"=s",d,"-d",h,"*n",h].join("")):s.push(["d",d,"=s",d].join("")),h=d),0!=(p=t.length-1-l)&&(f>0?s.push(["e",p,"=s",p,"-e",f,"*n",f,",f",p,"=",c[p],"-f",f,"*n",f].join("")):s.push(["e",p,"=s",p,",f",p,"=",c[p]].join("")),f=p)}r.push("var "+s.join(","));var g=["0","n0-1","data","offset"].concat(o(t.length));r.push(["if(n0<=",i,"){","insertionSort(",g.join(","),")}else{","quickSort(",g.join(","),")}"].join("")),r.push("}return "+n);var v=new Function("insertionSort","quickSort",r.join("\n")),m=function(t,e){var r=["'use strict'"],n=["ndarrayInsertionSort",t.join("d"),e].join(""),i=["left","right","data","offset"].concat(o(t.length)),s=a(e),l=["i,j,cptr,ptr=left*s0+offset"];if(t.length>1){for(var c=[],u=1;u1){for(r.push("dptr=0;sptr=ptr"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"b){break __l}"].join("")),u=t.length-1;u>=1;--u)r.push("sptr+=e"+u,"dptr+=f"+u,"}");for(r.push("dptr=cptr;sptr=cptr-s0"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"scratch)){",f("cptr",h("cptr-s0")),"cptr-=s0","}",f("cptr","scratch"));return r.push("}"),t.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(t,e),y=function(t,e,r){var n=["'use strict'"],s=["ndarrayQuickSort",t.join("d"),e].join(""),l=["left","right","data","offset"].concat(o(t.length)),c=a(e),u=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var h=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var f=[],p=1;p=0;--a)0!==(o=t[a])&&n.push(["for(i",o,"=0;i",o,"1)for(a=0;a1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function y(e,r,i,a){if(1===r.length)n.push("ptr0="+d(r[0]));else{for(var o=0;o1)for(o=0;o=1;--o)i&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function x(){t.length>1&&c&&n.push("free(pivot1)","free(pivot2)")}function b(e,r){var i="el"+e,a="el"+r;if(t.length>1){var o="__l"+ ++u;y(o,[i,a],!1,["comp=",g("ptr0"),"-",g("ptr1"),"\n","if(comp>0){tmp0=",i,";",i,"=",a,";",a,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",g(d(i)),">",g(d(a)),"){tmp0=",i,";",i,"=",a,";",a,"=tmp0}"].join(""))}function _(e,r){t.length>1?m([e,r],!1,v("ptr0",g("ptr1"))):n.push(v(d(e),g(d(r))))}function w(e,r,i){if(t.length>1){var a="__l"+ ++u;y(a,[r],!0,[e,"=",g("ptr0"),"-pivot",i,"[pivot_ptr]\n","if(",e,"!==0){break ",a,"}"].join(""))}else n.push([e,"=",g(d(r)),"-pivot",i].join(""))}function k(e,r){t.length>1?m([e,r],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join("")):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join(""))}function T(e,r,i){t.length>1?(m([e,r,i],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join("")),n.push("++"+r,"--"+i)):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","ptr2=",d(i),"\n","++",r,"\n","--",i,"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join(""))}function A(t,e){k(t,e),n.push("--"+e)}function M(e,r,i){t.length>1?m([e,r],!0,[v("ptr0",g("ptr1")),"\n",v("ptr1",["pivot",i,"[pivot_ptr]"].join(""))].join("")):n.push(v(d(e),g(d(r))),v(d(r),"pivot"+i))}function S(e,r){n.push(["if((",r,"-",e,")<=",i,"){\n","insertionSort(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}else{\n",s,"(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}"].join(""))}function E(e,r,i){t.length>1?(n.push(["__l",++u,":while(true){"].join("")),m([e],!0,["if(",g("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",u,"}"].join("")),n.push(i,"}")):n.push(["while(",g(d(e)),"===pivot",r,"){",i,"}"].join(""))}return n.push("var "+h.join(",")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?m(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",g("ptr1"),"\n","pivot2[pivot_ptr]=",g("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",g("ptr0"),"\n","y=",g("ptr2"),"\n","z=",g("ptr4"),"\n",v("ptr5","x"),"\n",v("ptr6","y"),"\n",v("ptr7","z")].join("")):n.push(["pivot1=",g(d("el2")),"\n","pivot2=",g(d("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",g(d("el1")),"\n","y=",g(d("el3")),"\n","z=",g(d("el5")),"\n",v(d("index1"),"x"),"\n",v(d("index3"),"y"),"\n",v(d("index5"),"z")].join("")),_("index2","left"),_("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),T("k","less","great"),n.push("break"),n.push("}else{"),A("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--greatindex5){"),E("less",1,"++less"),E("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great1&&c?new Function("insertionSort","malloc","free",n.join("\n"))(r,c[0],c[1]):new Function("insertionSort",n.join("\n"))(r)}(t,e,m);return v(m,y)}},{"typedarray-pool":545}],448:[function(t,e,r){"use strict";var n=t("./lib/compile_sort.js"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{"./lib/compile_sort.js":447}],449:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_3_arg4_)}",args:[{name:"_inline_3_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_4_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_4_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:a(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:i(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":149,"ndarray-linear-interpolate":443}],450:[function(t,e,r){var n=t("iota-array"),i=t("is-buffer"),a="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),i?a.push("return this.data.set("+u+",v)}"):a.push("return this.data["+u+"]=v}"),a.push("proto.get=function "+r+"_get("+l.join(",")+"){"),i?a.push("return this.data.get("+u+")}"):a.push("return this.data["+u+"]}"),a.push("proto.index=function "+r+"_index(",l.join(),"){return "+u+"}"),a.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+o.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=o.map(function(t){return"a"+t+"=this.shape["+t+"]"}),d=o.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+o.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");return a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map(function(t){return"shape["+t+"]"}).join(",")+","+o.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",a.join("\n"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1;return n.pack(o,r)}},{"double-bits":167}],452:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return["C",t,e,r,n,r,n]}function o(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,h,f,p){if(p)k=p[0],T=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(h=(d=l(h,f,-o)).x))/2,v=(e-(f=d.y))/2,m=g*g/(r*r)+v*v/(a*a);m>1&&(r*=m=Math.sqrt(m),a*=m);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/a+(t+h)/2,w=b*-a*g/r+(e+f)/2,k=Math.asin(((e-w)/a).toFixed(9)),T=Math.asin(((f-w)/a).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(T=h<_?n-T:T)<0&&(T=2*n+T),u&&k>T&&(k-=2*n),!u&&T>k&&(T-=2*n)}if(Math.abs(T-k)>i){var A=T,M=h,S=f;T=k+i*(u&&T>k?1:-1);var E=s(h=_+r*Math.cos(T),f=w+a*Math.sin(T),r,a,o,0,u,M,S,[T,A,_,w])}var C=Math.tan((T-k)/4),L=4/3*r*C,P=4/3*a*C,O=[2*t-(t+L*Math.sin(k)),2*e-(e-P*Math.cos(k)),h+L*Math.sin(T),f-P*Math.cos(T),h,f];if(p)return O;E&&(O=O.concat(E));for(var z=0;z7&&(r.push(m.splice(0,7)),m.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-n,b+=b-i),m=["C",x,b,m[1],m[2],m[3],m[4]];break;case"T":"Q"==e||"T"==e?(h=2*p-h,f=2*d-f):(h=p,f=d),m=o(p,d,h,f,m[1],m[2]);break;case"Q":h=m[1],f=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case"L":m=a(p,d,m[1],m[2]);break;case"H":m=a(p,d,m[1],d);break;case"V":m=a(p,d,p,m[1]);break;case"Z":m=a(p,d,l,u)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],i=m[m.length-3]):(n=p,i=d),r.push(m)}return r}},{}],453:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var b=i[c],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;oa)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0;for(c=0;c<3;++c)f[c]*=p;i[o]=f}return i}},{}],454:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l0){var h=Math.sqrt(u+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-a)/h,t[3]=.5*h}else{var f=Math.max(e,a,c),h=Math.sqrt(2*f-u+1);e>=f?(t[0]=.5*h,t[1]=.5*(i+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):a>=f?(t[0]=.5*(r+i)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-i)/h)}return t}},{}],456:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new h(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up);return i};var n=t("filtered-vector"),i=t("gl-mat4/lookAt"),a=t("gl-mat4/fromQuat"),o=t("gl-mat4/invert"),s=t("./lib/quatFromFrame");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function h(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=h.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*i[h];r[12+l]=-c}},f.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},f.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},f.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],h=i[4],f=i[8],p=u*a+h*o+f*s,d=l(u-=a*p,h-=o*p,f-=s*p);u/=d,h/=d,f/=d;var g=i[2],v=i[6],m=i[10],y=g*a+v*o+m*s,x=g*u+v*h+m*f,b=l(g-=y*a+x*u,v-=y*o+x*h,m-=y*s+x*f);g/=b,v/=b,m/=b;var _=u*e+a*r,w=h*e+o*r,k=f*e+s*r;this.center.move(t,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(t,Math.log(T))},f.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],h=i[5],f=i[9],p=i[2],d=i[6],g=i[10],v=e*a+r*u,m=e*o+r*h,y=e*s+r*f,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var T=this.computedRotation,A=T[0],M=T[1],S=T[2],E=T[3],C=A*w+E*x+M*_-S*b,L=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){x=p,b=d,_=g;var z=Math.sin(n)/l(x,b,_);x*=z,b*=z,_*=z,O=O*(w=Math.cos(e))-(C=C*w+O*x+L*_-P*b)*x-(L=L*w+O*b+P*x-C*_)*b-(P=P*w+O*_+C*b-L*x)*_}var I=c(C,L,P,O);I>1e-6?(C/=I,L/=I,P/=I,O/=I):(C=L=P=0,O=1),this.rotation.set(t,C,L,P,O)},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var h=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.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},f.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":455,"filtered-vector":226,"gl-mat4/fromQuat":262,"gl-mat4/invert":265,"gl-mat4/lookAt":266}],457:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return n(r="undefined"!=typeof r?r+"":" ",e)+t}},{"repeat-string":503}],458:[function(t,e,r){"use strict";function n(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",a=!!e.flat;n.forEach(function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])}),e})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r},"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],459:[function(t,e,r){"use strict";var n=t("pick-by-alias");e.exports=function(t){var e;arguments.length>1&&(t=arguments);"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]);t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{"pick-by-alias":465}],460:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),"m"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{"invert-permutation":415,"typedarray-pool":545}],465:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n,a,o={};if("string"==typeof e&&(e=i(e)),Array.isArray(e)){var s={};for(a=0;a0){o=a[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var f=a[h][r],p=0;p0&&(o=d,s=g,l=h)}return i?s:(o&&c(o,l),s)}function h(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],h=t,f=o[1],p=u(l,h,!0);if(n(e[l],e[h],e[f],e[p])<0)break;o.push(t),s=u(l,h)}return o}function f(t,e){return e[1]===e[e.length-1]}for(var o=0;o0;){a[0][o].length;var g=h(o,p);f(d,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t("compare-angle")},{"compare-angle":127}],467:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s0})).length,v=new Array(g),m=new Array(g),p=0;p0;){var N=F.pop(),j=C[N];l(j,function(t,e){return t-e});var U,V=j.length,q=B[N];if(0===q){var k=d[N];U=[k]}for(var p=0;p=0)&&(B[H]=1^q,F.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),U.push(k))}}0===q&&r.push(U)}return r};var n=t("edges-to-adjacency-list"),i=t("planar-dual"),a=t("point-in-big-polygon"),o=t("two-product"),s=t("robust-sum"),l=t("uniq"),c=t("./lib/trim-leaves");function u(t,e){for(var r=new Array(t),n=0;n>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(h(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;mr){for(var f=0;fl||A>c||M=C||o===s)){var u=y[a];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=w&&P.push(f)}var b=x[a],_=b[4*o+0],k=b[4*o+1],E=b[4*o+2],L=b[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(b,o+1),z=.5*i,I=a+1;e(r,n,z,I,_,k||E||L||O),e(r,n+z,z,I,k,E||L||O),e(r+z,n,z,I,E,L||O),e(r+z,n+z,z,I,L,O)}}}(0,0,1,0,0,1),P},d;function E(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(m.slabs,m.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t("robust-orientation")[3],i=t("slab-decomposition"),a=t("interval-tree-1d"),o=t("binary-search-bounds");function s(){return!0}function l(t){for(var e={},r=0;r=-t},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}},{}],476:[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 h=e.linesIntersect(o,s,c,u);if(!1===h){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var f=e.pointsSame(o,c),p=e.pointsSame(s,u);if(f&&p)return n;var d=!f&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(f)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===h.alongA&&(-1===h.alongB?l(t,c):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,u)),0===h.alongB&&(-1===h.alongA?l(n,o):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!a.isEmpty();){var f=a.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var p=c(f),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=u(f,d);if(t)return t}return!!g&&u(f,g)}r&&r.tempStatus(f.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x)t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,r&&r.segmentUpdate(x.seg),f.other.remove(),f.remove();if(a.getHead()!==f){r&&r.rewind(f.seg);continue}t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:i,f.seg.myFill.above=y?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(m=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:i,f.seg.otherFill={above:m,below:m}),r&&r.status(f.seg,!!d&&d.seg,!!g&&g.seg),f.other.status=p.insert(n.node({ev:f}))}else{var b=f.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(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}h.push(f.seg)}a.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d):(T=0,p>=0?(A=0,y=d):-p>=h?(A=1,y=h+2*p+d):y=p*(A=-p/h)+d);else if(A<0)A=0,f>=0?(T=0,y=d):-f>=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d;else{var M=1/k;y=(T*=M)*(c*T+u*(A*=M)+2*f)+A*(u*T+h*A+2*p)+d}else T<0?(b=h+p)>(x=u+f)?(_=b-x)>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d:(T=0,b<=0?(A=1,y=h+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/h)+d):A<0?(b=c+f)>(x=u+p)?(_=b-x)>=(w=c-2*u+h)?(A=1,T=0,y=h+2*p+d):y=(T=1-(A=_/w))*(c*T+u*A+2*f)+A*(u*T+h*A+2*p)+d:(A=0,b<=0?(T=1,y=c+2*f+d):f>=0?(T=0,y=d):y=f*(T=-f/c)+d):(_=h+p-u-f)<=0?(T=0,A=1,y=h+2*p+d):_>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d;var S=1-T-A;for(l=0;l1)for(var r=1;r0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{"cell-orientation":112,"compare-cell":128,"compare-oriented-cell":129}],490:[function(t,e,r){"use strict";var n=t("array-bounds"),i=t("color-normalize"),a=t("update-diff"),o=t("pick-by-alias"),s=t("object-assign"),l=t("flatten-vertex-data"),c=t("to-float32"),u=c.float32,h=c.fract32;e.exports=function(t,e){"function"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,p,d,g,v,m=t._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=t.buffer({usage:"static",type:"float",data:f}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:f.length}),s(b,{update:k,draw:_,destroy:T,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&T(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){"number"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},v.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold?t.shaders.rect(e):"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,h){var d=e.passes[h];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),d||(e.passes[h]=d={id:h,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,h80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function i(t,e,r,n,i){var a,o;if(i===A(t,e,r,n)>0)for(a=e;a=e;a-=n)o=w(a,t[a],t[a+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,h,f){if(t){!f&&h&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;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,h);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,h?l(t,n,i,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,v=g.next;else if((t=g)===v){f?1===f?o(t=c(t,e,r),e,r,n,i,h,2):2===f&&u(t,e,r,n,i,h):o(a(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(m(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(m(i,a,o)>=0)return!1;for(var s=i.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,h=p(s,l,e,r,n),f=p(c,u,e,r,n),d=t.prevZ,v=t.nextZ;d&&d.z>=h&&v&&v.z<=f;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!y(i,a)&&x(i,n,n.next,a)&&b(i,a)&&b(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),k(n),k(n.next),n=t=a),n=n.next}while(n!==t);return n}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=_(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function f(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&&g(ar.x)&&b(n,t)&&(r=n,f=l),n=n.next;return r}(t,e)){var r=_(e,t);a(r,r.next)}}function p(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||m(t,e,r)>0!=m(t,e,n)>0&&m(r,n,t)>0!=m(r,n,e)>0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function _(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w(t,e,r,n){var i=new T(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],493:[function(t,e,r){arguments[4][318][0].apply(r,arguments)},{"./is-implemented":494,"./polyfill":496,dup:318}],494:[function(t,e,r){arguments[4][319][0].apply(r,arguments)},{dup:319}],495:[function(t,e,r){arguments[4][320][0].apply(r,arguments)},{dup:320}],496:[function(t,e,r){arguments[4][321][0].apply(r,arguments)},{"./is-native-implemented":495,d:151,dup:321,"es5-ext/object/is-value":194,"es5-ext/object/set-prototype-of":200,"es5-ext/object/valid-object":204,"es5-ext/object/valid-value":205,"es5-ext/string/random-uniq":210,"es6-iterator/for-of":212,"es6-iterator/get":213,"es6-symbol":219}],497:[function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e 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=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(palette,\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) * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),d&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.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},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=l(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var f={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(f):e.elements=s.elements(f)}return i({data:g.float(t),usage:"dynamic"}),a({data:g.fract(t),usage:"dynamic"}),c({data:new Uint8Array(u),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&&t.destroy&&t.destroy()}),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],o=0,l=Math.min(e.length,r.count);o=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},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?g=new(h(e.dtype))(m):e.dtype&&(g=e.dtype,Array.isArray(g)&&(g.length=m));for(var y=0;yr||s>p){for(var f=0;fl||A>c||M=E||o===s)){var u=x[a];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=y&&P.push(f)}var _=b[a],w=_[4*o+0],k=_[4*o+1],C=_[4*o+2],L=_[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(_,o+1),z=.5*i,I=a+1;e(r,n,z,I,w,k||C||L||O),e(r,n+z,z,I,k,C||L||O),e(r+z,n,z,I,C,L||O),e(r+z,n+z,z,I,L,O)}}}(0,0,1,0,0,1),P},g;function C(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s2?(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;nT))&&(s.lower||!(k>>=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===h?i>>=1:5125===h&&(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 h=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),h.primType=4,h.vertCount=0|t,h.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,f=0;Array.isArray(t)||W(t)||l(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=$[t.usage]),"primitive"in t&&(n=rt[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(f=u[t.type]),"length"in t?o=0|t.length:(o=i,5123===f||5122===f?o*=2:5125!==f&&5124!==f||(o*=4))),a(h,e,r,n,i,o,f)}else c(),h.primType=4,h.vertCount=0,h.type=5121;return s}var c=r.create(null,34963,!0),h=new i(c._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=h,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(h)},s},createStream:function(t){var e=h.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){h.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 L(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(mt).forEach(function(e){t+=mt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=C();return"number"==typeof t?M(a,0|t,"number"==typeof e?0|e:0|t):t?(O(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),z(r,3553),R(),L(a),o.profile&&(i.stats.size=k(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return mt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=m();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,D(i),d(o,3553,e,r,a),R(),T(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l,c=i.channels,u=i.type,h=0;i.mipmask>>h;++h){var f=a>>h,p=s>>h;if(!f||!p)break;l=G.zero.allocType(u,f*p*c),t.texImage2D(3553,h,i.format,f,p,0,i.format,i.type,l),l&&G.zero.freeType(l)}return R(),o.profile&&(i.stats.size=k(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function h(t,e,r,n,i,a){var s,l=f.texInfo;for(P.call(l),s=0;6>s;++s)g[s]=C();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(O(l,t),u(f,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],f),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(f,g[0]),f.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,f.internalformat=g[0].internalformat,h.width=g[0].width,h.height=g[0].height,D(f),s=0;6>s;++s)E(g[s],34069+s);for(z(l,34067),R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,l.genMipmaps,!0)),h.format=tt[f.internalformat],h.type=et[f.type],h.mag=rt[l.magFilter],h.min=nt[l.minFilter],h.wrapS=it[l.wrapS],h.wrapT=it[l.wrapT],s=0;6>s;++s)L(g[s]);return h}var f=new I(34067);mt[f.id]=f,a.cubeCount++;var g=Array(6);return h(e,r,n,i,s,l),h.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=m();return c(a,f),a.width=0,a.height=0,p(a,e),a.width=a.width||(f.width>>i)-r,a.height=a.height||(f.height>>i)-n,D(f),d(a,34069+t,r,n,i),R(),T(a),h},h.resize=function(e){if((e|=0)!==f.width){h.width=f.width=e,h.height=f.height=e,D(f);for(var r=0;6>r;++r)for(var n=0;f.mipmask>>n;++n)t.texImage2D(34069+r,n,f.format,e>>n,e>>n,0,f.format,f.type,null);return R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=f,o.profile&&(h.stats=f.stats),h.destroy=function(){f.decRef()},h},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);z(e.texInfo,e.target)})}}}function A(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return"object"==typeof t&&(i=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=i._reglType)?r=i:"textureCube"===t?r=i:"renderbuffer"===t&&(n=i,e=36161),new o(e,r,n)}function h(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function f(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function d(){this.id=k++,T[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete T[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;ni;++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(T).forEach(v)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(T).forEach(function(e){e.framebuffer=t.createFramebuffer(),m(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){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;rt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return f.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={},f.forEach(function(e){t.deleteProgram(e.program)}),f.length=0,h={},r.shaderCount=0},program:function(t,e,n){var i=h[e];i||(i=h[e]={});var a=i[t];return a||(a=new s(e,t),r.shaderCount++,l(a),i[t]=a,f.push(a)),a},restore:function(){c={},u={};for(var t=0;t"+e+"?"+i+".constant["+e+"]:0;"}).join(""),"}}else{","if(",o,"(",i,".buffer)){",u,"=",s,".createStream(",34962,",",i,".buffer);","}else{",u,"=",s,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),o}function A(t,e,r,n,i){var o=_(t),s=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:t=!1,"height"in r?o=0|r.height:t=!1,new I(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,a=n;"width"in r||(a=e.def(i,".","framebufferWidth","-",s));var c=o;return"height"in r||(c=e.def(i,".","framebufferHeight","-",l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=F(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,".x|0"),a=e.def(r,".y|0");return[i,a,e.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",i,")"),r=e.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",a,")")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new I(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".","framebufferWidth"),e.def(r,".","framebufferHeight")]}):null}var i=t.static,a=t.dynamic;if(t=n("viewport")){var o=t;t=new I(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,".viewportWidth",r[2]),e.set(n,".viewportHeight",r[3]),r})}return{viewport:t,scissor_box:n("scissor.box")}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,i={};return nt.forEach(function(t){function e(e,a){if(t in r){var s=e(r[t]);i[o]=R(function(){return s})}else if(t in n){var l=n[t];i[o]=F(l,function(t,e){return a(t,e,t.invoke(e,l))})}}var o=m(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return e(function(t){return t},function(t,e,r){return r});case"depth.func":return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,"[",r,"]")});case"depth.range":return e(function(t){return t},function(t,e,r){return[e.def("+",r,"[0]"),e=e.def("+",r,"[1]")]});case"blend.func":return e(function(t){return[wt["srcRGB"in t?t.srcRGB:t.src],wt["dstRGB"in t?t.dstRGB:t.dst],wt["srcAlpha"in t?t.srcAlpha:t.src],wt["dstAlpha"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('"',t,n,'" in ',r,"?",r,".",t,n,":",r,".",t)}t=t.constants.blendFuncs;var i=n("src","RGB"),a=n("dst","RGB"),o=(i=e.def(t,"[",i,"]"),e.def(t,"[",n("src","Alpha"),"]"));return[i,a=e.def(t,"[",a,"]"),o,t=e.def(t,"[",n("dst","Alpha"),"]")]});case"blend.equation":return e(function(t){return"string"==typeof t?[J[t],J[t]]:"object"==typeof t?[J[t.rgb],J[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond("typeof ",r,'==="string"')).then(i,"=",a,"=",n,"[",r,"];"),t.else(i,"=",n,"[",r,".rgb];",a,"=",n,"[",r,".alpha];"),e(t),[i,a]});case"blend.color":return e(function(t){return a(4,function(e){return+t[e]})},function(t,e,r){return a(4,function(t){return e.def("+",r,"[",t,"]")})});case"stencil.mask":return e(function(t){return 0|t},function(t,e,r){return e.def(r,"|0")});case"stencil.func":return e(function(t){return[kt[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]},function(t,e,r){return[t=e.def('"cmp" in ',r,"?",t.constants.compareFuncs,"[",r,".cmp]",":",7680),e.def(r,".ref|0"),e=e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return e(function(e){return["stencil.opBack"===t?1029:1028,Tt[e.fail||"keep"],Tt[e.zfail||"keep"],Tt[e.zpass||"keep"]]},function(e,r,n){function i(t){return r.def('"',t,'" in ',n,"?",a,"[",n,".",t,"]:",7680)}var a=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,i("fail"),i("zfail"),i("zpass")]});case"polygonOffset.offset":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,".factor|0"),e=e.def(r,".units|0")]});case"cull.face":return e(function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e},function(t,e,r){return e.def(r,'==="front"?',1028,":",1029)});case"lineWidth":return e(function(t){return t},function(t,e,r){return r});case"frontFace":return e(function(t){return At[t]},function(t,e,r){return e.def(r+'==="cw"?2304:2305')});case"colorMask":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return a(4,function(t){return"!!"+r+"["+t+"]"})});case"sample.coverage":return e(function(t){return["value"in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('"value" in ',r,"?+",r,".value:1"),e=e.def("!!",r,".invert")]})}}),i}(t),u=w(t),h=s.viewport;return h&&(c.viewport=h),(s=s[h=m("scissor.box")])&&(c[h]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,g,v,s],");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(u+".drawElements("+[d,v,m,g+"<<(("+m+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[d,g,v]+");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,h=c.draw,f=n.draw,p=function(){var i=f.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(h,".","elements"),i&&a("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);"),i}(),d=i("primitive"),g=i("offset"),v=function(){var i=f.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(h,".","count"),i}();if("number"==typeof v){if(0===v)return}else r("if(",v,"){"),r.exit("}");$&&(s=i("instances"),l=t.instancing);var m=p+".type",y=f.elements&&D(f.elements);$&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function q(t,e,r,n,i){return i=(e=b()).proc("body",i),$&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),U(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId="a1",L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),U(t,e,e,r)}function Y(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),C(t,u,r.state,i),r.profile&&i(r.profile)&&B(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),U(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link(function(e){return q(G,t,r,e,2)}),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function W(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),z(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);v(n)?n.forEach(function(r,n){i.set(t.next[e],"["+n+"]",r)}):i.set(a.next,"."+e,n)}),B(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))}),Object.keys(r.uniforms).forEach(function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(a,"."+t,n[t])})}),n("vert"),n("frag"),0=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o)},o._reglType="renderbuffer",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=["x","y","z","w"],_t="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),wt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},kt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Tt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},At={cw:2304,ccw:2305},Mt=new I(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),Q=null;else{Q=q.next(e),h();for(var t=Z.length-1;0<=t;--t){var r=Z[t];r&&r(P,null,0)}v.flush(),w&&w.update()}}function r(){!Q&&0=Z.length&&n()}}}}function u(){var t=W.viewport,e=W.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function h(){P.tick+=1,P.time=g(),u(),G.procs.poll()}function f(){u(),G.procs.refresh(),w&&w.update()}function g(){return(H()-k)/1e3}if(!(t=i(t)))return null;var v=t.gl,m=v.getContextAttributes();v.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(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 z.create(t,34962,!1,!1)},elements:function(t){return I.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:F.create,framebuffer:U.create,framebufferCube:U.createCube,attributes:m,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=J;break;case"restore":r=K;break;case"destroy":r=$}return r.push(e),{cancel:function(){for(var t=0;t=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)}},{}],504:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],505:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&&(t[--n]=r,r=l)}for(var c=0,i=n;i>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(function(t){for(var e=new Array(t),r=0;r>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return u(e,t)}function h(t){if(2===t.length)return[["diff(",u(t[0][0],t[1][1]),",",u(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var o=0;o0&&r.push(","),o===i?r.push("+b[",a,"]"):r.push("+A[",a,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o: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],h=e[2]-n[2],f=r[2]-n[2],d=a*c,g=o*l,v=o*s,m=i*c,y=i*l,x=a*s,b=u*(d-g)+h*(v-m)+f*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(h)+(Math.abs(y)+Math.abs(x))*Math.abs(f));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;d.length<=s;)d.push(h(d.length));for(var t=[],r=["slow"],n=0;n<=s;++n)t.push("a"+n),r.push("o"+n);var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&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],h=Math.min(c,u),f=Math.max(c,u);if(f=n?(i=h,(l+=1)=n?(i=h,(l+=1)0?1:0}},{}],517:[function(t,e,r){"use strict";e.exports=function(t){return i(n(t))};var n=t("boundary-cells"),i=t("reduce-simplicial-complex")},{"boundary-cells":95,"reduce-simplicial-complex":489}],518:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){r=r||0,"undefined"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}for(var a=t+1;a>1;--a){a>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[v],s)););}return r}function h(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=h,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0){var n=m(r);if(e0){var t=T[0];return v(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=T[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}for(var T=[],A=new Array(a),h=0;h>1;h>=0;--h)x(h);for(;;){var E=_();if(E<0||c[E]>r)break;k(E)}for(var C=[],h=0;h=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&P.push([n,i])}}),i.unique(i.normalize(P)),{positions:C,edges:P}};var n=t("robust-orientation"),i=t("simplicial-complex")},{"robust-orientation":510,"simplicial-complex":522}],525:[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 h(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 h=this.horizontal[e];if(h.length>0){var f=n.ge(h,t[1],l);if(f=h.length)return i;p=h[f]}}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":525,"binary-search-bounds":91,"functional-red-black-tree":230,"robust-orientation":510}],527:[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 h=o(s,u,l,i);r.push(h),n.push(h.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":507,"robust-sum":515}],528:[function(t,e,r){!function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(r){return function(r,n){var i,a,o,s,l,c,u,h,f,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)||h&&!s.sign?f="":(f=h?"+":"-",i=i.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+i).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?f+i+l:"0"===c?f+l+i:l+f+i)}return g}(function(e){if(i[e])return i[e];var r,n=e,a=[],o=0;for(;n;){if(null!==(r=t.text.exec(n)))a.push(r[0]);else if(null!==(r=t.modulo.exec(n)))a.push("%");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({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 i[e]=a}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var i=Object.create(null);"undefined"!=typeof r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],529:[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]){for(var v=[],m=[],y=0,d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=h.length,x===e){l.length=d;break}}h.push(v);for(var b=new Array(y),d=0;d c)|0 },"),"generic"===e&&a.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){");for(var c=0;c<1<<(1<128&&c%128==0){h.length>0&&f.push("}}");var p="vExtra"+h.length;a.push("case ",c>>>7,":",p,"(m&0x7f,",l.join(),");break;"),f=["function ",p,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(A="+"+v[b]+"*c");var M=d[b].length/y*.5,S=.5+m[b]/y*.5;T.push("d"+b+"-"+S+"-"+M+"*("+d[b].join("+")+A+")/("+g[b].join("+")+")")}f.push("a.push([",T.join(),"]);","break;")}a.push("}},"),h.length>0&&f.push("}}");for(var E=[],c=0;c<1<1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,h=t.ry,f=t.xAxisRotation,p=void 0===f?0:f,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===h)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),h=Math.abs(h);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(h,2);k>1&&(u*=Math.sqrt(k),h*=Math.sqrt(k));var T=function(t,e,r,n,a,o,l,c,u,h,f,p){var d=Math.pow(a,2),g=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*f,_=h*x-u*b+(t+r)/2,w=u*x+h*b+(e+n)/2,k=(f-x)/a,T=(p-b)/o,A=(-f-x)/a,M=(-p-b)/o,S=s(1,0,k,T),E=s(k,T,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,h,g,m,x,b,_,w),A=n(T,4),M=A[0],S=A[1],E=A[2],C=A[3],L=Math.abs(C)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var P=Math.max(Math.ceil(L),1);C/=P;for(var O=0;Oe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":60,assert:68,"is-svg-path":424,"normalize-svg-path":534,"parse-svg-path":460}],534:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,h=null,f=0,p=0,d=0,g=t.length;d4?(o=v[v.length-4],s=v[v.length-3]):(o=f,s=p),r.push(v)}return r};var n=t("svg-arc-to-cubic-bezier");function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{"svg-arc-to-cubic-bezier":532}],535:[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,h;e.shape?(r=e.shape[0],h=e.shape[1]):(r=c.width=e.w||e.width||200,h=c.height=e.h||e.height||200);var f=Math.min(r,h),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),h/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,r,h),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*h),u.scale(v,v),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 m=new Path2D(t);u.fill(m),p&&u.stroke(m)}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*f})}},{"bitmap-sdf":93,"draw-svg-path":168,"is-svg-path":424,"parse-svg-path":460,"svg-path-bounds":533}],536:[function(t,e,r){(function(r){"use strict";e.exports=function t(e,r,i){var i=i||{};var o=a[e];o||(o=a[e]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o0&&(h+=.02);for(var p=new Float32Array(u),d=0,g=-.5*h,f=0;f1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),h=!0,f="hsl"),e.hasOwnProperty("a")&&(a=e.a));var p,d,g;return a=C(a),{ok:h,format:e.format||f,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e>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=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(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 f(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=[z(a(t).toString(16)),z(a(e).toString(16)),z(a(r).toString(16)),z(D(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+"%",g:a(100*L(this._g,255))+"%",b:a(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*L(this._r,255))+"%, "+a(100*L(this._g,255))+"%, "+a(100*L(this._b,255))+"%)":"rgba("+a(100*L(this._r,255))+"%, "+a(100*L(this._g,255))+"%, "+a(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);r="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:I(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 C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function z(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var 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)}"undefined"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],538:[function(t,e,r){"use strict";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=i(t),r=0,n=e.length;rh&&(h=l[0]),l[1]f&&(f=l[1])}function i(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(i);break;case"Point":n(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(n)}}if(!e){var a,o,s=r(t),l=new Array(2),c=1/0,u=c,h=-c,f=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=l[0]),l[1]f&&(f=l[1])}),t.objects)i(t.objects[o]);e=t.bbox=[c,u,h,f]}return e},i=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r};function a(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,a=o(t,e);return null==r&&null==n?{type:"Feature",properties:i,geometry:a}:null==n?{type:"Feature",id:r,properties:i,geometry:a}:{type:"Feature",id:r,bbox:n,properties:i,geometry:a}}function o(t,e){var n=r(t),a=t.arcs;function o(t,e){e.length&&e.pop();for(var r=a[t<0?~t:t],o=0,s=r.length;o1)n=function(t,e,r){var n,i=[],a=[];function o(t){var e=t<0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":e.arcs.forEach(l)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,o,c=1,u=l(i[0]);cu&&(o=i[0],i[0]=i[c],i[c]=o,u=a);return i})}}var u=function(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var r,i=n(t),a=i[0],o=(i[2]-a)/(e-1)||1,s=i[1],l=(i[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-a)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":c(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,i=1,c=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-a)/o),p=h[1]=Math.round((h[1]-s)/l);iMath.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 f(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=f.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 h=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=h;var f=this.computedToward;o(f,e,r),s(f,f);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,A=-m*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=_*r[a]+w*f[a]+k*e[a];E[4*a+1]=T*r[a]+A*f[a]+M*e[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],P=E[5],O=E[9],z=E[2],I=E[6],D=E[10],R=P*D-O*I,F=O*z-L*D,B=L*I-P*z,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],h=i[4],f=i[8],p=u*a+h*o+f*s,d=c(u-=a*p,h-=o*p,f-=s*p),g=(u/=d)*e+a*r,v=(h/=d)*e+o*r,m=(f/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],h=e[a+8];if(n){var f=Math.abs(s),p=Math.abs(l),d=Math.abs(h),g=Math.max(f,p,d);f===g?(s=s<0?-1:1,l=h=0):d===g?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var v=c(s,l,h);s/=v,l/=v,h/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*h,k=c(x-=s*w,b-=l*w,_-=h*w),T=l*(_/=k)-h*(b/=k),A=h*(x/=k)-s*_,M=s*b-l*x,S=c(T,A,M);if(T/=S,A/=S,M/=S,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,s,l,h),this.right.jump(t,x,b,_),2===a){var E=e[1],C=e[5],L=e[9],P=E*x+C*b+L*_,O=E*T+C*A+L*M;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,P)}else{var z=e[2],I=e[6],D=e[10],R=z*s+I*l+D*h,F=z*x+I*b+D*_,B=z*T+I*A+D*M;m=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var q=V[15],H=V[12]/q,G=V[13]/q,Y=V[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-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],h=e[1]-r[1],f=e[2]-r[2],p=c(l,h,f);if(!(p<1e-6)){l/=p,h/=p,f/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=i*g+a*v+o*m,x=c(g-=y*i,v-=y*a,m-=y*o);if(!(x<.01&&(x=c(g=a*f-o*h,v=o*l-i*f,m=i*h-a*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,i,a,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*m-o*v,_=o*g-i*m,w=i*v-a*g,k=c(b,_,w),T=i*l+a*h+o*f,A=g*l+v*h+m*f,M=(b/=k)*l+(_/=k)*h+(w/=k)*f,S=Math.asin(u(T)),E=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],P=C[C.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-E),z=Math.abs(L-E),I=Math.abs(L-2*Math.PI-E);O0?r.pop():new ArrayBuffer(t)}function f(t){return new Uint8Array(h(t),0,t)}function p(t){return new Uint16Array(h(2*t),0,t)}function d(t){return new Uint32Array(h(4*t),0,t)}function g(t){return new Int8Array(h(t),0,t)}function v(t){return new Int16Array(h(2*t),0,t)}function m(t){return new Int32Array(h(4*t),0,t)}function y(t){return new Float32Array(h(4*t),0,t)}function x(t){return new Float64Array(h(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(h(t),0,t):f(t)}function _(t){return new DataView(h(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),r=c[e];return r.length>0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[i.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|i.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[i.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return h(t);switch(e){case"uint8":return f(t);case"uint16":return p(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return y(t);case"double":case"float64":return x(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return _(t);default:return null}return null},r.mallocArrayBuffer=h,r.mallocUint8=f,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=v,r.mallocInt32=m,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":92,buffer:105,dup:170}],546:[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",w(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(k=0;k-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",F())),A+=.25*C*(l-s)}if(!0===o.superscripts){var c=t.indexOf(d),h=r.indexOf(d),p=c>-1?parseInt(t[1+c]):0,g=h>-1?parseInt(r[1+h]):0;p!==g&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,g-p),n=n.replace("?px ",F())),A-=.25*C*(g-p)}if(!0===o.bolds){var v=t.indexOf(u)>-1,y=r.indexOf(u)>-1;!v&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),v&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=t.indexOf(f)>-1,b=r.indexOf(f)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w",a="",o=i.length,s=a.length,l=e[0]===d||e[0]===m,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var f=n[h].indexOf(e[0]);-1===f?n[h]+=e:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var p=c+o,g=r.substr(p,u-p).indexOf(i);c=-1!==g?g:u+s}return n}function b(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var i=b(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:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:x(function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this})},delete___:{value:x(function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!i&&i.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==v)throw new Error("bogus call to permitHostObjects___");a=!0})}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&"___"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],553:[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":554}],554:[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}},{}],555:[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":553}],556:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":232}],557:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>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=f[o-f[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 h=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(h/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=h[t-h[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l="number"==typeof t&&t>=1888&&t<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var c="number"==typeof e&&e>=1&&e<=12;if(!c)throw new Error("Lunar month outside range 1 - 12");var u,p="number"==typeof r&&r>=1&&r<=30;if(!p)throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(u=!1,a=n):(u=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=h[o.year-h[0]],v=g>>13;d=v?o.month>v?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var m=0;m>9&4095,(x>>5&15)-1,(31&x)+s);return a.year=b.getFullYear(),a.month=1+b.getMonth(),a.day=b.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{var o="number"==typeof t&&t>=1888&&t<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s="number"==typeof e&&e>=1&&e<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l="number"==typeof r&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var c=f[i.year-f[0]],u=i.year<<9|i.month<<5|i.day;a.year=u>=c?i.year:i.year-1,c=f[a.year-f[0]];var p,d=new Date(c>>9&4095,(c>>5&15)-1,31&c),g=new Date(i.year,i.month-1,i.day);p=Math.round((g-d)/864e5);var v,m=h[a.year-h[0]];for(v=0;v<13;v++){var y=m&1<<12-v?30:29;if(p>13;!x||v=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":571,"object-assign":454}],560:[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":571,"object-assign":454}],561:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=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":571,"object-assign":454}],562:[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":571,"object-assign":454}],563:[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":571,"object-assign":454}],564:[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":571,"object-assign":454}],565:[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":571,"object-assign":454}],566:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;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),h=t-this.toJD(l,u,1)+1;return this.newDate(l,u,h)}}),n.calendars.persian=a,n.calendars.jalali=a},{"../main":571,"object-assign":454}],568:[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":571,"object-assign":454}],569:[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":571,"object-assign":454}],570:[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":571,"object-assign":454}],571:[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":454}],572:[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,h=r.monthNamesShort||this.local.monthNamesShort,f=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(f,p);d>E;E=this.daysInMonth(f,p))p++,d-=E}return h>-1?this.fromJD(h):this.newDate(f,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":571,"object-assign":454}],573:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":146}],574:[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":573}],575:[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}]},{}],576:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../../plots/font_attributes":793,"./arrow_paths":575}],577:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)})}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],c=t["a"+a+"ref"],u=t["_"+a+"padplus"],h=t["_"+a+"padminus"],f={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+f,g=p-f,v=3*t.startarrowsize*t.arrowwidth||0,m=v+f,y=v-f;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(h,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(h,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":719,"../../plots/cartesian/axes":767,"./draw":582}],578:[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,h=[],f=[],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),h={},f=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 H=!1,G=["x","y"],Y=0;Y1)&&(tt===Q?((ct=et.r2fraction(e["a"+$]))<0||ct>1)&&(H=!0):H=!0),W=et._offset+et.r2p(e[$]),J=.5}else"x"===$?(Z=e[$],W=b.l+b.w*Z):(Z=1-e[$],W=b.t+b.h*Z),J=e.showarrow?.5:Z;if(e.showarrow){lt.head=W;var ut=e["a"+$];K=nt*U(.5,e.xanchor)-it*U(.5,e.yanchor),tt===Q?(lt.tail=et._offset+et.r2p(ut),X=K):(lt.tail=W+ut,X=K+ut),lt.text=lt.tail+K;var ht=x["x"===$?"width":"height"];if("paper"===Q&&(lt.head=o.constrain(lt.head,1,ht-1)),"pixel"===tt){var ft=-Math.max(lt.tail-3,lt.text),pt=Math.min(lt.tail+3,lt.text)-ht;ft>0?(lt.tail+=ft,lt.text+=ft):pt>0&&(lt.tail-=pt,lt.text-=pt)}lt.tail+=st,lt.head+=st}else X=K=at*U(J,ot),lt.text=W+K;lt.text+=st,K+=st,X+=st,e["_"+$+"padplus"]=at/2+X,e["_"+$+"padminus"]=at/2-X,e["_"+$+"size"]=at,e["_"+$+"shift"]=K}if(t._dragging||!H){var dt=0,gt=0;if("left"!==e.align&&(dt=(w-m)*("center"===e.align?.5:1)),"top"!==e.valign&&(gt=(O-y)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:R+dt-1,y:R+gt}).call(c.setClipUrl,B?M:null,t);else{var vt=R+gt-d.top,mt=R+dt-d.left;V.call(h.positionText,mt,vt).call(c.setClipUrl,B?M:null,t)}N.select("rect").call(c.setRect,R,R,w,O),F.call(c.setRect,I/2,I/2,D-I,j-I),z.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:"rotate("+E+","+S.x.text+","+S.y.text+")"});var yt,xt=function(r,n){C.selectAll(".annotation-arrow-g").remove();var u=S.x.head,h=S.y.head,f=S.x.tail+r,d=S.y.tail+n,m=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(E,m,y),w=o.apply2DTransform(x),M=o.apply2DTransform2(x),P=+F.attr("width"),O=+F.attr("height"),I=m-.5*P,D=I+P,R=y-.5*O,B=R+O,N=[[I,R,I,B],[I,B,D,B],[D,B,D,R],[D,R,I,R]].map(M);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,h,u+1e6,h+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(f,d,u,h,t[0],t[1],t[2],t[3]);e&&(f=e.x,d=e.y)});var j=e.arrowwidth,U=e.arrowcolor,V=e.arrowside,q=C.append("g").style({opacity:l.opacity(U)}).classed("annotation-arrow-g",!0),H=q.append("path").attr("d","M"+f+","+d+"L"+u+","+h).style("stroke-width",j+"px").call(l.stroke,l.rgb(U));if(g(H,V,e),_.annotationPosition&&H.node().parentNode&&!a){var G=u,Y=h;if(e.standoff){var W=Math.sqrt(Math.pow(u-f,2)+Math.pow(h-d,2));G+=e.standoff*(f-u)/W,Y+=e.standoff*(d-h)/W}var X,Z,J=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-G)+","+(d-Y),transform:"translate("+G+","+Y+")"}).style("stroke-width",j+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:t,prepFn:function(){var t=c.getTranslate(z);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+".autorange",!0),v&&v.autorange&&k(v._name+".autorange",!0)},moveFn:function(t,r){var n=w(X,Z),i=n[0]+t,a=n[1]+r;z.call(c.setTranslate,i,a),T("x",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),T("y",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&T("ax",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&T("ay",v.p2r(v.r2p(e.ay)+r)),q.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+E+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&xt(0,0),P)p.init({element:z.node(),gd:t,prepFn:function(){yt=L.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?T("ax",s.p2r(s.r2p(e.ax)+t)):T("ax",e.ax+t),e.ayref===e.yref?T("ay",v.p2r(v.r2p(e.ay)+r)):T("ay",e.ay+r),xt(t,r);else{if(a)return;var i,o;if(s)i=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;i=p.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,h=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(h-r/b.h,u,0,1,e.yanchor)}T("x",i),T("y",o),s&&v||(n=p.getCursor(s?.5:i,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+yt}),f(z,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(z),i.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}else z.remove()}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,v=e.indexOf("end")>=0,m=h.backoff*p+r.standoff,y=f.backoff*d+r.startstandoff;if("line"===u.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},s={x:+t.attr("x2"),y:+t.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void P();if(m){if(m*m>x*x+b*b)return void P();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void P();var k=y*Math.cos(l),T=y*Math.sin(l);o.x-=k,o.y-=T,t.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var A=u.getTotalLength(),M="";if(A1){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":816,"../annotations/draw":582}],589:[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+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,l))),(i.isDark()?e?i.lighten(e):l:r?i.darken(r):s).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10));Y*=Z*c.roundUp(X/Z,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(G.tick0=0)}G.dtick=Y}G.domain=[V+N,V+R-N],G.setScale(),t.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var J,K=t.select("."+T.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),$=t.select("."+T.cbaxis),Q=0;function tt(n,i){var a={propContainer:G,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),d.draw(r,n,u(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+F)*l.w,n=G.title.font.size;t="top"===A?(1-(V+R-N))*l.h+l.t+3+.75*n:(1-(V+N))*l.h+l.t-3-.25*n,tt(G._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var a=t.select("."+T.cbtitle),o=a.select("text"),u=[-e.outlinewidth/2,e.outlinewidth/2],h=a.select(".h"+G._id+"title-math-group").node(),p=15.6;if(o.node()&&(p=parseInt(o.node().style.fontSize,10)*_),h?(Q=f.bBox(h).height)>p&&(u[1]-=(Q-p)/2):o.node()&&!o.classed(T.jsPlaceholder)&&(Q=f.bBox(o.node()).height),Q){if(Q+=5,"top"===A)G.domain[1]-=Q/l.h,u[1]*=-1;else{G.domain[0]+=Q/l.h;var d=g.lineCount(o);u[1]+=(1-d)*p}a.attr("transform","translate("+u+")"),G.setScale()}}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-G.domain[1]))+")"),$.attr("transform","translate(0,"+Math.round(-l.t)+")");var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).data(P);m.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),m.exit().remove();var y=M.map(G.c2p).map(Math.round).sort(function(t,e){return t-e});m.each(function(t,a){var o=[0===a?M[0]:(P[a]+P[a-1])/2,a===P.length-1?M[1]:(P[a]+P[a+1])/2].map(G.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[1]);var s=n.select(this).attr({x:j,width:Math.max(z,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(e._fillgradient)f.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=E(t).replace("e-","");s.attr("fill",i(l).toHexString())}});var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(v.color&&v.width?O:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr("d","M"+j+","+(Math.round(G.c2p(t))+v.width/2%1)+"h"+z).call(f.lineGroupStyle,v.width,S(t),v.dash)}),$.selectAll("g."+G._id+"tick,path").remove();var b=j+z+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),w=s.calcTicks(G),k=s.makeTransFn(G),C=s.getTickSigns(G)[2];return s.drawTicks(r,G,{vals:"inside"===G.ticks?s.clipEnds(G,w):w,layer:$,path:s.makeTickPath(G,b,C),transFn:k}),s.drawLabels(r,G,{vals:w,layer:$,transFn:k,labelFns:s.makeLabelFns(G,b)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=G.title.font.size,e=G._offset+G._length/2,i=l.l+(G.position||0)*l.w+("right"===G.side?10+t*(G.showticklabels?1:.5):-10-t*(G.showticklabels?.5:0));tt("h"+G._id+"title",{avoid:{selection:n.select(r).selectAll("g."+G._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:i,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},a.previousPromises,function(){var n=z+e.outlinewidth/2+f.bBox($.node()).width;if((J=K.select("text")).node()&&!J.classed(T.jsPlaceholder)){var i,o=K.select(".h"+G._id+"title-math-group").node();i=o&&-1!==["top","bottom"].indexOf(A)?f.bBox(o).width:f.bBox(K.node()).right-j-l.l,n=Math.max(n,i)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=q-H;t.select("."+T.cbbg).attr({x:j-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:H-B,width:Math.max(s,2),height:Math.max(c+2*B,2)}).call(p.fill,e.bgcolor).call(p.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+T.cboutline).attr({x:j,y:H+e.ypad+("top"===A?Q:0),width:Math.max(z,2),height:Math.max(c-2*e.ypad-Q,2)}).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var u=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform","translate("+(l.l-u)+","+l.t+")");var h={},d=w[e.yanchor],g=k[e.yanchor];"pixels"===e.lenmode?(h.y=e.y,h.t=c*d,h.b=c*g):(h.t=h.b=0,h.yt=e.y+e.len*d,h.yb=e.y-e.len*g);var v=w[e.xanchor],m=k[e.xanchor];if("pixels"===e.thicknessmode)h.x=e.x,h.l=s*v,h.r=s*m;else{var y=s-z;h.l=y*v,h.r=y*m,h.xl=e.x-e.thickness*v,h.xr=e.x+e.thickness*m}a.autoMargin(r,e._id,h)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=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+" translate("+r+","+o+")"),i=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),a=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,c)},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":688,"../../lib":719,"../../lib/extend":710,"../../lib/setcursor":739,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"../../plots/plots":828,"../../registry":847,"../color":593,"../colorscale/helpers":604,"../dragelement":611,"../drawing":614,"../titles":681,"./constants":595,d3:163,tinycolor2:537}],598:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":719}],599:[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":594,"./defaults":596,"./draw":597,"./has_colorbar":598}],600:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),i=t("../../lib/regex").counter,a=t("./scales.js").scales;Object.keys(a);function o(t){return"`"+t+"`"}e.exports=function(t,e){t=t||"";var r,s=(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"===s,u="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,h=e.editTypeOverride||"",f=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(f+(r={z:"z",c:"color"}[s]));var p=s+"auto",d=s+"min",g=s+"max",v=s+"mid",m=(o(f+p),o(f+d),o(f+g),{});m[d]=m[g]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:h||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[d]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},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":735,"../colorbar/attributes":594,"./scales.js":608}],601:[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,h=a(u),f=!1!==h.auto,p=h.min,d=h.max,g=h.mid,v=function(){return i.aggNums(Math.min,null,l)},m=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.min(p,v()):v()),void 0===d?d=m():f&&(d=u._colorAx&&n(d)?Math.max(d,m()):m()),f&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}},{"../../lib":719,"./helpers":604,"fast-isnumeric":225}],602:[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}},{}],610:[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":719}],611:[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 h(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,f,p,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._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&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,p),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(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)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=u},{"../../lib":719,"../../plots/cartesian/constants":773,"./align":609,"./cursor":610,"./unhover":612,"has-hover":410,"has-passive-events":411,"mouse-event-offset":436}],612:[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&&!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":708,"../../lib/events":709,"../../lib/throttle":744,"../fx/constants":626}],613:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],614:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=t("../../lib/svg_text_utils"),h=t("../../constants/xmlns_namespaces"),f=t("../../constants/alignment").LINE_SPACING,p=t("../../constants/interactions").DESELECTDIM,d=t("../../traces/scatter/subtypes"),g=t("../../traces/scatter/make_bubble_size_func"),v=e.exports={};v.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},v.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},v.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},v.setRect=function(t,e,r,n,i){t.call(v.setPosition,e,r).call(v.setSize,n,i)},v.translatePoint=function(t,e,r,n){var a=r.c2p(t.x),o=n.c2p(t.y);return!!(i(a)&&i(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform","translate("+a+","+o+")"),!0)},v.translatePoints=function(t,e,r){t.each(function(t){var i=n.select(this);v.translatePoint(t,i,e,r)})},v.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},v.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each(function(e){var a=e[0].trace,s=a.xcalendar,l=a.ycalendar,c=o.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each(function(t){v.hideOutsideRangePoint(t,n.select(this),r,i,s,l)})})}},v.crispRound=function(t,e,r){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},v.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,l=i||a.dash||"";s.stroke(e,n||a.color),v.dashLine(e,l,o)},v.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each(function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=i||a.dash||"";n.select(this).call(s.stroke,r||a.color).call(v.dashLine,l,o)})},v.dashLine=function(t,e,r){r=+r||0,e=v.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},v.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},v.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},v.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)})};var m=t("./symbol_defs");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(m).forEach(function(t){var e=m[t];v.symbolList=v.symbolList.concat([e.n,t,e.n+100,t+"-open"]),v.symbolNames[e.n]=t,v.symbolFuncs[e.n]=e.f,e.needLine&&(v.symbolNeedLines[e.n]=!0),e.noDot?v.symbolNoDot[e.n]=!0:v.symbolList=v.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"]),e.noFill&&(v.symbolNoFill[e.n]=!0)});var y=v.symbolNames.length,x="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function b(t,e){var r=t%100;return v.symbolFuncs[r](e)+(t>=200?x:"")}v.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=v.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=y||t>=400?0:Math.floor(Math.max(t,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},k=n.format("~.1f"),T={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:_},horizontalreversed:{node:"linearGradient",attrs:_,reversed:!0},vertical:{node:"linearGradient",attrs:w},verticalreversed:{node:"linearGradient",attrs:w,reversed:!0}};v.gradient=function(t,e,r,i,o,l){for(var u=o.length,h=T[i],f=new Array(u),p=0;p=100,e.attr("d",b(u,l))}var h,f,p,d=!1;if(t.so)p=o.outlierwidth,f=o.outliercolor,h=a.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,f="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(a.color)&&(h=s.defaultLine,d=!0),h="mc"in t?t.mcc=n.markerScale(t.mc):a.color||"rgba(0,0,0,0)",n.selectedColorFn&&(h=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",p+"px");var m=a.gradient,y=t.mgt;if(y?d=!0:y=m&&m.type,Array.isArray(y)&&(y=y[0],T[y]||(y=0)),y&&"none"!==y){var x=t.mgc;x?d=!0:x=m.color;var _=r.uid;d&&(_+="-"+t.i),v.gradient(e,i,_,y,[[0,x],[1,h]],"fill")}else s.fill(e,h);p&&s.stroke(e,f)}},v.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=v.tryColorscale(r,""),e.lineScale=v.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,v.makeSelectedPointStyleFns(t)),e},v.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},s=n.marker||{},l=i.opacity,u=a.opacity,h=s.opacity,f=void 0!==u,d=void 0!==h;(c.isArrayOrTypedArray(l)||f||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?f?u:e:d?h:p*e});var g=i.color,v=a.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=i.size,x=a.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},v.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},l=i.color,c=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},v.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push(function(t,e){t.style("opacity",r.selectedOpacityFn(e))}),r.selectedColorFn&&a.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&a.push(function(t,e){var n=e.mx||i.symbol||0,a=r.selectedSizeFn(e);t.attr("d",b(v.symbolNumber(n),a)),e.mrc2=a}),a.length&&t.each(function(t){for(var e=n.select(this),r=0;r0?r:0}v.textPointStyle=function(t,e,r){if(t.size()){var i;if(e.selectedpoints){var a=v.makeSelectedTextStyleFns(e);i=a.selectedTextColorFn}t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,"tx","text");if(o||0===o){var s=t.tp||e.textposition,l=S(t,e),h=i?i(t):t.tc||e.textfont.color;a.call(v.font,t.tf||e.textfont.family,l,h).text(o).call(u.convertToTspans,r).call(M,s,l,t.mrc)}else a.remove()})}},v.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedTextStyleFns(e);t.each(function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=S(t,e);s.fill(i,a),M(i,o,l,t.mrc2||t.mrc)})}};var E=.5;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,E/2),u=Math.pow(s*s+l*l,E/2),h=(u*u*a-c*c*s)*i,f=(u*u*o-c*c*l)*i,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&h/p),2),n.round(e[1]+(p&&f/p),2)],[n.round(e[0]-(d&&h/d),2),n.round(e[1]-(d&&f/d),2)]]}v.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=1e4&&(v.savedBBoxes={},O=0),r&&(v.savedBBoxes[r]=m),O++,c.extendFlat({},m)},v.setClipUrl=function(t,e,r){t.attr("clip-path",I(e,r))},v.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||0,y:+e[1]||0}},v.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=" translate("+e+", "+r+")").trim(),t[i]("transform",a),a},v.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||1,y:+e[1]||1}},v.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+=" scale("+e+", "+r+")").trim(),t[i]("transform",a),a};var D=/\s*sc.*/;v.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":" scale("+e+","+r+")";t.each(function(){var t=(this.getAttribute("transform")||"").replace(D,"");t=(t+=n).trim(),this.setAttribute("transform",t)})}};var R=/translate\([^)]*\)\s*$/;v.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(R);t=1===e&&1===r?[]:["translate("+o+","+s+")","scale("+e+","+r+")","translate("+-o+","+-s+")"],l&&t.push(l),i.attr("transform",t.join(" "))}})}},{"../../constants/alignment":688,"../../constants/interactions":694,"../../constants/xmlns_namespaces":696,"../../lib":719,"../../lib/svg_text_utils":743,"../../registry":847,"../../traces/scatter/make_bubble_size_func":1128,"../../traces/scatter/subtypes":1135,"../color":593,"../colorscale":605,"./symbol_defs":615,d3:163,"fast-isnumeric":225,tinycolor2:537}],615:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+a+","+c+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:163}],616:[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"}}}},{}],617:[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),h=0;h0;e.each(function(e){var h,f=e[0].trace,p=f.error_x||{},d=f.error_y||{};f.ids&&(h=function(t){return t.id});var g=o.hasMarkers(f)&&f.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,h);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),d.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var m=v.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(v,r.layerClipId,t),v.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 h=d.width;a="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(a+="m-"+h+",0h"+2*h),!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 f=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?d:p).width;a="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(a+="m0,-"+v+"v"+2*v),!f.size()?f=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(s.duration).ease(s.easing)),f.attr("d",a)}else f.remove()}})}})}},{"../../traces/scatter/subtypes":1135,"../drawing":614,d3:163,"fast-isnumeric":225}],622:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}},{"../color":593,d3:163}],623:[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":710,"../../plots/font_attributes":793,"./layout_attributes":633}],624:[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.indexw[0]._length||et<0||et>k[0]._length)return f.unhoverRaw(t,e)}if(e.pointerX=tt+w[0]._offset,e.pointerY=et+k[0]._offset,D="xval"in e?g.flat(l,e.xval):g.p2c(w,tt),R="yval"in e?g.flat(l,e.yval):g.p2c(k,et),!i(D[0])||!i(R[0]))return o.warn("Fx.hover failed",e,t),f.unhoverRaw(t,e)}var it=1/0;for(B=0;BW&&(J.splice(0,W),it=J[0].distance),y&&0!==Z&&0===J.length){Y.distance=Z,Y.index=!1;var ct=j._module.hoverPoints(Y,H,G,"closest",u._hoverlayer);if(ct&&(ct=ct.filter(function(t){return t.spikeDistance<=Z})),ct&&ct.length){var ut,ht=ct.filter(function(t){return t.xa.showspikes});if(ht.length){var ft=ht[0];i(ft.x0)&&i(ft.y0)&&(ut=vt(ft),(!$.vLinePoint||$.vLinePoint.spikeDistance>ut.spikeDistance)&&($.vLinePoint=ut))}var pt=ct.filter(function(t){return t.ya.showspikes});if(pt.length){var dt=pt[0];i(dt.x0)&&i(dt.y0)&&(ut=vt(dt),(!$.hLinePoint||$.hLinePoint.spikeDistance>ut.spikeDistance)&&($.hLinePoint=ut))}}}}function gt(t,e){for(var r,n=null,i=1/0,a=0;a1||J.length>1)||"closest"===I&&Q&&J.length>1,Pt=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),Ot={hovermode:I,rotateLabels:Lt,bgColor:Pt,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},zt=A(J,Ot,t);if(function(t,e,r){var n,i,a,o,s,l,c,u=0,h=1,f=t.size(),p=new Array(f),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--)}}}for(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&&(h=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?x:1)/2,pmin:0,pmax:i?r.width:r.height}]}),p.sort(function(t,e){return t[0].posref-e[0].posref||h*(e[0].traceIndex-t[0].traceIndex)});!n&&u<=f;){for(u++,n=!0,o=0;o.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=i;for(v.push.apply(v,m),p.splice(o+1,1),c=0,s=v.length-1;s>=0;s--)c+=v[s].dp;for(a=c/v.length,s=v.length-1;s>=0;s--)v[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var _=p[o];for(s=_.length-1;s>=0;s--){var w=_[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(zt,Lt?"xa":"ya",u),M(zt,Lt),e.target&&e.target.tagName){var It=d.getComponentMethod("annotations","hasClickToShow")(t,Mt);c(n.select(e.target),It?"pointer":"")}if(!e.target||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,At))return;At&&t.emit("plotly_unhover",{event:e,points:At});t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:w,yaxes:k,xvals:D,yvals:R})}(t,e,r,a)})},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=t.map(function(t){return{color:t.color||h.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,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}}),a=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):a,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||h.background,container:a,outerContainer:o},l=A(i,s,e.gd),c=0,u=0;return l.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 A(t,e,r){var i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,c=e.bgColor,f=e.container,p=e.outerContainer,d=e.commonLabelOpts||{},g=e.fontFamily||v.HOVERFONT,y=e.fontSize||v.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,A="y"===a?"yLabel":"xLabel",M=x[A],S=(String(M)||"").split(" ")[0],E=p.node().getBoundingClientRect(),C=E.top,P=E.width,O=E.height,z=void 0!==M&&x.distance<=e.hoverdistance&&("x"===a||"y"===a);if(z){var I,D,R=!0;for(I=0;I"),void 0!==t.yLabel&&(p+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(p+=(p?"z: ":"")+t.zLabel)):z&&t[a+"Label"]===M?p=t[("x"===a?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(p=t.yLabel):p=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(p+=(p?"
":"")+t.text),void 0!==t.extraText&&(p+=(p?"
":"")+t.extraText),""!==p||t.hovertemplate||(""===f&&e.remove(),p=f);var _=i._d3locale,A=t.hovertemplate||!1,S=t.hovertemplateLabels||t,E=t.eventData[0]||{};A&&(p=(p=o.hovertemplateString(A,S,_,E,t.trace._meta)).replace(T,function(e,r){return f=L(r,t.nameLength),""}));var I=e.select("text.nums").call(u.font,t.fontFamily||g,t.fontSize||y,t.fontColor||b).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),D=e.select("text.name"),R=0,F=0;if(f&&f!==p){D.call(u.font,t.fontFamily||g,t.fontSize||y,x).text(f).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var B=D.node().getBoundingClientRect();R=B.width+2*k,F=B.height+2*k}else D.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:b});var N,j,U=I.node().getBoundingClientRect(),V=t.xa._offset+(t.x0+t.x1)/2,q=t.ya._offset+(t.y0+t.y1)/2,H=Math.abs(t.x1-t.x0),G=Math.abs(t.y1-t.y0),Y=U.width+w+k+R;if(t.ty0=C-U.top,t.bx=U.width+2*k,t.by=Math.max(U.height+2*k,F),t.anchor="start",t.txwidth=U.width,t.tx2width=R,t.offset=0,s)t.pos=V,N=q+G/2+Y<=O,j=q-G/2-Y>=0,"top"!==t.idealAlign&&N||!j?N?(q+=G/2,t.anchor="start"):t.anchor="middle":(q-=G/2,t.anchor="end");else if(t.pos=q,N=V+H/2+Y<=P,j=V-H/2-Y>=0,"left"!==t.idealAlign&&N||!j)if(N)V+=H/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=V+W-P,Z=V-W;X>0&&(V-=X),Z<0&&(V+=-Z)}else V-=H/2,t.anchor="end";I.attr("text-anchor",t.anchor),R&&D.attr("text-anchor",t.anchor),e.attr("transform","translate("+V+","+q+")"+(s?"rotate("+m+")":""))}),N}function M(t,e){t.each(function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select("text.nums"),a=t.anchor,o="end"===a?-1:1,s={start:1,end:-1,middle:0}[a],c=s*(w+k),h=c+s*(t.txwidth+k),f=0,p=t.offset;"middle"===a&&(c-=t.tx2width/2,h+=t.txwidth/2+k),e&&(p*=-_,f=t.offset*b),r.select("path").attr("d","middle"===a?"M-"+(t.bx/2+t.tx2width/2)+","+(p-t.by/2)+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(o*w+f)+","+(w+p)+"v"+(t.by/2-w)+"h"+o*t.bx+"v-"+t.by+"H"+(o*w+f)+"V"+(p-w)+"Z");var d=c+f,g=p+t.ty0-t.by/2+k,v=t.textAlign||"auto";"auto"!==v&&("left"===v&&"start"!==a?(i.attr("text-anchor","start"),d="middle"===a?-t.bx/2-t.tx2width/2+k:-t.bx-k):"right"===v&&"end"!==a&&(i.attr("text-anchor","end"),d="middle"===a?t.bx/2-t.tx2width/2-k:t.bx+k)),i.call(l.positionText,d,g),t.tx2width&&(r.select("text.name").call(l.positionText,h+s*k+f,p+t.ty0-t.by/2+k),r.select("rect").call(u.setRect,h+(s-1)*t.tx2width/2+f,p-t.by/2-1,t.tx2width,t.by+2))})}function S(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:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=p.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+p.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var f=p.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+f+" / -"+p.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+f,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function E(t,e){var r,n,i=e.container,o=e.fullLayout,s=e.event,l=!!t.hLinePoint,c=!!t.vLinePoint;if(i.selectAll(".spikeline").remove(),c||l){var f=h.combine(o.plot_bgcolor,o.paper_bgcolor);if(l){var p,d,g=t.hLinePoint;r=g&&g.xa,"cursor"===(n=g&&g.ya).spikesnap?(p=s.pointerX,d=s.pointerY):(p=r._offset+g.x,d=n._offset+g.y);var v,m,y=a.readability(g.color,f)<1.5?h.contrast(f):g.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,k=(w.left+w.right)/20){for(var n=[],i=0;i-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){f||p||d||"independent"===T("pattern")&&(f=!0),v._hasSubplotGrid=f;var x,b,_="top to bottom"===T("roworder"),w=f?.2:.1,k=f?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u("x",T,w,x,y),y:u("y",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,f=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(d){var x=f.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==x||p.uirevision){var b=a.newContainer(e,"legend");if(w("uirevision",e.uirevision),!1!==x){if(w("bgcolor",e.paper_bgcolor),w("bordercolor"),w("borderwidth"),i.coerceFont(w,"font",e.font),w("orientation"),"h"===b.orientation){var _=t.xaxis;n.getComponentMethod("rangeslider","isVisible")(_)?(c=0,h="left",u=1.1,f="bottom"):(c=0,h="left",u=-.1,f="top")}w("traceorder",v),l.isGrouped(e.legend)&&w("tracegroupgap"),w("itemsizing"),w("itemclick"),w("itemdoubleclick"),w("x",c),w("xanchor",h),w("y",u),w("yanchor",f),w("valign"),i.noneOrAll(p,b,["x","y"])}}function w(t,e){return i.coerce(p,b,o,t,e)}}},{"../../lib":719,"../../plot_api/plot_template":757,"../../plots/layout_attributes":819,"../../registry":847,"./attributes":642,"./helpers":648}],645:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),h=t("../../lib/svg_text_utils"),f=t("./handle_click"),p=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,v=d.FROM_TL,m=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(){f(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)&&f(r,t,n)}}function w(t,e,r){var n=t.data()[0][0],a=e._fullLayout,s=n.trace,l=o.traceIs(s,"pie-like"),u=s.index,f=e._context.edits.legendText&&!l,d=l?n.label:s.name;s._meta&&(d=i.templateString(d,s._meta));var v=i.ensureSingle(t,"text","legendtext");function m(r){h.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select("g[class*=math-group]"),o=a.node(),s=e._fullLayout.legend.font.size*g;if(o){var l=c.bBox(o);n=l.height,i=l.width,c.setTranslate(a,0,n/4)}else{var u=t.select(".legendtext"),f=h.lineCount(u),d=u.node();n=s*f,i=d?c.bBox(d).width:0;var v=s*(.3+(1-f)/2);h.positionText(u,p.textOffsetX,v)}r.lineHeight=s,r.height=Math.max(n,16)+3,r.width=i}(t,e)})}v.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,a.legend.font).text(f?k(d,r):d),h.positionText(v,p.textOffsetX,0),f?v.call(h.makeEditable,{gd:e,text:d}).call(m).on("edit",function(t){this.text(k(t,r)).call(m);var a=n.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var l=o.getTransformIndices(a,"groupby"),c=l[l.length-1],h=i.keyedContainer(a,"transforms["+c+"].styles","target","value.name");h.set(n.trace._group,t),s=h.constructUpdate()}else s.name=t;return o.call("_guiRestyle",e,s,u)}):m(v)}function k(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 T(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,"rect","legendtoggle",function(t){t.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")});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){var a=t._fullLayout,o=a.legend,s=o.borderwidth,l=b.isGrouped(o),u=0;if(o._width=0,o._height=0,b.isVertical(o))l&&e.each(function(t,e){c.setTranslate(this,0,e*o.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;c.setTranslate(this,s,5+s+o._height+r/2),o._height+=r,o._width=Math.max(o._width,n)}),o._width+=45+2*s,o._height+=10+2*s,l&&(o._height+=(o._lgroupsLength-1)*o.tracegroupgap),u=40;else if(l){var h,f=0,p=0,d=e.data(),g=0;for(h=0;h0?o.tracegroupgap:0,w.push(T),_.push(o._width)}e.each(function(t,e){c.setTranslate(this,_[e],w[e])}),e.each(function(){var t=n.select(this).selectAll("g.traces"),e=0;t.each(function(t){var r=t[0].height;c.setTranslate(this,0,5+s+e+r/2),e+=r})});var A=w[w.length-1]+f;o._height=10+2*s+A;var M=Math.max.apply(null,_);o._width=M+p+40,o._width+=2*s}else{var S=0,E=0,C=0,L=0,P=0;r.each(function(t){C=Math.max(40+t[0].width,C),P+=40+t[0].width+5});var O=a._size.w>s+P-5;r.each(function(t){var e=t[0],r=O?40+t[0].width:C;s+L+5+r>a._size.w&&(L=0,S+=E,o._height+=E,E=0),c.setTranslate(this,s+L,5+s+e.height/2+S),o._width+=5+r,L+=5+r,E=Math.max(e.height,E)}),O?o._height=E:o._height+=E,o._width+=2*s,o._height+=10+2*s}o._width=Math.ceil(o._width),o._height=Math.ceil(o._height);var z=t._context.edits.legendText||t._context.edits.legendPosition;r.each(function(t){var e=t[0],r=n.select(this).select(".legendtoggle");c.setRect(r,0,-e.height/2,(z?0:o._width)+u,e.height)})}function M(t){var e=t._fullLayout.legend,r="left";i.isRightAnchor(e)?r="right":i.isCenterAnchor(e)&&(r="center");var n="top";i.isBottomAnchor(e)?n="bottom":i.isMiddleAnchor(e)&&(n="middle"),a.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._height*m[n],t:e._height*v[n]})}e.exports=function(t){var e=t._fullLayout,r="legend"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,h=e.showlegend&&y(t.calcdata,s),f=e.hiddenlabels||[];if(!e.showlegend||!h.length)return e._infolayer.selectAll(".legend").remove(),e._topdefs.select("#"+r).remove(),void a.autoMargin(t,"legend");for(var d=0,g=0;gh?function(t){var e=t._fullLayout.legend,r="left";i.isRightAnchor(e)?r="right":i.isCenterAnchor(e)&&(r="center");a.autoMargin(t,"legend",{x:e.x,y:.5,l:e._width*v[r],r:e._width*m[r],b:0,t:0})}(t):M(t);var f=e._size,d=f.l+f.w*s.x,g=f.t+f.h*(1-s.y);i.isRightAnchor(s)?d-=s._width:i.isCenterAnchor(s)&&(d-=s._width/2),i.isBottomAnchor(s)?g-=s._height:i.isMiddleAnchor(s)&&(g-=s._height/2);var y=s._width,x=f.w;y>x?(d=f.l,y=x):(d+y>u&&(d=u-y),d<0&&(d=0),y=Math.min(u-d,s._width));var b,w,k,T,S=s._height,E=f.h;if(S>E?(g=f.t,S=E):(g+S>h&&(g=h-S),g<0&&(g=0),S=Math.min(h-g,s._height)),c.setTranslate(L,d,g),I.on(".drag",null),L.on("wheel",null),s._height<=S||t._context.staticPlot)O.attr({width:y-s.borderwidth,height:S-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),c.setTranslate(z,0,0),P.select("rect").attr({width:y-2*s.borderwidth,height:S-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth}),c.setClipUrl(z,r,t),c.setRect(I,0,0,0,0),delete s._scrollY;else{var F,B,N=Math.max(p.scrollBarMinHeight,S*S/s._height),j=S-N-2*p.scrollBarMargin,U=s._height-S,V=j/U,q=Math.min(s._scrollY||0,U);O.attr({width:y-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:S-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),P.select("rect").attr({width:y-2*s.borderwidth+p.scrollBarWidth+p.scrollBarMargin,height:S-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth+q}),c.setClipUrl(z,r,t),G(q,N,V),L.on("wheel",function(){G(q=i.constrain(s._scrollY+n.event.deltaY/j*U,0,U),N,V),0!==q&&q!==U&&n.event.preventDefault()});var H=n.behavior.drag().on("dragstart",function(){F=n.event.sourceEvent.clientY,B=q}).on("drag",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||G(q=i.constrain((t.clientY-F)/V+B,0,U),N,V)});I.call(H)}function G(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(z,0,-e),c.setRect(I,y,p.scrollBarMargin+e*n,p.scrollBarWidth,r),P.select("rect").attr({y:s.borderwidth+e})}t._context.edits.legendPosition&&(L.classed("cursor-move",!0),l.init({element:L.node(),gd:t,prepFn:function(){var t=c.getTranslate(L);k=t.x,T=t.y},moveFn:function(t,e){var r=k+t,n=T+e;c.setTranslate(L,r,n),b=l.align(r,0,f.l,f.l+f.w,s.xanchor),w=l.align(n,0,f.t+f.h,f.t,s.yanchor)},doneFn:function(){void 0!==b&&void 0!==w&&o.call("_guiRelayout",t,{"legend.x":b,"legend.y":w})},clickFn:function(r,n){var i=e._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});i.size()>0&&_(t,L,i,r,n)}}))}],t)}}},{"../../constants/alignment":688,"../../lib":719,"../../lib/events":709,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":847,"../color":593,"../dragelement":611,"../drawing":614,"./constants":643,"./get_legend_data":646,"./handle_click":647,"./helpers":648,"./style":650,d3:163}],646:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){var r,a,o={},s=[],l=!1,c={},u=0;function h(t,r){if(""!==t&&i.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;i=e.width}return v?n:Math.min(i,r)}function y(t,e,r){var a=t[0].trace,o=a.marker||{},l=o.line||{},c=r?a.type===r&&a.visible:i.traceIs(a,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each(function(t){var e=n.select(this),r=t[0],i=m(r.mlw,o.line,g,p);e.style("stroke-width",i+"px").call(s.fill,r.mc||o.color),i&&s.stroke(e,r.mlc||l.color)})}function x(t,e,r){var o=t[0],s=o.trace,l=r?s.type===r&&s.visible:i.traceIs(s,r),h=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(h.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),h.exit().remove(),h.size()){var f=(s.marker||{}).line,d=m(u(f.width,o.pts),f,g,p),v=a.minExtend(s,{marker:{line:{width:d}}});v.marker.line.color=f.color;var y=a.minExtend(o,{trace:v});c(h,y,v)}}t.each(function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var o=r.valign,s=t[0].lineHeight,l=t[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));i.attr("transform","translate(0,"+c+")")}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 u=i.selectAll("g.legendsymbols").data([t]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(function(t){var e=t[0].trace,r=[];"waterfall"===e.type&&e.visible&&(r=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 i=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(r);i.enter().append("path").classed("legendwaterfall",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),i.exit().remove(),i.each(function(t){var r=n.select(this),i=e[t[0]].marker,a=m(void 0,i.line,g,p);r.attr("d",t[1]).style("stroke-width",a+"px").call(s.fill,i.color),a&&r.call(s.stroke,i.line.color)})}).each(function(t){y(t,this,"funnel")}).each(function(t){y(t,this)}).each(function(t){var r=t[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(i.traceIs(r,"box-violin")&&r.visible?[t]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),l.exit().remove(),l.each(function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var i=m(void 0,r.line,g,p);t.style("stroke-width",i+"px").call(s.fill,r.fillcolor),i&&s.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:v?h:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,e)}})}).each(function(t){x(t,this,"funnelarea")}).each(function(t){x(t,this,"pie")}).each(function(t){var r,i,s=t[0],c=s.trace,u=c.visible&&c.fill&&"none"!==c.fill,h=l.hasLines(c),p=c.contours,g=!1,v=!1;if(p){var y=p.coloring;"lines"===y?g=!0:h="none"===y||"heatmap"===y||p.showlines,"constraint"===p.type?u="="!==p._operation:"fill"!==y&&"heatmap"!==y||(v=!0)}var x=l.hasMarkers(c)||l.hasText(c),b=u||v,_=h||g,w=x||!b?"M5,0":_?"M5,-2":"M5,-3",k=n.select(this),T=k.select(".legendfill").selectAll("path").data(u||v?[t]:[]);if(T.enter().append("path").classed("js-fill",!0),T.exit().remove(),T.attr("d",w+"h30v6h-30z").call(u?o.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+c.uid;o.gradient(t,e,r,"horizontalreversed",c.colorscale,"fill")}}),h||g){var A=m(void 0,c.line,d,f);i=a.minExtend(c,{line:{width:A}}),r=[a.minExtend(s,{trace:i})]}var M=k.select(".legendlines").selectAll("path").data(h||g?[r]:[]);M.enter().append("path").classed("js-line",!0),M.exit().remove(),M.attr("d",w+(g?"l30,0.0001":"h30")).call(h?o.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+c.uid;o.lineGroupStyle(t),o.gradient(t,e,r,"horizontalreversed",c.colorscale,"stroke")}})}).each(function(t){var r,i,s=t[0],c=s.trace,u=l.hasMarkers(c),d=l.hasText(c),g=l.hasLines(c);function m(t,e,r,n){var i=a.nestedProperty(c,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function y(t){return t[0]}if(u||d||g){var x={},b={};if(u){x.mc=m("marker.color",y),x.mx=m("marker.symbol",y),x.mo=m("marker.opacity",a.mean,[.2,1]),x.mlc=m("marker.line.color",y),x.mlw=m("marker.line.width",a.mean,[0,5],p),b.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _=m("marker.size",a.mean,[2,16],h);x.ms=_,b.marker.size=_}g&&(b.line={width:m("line.width",y,[0,10],f)}),d&&(x.tx="Aa",x.tp=m("textposition",y),x.ts=10,x.tc=m("textfont.color",y),x.tf=m("textfont.family",y)),r=[a.minExtend(s,x)],(i=a.minExtend(c,b)).selectedpoints=null}var w=n.select(this).select("g.legendpoints"),k=w.selectAll("path.scatterpts").data(u?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),k.exit().remove(),k.call(o.pointStyle,i,e),u&&(r[0].mrc=3);var T=w.selectAll("g.pointtext").data(d?r:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),T.exit().remove(),T.selectAll("text").call(o.textPointStyle,i,e)}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data("candlestick"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=m(void 0,a.line,g,p);i.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(i,a.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data("ohlc"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],l=m(void 0,a.line,g,p);i.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(i,a.line.color)})})}},{"../../lib":719,"../../registry":847,"../../traces/pie/helpers":1091,"../../traces/pie/style_one":1097,"../../traces/scatter/subtypes":1135,"../color":593,"../drawing":614,d3:163}],651:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/plots"),a=t("../../plots/cartesian/axis_ids"),o=t("../../lib"),s=t("../../fonts/ploticon"),l=o._,c=e.exports={};function u(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=a.list(t,null,!0),f="on";if("zoom"===s){var p,d="in"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(i=0;i1?(A=["toggleHover"],M=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],M=["resetGeo"]):h?(A=["hoverClosest3d"],M=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(A=["toggleHover"],M=["resetViewMapbox"]):g?A=["hoverClosestGl2d"]:p?A=["hoverClosestPie"]:x?(A=["hoverClosestCartesian","hoverCompareCartesian"],M=["resetViewSankey"]):A=["toggleHover"];u&&(A=["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;a0?f+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,h,f=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=h)));return p>=f?[f,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;o10?t/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:a}).style(i).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:a}).style(i).classed("cursor-grab",!0),n}():e,X={element:W.node(),gd:t,prepFn:function(n){D&&(_=q(r.xanchor));R&&(w=H(r.yanchor));"path"===r.type?P=r.path:(m=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));mb?(k=y,S="y0",T=b,E="y1"):(k=b,S="y1",T=y,E="y0");Z(n),$(p,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),l=a.getFromId(r,i),c="";"paper"===n||o.autorange||(c+=n);"paper"===i||l.autorange||(c+=i);s.setClipUrl(t,c?"clip"+r._fullLayout._uid+c:null,r)}(e,r,t),X.moveFn="move"===O?J:K},doneFn:function(){u(e),Q(p),d(e,t,r),n.call("_guiRelayout",t,N.getUpdateObj())},clickFn:function(){Q(p)}};function Z(t){if(F)O="path"===t.target.tagName?"move":"start-point"===t.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,i=r.bottom-r.top,a=t.clientX-r.left,o=t.clientY-r.top,s=!B&&n>z&&i>I&&!t.shiftKey?c.getCursor(a/n,1-o/i):"move";u(e,s),O=s.split("-")[0]}}function J(n,i){if("path"===r.type){var a=function(t){return t},o=a,s=a;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},U&&"date"===U.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+i)):(s=function(t){return Y(H(t)+i)},V&&"date"===V.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else D?j("xanchor",r.xanchor=G(_+n)):(j("x0",r.x0=G(m+n)),j("x1",r.x1=G(x+n))),R?j("yanchor",r.yanchor=Y(w+i)):(j("y0",r.y0=Y(y+i)),j("y1",r.y1=Y(b+i)));e.attr("d",g(t,r)),$(p,r)}function K(n,i){if(B){var a=function(t){return t},o=a,s=a;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},U&&"date"===U.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+i)):(s=function(t){return Y(H(t)+i)},V&&"date"===V.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else if(F){if("resize-over-start-point"===O){var l=m+n,c=R?y-i:y+i;j("x0",r.x0=D?l:G(l)),j("y0",r.y0=R?c:Y(c))}else if("resize-over-end-point"===O){var u=x+n,h=R?b-i:b+i;j("x1",r.x1=D?u:G(u)),j("y1",r.y1=R?h:Y(h))}}else{var d=~O.indexOf("n")?k+i:k,N=~O.indexOf("s")?T+i:T,W=~O.indexOf("w")?A+n:A,X=~O.indexOf("e")?M+n:M;~O.indexOf("n")&&R&&(d=k-i),~O.indexOf("s")&&R&&(N=T-i),(!R&&N-d>I||R&&d-N>I)&&(j(S,r[S]=R?d:Y(d)),j(E,r[E]=R?N:Y(N))),X-W>z&&(j(C,r[C]=D?W:G(W)),j(L,r[L]=D?X:G(X)))}e.attr("d",g(t,r)),$(p,r)}function $(t,e){(D||R)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=q(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:f.extractPathCoords(e.path,h.paramIsX))),o=H(R?e.yanchor:i.midRange(r?[e.y0,e.y1]:f.extractPathCoords(e.path,h.paramIsY)));if(a=f.roundPositionForSharpStrokeRendering(a,1),o=f.roundPositionForSharpStrokeRendering(o,1),D&&R){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(D){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function Q(t){t.selectAll(".visual-cue").remove()}c.init(X),W.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=a.getFromId(t,e.xref),v=a.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=f.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=f.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},"path"===d)return g&&"date"===g.type&&(n=f.decodeDate(n)),v&&"date"===v.type&&(s=f.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(h.segmentRE,function(t){var n=0,c=t.charAt(0),u=h.paramIsX[c],f=h.paramIsY[c],p=h.numParams[c],d=t.substr(1).replace(h.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>p&&(t="X"),t});return n>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+d})}(e,n,s);if("pixel"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+p;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+p+"H"+l+"Z";var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),T="A"+w+","+k,A=b+w+","+_;return"M"+A+T+" 0 1,1 "+(b+","+(_-k))+T+" 0 0,1 "+A+"Z"}function v(t,e,r){return t.replace(h.segmentRE,function(t){var n=0,i=t.charAt(0),a=h.paramIsX[i],o=h.paramIsY[i],s=h.numParams[i];return i+t.substr(1).replace(h.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var i=0;i0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+e._dims.currentValueTotalHeight+")")}}function S(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",u.railTouchRectClass,function(n){n.call(T,e,t,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function L(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,i=s.ensureSingle(t,"rect",u.railRectClass);i.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[u.name],n=[],i=0;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(a.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),a.exit().each(function(){n.select(this).selectAll("g."+u.groupClassName).each(s)}).remove(),0!==r.length){var l=a.selectAll("g."+u.groupClassName).data(r,v);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||f<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr("transform","translate("+g+")")}}}z.call(I),P&&(M?z.on(".opacity",null):(k=0,T=!0,z.text(v).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)})),z.call(u.makeEditable,{gd:t}).on("edit",function(e){void 0!==m?o.call("_guiRestyle",t,g,e,m):o.call("_guiRelayout",t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(I)}).on("input",function(t){this.text(t||" ").call(u.positionText,x.x,x.y)}));return z.classed("js-placeholder",T),_}};var f=/ [XY][0-9]* /},{"../../constants/interactions":694,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":847,"../color":593,"../drawing":614,d3:163,"fast-isnumeric":225}],682:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({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":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/font_attributes":793,"../../plots/pad_attributes":827,"../color/attributes":592}],683:[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"}}},{}],684:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/array_container_defaults"),a=t("./attributes"),o=t("./constants").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("label"),r("execute"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":719,"../../plots/array_container_defaults":763,"./attributes":682,"./constants":683}],685:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("../color"),o=t("../drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../plot_api/plot_template").arrayEditor,u=t("../../constants/alignment").LINE_SPACING,h=t("./constants"),f=t("./scrollbox");function p(t){return t._index}function d(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,h.name,e).applyUpdate("active",o),"buttons"===e.type?m(t,n,null,null,e):"dropdown"===e.type&&(i.attr(h.menuIndexAttrName,"-1"),v(t,n,i,a,e),s||m(t,n,i,a,e))}function v(t,e,r,n,i){var a=s.ensureSingle(e,"g",h.headerClassName,function(t){t.style("pointer-events","all")}),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,f,p),s.ensureSingle(e,"text",h.headerArrowClassName,function(t){t.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,i.font).text(h.arrowSymbol[i.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on("click",function(){r.call(S,String(d(r,i)?-1:i._index)),m(t,e,r,n,i)}),a.on("mouseover",function(){a.call(w)}),a.on("mouseout",function(){a.call(k,i)}),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,v=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?v=m.headerHeight+h.gapButtonHeader:d=m.headerWidth+h.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(v=-h.gapButtonHeader+h.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},T={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||(g(t,o,0,e,r,a,l),s.execute&&i.executeAPICommand(t,s.method,s.args),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))}),c.on("mouseover",function(){c.call(w)}),c.on("mouseout",function(){c.call(k,o),u.call(_,o)})}),u.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,f=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(a)}).remove(),0!==r.length){var l=o.selectAll("g."+h.headerGroupClassName).data(r,p);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",h.dropdownButtonGroupClassName,function(t){t.style("pointer-events","all")}),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=v+m;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),T?(this.hbar=C.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 L=m>k,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,z=d+g,I=v;z+P>l&&(z=l-P);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:z,y:I,width:P,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?h+P+.5:h+.5,N=f-.5,j=T?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),T||L?(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:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),T||L){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 q=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":719,"../color":593,"../drawing":614,d3:163}],688:[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"}}},{}],689:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},{}],690:[function(t,e,r){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format"}},{}],691:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],692:[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]}},{}],693:[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"}},{}],694:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],695:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],696:[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}},{}],697:[function(t,e,r){"use strict";r.version="1.49.1",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),i=r.register=n.register,a=t("./plot_api"),o=Object.keys(a),s=0;splotly-logomark"}}},{}],700:[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}},{}],701:[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 h(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,h,f,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,h=o,f=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return h(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return h(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return h(t,e,r,n,i,a,1)}}},{"./mod":726}],702:[function(t,e,r){"use strict";var n=Array.isArray,i="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},a="undefined"==typeof DataView?function(){}: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(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(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&&!!c(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),m=t.charAt(0);!c||"G"!==m&&"g"!==m||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var P=v.getComponentMethod("calendars","getCal")(e);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),L=P.newDate(T,P.toMonthIndex(T,A,O),M)}else L=P.newDate(T,Number(A),M)}catch(t){return u}return L?(L.toJD()-g)*h+S*f+E*p+C*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var z=new Date(Date.UTC(2e3,A,M,S,E));return z.setUTCFullYear(T),z.getUTCMonth()!==A?u:z.getUTCDate()!==M?u:z.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),i=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*h,T=3*f,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/h)+g,E=Math.floor(l(t,h));try{a=v.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=m("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+h&&t<=i-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var S=/%\d?f/g;function E(t,e,r,n){t=t.replace(S,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"});var i=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var C=[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,h),n=w(Math.floor(r/f),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),C[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+E(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return E(e,t,n,i)};var L=3*h;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var i=Math.round(t/h)+g,a=v.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-g)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&v.getComponentMethod("calendars","getCal")(e),u=0;u0&&(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+h*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,h=n-e,f=o-i,p=c-a,d=u*u+h*h,g=f*f+p*p,v=Math.min(l(u,h,d,i-t,a-e),l(u,h,d,o-t,c-e),l(f,p,g,t-i,e-a),l(f,p,g,r-i,n-a));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=t.getPointAtLength(o(r,e)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=f,f},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(),h=u;function f(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===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,h=0,f=0,p=s;h0?p=i:f=i,h++}return a}},{"./mod":726}],716:[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),u=1;function h(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 p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,i,s,d,g,v=t.color,m=l(v),y=l(e),x=o.extractOpts(t),b=[];if(n=void 0!==x.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,m||y)for(var _=0;_o?s:i(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(i(t)&&t>=0&&t%1==0)},l.noop=t("./noop"),l.identity=t("./identity"),l.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o=Math.pow(2,r)?i>10?(l.warn("randstr failed uniqueness"),c):t(e,r,n,(i||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){var n;function i(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0})},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.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},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)(:[^}]*)?}/g;var C=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,n){return C.test(n)?e[n]||"":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||"")})};var L=/^:/,P=0;l.hovertemplateString=function(t,e,r){var i=arguments,a={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,o,s){var c,u,h;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 O=2e9;l.seedPseudoRandom=function(){O=2e9},l.pseudoRandom=function(){var t=O;return O=(69069*O+1)%4294967296,Math.abs(O-t)<429496729?l.pseudoRandom():O/4294967296},l.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=l.extractOption(t,e,"htx","hovertext");if(l.isValidTextValue(i))return n(i);var a=l.extractOption(t,e,"tx","text");return l.isValidTextValue(a)?n(a):void 0},l.isValidTextValue=function(t){return t||0===t},l.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;n2)return c[e]=2|c[e],f.set(t,null);if(h){for(o=e;o1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;ee/2?t-Math.round(t/e)*e:t}}},{}],727:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./array").isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,a,o,l=0,c=e.split(".");l/g),o=0;oa||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,h,f,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;uMath.max(h,v)||c>Math.max(f,m)))if(cu||Math.abs(n(o,f))>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":695,"./matrix":725}],732:[function(t,e,r){(function(r){"use strict";var n=t("./show_no_webgl_msg"),i=t("regl");e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each(function(n){if(!n.regl&&(!n.pick||a._has("parcoords"))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&&this.addEventListener("webglcontextlost",function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})},!1)}}),o||n({container:a._glcontainer.node()}),o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":740,regl:502}],733:[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(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,u,h=0,f=e.length,p=0,d=f>1?(e[f-1]-e[0])/(f-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);h90&&i.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,i=e[n]-e[0]||1,a=i/(n||1)/1e4,o=[e[0]],s=0;se[s]+a&&(i=Math.min(i,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:i}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;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":702,"fast-isnumeric":225}],742:[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":120}],743:[function(t,e,r){"use strict";var n=t("d3"),i=t("../lib"),a=t("../constants/xmlns_namespaces"),o=t("../constants/alignment").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,M){var S=t.text(),C=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(e&&e._promises||[]).push(new Promise(function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),a={fontSize:r};!function(t,e,r){var a,o,s,l;MathJax.Hub.Queue(function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})},function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},function(){var r="math-output-"+i.randstr({},64);return l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(l.node())},function(){var e=n.select("body").select("#MathJax_SVG_glyphs");if(l.select(".MathJax_SVG").empty()||!l.select("svg").node())i.log("There was an error in the tex syntax.",t),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),e,o)}if(l.remove(),"SVG"!==a)return MathJax.Hub.setRenderer(a)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})}(C[2],a,function(n,i,a){L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return O(),void e();var l=L.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(o.node()),i&&i.node()&&o.node().insertBefore(i.node().cloneNode(!0),o.node().firstChild),o.attr({class:P,height:a.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=t.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var h=s(u,"width"),f=s(u,"height"),p=+t.attr("x")-h*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],d=-(r||s(t,"height"))/4;"y"===P[0]?(l.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-h/2,d-f/2]+")"}),o.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===P[0]?o.attr({x:t.attr("x"),y:d-f/2}):"a"===P[0]&&0!==P.indexOf("atitle")?o.attr({x:0,y:d}):o.attr({x:p,y:+t.attr("y")+d-f/2}),M&&M.call(t,l),e(l)})})):O(),t}function O(){L.empty()||(P=t.attr("class")+"-math",L.select("svg."+P).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(v," ");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(a.svg,"tspan");n.select(e).attr({class:"line",dy:c*o+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var s=1;s doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),P=0;P|>|>)/g;var h={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"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},d="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i,b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\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&&E(n)}var A=/(^|;)\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 M={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,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)):M[e])||t})}function C(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return i="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},a="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:i()-c.top+"px",left:a()-c.left+"px","z-index":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i("x",e),o=i("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:a,y:o})})},r.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch("edit","input","cancel"),o=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");function s(){!function(){var i=n.select(r).select(".svg-container"),o=i.append("div"),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&&(u=t.attr("data-unformatted"));o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":s.fontFamily||"Arial","font-size":c,color:e.fill||s.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(u).call(C(t,i,e)).on("blur",function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)}).on("focus",function(){var t=this;r._editing=!0,n.select(document).on("mouseup",function(){if(n.event.target===t)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(C(t,i,e)))}).on("keydown",function(){13===n.event.which&&this.blur()}).call(l)}(),t.style({opacity:0});var i,s=o.attr("class");(i=s?"."+s.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(i).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,a,"on")}},{"../constants/alignment":688,"../constants/xmlns_namespaces":696,"../lib":719,d3:163}],744:[function(t,e,r){"use strict";var n={};function i(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var a=n[t],o=Date.now();if(!a){for(var s in n)n[s].tsa.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)}},{}],745:[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":225}],746:[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":795,"topojson-client":540}],747:[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"}}},{}],748:[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"}}},{}],749:[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,h=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.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",h);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",h,y),!0;e.set(y)}return!g&&(f(v,m),p(t),!0)}var x,b,_,w,k,T,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(m,h).get(),P=[],O=-1,z=C.length;for(x=0;xC.length-(A?0:1))a.warn("index out of range",h,_);else if(void 0!==T)k.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",h,_),c(T)?P.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):a.warn("Unrecognized full object edit value",h,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(P[x],1),L&&L.splice(P[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(f(v,m),d!==i){var I;if(-1===O)I=S;else{for(z=Math.max(C.length,z),I=[],x=0;x=O);x++)I.push(_);for(x=O;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 D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),I(t,e,"currentIndices"),"undefined"==typeof r||Array.isArray(r)||(r=[r]),"undefined"!=typeof r&&I(t,r,"newIndices"),"undefined"!=typeof r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if("undefined"==typeof r)throw new Error("indices must be an integer or array of integers");for(var a in I(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,h,f=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=z(r,t.data.length-1),e)for(var g=0;g-1?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 H(t,e,r){if(t=o.getGraphDiv(t),k.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(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=J(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[f.previousPromises];a.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(G(t,a,i)||f.supplyDefaults(t),a.legend&&s.push(T.doLegend),a.layoutstyle&&s.push(T.layoutStyles),a.axrange&&Y(s,i.rangesAltered),a.ticks&&s.push(T.doTicksRelayout),a.modebar&&s.push(T.doModeBar),a.camera&&s.push(T.doCamera),a.colorbars&&s.push(T.doColorBars),s.push(C)),s.push(f.rehover,f.redrag),c.add(t,H,[t,i.undoit],H,[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 G(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=d.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function Y(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=d.getFromId(t,i);if(r.push(i),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function J(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,f=j(l._preGUI,c),p=Object.keys(e),g=d.list(t),v=o.extendDeepAll({},e),m={};for(q(e),p=Object.keys(e),n=0;n0&&"string"!=typeof z.parts[D];)D--;var R=z.parts[D],F=z.parts[D-1]+"."+R,B=z.parts.slice(0,D).join("."),U=s(t.layout,B).get(),V=s(l,B).get(),H=z.get();if(void 0!==I){T[O]=I,S[O]="reverse"===R?I:N(H);var G=h.getLayoutValObject(l,z.parts);if(G&&G.impliedEdits&&null!==I)for(var Y in G.impliedEdits)E(o.relativeAttr(O,Y),G.impliedEdits[Y]);if(-1!==["width","height"].indexOf(O))if(I){E("autosize",null);var J="height"===O?"width":"height";E(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",I?null:l.width),E("height",I?null:l.height);else if(F.match(W))P(F),s(l,B+"._inputRange").set(null);else if(F.match(X)){P(F),s(l,B+"._inputRange").set(null);var $=s(l,B).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===R){var Q=U,tt="linear"===V.type&&"log"===I,et="log"===V.type&&"linear"===I;if(tt||et){if(Q&&Q.range)if(V.autorange)tt&&(Q.range=Q.range[1]>Q.range[0]?[1,2]:[2,1]);else{var rt=Q.range[0],nt=Q.range[1];tt?(rt<=0&&nt<=0&&E(B+".autorange",!0),rt<=0?rt=nt/1e6:nt<=0&&(nt=rt/1e6),E(B+".range[0]",Math.log(rt)/Math.LN10),E(B+".range[1]",Math.log(nt)/Math.LN10)):(E(B+".range[0]",Math.pow(10,rt)),E(B+".range[1]",Math.pow(10,nt)))}else E(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete l[z.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,V,I,E),u.getComponentMethod("images","convertCoords")(t,V,I,E)}else E(B+".autorange",!0),E(B+".range",null);s(l,B+"._inputRange").set(null)}else if(R.match(M)){var it=s(l,O).get(),at=(I||{}).type;at&&"-"!==at||(at="linear"),u.getComponentMethod("annotations","convertCoords")(t,it,at,E),u.getComponentMethod("images","convertCoords")(t,it,at,E)}var ot=w.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var st=ot.property,lt=G||{editType:"calc"};""!==n&&""===st&&(w.isAddVal(I)?S[O]=null:w.isRemoveVal(I)?S[O]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,lt),m[r]||(m[r]={});var ct=m[r][n];ct||(ct=m[r][n]={}),ct[st]=I,delete e[O]}else"reverse"===R?(U.range?U.range.reverse():(E(B+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==H&&"select"!==H?_.plot=!0:l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,z.set(I))}}for(r in m){w.applyContainerArrayChanges(t,f(a,r),m[r],_,f)||(_.plot=!0)}var ut=l._axisConstraintGroups||[];for(C in L)for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function it(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 h(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&h()};e()}var d,g,v=0;function m(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&TT)&&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,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&"number"==typeof m&&y&&Se.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=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,a];return c&&c.add(t,l,h,u,p),f.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,h=t,f=[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("undefined"==typeof 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(!k(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function k(t){return t===Math.round(t)&&t>=0}function T(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?"data_array"===t.valType?(t.role="data",n[e+"src"]={valType:"string",editType:"none"}):!0===t.arrayOk&&(n[e+"src"]={valType:"string",editType:"none"}):g(t)&&(t.role="object")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[b];if(!n)return;delete t[b],r[e]={items:{}},r[e].items[n]=t,r[e].role="object"})}(t),function(t){!function t(e){for(var r in e)if(g(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)i=u[o];else{var h=t._module;if(h||(h=(n.modules[t.type||a.type.dflt]||{})._module),!h)return!1;if(!(i=(r=h.attributes)&&r[o])){var f=h.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return w(i,e,s)},r.getLayoutValObject=function(t,e){return w(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;s&&(o=i);var l,c=e+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][a]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function f(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:f,applyUpdate:function(e,r){e&&h(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{"../lib":719,"../plots/attributes":764}],758:[function(t,e,r){"use strict";var n=t("d3"),i=t("../registry"),a=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),h=t("../components/modebar"),f=t("../plots/cartesian/axes"),p=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,v=d.clean,m=t("../plots/cartesian/autorange").doAutoRange,y="start",x="middle",b="end";function _(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function w(t){var e,i,a,s,u,d,g=t._fullLayout,v=g._size,m=v.p,y=f.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),r.drawMainTitle(t),h.manage(t),!g._has("cartesian"))return t._promises.length&&Promise.all(t._promises);function x(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-m-n:e._offset+e._length+m+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+m+n:e._offset-m-n:v.l+v.w*(t.position||0)+n%1}for(e=0;ek?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=p(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&d(a)&&t(a,o)}}({data:v,layout:f},""),u.length)return u.map(g)}},{"../lib":719,"../plots/attributes":764,"../plots/plots":828,"./plot_config":755,"./plot_schema":756,"./plot_template":757}],760:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./plot_api"),a=t("../lib"),o=t("../snapshot/helpers"),s=t("../snapshot/tosvg"),l=t("../snapshot/svgtoimg"),c={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(t,e){var r,u,h,f;function p(t){return!(t in e)||a.validate(e[t],c[t])}if(e=e||{},a.isPlainObject(t)?(r=t.data||[],u=t.layout||{},h=t.config||{},f={}):(t=a.getGraphDiv(t),r=a.extendDeep([],t.data),u=a.extendDeep({},t.layout),h=t._context,f=t._fullLayout||{}),!p("width")&&null!==e.width||!p("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!p("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var d={};function g(t,r){return a.coerce(e,d,c,t,r)}var v=g("format"),m=g("width"),y=g("height"),x=g("scale"),b=g("setBackground"),_=g("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=a.extendFlat({},u);m?k.width=m:null===e.width&&n(f.width)&&(k.width=f.width),y?k.height=y:null===e.height&&n(f.height)&&(k.height=f.height);var T=a.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=o.getRedrawFunc(w);function M(){return new Promise(function(t){setTimeout(t,o.getDelay(w._fullLayout))})}function S(){return new Promise(function(t,e){var r=s(w,v,x),n=w._fullLayout.width,c=w._fullLayout.height;if(i.purge(w),document.body.removeChild(w),"svg"===v)return t(_?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=a.randstr(),l({format:v,width:n,height:c,scale:x,canvas:u,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){i.plot(w,r,k,T).then(A).then(M).then(S).then(function(e){t(function(t){return _?t.replace(o.IMAGE_URL_PREFIX,""):t}(e))}).catch(function(t){e(t)})})}},{"../lib":719,"../snapshot/helpers":851,"../snapshot/svgtoimg":853,"../snapshot/tosvg":855,"./plot_api":754,"fast-isnumeric":225}],761:[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 h=Object.keys(t),f=0;fx.length&&i.push(p("unused",a,m.concat(x.length)));var T,A,M,S,E,C=x.length,L=Array.isArray(k);if(L&&(C=Math.min(C,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&i.push(p("unused",a,m.concat(A,x[A].length)));var P=x[A].length;for(T=0;T<(L?Math.min(P,k[A].length):P);T++)M=L?k[A][T]:k,S=y[A][T],E=x[A][T],n.validate(S,M)?E!==S&&E!==+S&&i.push(p("dynamic",a,m.concat(A,T),S,E)):i.push(p("value",a,m.concat(A,T),S))}else i.push(p("array",a,m.concat(A),y[A]));else for(A=0;A1&&f.push(p("object","layout"))),i.supplyDefaults(d);for(var g=d._fullData,v=r.length,m=0;m0&&((b=A-o(v)-o(m))>M?_/b>S&&(y=v,x=m,S=_/b):_/A>S&&(y={val:v.val,pad:0},x={val:m.val,pad:0},S=_/A));if(f===p){var E=f-1,C=f+1;if(k)if(0===f)a=[0,1];else{var L=(f>0?h:u).reduce(function(t,e){return Math.max(t,o(e))},0),P=f/(1-Math.min(.5,L/A));a=f>0?[0,P]:[P,0]}else a=T?[Math.max(0,E),Math.max(1,C)]:[E,C]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):T&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),a=[y.val-S*o(y),x.val+S*o(x)];return d&&a.reverse(),i.simpleMap(a,e.l2r||Number)}function l(t){var e=t._length/20;return"domain"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function c(t,e){var r,n,i,a=e._id,o=t._fullData,s=t._fullLayout,l=[],c=[];function f(t,e){for(r=0;r=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 p(t){return n(t)&&Math.abs(t)=e}e.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(t,e){if(e.setScale(),e.autorange){e.range=s(t,e),e._r=e.range.slice(),e._rl=i.simpleMap(e._r,e.r2l);var r=e._input,n={};n[e._attr+".range"]=e.range,n[e._attr+".autorange"]=e.autorange,o.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,n),r.range=e.range.slice(),r.autorange=e.autorange}var a=e._anchorAxis;if(a&&a.rangeslider){var l=a.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=s(t,e)),a._input.rangeslider[e._name]=i.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var i,o,s,l,c,f,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,k=!1;function T(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=T((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),M=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(i=0;i0&&(g=o),o>v&&o-a&&(g=o),o>v&&o=P;i--)L(i);return{min:m,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":695,"../../lib":719,"../../registry":847,"fast-isnumeric":225}],767:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../components/titles"),u=t("../../components/color"),h=t("../../components/drawing"),f=t("./layout_attributes"),p=t("./clean_ticks"),d=t("../../constants/numerical"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t("../../constants/alignment").MID_SHIFT,T=t("../../constants/alignment").LINE_SPACING,A=e.exports={};A.setConvert=t("./set_convert");var M=t("./axis_autotype"),S=t("./axis_ids");A.id2name=S.id2name,A.name2id=S.name2id,A.cleanId=S.cleanId,A.list=S.list,A.listIds=S.listIds,A.getFromId=S.getFromId,A.getFromTrace=S.getFromTrace;var E=t("./autorange");A.getAutoRange=E.getAutoRange,A.findExtremes=E.findExtremes,A.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return i||(i=l[0]||a),a||(a=i),u[c]={valType:"enumerated",values:l.concat(a?[a]:[]),dflt:i},s.coerce(t,e,u,c)},A.coercePosition=function(t,e,r,n,i,a){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(i,a);else{var c=A.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},A.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:A.getFromId(e,r).cleanPos)(t)},A.redrawComponents=function(t,e){e=e||A.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},A.saveRangeInitial=function(t,e){for(var r=A.list(t,"",!0),n=!1,i=0;i.3*f||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=A.tickIncrement(t,"M6","reverse")+1.5*m:a.exactMonths>.8?t=A.tickIncrement(t,"M1","reverse")+15.5*m:t-=m/2;var l=A.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,a)),v=x,0;v<=u;)v=A.tickIncrement(v,y,!1,a),0;return{start:e.c2r(x,0,a),end:e.c2r(v,0,a),size:y,_dataSpan:u-c}},A.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type||"multicategory"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),"radialaxis"===t._name&&(n*=2)),"array"===t.tickmode&&(n*=100),A.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),j(t)},A.calcTicks=function(t){A.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if("array"===t.tickmode)return function(t){var e=t.tickvals,r=t.ticktext,n=new Array(e.length),i=s.simpleMap(t.range,t.r2l),a=1.0001*i[0]-1e-4*i[1],o=1.0001*i[1]-1e-4*i[0],l=Math.min(a,o),c=Math.max(a,o),u=0;Array.isArray(r)||(r=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var f=0;fl&&p=n:h<=n)&&!(o.length>u||h===c);h=A.tickIncrement(h,t.dtick,a,t.calendar)){c=h;var f=!1;l&&h!==(0|h)&&(f=!0),o.push({minor:f,value:h})}rt(t)&&360===Math.abs(e[1]-e[0])&&o.pop(),t._tmax=(o[o.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;for(var p=new Array(o.length),d=0;d10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=m&&a<=10||e>=15*m)t._tickround="d";else if(e>=x&&a<=16||e>=y)t._tickround="M";else if(e>=b&&a<=19||e>=x)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(q(t.exponentformat)&&!H(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function U(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}A.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar);var a=2*e;a>g?(e/=g,r=n(10),t.dtick="M"+12*N(e,r,O)):a>v?(e/=v,t.dtick="M"+N(e,1,z)):a>m?(t.dtick=N(e,m,D),t.tick0=s.dateTick0(t.calendar,!0)):a>y?t.dtick=N(e,y,z):a>x?t.dtick=N(e,x,I):a>b?t.dtick=N(e,b,I):(r=n(10),t.dtick=N(e,r,O))}else if("log"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick="L"+N(e,r,O)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):rt(t)?(t.tick0=0,r=1,t.dtick=N(e,r,B)):(t.tick0=0,r=n(10),t.dtick=N(e,r,O));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}},A.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,a);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?F:R,h=t+.01*o,f=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)},A.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),a=r[1]"+l,t._prevDateHead=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=G(Math.pow(10,l),t,a,n);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),f=Math.abs(h),p=t.exponentformat;"power"===p||q(p)&&H(h)?(e.text=0===h?1:1===h?"10":"10"+(h>1?"":_)+f+"",e.fontSize*=1.25):("e"===p||"E"===p)&&f>2?e.text="1"+p+(h>0?"+":_)+f:(e.text=G(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,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):rt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=G(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=G(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="\u03c0":e.text=o[0]+"\u03c0":e.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(e.text=_+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=G(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 v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},A.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return A.hoverLabelText(t,e)+" - "+A.hoverLabelText(t,r);var n="log"===t.type&&e<=0,i=A.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":_+i:i};var V=["f","p","n","\u03bc","m","","k","M","G","T"];function q(t){return"SI"===t||"B"===t}function H(t){return t>14||t<-15}function G(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=A.getTickFormat(e),h=e.separatethousands;if(n){var f={exponentformat:l,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};j(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"
":"B"===l&&9===c?t+="B":q(l)&&(t+=V[c/3+5]));return a?_+t:t}function Y(t,e){var r=t._id.charAt(0),n=t._tickAngles[e]||0,i=s.deg2rad(n),a=Math.sin(i),o=Math.cos(i),l=0,c=0;return t._selections[e].each(function(){var t=J(this),e=h.bBox(t.node()),r=e.width,n=e.height;l=Math.max(l,o*r,a*n),c=Math.max(c,a*r,o*n)}),{x:c,y:l}[r]}function W(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function X(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return"free"!==e.anchor?r=S.getFromId(t,e.anchor):"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0}function Z(t,e){var r=t.l2p(e);return r>1&&r=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[i]+=l),e.title.text!==f._dfltTitle[d]&&(r[i]+=e.title.font.size),"x"===d&&c.width>0){var h=c.right-(e._offset+e._length);h>0&&(r.x=1,r.r=h);var p=e._offset-c.left;p>0&&(r.x=0,r.l=p)}else if("y"===d&&c.height>0){var v=c.bottom-(e._offset+e._length);v>0&&(r.y=0,r.b=v);var m=e._offset-c.top;m>0&&(r.y=1,r.t=m)}}a.autoMargin(t,K(e),r)}),r.skipTitle||tt&&e._boundingBox&&"bottom"===e.side||G.push(function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if("multicategory"===e.type)r=e._labelLength;else{r=10+1.5*o+(e.linewidth?e.linewidth-1:0)}var s,l,u,f,p=X(t,e);"x"===a?(l=e._offset+e._length/2,u="top"===e.side?-r-o*(e.showticklabels?1:0):r+o*(e.showticklabels?1.5:.5),u+=p):(u=e._offset+e._length/2,l="right"===e.side?r+o*(e.showticklabels?1:.5):-r-o*(e.showticklabels?.5:0),l+=p,s={rotate:"-90",offset:0});if("multicategory"!==e.type){var d=e._selections[e._id+"tick"];if(f={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var g=h.getTranslate(d.node().parentNode);f.offsetLeft=g.x,f.offsetTop=g.y}}return c.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:f,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(t,e)}),s.syncOrAsync(G)}function et(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}},A.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})),i},A.makeTransFn=function(t){var e=t._id.charAt(0),r=t._offset;return"x"===e?function(e){return"translate("+(r+t.l2p(e.x))+",0)"}:function(e){return"translate(0,"+(r+t.l2p(e.x))+")"}},A.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},A.makeLabelFns=function(t,e,r){var n=t._id.charAt(0),a="boundaries"!==t.tickson&&"outside"===t.ticks,o=0,l=0;if(a&&(o+=t.ticklen),r&&"outside"===t.ticks){var c=s.deg2rad(r);o=t.ticklen*Math.cos(c)+1,l=t.ticklen*Math.sin(c)}t.showticklabels&&(a||t.showline)&&(o+=.2*t.tickfont.size);var u,h,f,p,d={labelStandoff:o+=(t.linewidth||1)/2,labelShift:l};return"x"===n?(p="bottom"===t.side?1:-1,u=l*p,h=e+o*p,f="bottom"===t.side?1:-.2,d.xFn=function(t){return t.dx+u},d.yFn=function(t){return t.dy+h+t.fontSize*f},d.anchorFn=function(t,e){return i(e)&&0!==e&&180!==e?e*p<0?"end":"start":"middle"},d.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side?-n:0}):"y"===n&&(p="right"===t.side?1:-1,u=o,h=-l*p,f=90===Math.abs(t.tickangle)?.5:0,d.xFn=function(t){return t.dx+e+(u+t.fontSize*f)*p},d.yFn=function(t){return t.dy+h+t.fontSize*k},d.anchorFn=function(e,r){return i(r)&&90===Math.abs(r)?"middle":"right"===t.side?"start":"end"},d.heightFn=function(e,r,n){return(r*="left"===t.side?1:-1)<-30?-n:r<30?-.5*n:0}),d},A.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",i=r.layer.selectAll("path."+n).data(e.ticks?r.vals:[],W);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,e.tickcolor).style("stroke-width",h.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),i.attr("transform",r.transFn)},A.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&&A.shouldShowZeroLine(t,e,a))for(var o="array"===e.tickmode,s=0;s1)for(n=1;n2*o}(t,e)?"date":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(t)?"category":function(t){if(!t)return!1;for(var e=0;en?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n0;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;nl*x)||k)for(r=0;rz&&RP&&(P=R);p/=(P-L)/(2*O),L=c.l2r(L),P=c.l2r(P),c.range=c._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function I(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",i+"Z")}function D(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function R(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),F(t,e,i,a)}function F(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 B(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(t){S&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),S=!1)}function j(t){return"lasso"===t||"select"===t}function U(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,M)/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 V(t,e,r,n){for(var i,a,o,l,c=!1,u={},h={},f=0;f-1&&w(i,t,X,Z,e.id,St),a.indexOf("event")>-1&&h.click(t,i,e.id);else if(1===r&&pt){var s=S?G:F,c="s"===S||"w"===E?0:1,u=s._name+".range["+c+"]",f=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return"date"===t.type?i:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format("."+String(r)+"g")(i))}(s,c),p="left",d="middle";if(s.fixedrange)return;S?(d="n"===S?"top":"bottom","right"===s.side&&(p="right")):"e"===E&&(p="right"),t._context.showAxisRangeEntryBoxes&&n.select(vt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:d}).on("edit",function(e){var r=s.d2r(e);void 0!==r&&o.call("_guiRelayout",t,u,r)})}}function Lt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,e+mt)),i=Math.max(0,Math.min(Q,r+yt)),a=Math.abs(n-mt),o=Math.abs(i-yt);function s(){kt="",xt.r=xt.l,xt.t=xt.b,At.attr("d","M0,0Z")}if(xt.l=Math.min(mt,n),xt.r=Math.max(mt,n),xt.t=Math.min(yt,i),xt.b=Math.max(yt,i),tt.isSubplotConstrained)a>M||o>M?(kt="xy",a/$>o/Q?(o=a*Q/$,yt>i?xt.t=yt-o:xt.b=yt+o):(a=o*$/Q,mt>n?xt.l=mt-a:xt.r=mt+a),At.attr("d",U(xt))):s();else if(et.isSubplotConstrained)if(a>M||o>M){kt="xy";var l=Math.min(xt.l/$,(Q-xt.b)/Q),c=Math.max(xt.r/$,(Q-xt.t)/Q);xt.l=l*$,xt.r=c*$,xt.b=(1-l)*Q,xt.t=(1-c)*Q,At.attr("d",U(xt))}else s();else!nt||og[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":719,"fast-isnumeric":225}],783:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{"../../constants/alignment":688}],784:[function(t,e,r){"use strict";var n=t("polybooljs"),i=t("../../registry"),a=t("../../components/color"),o=t("../../components/fx"),s=t("../../lib"),l=t("../../lib/polygon"),c=t("../../lib/throttle"),u=t("../../components/fx/helpers").makeEventData,h=t("./axis_ids").getFromId,f=t("../../lib/clear_gl_canvases"),p=t("../../plot_api/subroutines").redrawReglTraces,d=t("./constants"),g=d.MINSELECT,v=l.filter,m=l.tester;function y(t){return t._id}function x(t,e,r,n,i,a,o){var s,l,c,u,h,f,p,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){k(t,e,a);var x=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)&&(f=S(x))){for(o&&o.remove(),g=0;g0?"M"+i.join("M")+"Z":"M0,0Z",e.attr("d",n)}function S(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function E(t,e,r){var n,a,o,s;for(n=0;n-1&&x(e,S,i.xaxes,i.yaxes,i.subplot,i,G),"event"===r&&S.emit("plotly_selected",void 0);o.click(S,e)}).catch(s.error)},i.doneFn=function(){W.remove(),c.done(X).then(function(){c.clear(X),i.gd.emit("plotly_selected",_),p&&i.selectionDefs&&(p.subtract=H,i.selectionDefs.push(p),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,f)),i.doneFnCompleted&&i.doneFnCompleted(Z)}).catch(s.error)}},clearSelect:L,selectOnClick:x}},{"../../components/color":593,"../../components/fx":632,"../../components/fx/helpers":628,"../../lib":719,"../../lib/clear_gl_canvases":704,"../../lib/polygon":731,"../../lib/throttle":744,"../../plot_api/subroutines":758,"../../registry":847,"./axis_ids":770,"./constants":773,polybooljs:473}],785:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../../lib"),o=a.cleanNumber,s=a.ms2DateTime,l=a.dateTime2ms,c=a.ensureNumber,u=a.isArrayOrTypedArray,h=t("../../constants/numerical"),f=h.FP_SAFE,p=h.BADNUM,d=h.LOG_CLIP,g=t("./constants"),v=t("./axis_ids");function m(t){return Math.pow(10,t)}function y(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",h=r.charAt(0);function x(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*d*Math.abs(n-i))}return p}function b(e,r,n){var o=l(e,n||t.calendar);if(o===p){if(!i(e))return p;e=+e;var s=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function _(e,r,n){return s(e,r,n||t.calendar)}function w(e){return t._categories[Math.round(e)]}function k(e){if(y(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 p}function T(e){if(t._categoriesMap)return t._categoriesMap[e]}function A(t){var e=T(t);return void 0!==e?e:i(t)?+t:void 0}function M(e){return i(e)?n.round(t._b+t._m*e,2):p}function S(e){return(e-t._b)/t._m}t.c2l="log"===t.type?x:c,t.l2c="log"===t.type?m:c,t.l2p=M,t.p2l=S,t.c2p="log"===t.type?function(t,e){return M(x(t,e))}:M,t.p2c="log"===t.type?function(t){return m(S(t))}:S,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=S,t.cleanPos=c):"log"===t.type?(t.d2r=t.d2l=function(t,e){return x(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=x,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(S(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=S,t.cleanPos=c):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=b,t.c2d=t.c2r=t.l2d=t.l2r=_,t.d2p=t.r2p=function(e,r,n){return t.l2p(b(e,0,n))},t.p2d=t.p2r=function(t,e,r){return _(S(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,p,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=k,t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:c(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=T,t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:c(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=e._axisMatchGroups;if(l&&l.length&&0===t._categories.length)for(i=0;if&&(s[n]=f),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else a.nestedProperty(t,e).set(o)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=v.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s=t.r2l(t[a][0],o),l=t.r2l(t[a][1],o);if("y"===h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.makeCalcdata=function(e,r){var n,i,o,s,l=t.type,c="date"===l&&e[r+"calendar"];if(r in e){if(n=e[r],s=e._length||a.minRowLength(n),a.isTypedArray(n)&&("linear"===l||"log"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}if("multicategory"===l)return function(t,e){for(var r=new Array(e),n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),t.plot.call(a.setTranslate,e._offset,r._offset).call(a.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,s=n.yaxis,l=e.xr0,c=e.xr1,u=i._length,h=e.yr0,f=e.yr1,p=s._length,d=!!c,g=!!f,v=[];if(d){var m=l[1]-l[0],y=c[1]-c[0];v[0]=(l[0]*(1-r)+r*c[0]-l[0])/(l[1]-l[0])*u,v[2]=u*(1-r+r*y/m),i.range[0]=l[0]*(1-r)+r*c[0],i.range[1]=l[1]*(1-r)+r*c[1]}else v[0]=0,v[2]=u;if(g){var x=h[1]-h[0],b=f[1]-f[0];v[1]=(h[1]*(1-r)+r*f[1]-h[1])/(h[0]-h[1])*p,v[3]=p*(1-r+r*b/x),s.range[0]=h[0]*(1-r)+r*f[0],s.range[1]=h[1]*(1-r)+r*f[1]}else v[1]=0,v[3]=p;o.drawOne(t,i,{skipTitle:!0}),o.drawOne(t,s,{skipTitle:!0}),o.redrawComponents(t,[i._id,s._id]);var _=d?u/v[2]:1,w=g?p/v[3]:1,k=d?v[0]:0,T=g?v[1]:0,A=d?v[0]/v[2]*u:0,M=g?v[1]/v[3]*p:0,S=i._offset-A,E=s._offset-M;n.clipRect.call(a.setTranslate,k,T).call(a.setScale,1/_,1/w),n.plot.call(a.setTranslate,S,E).call(a.setScale,_,w),a.setPointGroupScale(n.zoomScalePts,1/_,1/w),a.setTextPointsScale(n.zoomScaleTxt,1/_,1/w)}o.redrawComponents(t)}},{"../../components/drawing":614,"../../registry":847,"./axes":767,d3:163}],790:[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("type",(s.splomStash||{}).type)&&(!function(t,e){if("-"!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf("scene")&&(r=s);var l=function(t,e,r){for(var n=0;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,r,s);if(!l)return;if("histogram"===l.type&&s==={v:"y",h:"x"}[l.orientation||"v"])return void(t.type="linear");var c,u=s+"calendar",h=l[u],f={noMultiCategory:!n(l,"cartesian")||n(l,"noMultiCategory")};if(o(l,s)){var p=a(l),d=[];for(c=0;c0?".":"")+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"],h=0;hi*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(g.precision),i&&r.clipAngle(i-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var h=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],f=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(f.range,p.range);u.fitExtent(h,d);var v=this.bounds=u.getBounds(d),m=this.fitScale=u.scale(),y=u.translate();if(!isFinite(v[0][0])||!isFinite(v[0][1])||!isFinite(v[1][0])||!isFinite(v[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=["projection.rotation","center","lonaxis.range","lataxis.range"],_="Invalid geo settings, relayout'ing to default view.",w={},k=0;k-1&&p(n.event,a,[r.xaxis],[r.yaxis],r.id,g),c.indexOf("event")>-1&&l.click(a,n.event))})}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv,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(s.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"},u.setConvert(t.mockAxis,r)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale}:t._isClipped?this.viewInitial={"projection.scale":r.scale,"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale,"projection.rotation.lon":n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",function(t){return r(t.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},{"../../components/color":593,"../../components/dragelement":611,"../../components/drawing":614,"../../components/fx":632,"../../lib":719,"../../lib/topojson_utils":746,"../../registry":847,"../cartesian/axes":767,"../cartesian/select":784,"../plots":828,"./constants":795,"./projections":800,"./zoom":801,d3:163,"topojson-client":540}],797:[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[o]={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[o],s=0;s0&&w<0&&(w+=360);var k,T,A,M=(_+w)/2;if(!c){var S=u?s.projRotate:[M,0,0];k=r("projection.rotation.lon",S[0]),r("projection.rotation.lat",S[1]),r("projection.rotation.roll",S[2]),r("showcoastlines",!u)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean")&&r("oceancolor")}(c?(T=-96.6,A=38.7):(T=u?M:k,A=(b[0]+b[1])/2),r("center.lon",T),r("center.lat",A),h)&&r("projection.parallels",s.projParallels||[0,60]);r("projection.scale"),r("showland")&&r("landcolor"),r("showlakes")&&r("lakecolor"),r("showrivers")&&(r("rivercolor"),r("riverwidth")),r("showcountries",u&&"usa"!==a)&&(r("countrycolor"),r("countrywidth")),("usa"===a||"north america"===a&&50===n)&&(r("showsubunits",!0),r("subunitcolor"),r("subunitwidth")),u||r("showframe",!0)&&(r("framecolor"),r("framewidth")),r("bgcolor")}e.exports=function(t,e,r){n(t,e,r,{type:"geo",attributes:a,handleDefaults:s,partition:"y"})}},{"../subplot_defaults":842,"./constants":795,"./layout_attributes":798}],800:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length<2?{type:"Point",coordinates:i[0]}:{type:"MultiPoint",coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&&(a.push(i),i=[])},result:function(){var t=a.length?a.length<2?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t<4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++rn^p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),a=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var h=1e-6,f=h*h,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),v=180/p;function m(t){return t>1?d:t<-1?-d:Math.asin(t)}function y(t){return t>1?0:t<-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>h;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function i(t,r){for(var i=r<0?-1:1,a=n[+(r<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}e.invert&&(i.invert=function(t,a){for(var o=r[+(a<0)],s=n[+(a<0)],c=0,u=o.length;c=0;--i){var o=n[1][i],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,h=180*o[2][0]/p,f=180*o[2][1]/p;r.push(s([[h-e,f-e],[h-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),l)},i},a.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})}),a):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},a},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=m(r),i=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+i)),m((n+r*(i+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length<2&&(e=t),1===e)return w;if(e===1/0)return T;function r(r,n){var i=w(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=w.invert(r/t,n);return i[0]*=e,i},r}function T(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function M(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>h&&--i>0);return e/2}}T.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,M.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(M)}).raw=M,S(p);var E=function(t,e,r){var n=S(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=m(i/e);return[n/(t*Math.cos(a)),m((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/d,Math.SQRT2,p);function C(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(E)}).raw=E,C.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>h&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(C)}).raw=C;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function P(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),i=Math.floor(n),a=n-i,o=(r=L[i])[0],s=r[1],l=(r=L[++i])[0],c=r[1],u=(r=L[Math.min(19,++i)])[0],h=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?d:-d)*(c+a*(h-s)/2+a*a*(h-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function z(t,e){var r,n=Math.cos(e),i=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function I(t,e){var r=z(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),P.invert=function(t,e){var r=e/d,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,h=2*(Math.abs(r)-s)/c,p=u/c,m=h*(1-p*h*(1-2*p*h));if(m>=0||1===a){n=(e>=0?5:-5)*(m+i);var y,x=50;do{m=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=L[a][1],s=L[a+1][1],l=L[Math.min(19,a+2)][1],n-=(y=(e>=0?d:-d)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*v}while(Math.abs(y)>f&&--x>0);break}}while(--a>=0);var b=L[a][0],_=L[a+1][0],w=L[Math.min(19,a+2)][0];return[t/(_+m*(w-b)/2+m*m*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(P)}).raw=P,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(O)}).raw=O,z.invert=function(t,e){if(!(t*t+4*e*e>p*p+h)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),f=Math.sin(2*n),d=c*c,g=u*u,v=s*s,m=1-g*l*l,x=m?y(u*l)*Math.sqrt(a=1/m):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*v+x*u*l*d),k=a*(.5*o*f-2*x*c*s),T=.25*a*(f*s-x*c*g*o),A=a*(d*l+x*v*u),M=k*T-A*w;if(!M)break;var S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return x(z)}).raw=z,I.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,f=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),v=g*g,m=1-u*p*p,x=m?y(o*p)*Math.sqrt(a=1/m):a=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*a*(u*v+x*o*p*c)+.5/d,k=a*(f*l/4-x*s*g),T=.125*a*(l*g-x*s*u*f),A=.5*a*(c*p+x*v*o)+.5,M=k*T-A*w,S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return x(I)}).raw=I}},{}],801:[function(t,e,r){"use strict";var n=t("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 h(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],h={},f={};function p(t,e){h[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),f[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),o.emit("plotly_relayout",f)}function f(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),h(t,e,i)}),r}function p(t,e){var r,i,a,o,s,f,p,d,g,v=u(0,e),m=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return v.on("zoomstart",function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=y(r)}).on("zoom",function(){if(f=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>m||Math.abs(n[1]-t[1])>m}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?y(f)&&(d=y(f),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=y(r=f),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&&h(t,e,x)}),v}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),f=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/d)*s-p,i=Math.sqrt(d*d-h*h));var g=180-a-2*p,m=(Math.atan2(f,u)-Math.atan2(c,i))*s,x=(Math.atan2(f,u)-Math.atan2(c,-i))*s,b=v(r[0],r[1],a,m),_=v(r[0],r[1],g,x);return b<=_?[a,m,r[2]]:[g,x,r[2]]}(k,r,E);isFinite(T[0])&&isFinite(T[1])&&isFinite(T[2])||(T=E),e.rotate(T),E=T}}else r=g(e,M=b);f.of(this,arguments)({type:"zoom"})}),A=f.of(this,arguments),p++||A({type:"zoomstart"})}).on("zoomend",function(){var r;n.select(this).style(c),d.call(a,"zoom",null),r=f.of(this,arguments),--p||r({type:"zoomend"}),h(t,e,m)}).on("zoom.redraw",function(){t.render();var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),n.rebind(a,f,"on")}function g(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function v(t,e,r,n){var i=m(r-t),a=m(n-e);return Math.sqrt(i*i+a*a)}function m(t){return(t%360+540)%360-180}function y(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 x(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&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n).999&&(v="turntable"):v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":593,"../../../lib":719,"../../../registry":847,"../../get_data":802,"../../subplot_defaults":842,"./axis_defaults":810,"./layout_attributes":813}],813:[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":719,"../../../lib/extend":710,"../../domain":792,"./axis_attributes":809}],814:[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":742}],815:[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 h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var p=n.calcTicks(u),d=0;d/g," "));l[c]=p,u.tickmode=h}}e.ticks=l;for(var c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(var 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;a")):"isosurface"===e.type||"volume"===e.type?(w.valueLabel=h.tickText(t.mockAxis,t.mockAxis.d2l(p.traceCoordinate[3]),"hover").text,M.push("value: "+w.valueLabel),p.textLabel&&M.push(p.textLabel),x=M.join("
")):x=p.textLabel;var S={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:_};f.appendArrayPointValue(S,b,_),e._module.eventData&&(S=b._module.eventData(S,p,b,{},_));var E={points:[S]};t.fullSceneLayout.hovermode&&f.loneHover({trace:b,x:(.5+.5*m[0]/m[3])*a,y:(.5-.5*m[1]/m[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:x,name:c.name,color:f.castHoverOption(b,_,"bgcolor")||c.color,borderColor:f.castHoverOption(b,_,"bordercolor"),fontFamily:f.castHoverOption(b,_,"font.family"),fontSize:f.castHoverOption(b,_,"font.size"),fontColor:f.castHoverOption(b,_,"font.color"),nameLength:f.castHoverOption(b,_,"namelength"),textAlign:f.castHoverOption(b,_,"align"),hovertemplate:u.castOption(b,_,"hovertemplate"),hovertemplateLabels:u.extendFlat({},S,w),eventData:[S]},{container:n,gd:r}),p.buttons&&p.distance<5?r.emit("plotly_click",E):r.emit("plotly_hover",E),s=E}else f.loneUnhover(n),r.emit("plotly_unhover",s);t.drawAnnotations(t)}.bind(null,t),t.traces={},t.make4thDimension(),!0}function b(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e,e[this.id]),this.spikeOptions=m(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),x(this,this.pixelRatio)}var _=b.prototype;_.initializeGLCamera=function(){var t=this.fullSceneLayout.camera,e="orthographic"===t.projection.type;this.camera=a(this.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:e,zoomMin:.01,zoomMax:100,mode:"orbit"})},_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas,n=this.glplot.camera,i=this.glplot.pixelRatio;this.glplot.dispose(),requestAnimationFrame(function a(){e.isContextLost()?requestAnimationFrame(a):x(t,n,i,r)?t.plot.apply(t,t.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")})};var w=["xaxis","yaxis","zaxis"];function k(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=w[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+"calendar"],h=e["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var f,p=0;p<(h||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][a])g[0][a]=-1,g[1][a]=1;else{var E=g[1][a]-g[0][a];g[0][a]-=E/32,g[1][a]+=E/32}if("reversed"===s.autorange){var C=g[0][a];g[0][a]=g[1][a],g[1][a]=C}}else{var L=s.range;g[0][a]=s.r2l(L[0]),g[1][a]=s.r2l(L[1])}g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),v[a]=g[1][a]-g[0][a],this.glplot.bounds[0][a]=g[0][a]*f[a],this.glplot.bounds[1][a]=g[1][a]*f[a]}var P=[1,1,1];for(a=0;a<3;++a){var O=m[l=(s=c[w[a]]).type];P[a]=Math.pow(O.acc,1/O.count)/f[a]}var z;if("auto"===c.aspectmode)z=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===c.aspectmode)z=[1,1,1];else if("data"===c.aspectmode)z=P;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var I=c.aspectratio;z=[I.x,I.y,I.z]}c.aspectratio.x=u.aspectratio.x=z[0],c.aspectratio.y=u.aspectratio.y=z[1],c.aspectratio.z=u.aspectratio.z=z[2],this.glplot.aspect=z;var D=c.domain||null,R=e._size||null;if(D&&R){var F=this.container.style;F.position="absolute",F.left=R.l+D.x[0]*R.w+"px",F.top=R.t+(1-D.y[1])*R.h+"px",F.width=R.w*(D.x[1]-D.x[0])+"px",F.height=R.h*(D.y[1]-D.y[0])+"px"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),T(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]);var r="orthographic"===t.projection.type;if(r!==this.glplot.camera._ortho){this.glplot.redraw();var n=this.glplot.pixelRatio,i=this.glplot.clearColor;this.glplot.gl.clearColor(i[0],i[1],i[2],i[3]),this.glplot.gl.clear(this.glplot.gl.DEPTH_BUFFER_BIT|this.glplot.gl.COLOR_BUFFER_BIT),this.glplot.dispose(),x(this,n),this.glplot.camera._ortho=r}},_.saveCamera=function(t){var e=this.fullLayout,r=this.getCamera(),n=u.nestedProperty(t,this.id+".camera"),i=n.get(),a=!1;function o(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}if(void 0===i)a=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!o(r,i,s,l)){a=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(a=!0)}if(a){var h={};h[this.id+".camera"]=i,c.call("_storeDirectGUIEdit",t,e._preGUI,h),n.set(r),u.nestedProperty(e,this.id+".camera").set(r)}return a},_.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 h=this.id+".camera.up",f={x:0,y:0,z:1},p={};p[h]=f;var d=n.layout;c.call("_storeDirectGUIEdit",d,i._preGUI,p),a.up=f,u.nestedProperty(d,h).set(f)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o\xa9 OpenStreetMap
',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:'\xa9 CARTO',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:'\xa9 CARTO',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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, under CC BY SA.',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}]}},i=Object.keys(n);e.exports={requiredVersion:"1.1.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:i,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.1.1."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",i.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\')'}}},{}],821:[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":719}],822:[function(t,e,r){"use strict";var n=t("mapbox-gl"),i=t("../../lib"),a=t("../../plots/get_data").getSubplotCalcData,o=t("../../constants/xmlns_namespaces"),s=t("d3"),l=t("../../components/drawing"),c=t("../../lib/svg_text_utils"),u=t("./mapbox"),h=r.constants=t("./constants");function f(t){return"string"==typeof t&&-1!==h.styleValuesMapbox.indexOf(t)}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=i.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==h.requiredVersion)throw new Error(h.wrongVersionErrorMsg);var s=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(h.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,o);n.accessToken=s;for(var l=0;lx/2){var b=g.split("|").join("
");m.text(b).attr("data-unformatted",b).call(c.convertToTspans,t),y=l.bBox(m.node())}m.attr("transform","translate(-3, "+(8-y.height)+")"),v.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var _=1;y.width+6>x&&(_=x/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];v.attr("transform","translate("+w[0]+","+w[1]+") scale("+_+")")}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0)}function c(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 a=t.symbol,o=i(a.textposition,a.iconsize);n.extendFlat(e,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":a.textfont.color,"text-opacity":t.opacity})}return{layout:e,paint:r}}s.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=l(t)},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.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,l(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",i.tileSize=256):"image"===r&&(e="url",i.coordinates=t.coordinates);i[e]=n,t.sourceattribution&&(i.attribution=t.sourceattribution);return i}(t);e.addSource(this.idSource,r)}},s.updateLayer=function(t){var e,r=this.subplot,n=c(t),i=this.subplot.belowLookup["layout-"+this.index];if("traces"===i)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&h(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&a.click(n,e.originalEvent)}}},g.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var i,a=t.dragmode;i="select"===a?function(t,r){(t.range={})[e.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(l)};var s=e.dragOptions;e.dragOptions=o.extendDeep(s||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:i},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),"select"===a||"lasso"===a?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){u(t,r,n,e.dragOptions,a)},c.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 l(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},g.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])},g.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"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){v.sendDataToCloud(t)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&u.text()?" - ":"")}},v.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=v.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1};var x=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],b=["year","month","dayMonth","dayMonthYear"];function _(t,e){var r=t._context.locale,n=!1,i={};function o(t){for(var r=!0,a=0;a1&&O.length>1){for(a.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&O.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has("cartesian"),s._hasGeo=s._has("geo"),s._hasGL3D=s._has("gl3d"),s._hasGL2D=s._has("gl2d"),s._hasTernary=s._has("ternary"),s._hasPie=s._has("pie"),v.linkSubplots(h,s,u,i),v.cleanPlot(h,s,u,i),i._zoomlayer&&!t._dragging&&i._zoomlayer.selectAll(".select-outline").remove(),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var h=1-2*s;n=Math.round(h*n),a=Math.round(h*a)}}var f=v.layoutAttributes.width.min,p=v.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-a)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=a)),t._initialAutoSize||(t._initialAutoSize={width:n,height:a}),v.sanitizeMargins(r)},v.supplyLayoutModuleDefaults=function(t,e,r,n){var i,o,s,c=a.componentsRegistry,u=e._basePlotModules,h=a.subplotsRegistry.cartesian;for(i in c)(s=c[i]).includeBasePlot&&s.includeBasePlot(t,e);for(var f in u.length||u.push(h),e._has("cartesian")&&(a.getComponentMethod("grid","contentDefaults")(t,e),h.finalizeSubplots(t,e)),e._subplots)e._subplots[f].sort(l.subplotSort);for(o=0;o.5*n.width&&(r.l=r.r=0),r.b+r.t>.5*n.height&&(r.b=r.t=0);var l=void 0!==r.xl?r.xl:r.x,c=void 0!==r.xr?r.xr:r.x,u=void 0!==r.yt?r.yt:r.y,h=void 0!==r.yb?r.yb:r.y;i[e]={l:{val:l,size:r.l+o},r:{val:c,size:r.r+o},b:{val:h,size:r.b+o},t:{val:u,size:r.t+o}},a[e]=1}else delete i[e],delete a[e];n._replotting||v.doAutoMargin(t)}},v.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),A(e);var r=e._size,n=e.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,h=n.b,f=e.width,p=e.height,d=e._pushmargin,g=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var m in d)g[m]||delete d[m];for(var y in d.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:h}},d){var x=d[y].l||{},b=d[y].b||{},_=x.val,w=x.size,k=b.val,T=b.size;for(var M in d){if(i(w)&&d[M].r){var S=d[M].r.val,E=d[M].r.size;if(S>_){var C=(w*S+(E-f)*_)/(S-_),L=(E*(1-_)+(w-f)*(1-S))/(S-_);C>=0&&L>=0&&f-(C+L)>0&&C+L>s+c&&(s=C,c=L)}}if(i(T)&&d[M].t){var P=d[M].t.val,O=d[M].t.size;if(P>k){var z=(T*P+(O-p)*k)/(P-k),I=(O*(1-k)+(T-p)*(1-P))/(P-k);z>=0&&I>=0&&p-(I+z)>0&&z+I>h+u&&(h=z,u=I)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(h),r.p=Math.round(n.pad),r.w=Math.round(f)-r.l-r.r,r.h=Math.round(p)-r.t-r.b,!e._replotting&&v.didMarginChange(o,r))return"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1,a.call("plot",t)};var M=["l","r","t","b","p","w","h"];function S(t,e,r){var n=!1;var i=[v.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,v.rehover,function(){return t.emit("plotly_transitioning",[]),new Promise(function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return a.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o=0,s=0;function l(){return o++,function(){var e;s++,n||s!==o||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return a.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(e)))}}r.runFn(l),setTimeout(l())})}],o=l.syncOrAsync(i,t);return o&&o.then||(o=Promise.resolve()),o.then(function(){return t})}v.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},v.graphJson=function(t,e,r,n,i){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&v.supplyDefaults(t);var a=i?t._fullData:t.data,o=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if("function"==typeof t)return null;if(l.isPlainObject(t)){var e,n,i={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;i[e]=c(t[e])}return i}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(a||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},v.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(a=n.calc(t,r))}Array.isArray(a)&&a[0]||(a=[{x:u,y:u}]),a[0].t||(a[0].t={}),a[0].trace=r,d[e]=a}}for(C(c,f),i=0;i1e-10?t:0}function f(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:h,pathPolygon:function(t,e,r,n,i,a){return"M"+f(u(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=0?f.angularAxis.domain:n.extent(k),E=Math.abs(k[1]-k[0]);A&&!T&&(E=0);var C=S.slice();M&&T&&(C[1]+=E);var L=f.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),f.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var P=f.angularAxis.ticksStep||(C[1]-C[0])/(L*(f.minorTicks+1));w&&(P=Math.max(Math.round(P),1)),C[2]||(C[2]=P);var O=n.range.apply(this,C);if(O=O.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=M?E:0,"undefined"==typeof(t=n.select(this).select("svg.chart-root"))||t.empty()){var z=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),I=this.appendChild(this.ownerDocument.importNode(z.documentElement,!0));t=n.select(I)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var D,R=t.select(".chart-group"),F={fill:"none",stroke:f.tickColor},B={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){D=t.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend="undefined"==typeof t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||"Element"+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:f.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(f.width-j.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else D=t.select(".legend-group").style({display:"none"});t.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var U=[(f.width-(f.margin.left+f.margin.right+2*x+(j?j.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(U[0]=Math.max(0,U[0]),U[1]=Math.max(0,U[1]),t.select(".outer-group").attr("transform","translate("+U+")"),f.title&&f.title.text){var V=t.select("g.title-group text").style(B).text(f.title.text),q=V.node().getBBox();V.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var Y=t.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});function W(t,e){return s(t)%360+f.orientation}if(f.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+f.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(O),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+W(t)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:f.minorTickColor}),Z.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+f.labelOffset,dy:a+"em",transform:function(t,e){var r=W(t),n=x+f.labelOffset,i=f.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(B);f.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var $=n.max(R.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:"translate("+[x+$,f.margin.top]+")"});var Q=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(p);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),p[0]||Q){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return"undefined"!=typeof t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var it,at,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!T){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(Y).angle;ht.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-f.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",function(t,e){var n=o.util.getMousePos(Y).radius;ft.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(Y).radius);var i=o.util.convertToCartesian(n,f.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(e,r){var i=n.select(this),a=this.style.fill,s="black",l=this.style.opacity||1;if(i.attr({"data-opacity":l}),a&&"none"!==a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};T&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,h=this.getBoundingClientRect(),f=t.node().getBoundingClientRect(),p=[h.left+h.width/2-U[0]-f.left,h.top+h.height/2-U[1]-f.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||"black",i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()}).on("mouseout.tooltip",function(t,e){ut.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})})}(c),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},f.getLiveConfig=function(){return u},f.getinputConfig=function(){return c},f.radialScale=function(t){return r},f.angularScale=function(t){return s},f.svg=function(){return t},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach(function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)});var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if("undefined"==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,i,a)},"stroke-width":function(t,e){return d["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var h=e.angularScale.range(),f=Math.abs(h[1]-h[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-f/2}).endAngle(function(t){return f/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,i){n.select(this).attr({class:"mark arc",d:p,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return"undefined"==typeof t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var v=g.selectAll("path.mark").data(function(t,e){return t});v.enter().append("path").attr({class:"mark"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()})}return a.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)}),this):t},a.getColorScale=function(){},n.rebind(a,e,"on"),a},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,a=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a})}),o=n.merge(a);o=o.filter(function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||"undefined"==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,h=u?e.height:c*o.length,f=s.classed("legend-group",!0).selectAll("svg").data([0]),p=f.enter().append("svg").attr({width:300,height:h+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),v=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,h]);if(u){var m=f.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),f.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=f.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),"line"===(r=o)?"M"+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type("square").size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient("right"),b=f.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",h=i||"";e.style({fill:u,"font-size":a.fontSize+"px"}).text(h);var f=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,"stroke-width":"2px"},g=p.width+2*f+l,v=p.height+2*f;return r.attr({d:"M"+[[l,-v/2],[l,-v/4],[a.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-v/2+2*f]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=i({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=i({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?("undefined"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&"undefined"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&"undefined"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&"undefined"!=typeof s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{"../../../constants/alignment":688,"../../../lib":719,d3:163}],838:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../../lib"),a=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,h=new s;function f(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return f.isPolar=!0,f.svg=function(){return i.svg()},f.getConfig=function(){return e},f.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},f.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},f.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,h.add({undo:function(){n&&i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},f.undo=function(){h.undo()},f.redo=function(){h.redo()},f},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../../components/color":593,"../../../lib":719,"./micropolar":837,"./undo_manager":839,d3:163}],839:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&f<=0?0:Math.max(u,f);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&h>=0?0:Math.min(c,h);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&f>=0?0:Math.min(u,f);n=l>=360?1:c<=0&&h<=0?0:Math.max(c,h);return[e,r,n,i]}(f),x=y[2]-y[0],b=y[3]-y[1],_=h/u,w=Math.abs(b/x);_>w?(p=u,m=(h-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=h,m=(u-(p=h/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],T=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=p/x,M=this.innerRadius=e.hole*A,S=this.cx=k-A*y[0],L=this.cy=T+A*y[3],P=this.cxx=S-k,O=this.cyy=L-T;this.radialAxis=this.mockAxis(t,e,i,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[i.side],domain:[M/n.w,A/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:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",z).attr("transform",R(P,O)),r.frontplot.attr("transform",R(k,T)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",z).attr("transform",R(S,L)).call(s.fill,e.bgcolor)},O.mockAxis=function(t,e,r,n){var i=o.extendFlat({anchor:"free",position:0},r,n);return f(i,e,t),i},O.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:"linear"},r);h(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange="x"===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),p(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,"gregorian"),n.r2l(a[1],null,"gregorian")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.radialaxis,p=E(e.sector[0],360),d=r.radialAxis,g=l90&&p<=270&&(d.tickangle=180);var v=function(t){return"translate("+(d.l2p(t.x)+l)+",0)"},m=z(f);if(r.radialTickLayout!==m&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),g){d.setScale();var y=u.calcTicks(d),x=u.clipEnds(d,y),b=u.getTickSigns(d)[2];u.drawTicks(n,d,{vals:y,layer:i["radial-axis"],path:u.makeTickPath(d,0,b),transFn:v,crisp:!1}),u.drawGrid(n,d,{vals:x,layer:i["radial-grid"],path:function(t){return r.pathArc(d.r2p(t.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,d,{vals:y,layer:i["radial-axis"],transFn:v,labelFns:u.makeLabelFns(d,0)})}var _=r.radialAxisAngle=r.vangles?L(I(C(f.angle),r.vangles)):f.angle,w=R(c,h),k=w+F(-_);D(i["radial-axis"],g&&(f.showticklabels||f.ticks),{transform:k}),D(i["radial-grid"],g&&f.showgrid,{transform:w}),D(i["radial-line"].select("line"),g&&f.showline,{x1:l,y1:0,x2:a,y2:0,transform:k}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,h=C(u),f=Math.cos(h),p=Math.sin(h),d=0;if(s.title){var g=l.bBox(this.layers["radial-axis"].node()).height,v=s.title.font.size;d="counterclockwise"===s.side?-g-.4*v:g+.8*v}this.layers["radial-axis-title"]=m.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:S(n,"Click to enter radial axis title"),attributes:{x:a+i/2*f+d*p,y:o-i/2*p+d*f,"text-anchor":"middle"},transform:{rotate:-u}})},O.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.angularaxis,p=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",f.rotation),p.setGeometry(),p.setScale();var d=function(t){return p.t2g(t.x)};"linear"===p.type&&"radians"===p.thetaunit&&(p.tick0=L(p.tick0),p.dtick=L(p.dtick));var g=function(t){return R(c+a*Math.cos(t),h-a*Math.sin(t))},v=u.makeLabelFns(p,0).labelStandoff,m={xFn:function(t){var e=d(t);return Math.cos(e)*v},yFn:function(t){var e=d(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(v+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*T)},anchorFn:function(t){var e=d(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=d(t);return-.5*(1+Math.sin(n))*r}},y=z(f);r.angularTickLayout!==y&&(i["angular-axis"].selectAll("."+p._id+"tick").remove(),r.angularTickLayout=y);var x,b=u.calcTicks(p);if("linear"===e.gridshape?(x=b.map(d),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===p.type&&(b=b.filter(function(t){return o.isAngleInsideSector(d(t),r.sectorInRad)})),p.visible){var _="inside"===p.ticks?-1:1,w=(p.linewidth||1)/2;u.drawTicks(n,p,{vals:b,layer:i["angular-axis"],path:"M"+_*w+",0h"+_*p.ticklen,transFn:function(t){var e=d(t);return g(e)+F(-L(e))},crisp:!1}),u.drawGrid(n,p,{vals:b,layer:i["angular-grid"],path:function(t){var e=d(t),r=Math.cos(e),n=Math.sin(e);return"M"+[c+l*r,h-l*n]+"L"+[c+a*r,h-a*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,p,{vals:b,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return g(d(t))},labelFns:m})}D(i["angular-line"].select("path"),f.showline,{d:r.pathSubplot(),transform:R(c,h)}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,h=e.innerRadius,f=e.cx,p=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,T=e.radialAxis,S=M.clampTiny,E=M.findXYatLength,C=M.findEnclosingVertexAngles,L=A.cornerHalfWidth,P=A.cornerLen/2,O=d.makeDragger(o,"path","maindrag","crosshair");n.select(O).attr("d",e.pathSubplot()).attr("transform",R(f,p));var z,I,D,F,B,N,j,U,V,q={element:O,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function Y(t,e){return Math.atan2(_-e,t-m)}function W(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=P/t,i=r-n,a=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return"M"+W(s,i)+"A"+[s,s]+" 0,0,0 "+W(s,a)+"L"+W(l,a)+"A"+[l,l]+" 0,0,1 "+W(l,i)+"Z"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var i,a,o=W(t,r),s=W(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,h=-1/u,f=E(L,u,l,c);i=E(P,h,f[0][0],f[0][1]),a=E(P,h,f[1][0],f[1][1])}else{var p,d;c?(p=P,d=L):(p=L,d=P),i=[[l-p,c-d],[l+p,c-d]],a=[[l-p,c+d],[l+p,c+d]]}return"M"+i.join("L")+"L"+a.reverse().join("L")+"Z"}function J(t,e){return e=Math.max(Math.min(e,u),h),tl?(t-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),i.indexOf("event")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,a){var o=r._fullLayout.dragmode,l=O.getBoundingClientRect();if(z=n-l.left,I=a-l.top,k){var c=M.findPolygonOffset(u,w[0],w[1],k);z+=m+c[0],I+=_+c[1]}switch(o){case"zoom":q.moveFn=k?tt:$,q.clickFn=nt,q.doneFn=et,function(){D=null,F=null,B=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=i(t.bgcolor).getLuminance(),(U=d.makeZoombox(s,j,f,p,B)).attr("fill-rule","evenodd"),V=d.makeCorners(s,f,p),b(r)}();break;case"select":case"lasso":y(t,n,a,q,o)}},O.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=O,r._fullLayout._hoversubplot=e.id},O.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},O.updateRadialDrag=function(t,e,r){var i=this,s=i.gd,l=i.layers,c=i.radius,u=i.innerRadius,h=i.cx,f=i.cy,p=i.radialAxis,v=A.radialDragBoxSize,m=v/2;if(p.visible){var y,x,_,T=C(i.radialAxisAngle),M=p._rl,S=M[0],E=M[1],P=M[r],O=.75*(M[1]-M[0])/(1-e.hole)/c;r?(y=h+(c+m)*Math.cos(T),x=f-(c+m)*Math.sin(T),_="radialdrag"):(y=h+(u-m)*Math.cos(T),x=f-(u-m)*Math.sin(T),_="radialdrag-inner");var z,B,N,j=d.makeRectDragger(l,_,"crosshair",-m,-m,v,v),U={element:j,gd:s};D(n.select(j),p.visible&&u0==(r?N>S:Nn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o=u&&(p.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,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 f=o("color"),p=f!==i.color.dflt?f:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,v=o("title.text",g);e._hovertitle=v===g?v:d,a.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:p}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:p}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:f,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:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":593,"../../lib":719,"../../plot_api/plot_template":757,"../cartesian/line_grid_defaults":781,"../cartesian/tick_label_defaults":786,"../cartesian/tick_mark_defaults":787,"../cartesian/tick_value_defaults":788,"../subplot_defaults":842,"./layout_attributes":844}],846:[function(t,e,r){"use strict";var n=t("d3"),i=t("tinycolor2"),a=t("../../registry"),o=t("../../lib"),s=o._,l=t("../../components/color"),c=t("../../components/drawing"),u=t("../cartesian/set_convert"),h=t("../../lib/extend").extendFlat,f=t("../plots"),p=t("../cartesian/axes"),d=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/titles"),m=t("../cartesian/select").prepSelect,y=t("../cartesian/select").selectOnClick,x=t("../cartesian/select").clearSelect,b=t("../cartesian/constants");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;ik*x?i=(a=x)*k:a=(i=y)/k,o=v*i/y,s=m*a/x,r=e.l+e.w*d-i/2,n=e.t+e.h*(1-g)-a/2,f.x0=r,f.y0=n,f.w=i,f.h=a,f.sum=b,f.xaxis={type:"linear",range:[_+2*T-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:"x"},u(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(t){return t.a>=f.aaxis.range[0]&&t.a<=f.aaxis.range[1]&&t.b>=f.baxis.range[1]&&t.b<=f.baxis.range[0]&&t.c>=f.caxis.range[1]&&t.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[_,b-w-T],domain:[g-s/2,g+s/2],_id:"y"},u(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var A=f.yaxis.domain[0],M=f.aaxis=h({},t.aaxis,{range:[_,b-w-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:i});u(M,f.graphDiv._fullLayout),M.setScale();var S=f.baxis=h({},t.baxis,{range:[b-_-T,w],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});u(S,f.graphDiv._fullLayout),S.setScale();var E=f.caxis=h({},t.caxis,{range:[b-_-w,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:i});u(E,f.graphDiv._fullLayout),E.setScale();var C="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDef.select("path").attr("d",C),f.layers.plotbg.select("path").attr("d",C);var L="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDefRelative.select("path").attr("d",L);var P="translate("+r+","+n+")";f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),f.clipDefRelative.select("path").attr("transform",null);var O="translate("+(r-S._offset)+","+(n+a)+")";f.layers.baxis.attr("transform",O),f.layers.bgrid.attr("transform",O);var z="translate("+(r+i/2)+","+n+")rotate(30)translate(0,"+-M._offset+")";f.layers.aaxis.attr("transform",z),f.layers.agrid.attr("transform",z);var I="translate("+(r+i/2)+","+n+")rotate(-30)translate(0,"+-E._offset+")";f.layers.caxis.attr("transform",I),f.layers.cgrid.attr("transform",I),f.drawAxes(!0),f.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",E.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(l.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),c.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},w.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 l=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"]=v.draw(e,"a"+r,{propContainer:i,propName:this.id+".aaxis.title",placeholder:s(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=v.draw(e,"b"+r,{propContainer:a,propName:this.id+".baxis.title",placeholder:s(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"]=v.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(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"}})}},w.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=p.calcTicks(t),h=p.clipEnds(t,u),f=p.makeTransFn(t),d=p.getTickSigns(t)[2],g=o.deg2rad(30),v=d*(t.linewidth||1)/2,m=d*t.ticklen,y=this.w,x=this.h,b="b"===i?"M0,"+v+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+v+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[i];p.drawTicks(r,t,{vals:"inside"===t.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),p.drawGrid(r,t,{vals:h,layer:this.layers[i+"grid"],path:_,transFn:f,crisp:!1}),p.drawLabels(r,t,{vals:u,layer:s,transFn:f,labelFns:p.makeLabelFns(t,0,30)})};var T=b.MINZOOM/2+.87,A="m-0.87,.5h"+T+"v3h-"+(T+5.2)+"l"+(T/2+2.6)+",-"+(.87*T+4.5)+"l2.6,1.5l-"+T/2+","+.87*T+"Z",M="m0.87,.5h-"+T+"v3h"+(T+5.2)+"l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-2.6,1.5l"+T/2+","+.87*T+"Z",S="m0,1l"+T/2+","+.87*T+"l2.6,-1.5l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-"+(T/2+2.6)+","+(.87*T+4.5)+"l2.6,1.5l"+T/2+",-"+.87*T+"Z",E="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",C=!0;function L(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var t,e,r,n,u,h,f,p,v,_,w=this,T=w.layers.plotbg.select("path").node(),P=w.graphDiv,O=P._fullLayout._zoomlayer,z={element:T,gd:P,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(a,o,s){z.xaxes=[w.xaxis],z.yaxes=[w.yaxis];var c=P._fullLayout.dragmode;z.minDrag="lasso"===c?1:void 0,"zoom"===c?(z.moveFn=N,z.clickFn=D,z.doneFn=j,function(a,o,s){var c=T.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,h=i(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),f="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",p=!1,v=O.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",f),_=O.append("path").attr("class","zoombox-corners").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),x(P)}(0,o,s)):"pan"===c?(z.moveFn=U,z.clickFn=D,z.doneFn=V,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(P)):"select"!==c&&"lasso"!==c||m(a,o,s,z,c)}};function I(t){var e={};return e[w.id+".aaxis.min"]=t.a,e[w.id+".baxis.min"]=t.b,e[w.id+".caxis.min"]=t.c,e}function D(t,e){var r=P._fullLayout.clickmode;L(P),2===t&&(P.emit("plotly_doubleclick",null),a.call("_guiRelayout",P,I({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&y(e,P,[w.xaxis],[w.yaxis],w.id,z),r.indexOf("event")>-1&&g.click(P,e,w.id)}function R(t,e){return 1-e/w.h}function F(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function N(i,a){var o=t+i,s=e+a,l=Math.max(0,Math.min(1,R(0,e),R(0,s))),c=Math.max(0,Math.min(1,F(t,e),F(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,T=(1-l)*w.h,C=T-x/k;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),p=!0),P.emit("plotly_relayouting",I(u))}function j(){L(P),u!==r&&(a.call("_guiRelayout",P,I(u)),C&&P.data&&P._context.showTips&&(o.notifier(s(P,"Double-click to zoom back out"),"long"),C=!1))}function U(t,e){var n=t/w.xaxis._m,i=e/w.yaxis._m,a=[(u={a:r.a-i,b:r.b+(n+i)/2,c:r.c-(n-i)/2}).a,u.b,u.c].sort(),o=a.indexOf(u.a),s=a.indexOf(u.b),l=a.indexOf(u.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),u={a:a[o],b:a[s],c:a[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var h="translate("+(w.x0+t)+","+(w.y0+e)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var f="translate("+-t+","+-e+")";w.clipDefRelative.select("path").attr("transform",f),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),P.emit("plotly_relayouting",I(u))}function V(){a.call("_guiRelayout",P,I(u))}T.onmousemove=function(t){g.hover(P,t,w.id),P._fullLayout._lasthover=T,P._fullLayout._hoversubplot=w.id},T.onmouseout=function(t){P._dragging||d.unhover(P,t)},d.init(z)}},{"../../components/color":593,"../../components/dragelement":611,"../../components/drawing":614,"../../components/fx":632,"../../components/titles":681,"../../lib":719,"../../lib/extend":710,"../../registry":847,"../cartesian/axes":767,"../cartesian/constants":773,"../cartesian/select":784,"../cartesian/set_convert":785,"../plots":828,d3:163,tinycolor2:537}],847:[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"),h=l.extendFlat,f=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 m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(h[p[r]].title={text:""});for(r=0;rpath, .legendlines>path, .cbfill").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,"TOBESTRIPPED"))}),"pdf"!==e&&"eps"!==e||f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(s.xmlns,"xmlns",s.svg),f.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(f.attr("width",r*d),f.attr("height",r*g),f.attr("viewBox","0 0 "+d+" "+g));var _=(new window.XMLSerializer).serializeToString(f.node());return _=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":593,"../components/drawing":614,"../constants/xmlns_namespaces":696,"../lib":719,d3:163}],856:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r0&&h.s>0||(c=!1)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:!c,padded:!0})}}function m(t){for(var e=t.traces,r=0;rh+c||!n(u))}for(var p=0;p0&&_.s>0||(m=!1)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:!m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],c=[],h=0;ha))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)?e2*v&&p>2*v?v:0;f-=2*d,p-=2*d;var g=!1;if(!("auto"===l)||u<=f&&h<=p||!(u>f||h>p)||(u>p||h>f)&&u2*v?v:0:f>2*v?v:0;var d=1;l&&(d=s?Math.min(1,p/h):Math.min(1,f/u));var g=y(c);o+=.5*(d*(s?h:u)*Math.abs(Math.sin(Math.PI/180*g))+d*(s?u:h)*Math.abs(Math.cos(Math.PI/180*g)));var x=(t+e)/2,b=(r+n)/2;return s?x=e-o*m(e,t):b=n+o*m(r,n),{textX:(i.left+i.right)/2,textY:(i.top+i.bottom)/2,targetX:x,targetY:b,scale:d,rotate:g}}function _(t){var e,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.scale,s=t.rotate;return o<1?e="scale("+o+") ":(o=1,e=""),"translate("+(i-o*r)+" "+(a-o*n)+")"+e+(s?"rotate("+s+" "+r+" "+n+") ":"")}e.exports={plot:function(t,e,r,p,y){var w=e.xaxis,k=e.yaxis,T=t._fullLayout;y||(y={mode:T.barmode,norm:T.barmode,gap:T.bargap,groupgap:T.bargroupgap});var A=a.makeTraceGroups(p,r,"trace bars").each(function(r){var c=n.select(this),p=r[0].trace,T="waterfall"===p.type,A="funnel"===p.type,M="bar"===p.type||A,S=0;T&&p.connector.visible&&"between"===p.connector.mode&&(S=p.connector.line.width/2);var E="h"===p.orientation,C=a.ensureSingle(c,"g","points").selectAll("g.point").data(a.identity);C.enter().append("g").classed("point",!0),C.exit().remove(),C.each(function(c,T){var A,C,L=n.select(this),P=function(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),n?[i,a]:[a,i]}(c,w,k,E),O=P[0][0],z=P[0][1],I=P[1][0],D=P[1][1],R=!(O!==z&&I!==D&&i(O)&&i(z)&&i(I)&&i(D));if(R&&M&&f.getLineWidth(p,c)&&(E?z-O==0:D-I==0)&&(R=!1),c.isBlank=R,S&&(E?(O-=m(O,z)*S,z+=m(O,z)*S):(I-=m(I,D)*S,D+=m(I,D)*S)),"waterfall"===p.type){if(!R){var F=p[c.dir].marker;A=F.line.width,C=F.color}}else A=f.getLineWidth(p,c),C=c.mc||p.marker.color;var B=n.round(A/2%1,2);function N(t){return 0===y.gap&&0===y.groupgap?n.round(Math.round(t)-B,2):t}if(!t._context.staticPlot){var j=s.opacity(C)<1||A>.01?N:function(t,e){return Math.abs(t-e)>=2?N(t):t>e?Math.ceil(t):Math.floor(t)};O=j(O,z),z=j(z,O),I=j(I,D),D=j(D,I)}a.ensureSingle(L,"path").style("vector-effect","non-scaling-stroke").attr("d",R?"M0,0Z":"M"+O+","+I+"V"+D+"H"+z+"V"+I+"Z").call(l.setClipUrl,e.layerClipId,t),function(t,e,r,n,i,s,c,p,m,y){var w,k=e.xaxis,T=e.yaxis,A=t._fullLayout;function M(e,r,n){var i=a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,transform:"","text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t);return i}var S=n[0].trace,E="h"===S.orientation,C=function(t,e,r,n){var i,o=t[0].trace;return i=o.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){var e=o?r:n;return u(e,+t,!0).text}var h,f,p=i.textinfo,d=t[e],g=p.split("+"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m("label")&&v.push((f=t[e].p,u(o?n:r,f,!0).text)),m("text")&&(0===(h=a.castOption(i,d.i,"text"))||h)&&v.push(h),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m("initial")&&v.push(c(b)),m("delta")&&v.push(c(y)),m("final")&&v.push(c(x))}if(l){m("value")&&v.push(c(d.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(h=a.formatPercent(d.begR),w&&(h+=" of initial"),v.push(h)),m("percent previous")&&(h=a.formatPercent(d.difR),w&&(h+=" of previous"),v.push(h)),m("percent total")&&(h=a.formatPercent(d.sumR),w&&(h+=" of total"),v.push(h))}return v.join("
")}(t,e,r,n):f.getValue(o.text,e),f.coerceString(d,i)}(n,i,k,T);w=function(t,e){var r=f.getValue(t.textposition,e);return f.coerceEnumerated(g,r)}(S,i);var L="stack"===y.mode||"relative"===y.mode,P=n[i],O=!L||P._outmost;if(C&&"none"!==w&&(!P.isBlank&&s!==c&&p!==m||"auto"!==w&&"inside"!==w)){var z=A.font,I=h.getBarColor(n[i],S),D=h.getInsideTextFont(S,i,z,I),R=h.getOutsideTextFont(S,i,z),F=r.datum();E?"log"===k.type&&F.s0<=0&&(s=k.range[0]0&&U>0,W=j<=H&&U<=G,X=j<=G&&U<=H,Z=E?H>=j*(G/U):G>=U*(H/j);Y&&(W||X||Z)?w="inside":(w="outside",B.remove(),B=null)}else w="inside";!B&&(B=M(r,C,"outside"===w?R:D),N=l.bBox(B.node()),j=N.width,U=N.height,j<=0||U<=0)?B.remove():("outside"===w?(q="both"===S.constraintext||"outside"===S.constraintext,V=_(b(s,c,p,m,N,{isHorizontal:E,constrained:q,angle:S.textangle}))):(q="both"===S.constraintext||"inside"===S.constraintext,V=_(x(s,c,p,m,N,{isHorizontal:E,constrained:q,angle:S.textangle,anchor:S.insidetextanchor}))),B.attr("transform",V))}else r.select("text").remove()}(t,e,L,r,T,O,z,I,D,y),e.layerClipId&&l.hideOutsideRangePoint(c,L.select("text"),w,k,p.xcalendar,p.ycalendar)});var L=!1===p.cliponaxis;l.setClipUrl(c,L?null:e.layerClipId,t)});c.getComponentMethod("errorbars","plot")(t,A,e)},getTransform:_,toMoveInsideBar:x,toMoveOutsideBar:b}},{"../../components/color":593,"../../components/drawing":614,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../registry":847,"./attributes":857,"./helpers":862,"./style":870,d3:163,"fast-isnumeric":225}],868:[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){p(n.select(this),e[0].trace,t)}),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:d,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.extendFlat({},g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)})}(t.selectAll("text"),e,r)}(r,i,t):(p(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:y,getBarColor:b}},{"../../components/color":593,"../../components/drawing":614,"../../lib":719,"../../registry":847,"./attributes":857,"./helpers":862,d3:163}],871:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":593,"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604}],872:[function(t,e,r){"use strict";var n=t("../../components/fx/hovertemplate_attributes"),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}},{"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../bar/attributes":857,"../scatterpolar/attributes":1179}],873:[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"),h=c.makeCalcdata(e,"theta"),f=e._length,p=new Array(f),d=u,g=h,v=0;vf.range[1]&&(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,h,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":632,"../../lib":719,"../../plots/polar/helpers":830,"../bar/hover":863,"../scatterpolar/hover":1182}],876:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":831,"../bar/select":868,"../bar/style":870,"../scatter/marker_colorbar":1129,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./layout_attributes":877,"./layout_defaults":878,"./plot":879}],877:[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"}}},{}],878:[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 h=s.findEnclosingVertexAngles(c,t.vangles)[0],f=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[h,(c+u)/2,f];return s.pathPolygonAnnulus(n,i,c,u,p,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,r,"trace bars").each(function(){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=h.c2g(t.p0),d=t.thetag1=h.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=f(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":614,"../../lib":719,"../../plots/polar/helpers":830,d3:163,"fast-isnumeric":225}],880:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../bar/attributes"),a=t("../../components/color/attributes"),o=t("../../components/fx/hovertemplate_attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},name:{valType:"string",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers",editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1,editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},c.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:s({},c.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,offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":592,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../bar/attributes":857,"../scatter/attributes":1112}],881:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=i._,o=t("../../plots/cartesian/axes");function s(t,e,r){var n={text:"tx",hovertext:"htx"};for(var i in n)Array.isArray(e[i])&&(t[n[i]]=e[i][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,h,f,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||"x"),v=o.getFromId(t,e.yaxis||"y"),m=[],y="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(u=g,h="x",f=v,p="y"):(u=v,h="y",f=g,p="x");var x,b=u.makeCalcdata(e,h),_=function(t,e,r,a,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+"0"in t?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||i.isDateTime(t.name)&&"date"===r.type)?t.name:o;var l="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]);return a.map(function(){return l})}(e,p,f,b,d[y]),w=i.distinctVals(_),k=w.vals,T=w.minDiff/2,A=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&Cx.uf};for(r=0;r0){var O=S[r].sort(l),z=O.map(c),I=z.length;(x={}).pos=k[r],x.pts=O,x[p]=x.pos,x[h]=x.pts.map(function(t){return t.v}),x.min=z[0],x.max=z[I-1],x.mean=i.mean(z,I),x.sd=i.stdev(z,I,x.mean),x.q1=i.interp(z,.25),x.med=i.interp(z,.5),x.q3=i.interp(z,.75),x.lf=Math.min(x.q1,z[Math.min(i.findBin(2.5*x.q1-1.5*x.q3,z,!0)+1,I-1)]),x.uf=Math.max(x.q3,z[Math.max(i.findBin(2.5*x.q3-1.5*x.q1,z),0)]),x.lo=4*x.q1-3*x.q3,x.uo=4*x.q3-3*x.q1;var D=1.57*(x.q3-x.q1)/Math.sqrt(I);x.ln=x.med-D,x.un=x.med+D,x.pts2=O.filter(P),m.push(x)}!function(t,e){if(i.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(m[0].t={num:d[y],dPos:T,posLetter:p,valLetter:h,labels:{med:a(t,"median:"),min:a(t,"min:"),q1:a(t,"q1:"),q3:a(t,"q3:"),max:a(t,"max:"),mean:"sd"===e.boxmean?a(t,"mean \xb1 \u03c3:"):a(t,"mean:"),lf:a(t,"lower fence:"),uf:a(t,"upper fence:")}},d[y]++,m):[{t:{empty:!0}}]}},{"../../lib":719,"../../plots/cartesian/axes":767,"fast-isnumeric":225}],882:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib"),a=t("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,h=e._fullLayout,f=o._id,p=f.charAt(0),d=[],g=0;for(s=0;s1,b=1-h[t+"gap"],_=1-h[t+"groupgap"];for(s=0;s0){var H=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;H+G>=0&&((W=V*(H+G))>M?(q=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;H-G<=0&&((X=-V*(H-G))>S?(q=!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;lt.lo&&(_.so=!0)}return a});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(a.translatePoints,l,c)}function u(t,e,r,a){var o,s,l=e.pos,c=e.val,u=a.bPos,h=a.bPosPxOffset||0,f=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+h,i=l.c2p(t.pos+u-o,!0)+h,a=l.c2p(t.pos+u+s,!0)+h,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+p+","+i+"V"+a+("sd"===f?"m0,0L"+d+","+e+"L"+p+","+i+"L"+g+","+e+"Z":"")):n.select(this).attr("d","M"+i+","+p+"H"+a+("sd"===f?"m0,0L"+e+","+d+"L"+i+","+p+"L"+e+","+g+"Z":""))})}e.exports={plot:function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each(function(t){var e,r,i=n.select(this),a=t[0],h=a.t,f=a.trace;h.wdPos=h.bdPos*f.whiskerwidth,!0!==f.visible||h.empty?i.remove():("h"===f.orientation?(e=s,r=o):(e=o,r=s),l(i,{pos:e,val:r},f,h),c(i,{x:o,y:s},f,h),u(i,{pos:e,val:r},f,h))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{"../../components/drawing":614,"../../lib":719,d3:163}],890:[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;var i=1/0;var a=-1/0;var o=e.length;for(var s=0;s0?Math.floor:Math.ceil,O=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,I=C>0?Math.max:Math.min,D=P(S+L),R=O(E-L),F=[[h=M(S)]];for(a=D;a*C=0;i--)a[u-i]=t[h][i],o[u-i]=e[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=t[i][0],o[h-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],904:[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,h,f,p,d,g,v,m,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,C=M.length,L=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function z(n){var i,a,o,s,l,c,u,h,p,d,g,v,m=[],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=L,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),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),m.push(h[0]-d[0]/3),y.push(h[1]-d[1]/3)),m.push(h[0]),y.push(h[1]),l=h;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=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),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,a-1,u,1),m.push(h[0]-v[0]/3),y.push(h[1]-v[1]/3)),m.push(h[0]),y.push(h[1]),l=h;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=f,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function I(n){var i,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=T.length,"b"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),h.xy=function(e){return t.evalxy([],e,n)},h.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;ix.length-1||_.push(i(I(o),{color:b.gridcolor,width:b.gridwidth}));for(f=u;fx.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],a=0;ax[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(I(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(I(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],h=c[1],f=u;f<=h;f++)p=b.tick0+b.dtick*f,_.push(i(z(p),{color:b.gridcolor,width:b.gridwidth}));for(f=u-1;fx[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":710,"../../plots/cartesian/axes":767}],905:[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}}},{}],919:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=t("../../constants/alignment");function h(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),h="M"+o(c,u,i.smoothing);n.select(this).attr("d",h).style("stroke-width",i.width).style("stroke",i.color).style("fill","none")}),u.exit().remove()}function f(t,e,r,a,o,c,u,h){var f=c.selectAll("text."+h).data(u);f.enter().append("text").classed(h,!0);var p=0,d={};return f.each(function(o,c){var u;if("auto"===o.axis.tickangle)u=s(a,e,r,o.xy,o.dxy);else{var h=(o.axis.tickangle+180)*Math.PI/180;u=s(a,e,r,o.xy,[Math.cos(h),Math.sin(h)])}c||(d={angle:u.angle,flip:u.flip});var f=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({"text-anchor":f>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),v=i.bBox(this);g.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*f+","+.3*v.height+")"),p=Math.max(p,v.width+o.axis.labelpadding)}),f.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(i,r,"trace").each(function(e){var r=n.select(this),i=e[0],d=i.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),h(l,u,x,v,"a",v._gridlines),h(l,u,x,m,"b",m._gridlines),h(l,u,y,v,"a",v._minorgridlines),h(l,u,y,m,"b",m._minorgridlines),h(l,u,b,v,"a-boundary",v._boundarylines),h(l,u,b,m,"b-boundary",m._boundarylines);var w=f(t,l,u,d,i,_,v._labels,"a-label"),k=f(t,l,u,d,i,_,m._labels,"b-label");!function(t,e,r,n,i,a,o,l){var u,h,f,p,d=c.aggNums(Math.min,null,r.a),v=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+v),h=m,f=r.ab2xy(u,h,!0),p=r.dxyda_rough(u,h),void 0===o.angle&&c.extendFlat(o,s(r,i,a,f,r.dxydb_rough(u,h)));g(t,e,r,n,f,p,r.aaxis,i,a,o,"a-title"),u=d,h=.5*(m+y),f=r.ab2xy(u,h,!0),p=r.dxydb_rough(u,h),void 0===l.angle&&c.extendFlat(l,s(r,i,a,f,r.dxyda_rough(u,h)));g(t,e,r,n,f,p,r.baxis,i,a,l,"b-title")}(t,_,d,i,l,u,w,k),function(t,e,r,n,i){var s,l,u,h,f=r.select("#"+t._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var p=c.ensureSingle(f,"path","carpetboundary"),d=e.clipsegments,g=[];for(h=0;h90&&v<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*p*a-x),y.attr("transform","translate("+e.p[0]+","+e.p[1]+") rotate("+e.angle+") translate(0,"+x+")").classed("user-select-none",!0).attr("text-anchor","middle").call(i.font,u.title.font)}),y.exit().remove()}},{"../../components/drawing":614,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"./makepath":916,"./map_1d_array":917,"./orient_text":918,d3:163}],920:[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,h=t.aaxis,f=t.baxis,p=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||ev},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,h.smoothing,f.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,h.smoothing,f.smoothing),t.dxydi=s([t._xctrl,t._yctrl],h.smoothing,f.smoothing),t.dxydj=l([t._xctrl,t._yctrl],h.smoothing,f.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 h,f,p,d,g=0,v=0,m=[];ne[c-1]?(h=c-2,f=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):f=o-(h=Math.max(0,Math.min(c-2,Math.floor(o)))),ir[u-1]?(p=u-2,d=1,v=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,h,p,f,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,h,p,f,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":738,"./compute_control_points":908,"./constants":909,"./create_i_derivative_evaluator":910,"./create_j_derivative_evaluator":911,"./create_spline_evaluator":912}],921:[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 h(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",T,"after",A,"iterations"),t}},{"../../lib":719}],922:[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":719}],923:[function(t,e,r){"use strict";var n=t("../../components/fx/hovertemplate_attributes"),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"},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()},a("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":592,"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../scattergeo/attributes":1151}],924:[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 h=0;h")}(t,h,o,f.mockAxis),[t]}},{"../../lib":719,"../../plots/cartesian/axes":767,"./attributes":923}],928:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),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"],meta:{}}},{"../../plots/geo":797,"../heatmap/colorbar":1004,"./attributes":923,"./calc":924,"./defaults":925,"./event_data":926,"./hover":927,"./plot":929,"./select":930,"./style":931}],929:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../lib/polygon"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("./style").style;function c(t,e){for(var r=t[0].trace,n=t.length,i=o(r,e),a=0;a0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===l||"FJI"===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;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 o=a.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(a.tester(t))},o.type){case"MultiPolygon":for(r=0;ro&&(o=c,e=l)}else e=r;return a.default(e).geometry.coordinates}(s),e.fIn=t,e.fOut=s,m.push(s)}else o.log(["Location with id",e.loc,"does not have a valid GeoJSON geometry,","choroplethmapbox traces only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete v[t.id]}switch(o.isArrayOrTypedArray(k.opacity)&&(x=function(t){var e=t.mo;return n(e)?+o.constrain(e,0,1):0}),o.isArrayOrTypedArray(T.color)&&(b=function(t){return t.mlc}),o.isArrayOrTypedArray(T.width)&&(_=function(t){return t.mlw}),d.type){case"FeatureCollection":var M=d.features;for(g=0;g=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":820,"./convert":933}],937:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach(function(t){l[t]=a[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,e.exports=l},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../mesh3d/attributes":1053}],938:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;c":h.value>f&&(s.prefixBoundary=!0);break;case"<":h.valuef)&&(s.prefixBoundary=!0);break;case"][":a=Math.min.apply(null,h.value),o=Math.max.apply(null,h.value),af&&(s.prefixBoundary=!0)}}},{}],945:[function(t,e,r){"use strict";var n=t("../../components/colorscale").extractOpts,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 h=n(e);r._fillgradient=e.colorscale,r._zrange=[h.min,h.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":605,"./end_plus":953,"./make_color_map":958}],946:[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}}},{}],947:[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,h){var f,p,d,g=e.contours,v=r("contours.operation");(g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===v?f=g.showlines=!0:(f=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),f)&&(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,h)}},{"../../components/color":593,"../../constants/filter_ops":691,"./label_defaults":957,"fast-isnumeric":225}],948:[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":691,"fast-isnumeric":225}],949:[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")}},{}],950:[function(t,e,r){"use strict";var n=t("../../lib");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),a=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":719,"./constraint_mapping":948,"./end_plus":953}],953:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],954:[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),d=[s(t,e,[-p[0],-p[1]])],g=p.join(","),v=t.z.length,m=t.z[0].length;for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],t.crossings[h]=i.SADDLEREMAINDER[f]):delete t.crossings[h],!(p=i.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}d.push(s(t,e,p)),e[0]+=p[0],e[1]+=p[1],a(d[d.length-1],d[d.length-2],o,l)&&d.pop(),h=e.join(",");var y=p[0]&&(e[0]<0||e[0]>m-2)||p[1]&&(e[1]<0||e[1]>v-2);if(h===u&&p.join(",")===g||r&&y)break;f=t.crossings[h]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,A,M,S,E,C,L,P,O,z,I=a(d[0],d[d.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]=C.concat(d,E));break}V||(t.edgepaths[M]=d.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,h,f=t[0].z,p=f.length,d=f[0].length,g=2===p||2===d;for(r=0;rt.level}return r?"M"+e.join("L")+"Z":""}(t,e),f=0,p=t.edgepaths.map(function(t,e){return e}),d=!0;function g(t){return Math.abs(t[1]-e[2][1])<.01}function v(t){return Math.abs(t[0]-e[0][0])<.01}function m(t){return Math.abs(t[0]-e[2][0])<.01}for(;p.length;){for(c=a.smoothopen(t.edgepaths[f],t.smoothing),h+=d?c:c.replace(/^M/,"L"),p.splice(p.indexOf(f),1),r=t.edgepaths[f][t.edgepaths[f].length-1],s=-1,o=0;o<4;o++){if(!r){i.log("Missing end?",f,t);break}for(u=r,Math.abs(u[1]-e[0][1])<.01&&!m(r)?n=e[1]:v(r)?n=e[0]:g(r)?n=e[3]:m(r)&&(n=e[2]),l=0;l=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;h+="L"+n}if(s===t.edgepaths.length){i.log("unclosed perimeter path");break}f=s,(d=-1===p.indexOf(f))&&(f=p[0],h+="Z")}for(f=0;fn.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(h)+Math.cos(c)*o);if(f<1||p<1)return 1/0;var d=v.EDGECOST*(1/(f-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var g=s-u,m=l-h,y=s+u,x=l+h,b=0;b2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),h=i*u,f=a*c,p=i*c,d=-a*u,g=[[o-h-f,s-p-d],[o+h-f,s+p-d],[o+h+f,s+p+d],[o-h+f,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,a,s){var l=t.selectAll("text").data(e,function(t){return t.text+","+t.x+","+t.y+","+t.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+i+")"}).call(o.convertToTspans,r)}),s){for(var c="",u=0;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,h=r.end,f=t._input.contours;if(u>h&&(r.start=f.start=h,h=r.end=f.end=u,u=r.start),!(r.size>0))c=u===h?1:a(u,h,t.ncontours).dtick,f.size=r.size=c}}},{"../../lib":719,"../../plots/cartesian/axes":767}],962:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("../heatmap/style"),o=t("./make_color_map");e.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",function(t){return t[0].trace.opacity}),e.each(function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u="constraint"===a.type,h=!u&&"lines"===a.coloring,f=!u&&"fill"===a.coloring,p=h||f?o(r):null;e.selectAll("g.contourlevel").each(function(t){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,h?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||(h?p(t.level):s.color)})}),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(f){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":614,"../heatmap/style":1013,"./make_color_map":958,d3:163}],963:[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":603,"./label_defaults":957}],964:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),i=t("../contour/attributes"),a=i.contours,o=t("../scatter/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../lib/extend").extendFlat,c=o.line;e.exports=l({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:a.type,start:a.start,end:a.end,size:a.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:a.operation,value:a.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:l({},c.color,{}),width:c.width,dash:c.dash,smoothing:l({},c.smoothing,{}),editType:"plot"},transforms:void 0},s("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":600,"../../lib/extend":710,"../contour/attributes":942,"../heatmap/attributes":1001,"../scatter/attributes":1112}],965:[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"),h=t("../carpet/lookup_carpetid"),f=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var 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,h,f,p,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,m,y,"a","b",["z"]);r=e._a=e._a||e.a,f=e._b=e._b||e.b,r=r?m.makeCalcdata(e,"_a"):[],f=f?y.makeCalcdata(e,"_b"):[],u=e.a0||0,h=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,h,x,m),w="scaled"===e.ytype?"":f,k=c(e,w,p,d,g.length,y),T={a:_,b:k,z:g};"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"});return[T]}(t,e);return f(e,e._z),g}}},{"../../components/colorscale/calc":601,"../../lib":719,"../carpet/lookup_carpetid":915,"../contour/set_contours":961,"../heatmap/clean_2d_array":1003,"../heatmap/convert_column_xyz":1005,"../heatmap/find_empties":1007,"../heatmap/interp2d":1010,"../heatmap/make_bound_array":1011,"./defaults":966}],966:[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":719,"../contour/constraint_defaults":947,"../contour/contours_defaults":949,"../contour/style_defaults":963,"../heatmap/xyz_defaults":1015,"./attributes":964}],967:[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"],meta:{}}},{"../../plots/cartesian":778,"../contour/colorbar":945,"../contour/style":962,"./attributes":964,"./calc":965,"./defaults":966,"./plot":970}],968:[function(t,e,r){"use strict";var n=t("../../components/drawing"),i=t("../carpet/axis_aligned_line"),a=t("../../lib");e.exports=function(t,e,r,o,s,l,c,u){var h,f,p,d,g,v,m,y="",x=e.edgepaths.map(function(t,e){return e}),b=!0,_=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(t){return Math.abs(t[1]-r[0][1])=0&&(p=C,g=v):Math.abs(f[1]-p[1])=0&&(p=C,g=v):a.log("endpt to newendpt is not vert. or horz.",f,p,C)}if(g>=0)break;y+=S(f,p),f=p}if(g===e.edgepaths.length){a.log("unclosed perimeter path");break}h=g,(b=-1===x.indexOf(h))&&(h=x[0],y+=S(f,p)+"Z",f=null)}for(h=0;h=0;U--)B=S.clipsegments[U],N=i([],B.x,w.c2p),j=i([],B.y,k.c2p),N.reverse(),j.reverse(),q.push(a(N,j,B.bicubic));var H="M"+q.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,h,f,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(f=0;fv&&(n.max=v);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*h.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/O),h.LABELMAX),a=0;a0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)k.push(_[u][0],_[u][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":d?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}},{"../../components/color":593,"../../components/colorscale":605,"../../constants/numerical":695,"../../lib":719,"../../lib/geojson_utils":714,"fast-isnumeric":225}],974:[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":603,"../../lib":719,"./attributes":971}],975:[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}},{}],976:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("../scattermapbox/hover");e.exports=function(t,e,r){var o=a(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 h=s.subplot.mockAxis;s.z=u.z,s.zLabel=i.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(t.hovertemplate)return;var i=(e.hi||t.hoverinfo).split("+"),a=-1!==i.indexOf("all"),o=-1!==i.indexOf("lon"),s=-1!==i.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}a||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(a||-1!==i.indexOf("text"))&&n.fillText(e,t,c);return c.join("
")}(c,u,l[0].t.labels),[s]}}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scattermapbox/hover":1175}],977:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),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":820,"./convert":973}],979:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.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}(c,h),[s]}}},{"../../components/color":593,"../../lib":719,"../bar/hover":863}],987:[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":778,"../bar/select":868,"./attributes":980,"./calc":981,"./cross_trace_calc":983,"./defaults":984,"./event_data":985,"./hover":986,"./layout_attributes":988,"./layout_defaults":989,"./plot":990,"./style":991}],988:[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"}}},{}],989:[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=l.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",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".regions").each(function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,l.connector.fillcolor)}),r.selectAll(".lines").each(function(){var t=l.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":593,"../../components/drawing":614,"../../constants/interactions":694,"../bar/style":870,d3:163}],992:[function(t,e,r){"use strict";var n=t("../pie/attributes"),i=t("../../plots/attributes"),a=t("../../plots/domain").attributes,o=t("../../components/fx/hovertemplate_attributes"),s=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:s({},n.marker.line.color,{dflt:null}),width:s({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:s({},n.scalegroup,{}),textinfo:s({},n.textinfo,{flags:["label","text","value","percent"]}),hoverinfo:s({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),textposition:s({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:s({},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"}}},{"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/domain":792,"../pie/attributes":1086}],993:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/get_data").getModuleCalcData;r.name="funnelarea",r.plot=function(t){var e=n.getModule("funnelarea"),r=i(t.calcdata,e)[0];e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has("funnelarea"),a=e._has&&e._has("funnelarea");i&&!a&&n._funnelarealayer.selectAll("g.trace").remove()}},{"../../plots/get_data":802,"../../registry":847}],994:[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":1088}],995:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText;e.exports=function(t,e,r,s){function l(r,a){return n.coerce(t,e,i,r,a)}var c,u=l("values"),h=n.isArrayOrTypedArray(u),f=l("labels");if(Array.isArray(f)?(c=f.length,h&&(c=Math.min(c,u.length))):h&&(c=u.length,l("label0"),l("dlabel")),c){e._length=c,l("marker.line.width")&&l("marker.line.color",s.paper_bgcolor),l("marker.colors"),l("scalegroup");var p=l("text"),d=l("textinfo",Array.isArray(p)?"text+percent":"percent");if(l("hovertext"),l("hovertemplate"),d&&"none"!==d){var g=l("textposition");o(t,e,s,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,s,l),l("title.text")&&(l("title.position"),n.coerceFont(l,"title.font",s.font)),l("aspectratio"),l("baseratio")}else e.visible=!1}},{"../../lib":719,"../../plots/domain":792,"../bar/defaults":861,"./attributes":992}],996:[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":1097,"./attributes":992,"./base_plot":993,"./calc":994,"./defaults":995,"./layout_attributes":997,"./layout_defaults":998,"./plot":999,"./style":1e3}],997:[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":1093}],998:[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":719,"./layout_attributes":997}],999:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("../../lib"),o=t("../../lib/svg_text_utils"),s=t("../bar/plot"),l=s.getTransform,c=s.toMoveInsideBar,u=t("../pie/helpers"),h=t("../pie/plot"),f=h.attachFxHandlers,p=h.determineInsideTextFont,d=h.layoutAreas,g=h.prerenderTitles,v=h.positionTitleOutside;function m(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;g(e,t),d(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,"trace").each(function(e){var s=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 h,f,p=[];for(p.push(u()),h=t.length-1;h>-1;h--)if(!(f=t[h]).hidden){var d=f.v/l;c+=d,p.push(u())}var g=1/0,v=-1/0;for(h=0;h-1;h--)if(!(f=t[h]).hidden){var A=p[T+=1][0],M=p[T][1];f.TL=[-A,M],f.TR=[A,M],f.BL=w,f.BR=k,f.pxmid=(S=f.TR,E=f.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=f.TL,k=f.TR}var S,E}(e),s.each(function(){var s=n.select(this).selectAll("g.slice").data(e);s.enter().append("g").classed("slice",!0),s.exit().remove(),s.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=d.index;var s=h.cx,g=h.cy,v=n.select(this),y=v.selectAll("path.surface").data([r]);y.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),v.call(f,t,e);var x="M"+(s+r.TR[0])+","+(g+r.TR[1])+m(r.TR,r.BR)+m(r.BR,r.BL)+m(r.BL,r.TL)+"Z";y.attr("d",x);var b=u.castOption(d.textposition,r.pts),_=v.selectAll("g.slicetext").data(r.text&&"none"!==b?[0]:[]);_.enter().append("g").classed("slicetext",!0),_.exit().remove(),_.each(function(){var e=a.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,p(d,r,t._fullLayout.font)).call(o.convertToTspans,t);var u,h,f,v=i.bBox(e.node()),m=Math.min(r.BL[1],r.BR[1]),y=Math.max(r.TL[1],r.TR[1]);h=Math.max(r.TL[0],r.BL[0]),f=Math.min(r.TR[0],r.BR[0]),u=l(c(h,f,m,y,v,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})),e.attr("transform","translate("+s+","+g+")"+u)})}});var g=n.select(this).selectAll("g.titletext").data(d.title.text?[0]:[]);g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each(function(){var e=a.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),s=d.title.text;d._meta&&(s=a.templateString(s,d._meta)),e.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,d.title.font).call(o.convertToTspans,t);var l=v(h,r._size);e.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")})})})}},{"../../components/drawing":614,"../../lib":719,"../../lib/svg_text_utils":743,"../bar/plot":867,"../pie/helpers":1091,"../pie/plot":1095,d3:163}],1000:[function(t,e,r){"use strict";var n=t("d3"),i=t("../pie/style_one");e.exports=function(t){t._fullLayout._funnelarealayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(i,t,e)})})}},{"../pie/style_one":1097,d3:163}],1001:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../../components/colorscale/attributes"),o=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},n.x,{impliedEdits:{xtype:"array"}}),x0:o({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},n.y,{impliedEdits:{ytype:"array"}}),y0:o({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},n.dy,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},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"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:i()},{transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../constants/docs":690,"../../lib/extend":710,"../scatter/attributes":1112}],1002:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("../histogram2d/calc"),s=t("../../components/colorscale/calc"),l=t("./convert_column_xyz"),c=t("./clean_2d_array"),u=t("./interp2d"),h=t("./find_empties"),f=t("./make_bound_array");e.exports=function(t,e){var r,p,d,g,v,m,y,x,b,_=a.getFromId(t,e.xaxis||"x"),w=a.getFromId(t,e.yaxis||"y"),k=n.traceIs(e,"contour"),T=n.traceIs(e,"histogram"),A=n.traceIs(e,"gl2d"),M=k?"best":e.zsmooth;if(_._minDtick=0,w._minDtick=0,T)r=(b=o(t,e)).x,p=b.x0,d=b.dx,g=b.y,v=b.y0,m=b.dy,y=b.z;else{var S=e.z;i.isArray1D(S)?(l(e,_,w,"x","y",["z"]),r=e._x,g=e._y,S=e._z):(r=e._x=e.x?_.makeCalcdata(e,"x"):[],g=e._y=e.y?w.makeCalcdata(e,"y"):[]),p=e.x0,d=e.dx,v=e.y0,m=e.dy,y=c(S,e,_,w),(k||e.connectgaps)&&(e._emptypoints=h(y),u(y,e._emptypoints))}function E(t){M=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: "fast": '+t)}if("fast"===M)if("log"===_.type||"log"===w.type)E("log axis found");else if(!T){if(r.length){var C=(r[r.length-1]-r[0])/(r.length-1),L=Math.abs(C/100);for(x=0;xL){E("x scale is not linear");break}}if(g.length&&"fast"===M){var P=(g[g.length-1]-g[0])/(g.length-1),O=Math.abs(P/100);for(x=0;xO){E("y scale is not linear");break}}}var z=i.maxRowLength(y),I="scaled"===e.xtype?"":r,D=f(e,I,p,d,z,_),R="scaled"===e.ytype?"":g,F=f(e,R,v,m,y.length,w);A||(e._extremes[_._id]=a.findExtremes(_,D),e._extremes[w._id]=a.findExtremes(w,F));var B={x:D,y:F,z:y,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(I&&I.length===D.length-1&&(B.xCenter=I),R&&R.length===F.length-1&&(B.yCenter=R),T&&(B.xRanges=b.xRanges,B.yRanges=b.yRanges,B.pts=b.pts),k||s(t,e,{vals:y,cLetter:"z"}),k&&e.contours&&"heatmap"===e.contours.coloring){var N={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};B.xfill=f(N,I,p,d,z,_),B.yfill=f(N,R,v,m,y.length,w)}return[B]}},{"../../components/colorscale/calc":601,"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":847,"../histogram2d/calc":1033,"./clean_2d_array":1003,"./convert_column_xyz":1005,"./find_empties":1007,"./interp2d":1010,"./make_bound_array":1011}],1003:[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,h,f;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,h=0;h=0;o--)(s=((h[[(r=(a=f[o])[0])-1,i=a[1]]]||g)[2]+(h[[r+1,i]]||g)[2]+(h[[r,i-1]]||g)[2]+(h[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],f.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{"../../lib":719}],1008:[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,c){var u,h,f,p,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,A=y,M=x;if(!1!==t.index){try{f=Math.round(t.index[1]),p=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||p<0||p>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(c){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(m=Math.max(m,Math.abs(t[a][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},{"../../lib":719}],1011:[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,h=[],f=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 f?e.slice(0,o):e.slice(0,o+1);if(f||d)h=e.slice(0,o);else if(1===o)h=[e[0]-.5,e[0]+.5];else{for(h=[1.5*e[0]-.5*e[1]],u=1;u0;)f=p.c2p(k[y]),y--;for(f0;)m=d.c2p(T[y]),y--;if(m0&&(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,f=-.1*e,p=t-f,d=r[0],g=r[1],v=Math.min(h(d+f,d+p,n,a),h(g+f,g+p,n,a)),m=Math.min(h(d+c,d+f,n,a),h(g+c,g+f,n,a));if(v>m&&mo){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)),I.start=r.l2r(j),F||i.nestedProperty(e,m+".start").set(I.start)}var U=b.end,V=r.r2l(z.end),q=void 0!==V;if((b.endFound||q)&&V!==r.r2l(U)){var H=q?V:i.aggNums(Math.max,null,d);I.end=r.l2r(H),q||i.nestedProperty(e,m+".start").set(I.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[m]=i.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[I,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],v=[],m=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=f(t,e,m,y),k=w[0],T=w[1],A="string"==typeof k.size,M=[],S=A?M:k,E=[],C=[],L=[],P=0,O=e.histnorm,z=e.histfunc,I=-1!==O.indexOf("density");_.enabled&&I&&(O=O.replace(/ ?density$/,""),I=!1);var D,R="max"===z||"min"===z?null:0,F=l.count,B=c[O],N=!1,j=function(t){return m.r2c(t,0,b)};for(i.isArrayOrTypedArray(e[x])&&"count"!==z&&(D=e[x],N="avg"===z,F=l[z]),r=j(k.start),p=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/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())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],J=0,K=X-1;for(r=0;r=J;r--)if(v[r]){K=r;break}for(r=J;r<=K;r++)if(n(g[r])&&n(v[r])){var $={p:g[r],s:v[r],b:0};_.enabled||($.pts=L[r],q?$.ph0=$.ph1=L[r].length?T[L[r][0]]:g[r]:($.ph0=U(M[r]),$.ph1=U(M[r+1],!0))),Z.push($)}return 1===Z.length&&(Z[0].width1=o.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),s(Z,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Z,e,Y),Z},calcAllAutoBins:f}},{"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":847,"../bar/arrays_to_calcdata":856,"./average":1020,"./bin_functions":1022,"./bin_label_vals":1023,"./norm_functions":1031,"fast-isnumeric":225}],1025:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1026:[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=i.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,h,f,p,d,g,v,m=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 k(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=m[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&&(m[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+"calendar"]||""}),t["_"+a+"bingroup"]=r}for(d=0;dS&&k.splice(S,k.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],L=[],P="string"==typeof w.size,O="string"==typeof A.size,z=[],I=[],D=P?z:w,R=O?I:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf("density"),q="max"===U||"min"===U?null:0,H=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,H=a[U]);var J=w.size,K=x(w.start),$=x(w.end)+(K-i.tickIncrement(K,J,!1,m))/1e6;for(r=K;r<$;r=i.tickIncrement(r,J,!1,m))C.push(q),z.push(r),Y&&L.push(0);z.push(r);var Q,tt=C.length,et=(r-K)/tt,rt=(Q=K+et/2,g.c2r(Q,0,m)),nt=A.size,it=b(A.start),at=b(A.end)+(it-i.tickIncrement(it,nt,!1,y))/1e6;for(r=it;r=0&&p=0&&d0}function x(t){t.each(function(t){d.stroke(n.select(this),t.line.color)}).each(function(t){d.fill(n.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function b(t,e,r){var n=t._fullLayout,a=i.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return i.coerce(a,o,p,t,e)}return h(a,o,l,s,n),f(a,o,l,s),o}function _(t,e){return"translate("+t+","+e+")"}function w(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(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(c.convertToTspans,i).call(s.font,e),s.bBox(o.node())}function T(t,e,r,n,a,o){var s="_cache"+e;t[s]&&t[s].key===a||(t[s]={key:a,value:r});var l=i.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,h){var f,p=t._fullLayout;y(r)&&h&&(f=h()),i.makeTraceGroups(p._indicatorlayer,e,"trace").each(function(e){var h,A,M,S,E,C=e[0].trace,L=n.select(this),P=C._hasGauge,O=C._isAngular,z=C._isBullet,I=C.domain,D={w:p._size.w*(I.x[1]-I.x[0]),h:p._size.h*(I.y[1]-I.y[0]),l:p._size.l+p._size.w*I.x[0],r:p._size.r+p._size.w*(1-I.x[1]),t:p._size.t+p._size.h*(1-I.y[1]),b:p._size.b+p._size.h*I.y[0]},R=D.l+D.w/2,F=D.t+D.h/2,B=Math.min(D.w/2,D.h),N=l.innerRadius*B,j=C.align||"center";if(A=F,P){if(O&&(h=R,A=F+B/2,M=function(t){return e=t,r=.9*N,n=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),[r/n,e,r];var e,r,n}),z){var U=l.bulletPadding,V=1-l.bulletNumberDomainSize+U;h=D.l+(V+(1-V)*v[j])*D.w,M=function(t){return w(t,(l.bulletNumberDomainSize-U)*D.w,D.h)}}}else h=D.l+v[j]*D.w,M=function(t){return w(t,D.w,D.h)};!function(t,e,r,a){var o,l,h,f=r[0].trace,p=a.numbersX,x=a.numbersY,w=f.align||"center",A=g[w],M=a.transitionOpts,S=a.onComplete,E=i.ensureSingle(e,"g","numbers"),C=[];f._hasNumber&&C.push("number");f._hasDelta&&(C.push("delta"),"left"===f.delta.position&&C.reverse());var L=E.selectAll("text").data(C);function P(e,r,n,i){if(!e.match("s")||n>=0==i>=0||r(n).slice(-1).match(m)||r(i).slice(-1).match(m))return r;var a=e.slice().replace("s","f").replace(/\d+/,function(t){return parseInt(t)-1}),o=b(t,{tickformat:a});return function(t){return Math.abs(t)<1?u.tickText(o,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",function(){return A}).attr("class",function(t){return t}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var O,z=f.mode+f.align;f._hasDelta&&(O=function(){var e=b(t,{tickformat:f.delta.valueformat},f._range);e.setScale(),u.calcTicks(e);var i=function(t){return u.tickText(e,t).text},a=function(t){var e=f.delta.relative?t.relativeDelta:t.delta;return e},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?f.delta.increasing.symbol:f.delta.decreasing.symbol)+e(t)},h=function(t){return t.delta>=0?f.delta.increasing.color:f.delta.decreasing.color};void 0===f._deltaLastValue&&(f._deltaLastValue=a(r[0]));var p=E.select("text.delta");function g(){p.text(o(a(r[0]),i)).call(d.fill,h(r[0])).call(c.convertToTspans,t)}p.call(s.font,f.delta.font).call(d.fill,h({delta:f._deltaLastValue})),y(M)?p.transition().duration(M.duration).ease(M.easing).tween("text",function(){var t=n.select(this),e=a(r[0]),s=f._deltaLastValue,l=P(f.delta.valueformat,i,s,e),c=n.interpolateNumber(s,e);return f._deltaLastValue=e,function(e){t.text(o(c(e),l)),t.call(d.fill,h({delta:c(e)}))}}).each("end",function(){g(),S&&S()}).each("interrupt",function(){g(),S&&S()}):g();return l=k(o(a(r[0]),i),f.delta.font,A,t),p}(),z+=f.delta.position+f.delta.font.size+f.delta.font.family+f.delta.valueformat,z+=f.delta.increasing.symbol+f.delta.decreasing.symbol,h=l);f._hasNumber&&(!function(){var e=b(t,{tickformat:f.number.valueformat},f._range);e.setScale(),u.calcTicks(e);var i=function(t){return u.tickText(e,t).text},a=f.number.suffix,l=f.number.prefix,h=E.select("text.number");function p(){var e="number"==typeof r[0].y?l+i(r[0].y)+a:"-";h.text(e).call(s.font,f.number.font).call(c.convertToTspans,t)}y(M)?h.transition().duration(M.duration).ease(M.easing).each("end",function(){p(),S&&S()}).each("interrupt",function(){p(),S&&S()}).attrTween("text",function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);f._lastValue=r[0].y;var o=P(f.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(l+o(e(r))+a)}}):p();o=k(l+i(r[0].y)+a,f.number.font,A,t)}(),z+=f.number.font.size+f.number.font.family+f.number.valueformat+f.number.suffix+f.number.prefix,h=o);if(f._hasDelta&&f._hasNumber){var I,D,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=.75*f.delta.font.size;"left"===f.delta.position&&(I=T(f,"deltaPos",0,-1*(o.width*v[f.align]+l.width*(1-v[f.align])+B),z,Math.min),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:l.left+I,right:o.right,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"right"===f.delta.position&&(I=T(f,"deltaPos",0,o.width*(1-v[f.align])+l.width*v[f.align]+B,z,Math.max),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:o.left,right:l.right+I,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"bottom"===f.delta.position&&(I=null,D=l.height,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height,bottom:o.bottom+l.height}),"top"===f.delta.position&&(I=null,D=o.top,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height-l.height,bottom:o.bottom}),O.attr({dx:I,dy:D})}(f._hasNumber||f._hasDelta)&&E.attr("transform",function(){var t=a.numbersScaler(h);z+=t[2];var e,r=T(f,"numbersScale",1,t[0],z,Math.min);f._scaleNumbers||(r=1),e=f._isAngular?x-r*h.bottom:x-r*(h.top+h.bottom)/2,f._numbersTop=r*h.top+e;var n=h[w];"center"===w&&(n=(h.left+h.right)/2);var i=p-r*n;return _(i=T(f,"numbersTranslate",0,i,z,Math.max),e)+" scale("+r+")"})}(t,L,e,{numbersX:h,numbersY:A,numbersScaler:M,transitionOpts:r,onComplete:f}),P&&(S={range:C.gauge.axis.range,color:C.gauge.bgcolor,line:{color:C.gauge.bordercolor,width:0},thickness:1},E={range:C.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:C.gauge.bordercolor,width:C.gauge.borderwidth},thickness:1});var q=L.selectAll("g.angular").data(O?e:[]);q.exit().remove();var H=L.selectAll("g.angularaxis").data(O?e:[]);H.exit().remove(),O&&function(t,e,r,i){var s,l,c,h,f=r[0].trace,p=i.size,d=i.radius,g=i.innerRadius,v=i.gaugeBg,m=i.gaugeOutline,w=[p.l+p.w/2,p.t+p.h/2+d/2],k=i.gauge,T=i.layer,A=i.transitionOpts,M=i.onComplete,S=Math.PI/2;function E(t){var e=f.gauge.axis.range[0],r=f.gauge.axis.range[1],n=(t-e)/(r-e)*Math.PI-S;return n<-S?-S:n>S?S:n}function C(t){return n.svg.arc().innerRadius((g+d)/2-t/2*(d-g)).outerRadius((g+d)/2+t/2*(d-g)).startAngle(-S)}function L(t){t.attr("d",function(t){return C(t.thickness).startAngle(E(t.range[0])).endAngle(E(t.range[1]))()})}k.enter().append("g").classed("angular",!0),k.attr("transform",_(w[0],w[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),(s=b(t,f.gauge.axis)).type="linear",s.range=f.gauge.axis.range,s._id="xangularaxis",s.setScale();var P=function(t){return(s.range[0]-t.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},O={},z=u.makeLabelFns(s,0).labelStandoff;O.xFn=function(t){var e=P(t);return Math.cos(e)*z},O.yFn=function(t){var e=P(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*o)},O.anchorFn=function(t){var e=P(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},O.heightFn=function(t,e,r){var n=P(t);return-.5*(1+Math.sin(n))*r};var I=function(t){return _(w[0]+d*Math.cos(t),w[1]-d*Math.sin(t))};c=function(t){return I(P(t))};if(l=u.calcTicks(s),h=u.getTickSigns(s)[2],s.visible){h="inside"===s.ticks?-1:1;var D=(s.linewidth||1)/2;u.drawTicks(t,s,{vals:l,layer:T,path:"M"+h*D+",0h"+h*s.ticklen,transFn:function(t){var e=P(t);return I(e)+"rotate("+-a(e)+")"}}),u.drawLabels(t,s,{vals:l,layer:T,transFn:c,labelFns:O})}var R=[v].concat(f.gauge.steps),F=k.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(x),F.exit().remove();var B=C(f.gauge.bar.thickness),N=k.selectAll("g.value-arc").data([f.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j=N.select("path");y(A)?(j.transition().duration(A.duration).ease(A.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()}).attrTween("d",(U=B,V=E(r[0].lastY),q=E(r[0].y),function(){var t=n.interpolate(V,q);return function(e){return U.endAngle(t(e))()}})),f._lastValue=r[0].y):j.attr("d","number"==typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var U,V,q;j.call(x),N.exit().remove(),R=[];var H=f.gauge.threshold.value;H&&R.push({range:[H,H],color:f.gauge.threshold.color,line:{color:f.gauge.threshold.line.color,width:f.gauge.threshold.line.width},thickness:f.gauge.threshold.thickness});var G=k.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(x),G.exit().remove();var Y=k.selectAll("g.gauge-outline").data([m]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(L).call(x),Y.exit().remove()}(t,0,e,{radius:B,innerRadius:N,gauge:q,layer:H,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var G=L.selectAll("g.bullet").data(z?e:[]);G.exit().remove();var Y=L.selectAll("g.bulletaxis").data(z?e:[]);Y.exit().remove(),z&&function(t,e,r,n){var i,a,o,s,c,h=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,_=h.domain,w=n.transitionOpts,k=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform","translate("+m.l+", "+m.t+")"),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var T=m.h,A=h.gauge.bar.thickness*T,M=_.x[0],S=_.x[0]+(_.x[1]-_.x[0])*(h._hasNumber||h._hasDelta?1-l.bulletNumberDomainSize:1);(i=b(t,h.gauge.axis))._id="xbulletaxis",i.domain=[M,S],i.setScale(),a=u.calcTicks(i),o=u.makeTransFn(i),s=u.getTickSigns(i)[2],c=m.t+m.h,i.visible&&(u.drawTicks(t,i,{vals:"inside"===i.ticks?u.clipEnds(i,a):a,layer:p,path:u.makeTickPath(i,c,s),transFn:o}),u.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:u.makeLabelFns(i,c)}));function E(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)*T}).attr("height",function(t){return t.thickness*T})}var C=[g].concat(h.gauge.steps),L=f.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(x),L.exit().remove();var P=f.selectAll("g.value-bullet").data([h.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",A).attr("y",(T-A)/2).call(x),y(w)?P.select("rect").transition().duration(w.duration).ease(w.easing).each("end",function(){k&&k()}).each("interrupt",function(){k&&k()}).attr("width",Math.max(0,i.c2p(Math.min(h.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(h.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var O=r.filter(function(){return h.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(h.gauge.threshold.value)).attr("x2",i.c2p(h.gauge.threshold.value)).attr("y1",(1-h.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-h.gauge.threshold.thickness)/2)*T).call(d.stroke,h.gauge.threshold.line.color).style("stroke-width",h.gauge.threshold.line.width),z.exit().remove();var I=f.selectAll("g.gauge-outline").data([v]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(E).call(x),I.exit().remove()}(t,0,e,{gauge:G,layer:Y,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var W=L.selectAll("text.title").data(e);W.exit().remove(),W.enter().append("text").classed("title",!0),W.attr("text-anchor",function(){return z?g.right:g[C.title.align]}).text(C.title.text).call(s.font,C.title.font).call(c.convertToTspans,t),W.attr("transform",function(){var t,e=D.l+D.w*v[C.title.align],r=l.titlePadding,n=s.bBox(W.node());if(P){if(O)if(C.gauge.axis.visible)t=s.bBox(H.node()).top-r-n.bottom;else t=D.t+D.h/2-B/2-n.bottom-r;z&&(t=A-(n.top+n.bottom)/2,e=D.l-l.bulletPadding*D.w)}else t=C._numbersTop-r-n.bottom;return _(e,t)})})}},{"../../components/color":593,"../../components/drawing":614,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"./constants":1044,d3:163}],1048:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;var c=e.exports=l(s({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:i()},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764,"../mesh3d/attributes":1053}],1049:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length);for(var r=1/0,i=-1/0,a=e.value.length,o=0;o0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function D(t,e){return null===t?e:t}function R(e,r,n){C();var i,a,o,s=[r],l=[n];if(k>=1)s=[r],l=[n];else if(k>0){var c=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]:E(d,g,v);f[p]=y>-1?y:P(d,g,v,D(e,m))}i=f[0],a=f[1],o=f[2],t._i.push(i),t._j.push(a),t._k.push(o),++h}}function F(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 B(t,e,r){return t>=e&&t<=r}function N(t){var e=.001*(S-M);return t>=M-e&&t<=S+e}function j(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}var U=3;function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[B(e[0][3],n,i),B(e[1][3],n,i),B(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return N(e[0][3])&&N(e[1][3])&&N(e[2][3])?(R(t,e,r),!0):aMath.abs(k-A)?[T,k]:[k,A];Q(e,E[0],E[1])}}var C=[[Math.min(M,A),Math.max(M,A)],[Math.min(T,S),Math.max(T,S)]];["x","y","z"].forEach(function(e){for(var r=[],n=0;n0&&(c.push(x.id),"x"===e?h.push([x.distRatio,0,0]):"y"===e?h.push([0,x.distRatio,0]):h.push([0,0,x.distRatio]))}else l=nt(1,"x"===e?g-1:"y"===e?v-1:m-1);c.length>0&&(r[i]="x"===e?tt(null,c,a,o,h,r[i]):"y"===e?et(null,c,a,o,h,r[i]):rt(null,c,a,o,h,r[i]),i++),l.length>0&&(r[i]="x"===e?Z(null,l,a,o,r[i]):"y"===e?J(null,l,a,o,r[i]):K(null,l,a,o,r[i]),i++)}var b=t.caps[e];b.show&&b.fill&&(z(b.fill),r[i]="x"===e?Z(null,[0,g-1],a,o,r[i]):"y"===e?J(null,[0,v-1],a,o,r[i]):K(null,[0,m-1],a,o,r[i]),i++)}}),0===h&&L(),t._x=x,t._y=b,t._z=_,t._intensity=w,t._Xs=f,t._Ys=p,t._Zs=d}(),t}f.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._x[e],n=this.data._y[e],i=this.data._z[e],a=this.data._Ys.length,o=this.data._Zs.length,s=u(r,this.data._Xs).id,l=u(n,this.data._Ys).id,c=u(i,this.data._Zs).id,h=t.index=c+o*l+o*a*s;t.traceCoordinate=[this.data._x[h],this.data._y[h],this.data._z[h],this.data.value[h]];var f=this.data.hovertext||this.data.text;return Array.isArray(f)&&void 0!==f[h]?t.textLabel=f[h]:f&&(t.textLabel=f),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=p(t);var i={positions:l(n(r.xaxis,t._x,e.dataScale[0],t.xcalendar),n(r.yaxis,t._y,e.dataScale[1],t.ycalendar),n(r.zaxis,t._z,e.dataScale[2],t.zcalendar)),cells:l(t._i,t._j,t._k),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:o(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},c=s(t);i.vertexIntensity=t._intensity,i.vertexIntensityBounds=[c.min,c.max],i.colormap=a(t),this.mesh.update(i)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports={findNearestOnAxis:u,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{"../../components/colorscale":605,"../../lib":719,"../../lib/gl_format_color":716,"../../lib/str2rgbarray":742,"../../plots/gl3d/zip3":818,"gl-mesh3d":280}],1051:[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"),h=a("z"),f=a("value");c&&c.length&&u&&u.length&&h&&h.length&&f&&f.length?(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach(function(t){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,0,i,function(r,i){return n.coerce(t,e,a,r,i)})},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":603,"../../lib":719,"../../registry":847,"./attributes":1048}],1052:[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"],meta:{}}},{"../../plots/gl3d":807,"./attributes":1048,"./calc":1049,"./convert":1050,"./defaults":1051}],1053:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../components/fx/hovertemplate_attributes"),a=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:"calc"},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"})})},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../surface/attributes":1224}],1054:[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":601}],1055:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),i=t("delaunay-triangulate"),a=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function h(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,h=t.x.length,f=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||!v(t.i,h)||!v(t.j,h)||!v(t.k,h))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(f):t.alphahull>0?a(t.alphahull,f):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;ov):g=k>b,v=k;var T=l(b,_,w,k);T.pos=x,T.yc=(b+k)/2,T.i=y,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[w,_],p&&(T.tx=e.text[y]),d&&(T.htx=e.hovertext[y]),m.push(T)}else m.push({pos:x,empty:!0})}return e._extremes[s._id]=a.findExtremes(s,n.concat(h,u),{padded:!0}),m.length&&(m[0].t={labels:{open:i(t,"open:")+" ",high:i(t,"high:")+" ",low:i(t,"low:")+" ",close:i(t,"close:")+" "}}),m}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),o=function(t,e,r){var i=r._minDiff;if(!i){var a,o=t._fullData,s=[];for(i=1/0,a=0;a"+c.labels[x]+n.hoverLabelText(s,b):((y=i.extendFlat({},f)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",h.push(y),v[b]=y)}return h}function f(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,h=a[0].t,f=u(t,e,r,i);if(!f)return[];var p=a[f.index],d=f.index=p.i,g=p.dir;function v(t){return h.labels[t]+n.hoverLabelText(o,l[t][d])}var m=p.hi||l.hoverinfo,y=m.split("+"),x="all"===m,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[v("open"),v("high"),v("low"),v("close")+" "+c[g]]:[];return _&&s(p,l,w),f.extraText=w.join("
"),f.y0=f.y1=o.c2p(p.yc,!0),[f]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?h(t,e,r,n):f(t,e,r,n)},hoverSplit:h,hoverOnPoints:f}},{"../../components/color":593,"../../components/fx":632,"../../constants/delta.js":689,"../../lib":719,"../../plots/cartesian/axes":767}],1062:[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":778,"./attributes":1058,"./calc":1059,"./defaults":1060,"./hover":1061,"./plot":1064,"./select":1065,"./style":1066}],1063:[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 h=Math.min(s.length,l.length,c.length,u.length);return o&&(h=Math.min(h,i.minRowLength(o))),e._length=h,h}}},{"../../lib":719,"../../registry":847}],1064:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib");e.exports=function(t,e,r,a){var o=e.xaxis,s=e.yaxis;i.makeTraceGroups(a,r,"trace ohlc").each(function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var l=a.tickLen,c=e.selectAll("path").data(i.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",function(t){if(t.empty)return"M0,0Z";var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-l,!0),n=o.c2p(t.pos+l,!0);return"M"+r+","+s.c2p(t.o,!0)+"H"+e+"M"+e+","+s.c2p(t.h,!0)+"V"+s.c2p(t.l,!0)+"M"+n+","+s.c2p(t.c,!0)+"H"+e})}})}},{"../../lib":719,d3:163}],1065:[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,h){function f(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,h,f);o(e,h,f),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,"values",d),f("hoveron"),f("hovertemplate"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var g={family:h.font.family,size:Math.round(h.font.size),color:h.font.color};n.coerceFont(f,"labelfont",g);var v={family:h.font.family,size:Math.round(h.font.size/1.2),color:h.font.color};n.coerceFont(f,"tickfont",v)}},{"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/domain":792,"../parcoords/merge_length":1083,"./attributes":1067}],1071:[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":1067,"./base_plot":1068,"./calc":1069,"./defaults":1070,"./plot":1073}],1072:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plot_api/plot_api"),a=t("../../components/fx"),o=t("../../lib"),s=t("../../components/drawing"),l=t("tinycolor2"),c=t("../../lib/svg_text_utils");function u(t,e,r,i){var a=t.map(function(t,e,r){var n,i=r[0],a=e.margin||{l:80,r:80,t:100,b:80},o=i.trace,s=o.domain,l=e.width,c=e.height,u=Math.floor(l*(s.x[1]-s.x[0])),h=Math.floor(c*(s.y[1]-s.y[0])),f=s.x[0]*l+a.l,p=e.height-s.y[1]*e.height+a.t,d=o.line.shape;n="all"===o.hoverinfo?["count","probability"]:(o.hoverinfo||"").split("+");var g={trace:o,key:o.uid,model:i,x:f,y:p,width:u,height:h,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:a,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};i.dimensions&&(R(g),D(g));return g}.bind(0,e,r)),l=i.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(a,h),v=u.enter().append("g").attr("class","trace parcats");u.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"}),v.append("g").attr("class","paths");var x=u.select("g.paths").selectAll("path.path").data(function(t){return t.paths},h);x.attr("fill",function(t){return t.model.color});var w=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(t){return t.model.color}).attr("fill-opacity",0);y(w),x.attr("d",function(t){return t.svgD}),w.empty()||x.sort(p),x.exit().remove(),x.on("mouseover",d).on("mouseout",g).on("click",m),v.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data(function(t){return t.dimensions},h);k.enter().append("g").attr("class","dimension"),k.attr("transform",function(t){return"translate("+t.x+", 0)"}),k.exit().remove();var T=k.selectAll("g.category").data(function(t){return t.categories},h),A=T.enter().append("g").attr("class","category");T.attr("transform",function(t){return"translate(0, "+t.y+")"}),A.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),b(A);var P=T.selectAll("rect.bandrect").data(function(t){return t.bands},h);P.each(function(){o.raiseToTop(this)}),P.attr("fill",function(t){return t.color});var O=P.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(t){return t.color}).attr("fill-opacity",0);P.attr("fill",function(t){return t.color}).attr("width",function(t){return t.width}).attr("height",function(t){return t.height}).attr("y",function(t){return t.y}).attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"}),_(O),P.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var z=e._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",function(t){return f(t)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",z+" -1px 1px 2px, "+z+" 1px 1px 2px, "+z+" 1px -1px 2px, "+z+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",function(t){return f(t)?t.width+5:-5}).attr("y",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)}),A.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(t){return t.width/2}).attr("y",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)}),T.selectAll("rect.bandrect").on("mouseover",M).on("mouseout",S),T.exit().remove(),k.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on("dragstart",E).on("drag",C).on("dragend",L)),u.each(function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),u.exit().remove()}function h(t){return t.key}function f(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function p(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),S=n.mouse(u)[0];a.loneHover({trace:h,x:y-p.left+d.left,y:b-p.top+d.top,text:M,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_,idealAlign:S1&&c.displayInd===l.dimensions.length-1?(r=o.left,i="left"):(r=o.left+o.width,i="right");var f=s.model.count,p=s.model.categoryLabel,d=f/s.parcatsViewModel.model.count,g={countLabel:f,categoryLabel:p,probabilityLabel:d.toFixed(3)},v=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&v.push(["Count:",g.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&v.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var m=v.join("
");return{trace:u,x:r-t.left,y:h-t.top,text:m,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:i,hovertemplate:u.hovertemplate,hovertemplateLabels:g,eventData:[{data:u._input,fullData:u,count:f,category:p,probability:d}]}}function M(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;if("color"===c?(!function(t){var e=n.select(t).datum(),r=w(e);x(r),r.each(function(){o.raiseToTop(this)}),n.select(t.parentNode).selectAll("rect.bandrect").filter(function(t){return t.color===e.color}).each(function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),T(this,"plotly_hover",n.event)):(!function(t){n.select(t.parentNode).selectAll("rect.bandrect").each(function(t){var e=w(t);x(e),e.each(function(){o.raiseToTop(this)})}),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),k(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===c?e=A(s,this):"color"===c?e=function(t,e){var r,i,a=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],h=c.trace,f=a.y+a.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=a.left,i="left"):(r=a.left+a.width,i="right");var p=s.model.categoryLabel,d=o.parcatsViewModel.model.count,g=0;o.categoryViewModel.bands.forEach(function(t){t.color===o.color&&(g+=t.count)});var v=s.model.count,m=0;c.pathSelection.each(function(t){t.model.color===o.color&&(m+=t.model.count)});var y=g/d,x=g/m,b=g/v,_={countLabel:d,categoryLabel:p,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color \u2229 "+p+"): "+_.probabilityLabel),w.push("P("+p+" | color): "+x.toFixed(3)),w.push("P(color | "+p+"): "+b.toFixed(3)));var k=w.join("
"),T=l.mostReadable(o.color,["black","white"]);return{trace:h,x:r-t.left,y:f-t.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:T,fontSize:10,idealAlign:i,hovertemplate:h.hovertemplate,hovertemplateLabels:_,eventData:[{data:h._input,fullData:h,category:p,count:d,probability:y,categorycount:v,colorcount:m,bandcolorcount:g}]}}(s,this):"dimension"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){r.push(A(t,this))}),r}(s,this)),e&&a.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function S(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(y(e.pathSelection),b(e.dimensionSelection.selectAll("g.category")),_(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(p),-1===e.hoverinfoItems.indexOf("skip"))){"color"===t.parcatsViewModel.hoveron?T(this,"plotly_unhover",n.event):k(this,"plotly_unhover",n.event)}}function E(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each(function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each(function(e){e.yh.y+h.height/2&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var f=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==f&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}R(t.parcatsViewModel),D(t.parcatsViewModel),z(t.parcatsViewModel),O(t.parcatsViewModel)}}function L(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=P(t.parcatsViewModel),a=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),o=t.initialDragDimensionDisplayInds.some(function(t,e){return t!==a[e]});o&&a.forEach(function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+i+"].displayindex"]=r});var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map(function(t){return t.displayInd});if(s=t.initialDragCategoryDisplayInds.some(function(t,e){return t!==l[e]})){var c=t.model.categories.slice().sort(function(t,e){return t.displayInd-e.displayInd}),u=c.map(function(t){return t.categoryValue}),h=c.map(function(t){return t.categoryLabel});e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[h],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?T(t.potentialClickBand,"plotly_click",n.event.sourceEvent):k(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,R(t.parcatsViewModel),D(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each(function(){z(t.parcatsViewModel,!0),O(t.parcatsViewModel,!0)}).each("end",function(){(o||s)&&i.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function P(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+i)+" "+l[s]+","+(e[s]+i)+" "+(t[s]+r[s])+","+(e[s]+i),u+="l-"+r[s]+",0 ";return u+="Z"}function D(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),i=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),a=t.model.dimensions.map(function(t){return t.displayInd}),o=t.dimensions.map(function(t){return t.model.dimensionInd}),s=e.map(function(t){return t.x}),l=e.map(function(t){return t.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(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=h(e),i=h(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 f=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*(m.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=[],h=t.model.maxCats,f=e.categories.length,p=e.count,d=t.height-8*(h-1),g=8*(h-f)/2,v=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(v.sort(function(t,e){return t.displayInd-e.displayInd}),c=0;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){u(r,t,n,e)}},{"../../components/drawing":614,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"../../plot_api/plot_api":754,d3:163,tinycolor2:537}],1073:[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":1072}],1074:[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:"number",editType:"plot"},{valType:"number",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":600,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/layout_attributes":779,"../../plots/domain":792,"../../plots/font_attributes":793}],1075:[function(t,e,r){"use strict";var n=t("./constants"),i=t("d3"),a=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function h(t,e){return t*(1-u)+e*u}function f(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],u=l,f=a;i*fe){f=r;break}}if(a=u,isNaN(a)&&(a=isNaN(h)||isNaN(f)?isNaN(h)?f:h:e-c[h][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 _(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),x(t.parentNode)}function w(t,e){var r=b(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||w(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||m()}).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=b(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){_(this,t)}).on("dragend",function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(w(t,e),_(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,m(),!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&&A(r)):A(r),a.brushCallback(e),x(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||A(r),a.brushCallback(e),c?x(t.parentNode,s):(s(),x(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)}))}function T(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function M(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map(function(t){return t.slice().sort(s)}).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=M(r),e=r.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map(function(t){return t.slice()})}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,a);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(p).call(d).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),e.call(k).attr("height",function(t){return t.height-n.verticalPadding});var r=t.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",function(t){return t.height}).call(y);var i=t.selectAll(".highlight").data(o);i.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(t){return t.height}).call(y)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?M(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[f(0,r,t[0],[]),f(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":719,"../../lib/gup":717,"./constants":1078,d3:163}],1076:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/get_data").getModuleCalcData,a=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter(function(t,e){return e===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":696,"../../plots/get_data":802,"./plot":1085,d3:163}],1077:[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;rh&&(n.log("parcoords traces support up to "+h+" dimensions at the moment"),d.splice(h));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),v=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),f(e,g,"values",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",m),n.coerceFont(u,"tickfont",m),n.coerceFont(u,"rangefont",m),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/cartesian/axes":767,"../../plots/domain":792,"./attributes":1074,"./axisbrush":1075,"./constants":1078,"./merge_length":1083}],1080:[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":719}],1081:[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":1074,"./base_plot":1076,"./calc":1077,"./defaults":1079,"./plot":1085}],1082:[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 sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\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(mask,\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=1e-6,c=2048,u=new Uint8Array(4),h=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function p(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 d(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:u})}(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],p(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 v(t,e,r){for(var n=new Array(8*e),i=0,a=0;ah&&(h=t[i].dim1.canvasX,o=i);0===s&&p(T,0,0,r.canvasWidth,r.canvasHeight);var f=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&ni._length&&(A=A.slice(0,i._length));var M,S=i.tickvals;function E(t,e){return{val:t,text:M[e]}}function C(t,e){return t.val-e.val}if(Array.isArray(S)&&S.length){M=i.ticktext,Array.isArray(M)&&M.length?M.length>S.length?M=M.slice(0,S.length):S.length>M.length&&(S=S.slice(0,M.length)):M=S.map(n.format(i.tickformat));for(var L=1;L=r||l>=a)return;var c=t.lineLayer.readPixel(s,a-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:h};h!==I&&(u?i.hover(f):i.unhover&&i.unhover(f),I=h)}}),z.style("opacity",function(t){return t.pick?0:1}),u.style("background","rgba(255, 255, 255, 0)");var D=u.selectAll("."+g.cn.parcoords).data(O,h);D.exit().remove(),D.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),D.attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var R=D.selectAll("."+g.cn.parcoordsControlView).data(f,h);R.enter().append("g").classed(g.cn.parcoordsControlView,!0),R.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var F=R.selectAll("."+g.cn.yAxis).data(function(t){return t.dimensions},h);F.enter().append("g").classed(g.cn.yAxis,!0),R.each(function(t){S(F,t)}),z.each(function(t){if(t.viewModel){!t.lineLayer||i?t.lineLayer=m(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||i;t.lineLayer.render(t.viewModel.panels,e)}}),F.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),F.call(n.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;P.linePickActive(!1),t.x=Math.max(-g.overdrag,Math.min(t.model.width+g.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,F.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}),S(F,e),F.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),n.select(this).attr("transform","translate("+t.x+", 0)"),F.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(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,S(F,e),n.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),P.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),F.exit().remove();var B=F.selectAll("."+g.cn.axisOverlays).data(f,h);B.enter().append("g").classed(g.cn.axisOverlays,!0),B.selectAll("."+g.cn.axis).remove();var N=B.selectAll("."+g.cn.axis).data(f,h);N.enter().append("g").classed(g.cn.axis,!0),N.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 d.isOrdinal(t)?e:E(t.model.dimensions[t.visibleIndex],e)}).scale(r)),l.font(N.selectAll("text"),t.model.tickFont)}),N.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),N.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=B.selectAll("."+g.cn.axisHeading).data(f,h);j.enter().append("g").classed(g.cn.axisHeading,!0);var U=j.selectAll("."+g.cn.axisTitle).data(f,h);U.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),U.text(function(t){return t.label}).each(function(e){var r=n.select(this);l.font(r,e.model.labelFont),s.convertToTspans(r,t)}).attr("transform",function(t){var e=M(t.model.labelAngle,t.model.labelSide),r=g.axisTitleOffset;return(e.dir>0?"":"translate(0,"+(2*r+t.model.height)+")")+"rotate("+e.degrees+")translate("+-r*e.dx+","+-r*e.dy+")"}).attr("text-anchor",function(t){var e=M(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 V=B.selectAll("."+g.cn.axisExtent).data(f,h);V.enter().append("g").classed(g.cn.axisExtent,!0);var q=V.selectAll("."+g.cn.axisExtentTop).data(f,h);q.enter().append("g").classed(g.cn.axisExtentTop,!0),q.attr("transform","translate(0,"+-g.axisExtentOffset+")");var H=q.selectAll("."+g.cn.axisExtentTopText).data(f,h);H.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(A),H.text(function(t){return C(t,!0)}).each(function(t){l.font(n.select(this),t.model.rangeFont)});var G=V.selectAll("."+g.cn.axisExtentBottom).data(f,h);G.enter().append("g").classed(g.cn.axisExtentBottom,!0),G.attr("transform",function(t){return"translate(0,"+(t.model.height+g.axisExtentOffset)+")"});var Y=G.selectAll("."+g.cn.axisExtentBottomText).data(f,h);Y.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(A),Y.text(function(t){return C(t,!1)}).each(function(t){l.font(n.select(this),t.model.rangeFont)}),v.ensureAxisBrush(B)}},{"../../components/colorscale":605,"../../components/drawing":614,"../../lib":719,"../../lib/gup":717,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"./axisbrush":1075,"./constants":1078,"./helpers":1080,"./lines":1082,"color-rgba":122,d3:163}],1085:[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={},h=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:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map(function(t){return t.slice()}),s="dimensions["+n+"].constraintrange",h=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===h[s]){var f=a.constraintrange;h[s]=f||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":732,"./helpers":1080,"./parcoords":1084}],1086:[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("../../components/fx/hovertemplate_attributes"),l=t("../../lib/extend").extendFlat,c=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:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:l({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},c,{}),insidetextfont:l({},c,{}),outsidetextfont:l({},c,{}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},c,{}),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:l({},c,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":592,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793}],1087:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/get_data").getModuleCalcData;r.name="pie",r.plot=function(t){var e=n.getModule("pie"),r=i(t.calcdata,e)[0];e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has("pie"),a=e._has&&e._has("pie");i&&!a&&n._pielayer.selectAll("g.trace").remove()}},{"../../plots/get_data":802,"../../registry":847}],1088:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib").isArrayOrTypedArray,a=t("tinycolor2"),o=t("../../components/color"),s=t("./helpers"),l=t("../../lib").isValidTextValue,c={};function u(t){return function(e,r){return!!e&&(!!(e=a(e)).isValid()&&(e=o.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function h(t,e){var r,n=JSON.stringify(t),i=e[n];if(!i){for(i=t.slice(),r=0;r")}}return o},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r="pie");var n=t._fullLayout,i=t.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=h(a,c));for(var s=0,l=0;l"),name:f.hovertemplate||-1!==p.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:c.castOption(b.bgcolor,t.pts)||t.color,borderColor:c.castOption(b.bordercolor,t.pts),fontFamily:c.castOption(_.family,t.pts),fontSize:c.castOption(_.size,t.pts),fontColor:c.castOption(_.color,t.pts),nameLength:c.castOption(b.namelength,t.pts),textAlign:c.castOption(b.align,t.pts),hovertemplate:c.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[u(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[u(t,f)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,a=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[u(s,a)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,a=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[u(t,a)],i.click(e,n.event))})}function f(t,e,r){var n=c.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=c.castOption(t._input.textfont.color,e.pts));var i=c.castOption(t.insidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,o=c.castOption(t.insidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n||a.contrast(e.color),family:i,size:o}}function p(t,e){for(var r,n,i=0;i=1)return c;var u=i+1/(2*Math.tan(a)),h=l*Math.min(1/(Math.sqrt(u*u+.5)+u),o/(Math.sqrt(i*i+o/2)+i)),f={scale:2*h/t.height,rCenter:Math.cos(h/l)-h*i/l,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/i,d=p+1/(2*Math.tan(a)),g=l*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),v={scale:2*g/t.width,rCenter:Math.cos(g/l)-g/i/l,rotate:(180/Math.PI*e.midangle+810)%180-90},m=v.scale>f.scale?v:f;return c.scale<1&&m.scale>c.scale?m:c}function g(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function v(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 m(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=x(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)),h=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(h+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf("center")?h*=2:-1!==a.title.position.indexOf("right")&&(h+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=h/t.titleBox.width,n=y(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function y(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 x(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 b(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;ni.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-a.hole,r.rInscribed=g(r,i))}(e),i.attr("stroke-linejoin","round"),i.each(function(){var i=n.select(this).selectAll("g.slice").data(e);i.enter().append("g").classed("slice",!0),i.exit().remove();var g=[[[],[]],[[],[]]],y=!1;i.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=p.index,g[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var i=u.cx,a=u.cy,m=n.select(this),x=m.selectAll("path.surface").data([r]);if(x.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),m.call(h,t,e),p.pull){var b=+c.castOption(p.pull,r.pts)||0;b>0&&(i+=b*r.pxmid[0],a+=b*r.pxmid[1])}r.cxFinal=i,r.cyFinal=a;var _=p.hole;if(r.v===u.vTotal){var w="M"+(i+r.px0[0])+","+(a+r.px0[1])+S(r.px0,r.pxmid,!0,1)+S(r.pxmid,r.px0,!0,1)+"Z";_?x.attr("d","M"+(i+_*r.px0[0])+","+(a+_*r.px0[1])+S(r.px0,r.pxmid,!1,_)+S(r.pxmid,r.px0,!1,_)+"Z"+w):x.attr("d",w)}else{var k=S(r.px0,r.px1,!0,1);if(_){var T=1-_;x.attr("d","M"+(i+_*r.px1[0])+","+(a+_*r.px1[1])+S(r.px1,r.px0,!1,_)+"l"+T*r.px0[0]+","+T*r.px0[1]+k+"Z")}else x.attr("d","M"+i+","+a+"l"+r.px0[0]+","+r.px0[1]+k+"Z")}var A=c.castOption(p.textposition,r.pts),M=m.selectAll("g.slicetext").data(r.text&&"none"!==A?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each(function(){var e=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,"outside"===A?function(t,e,r){var n=c.castOption(t.outsidetextfont.color,e.pts)||c.castOption(t.textfont.color,e.pts)||r.color,i=c.castOption(t.outsidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,a=c.castOption(t.outsidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(p,r,t._fullLayout.font):f(p,r,t._fullLayout.font)).call(l.convertToTspans,t);var h,g=o.bBox(e.node());"outside"===A?h=v(g,r):(h=d(g,r,u),"auto"===A&&h.scale<1&&(e.call(o.font,p.outsidetextfont),p.outsidetextfont.family===p.insidetextfont.family&&p.outsidetextfont.size===p.insidetextfont.size||(g=o.bBox(e.node())),h=v(g,r)));var m=i+r.pxmid[0]*h.rCenter+(h.x||0),x=a+r.pxmid[1]*h.rCenter+(h.y||0);h.outside&&(r.yLabelMin=x-g.height/2,r.yLabelMid=x,r.yLabelMax=x+g.height/2,r.labelExtraX=0,r.labelExtraY=0,y=!0),e.attr("transform","translate("+m+","+x+")"+(h.scale<1?"scale("+h.scale+")":"")+(h.rotate?"rotate("+h.rotate+")":"")+"translate("+-(g.left+g.right)/2+","+-(g.top+g.bottom)/2+")")})}function S(t,e,n,i){var a=i*(e[0]-t[0]),o=i*(e[1]-t[1]);return"a"+i*u.r+","+i*u.r+" 0 "+r.largeArc+(n?" 1 ":" 0 ")+a+","+o}});var x=n.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);x.enter().append("g").classed("titletext",!0),x.exit().remove(),x.each(function(){var e,i=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),a=p.title.text;p._meta&&(a=s.templateString(a,p._meta)),i.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,p.title.font).call(l.convertToTspans,t),e="middle center"===p.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}}(u):m(u,r._size),i.attr("transform","translate("+e.x+","+e.y+")"+(e.scale<1?"scale("+e.scale+")":"")+"translate("+e.tx+","+e.ty+")")}),y&&function(t,e){var r,n,i,a,o,s,l,u,h,f,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,u,h,p,d,g,v=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=v-m;if(b*l>0&&(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u=(c.castOption(e.pull,h.pts)||0)||((t.pxmid[1]-h.pxmid[1])*l>0?(p=h.cyFinal+o(h.px0[1],h.px1[1]),(b=p-m-t.labelExtraY)*l>0&&(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l>0&&(i=3*s*Math.abs(u-f.indexOf(t)),d=h.cxFinal+a(h.px0[0],h.px1[0]),(g=d+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=g)))}for(n=0;n<2;n++)for(i=n?v:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(i),h=t[1-n][r],f=h.concat(u),d=[],p=0;pMath.abs(f)?c+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(o+t.labelExtraX+u):c+="l"+t.labelExtraX+","+h+"v"+(f-h)+"h"+u}else c+="V"+(t.yLabelMid+t.labelExtraY)+"h"+u;s.ensureSingle(r,"path","textline").call(a.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:c,fill:"none"})}else r.select("path.textline").remove()})}(i,p)})});setTimeout(function(){i.selectAll("tspan").each(function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)},transformInsideText:d,determineInsideTextFont:f,positionTitleOutside:m,prerenderTitles:p,layoutAreas:b,attachFxHandlers:h}},{"../../components/color":593,"../../components/drawing":614,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"./event_data":1090,"./helpers":1091,d3:163}],1096:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(i,t,e)})})}},{"./style_one":1097,d3:163}],1097:[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":593,"./helpers":1091}],1098:[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":1112}],1099:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),i=t("../../lib/str2rgbarray"),a=t("../../plots/cartesian/autorange").findExtremes,o=t("../scatter/get_trace_color");function s(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,h=this.pickXYData=t.xy,f=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(h){if(n=h,e=h.length>>>1,f)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),v=i(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":742,"../../plots/cartesian/autorange":766,"../scatter/get_trace_color":1121,"gl-pointcloud2d":292}],1100:[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":719,"./attributes":1098}],1101:[function(t,e,r){"use strict";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":805,"../scatter3d/calc":1139,"./attributes":1098,"./convert":1099,"./defaults":1100}],1102:[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("../../components/fx/hovertemplate_attributes"),c=t("../../components/colorscale/attributes"),u=t("../../plot_api/plot_template").templatedArray,h=t("../../lib/extend").extendFlat,f=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK;(e.exports=f({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"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),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},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},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":592,"../../components/colorscale/attributes":600,"../../components/fx/attributes":623,"../../components/fx/hovertemplate_attributes":631,"../../constants/docs":690,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793}],1103:[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"),h=t("../../registry");function f(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 f={_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:f,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[f],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;rm&&(m=a.source[e]),a.target[e]>m&&(m=a.target[e]);var y,x=m+1;t.node._count=x;var b=t.node.groups,_={};for(e=0;e0&&s(S,x)&&s(E,x)&&(!_.hasOwnProperty(S)||!_.hasOwnProperty(E)||_[S]!==_[E])){_.hasOwnProperty(E)&&(E=_[E]),_.hasOwnProperty(S)&&(S=_[S]),E=+E,h[S=+S]=h[E]=!0;var C="";a.label&&a.label[e]&&(C=a.label[e]);var L=null;C&&f.hasOwnProperty(C)&&(L=f[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,concentrationscale:L,source:S,target:E,value:+M}),A.source.push(S),A.target.push(E)}}var P=x+b.length,O=o(r.color),z=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:I,color:O?r.color[e]:r.color})}var D=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1})}(P,A.source,A.target)&&(D=!0),{circular:D,links:c,nodes:z,groups:b,groupLookup:_}}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":605,"../../lib":719,"../../lib/gup":717,"strongly-connected-components":530}],1105:[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",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1106:[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 h(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,f){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(f.hoverlabel,t.hoverlabel),g=t.node,v=c.newContainer(e,"node");function m(t,e){return n.coerce(g,v,i.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,v,m,d),m("hovertemplate");var y=f.colorway;m("color",v.label.map(function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}));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,k=o(f.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(k,b.value.length)),u(x,b,{name:"colorscales",handleItemDefaults:h}),s(e,f,p),p("orientation"),p("valueformat"),p("valuesuffix"),v.x.length&&v.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},f.font)),e._length=null}},{"../../components/color":593,"../../components/fx/hoverlabel_defaults":630,"../../lib":719,"../../plot_api/plot_template":757,"../../plots/array_container_defaults":763,"../../plots/domain":792,"./attributes":1102,tinycolor2:537}],1107:[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":1102,"./base_plot":1103,"./calc":1104,"./defaults":1106,"./plot":1108,"./select.js":1110}],1108:[function(t,e,r){"use strict";var n=t("d3"),i=t("./render"),a=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function h(t,e){return t.filter(function(t){return t.key===e.traceId})}function f(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function p(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",function(t){if(!t.link.concentrationscale)return.4}),i&&h(e,t).selectAll("."+l.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("."+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",function(t){return t.tinyColorAlpha}),i&&h(e,t).selectAll("."+l.sankeyLink).filter(function(t){return t.link.label===i}).style("fill-opacity",function(t){return t.tinyColorAlpha}),r&&h(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,h=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.color,1),borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:n.event.x"),color:b(o,"bgcolor")||i.tinyColorHue,borderColor:b(o,"bordercolor"),fontFamily:b(o,"font.family"),fontSize:b(o,"font.size"),fontColor:b(o,"font.color"),nameLength:b(o,"namelength"),textAlign:b(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});f(y,.85),p(y)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,i,o),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit("plotly_unhover",{event:n.event,points:[i.node]})),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,i),a.click(t,{target:!0})}}})}},{"../../components/color":593,"../../components/fx":632,"../../lib":719,"./constants":1105,"./render":1109,d3:163}],1109:[function(t,e,r){"use strict";var n=t("./constants"),i=t("d3"),a=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),h=t("../../lib"),f=t("../../lib/gup"),p=f.keyFun,d=f.repeat,g=f.unwrap,v=t("d3-interpolate").interpolateNumber,m=t("../../registry");function y(){var t=.5;return function(e){if(e.link.circular)return r=e.link,n=r.width/2,i=r.circularPathData,"top"===r.circularLinkType?"M "+i.targetX+" "+(i.targetY+n)+" L"+i.rightInnerExtent+" "+(i.targetY+n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 1 "+(i.rightFullExtent-n)+" "+(i.targetY-i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 1 "+i.rightInnerExtent+" "+(i.verticalFullExtent-n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY-i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.leftInnerExtent+" "+(i.sourceY-n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 0 "+(i.leftFullExtent-n)+" "+(i.sourceY-i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"L"+i.rightInnerExtent+" "+(i.verticalFullExtent+n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 0 "+(i.rightFullExtent+n)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n)+" "+(i.targetY-i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 0 "+i.rightInnerExtent+" "+(i.targetY-n)+"L"+i.targetX+" "+(i.targetY-n)+"Z":"M "+i.targetX+" "+(i.targetY-n)+" L"+i.rightInnerExtent+" "+(i.targetY-n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n)+" "+(i.targetY+i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+i.rightInnerExtent+" "+(i.verticalFullExtent+n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.leftInnerExtent+" "+(i.sourceY+n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"L"+i.rightInnerExtent+" "+(i.verticalFullExtent-n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n)+" "+(i.targetY+i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+i.rightInnerExtent+" "+(i.targetY+n)+"L"+i.targetX+" "+(i.targetY+n)+"Z";var r,n,i,a=e.link.source.x1,o=e.link.target.x0,s=v(a,o),l=s(t),c=s(1-t),u=e.link.y0-e.link.width/2,h=e.link.y0+e.link.width/2,f=e.link.y1-e.link.width/2,p=e.link.y1+e.link.width/2;return"M"+a+","+u+"C"+l+","+u+" "+c+","+f+" "+o+","+f+"L"+o+","+p+"C"+c+","+p+" "+l+","+h+" "+a+","+h+"Z"}}function x(t){t.attr("transform",function(t){return"translate("+t.node.x0.toFixed(3)+", "+t.node.y0.toFixed(3)+")"})}function b(t){t.call(x)}function _(t,e){t.call(b),e.attr("d",y())}function w(t){t.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function k(t){return t.link.width>1||t.linkLineWidth>0}function T(t){return"translate("+t.translateX+","+t.translateY+")"+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function A(t){return"translate("+(t.horizontal?0:t.labelY)+" "+(t.horizontal?t.labelY:0)+")"}function M(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function S(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function E(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function C(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function L(t){return t.horizontal&&t.left?"100%":"0%"}function P(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 O(t,e,r,a){var o=i.behavior.drag().origin(function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}}).on("dragstart",function(i){if("fixed"!==i.arrangement&&(h.ensureSingle(a._fullLayout._infolayer,"g","dragcover",function(t){a._fullLayout._dragCover=t}),h.raiseToTop(this),i.interactionState.dragInProgress=i.node,I(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),"snap"===i.arrangement)){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&i.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,i),function(t,e,r,i,a){window.requestAnimationFrame(function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var c=r.node.originalX;r.node.x0=c-r.visibleWidth/2,r.node.x1=c+r.visibleWidth/2,z(r,a)}})}(t,e,i,o,a)}}).on("drag",function(r){if("fixed"!==r.arrangement){var n=i.event.x,a=i.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a)),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2),I(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),_(t.filter(D(r)),e))}}).on("dragend",function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e=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}(y=T.nodes)),i.update(T)}return{circular:b,key:r,trace:s,guid:h.randstr(),horizontal:f,width:v,height:m,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:v,dragPerpendicular:f?v:m,arrangement:s.arrangement,sankey:i,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,u)),_=e.selectAll("."+n.cn.sankey).data(b,p);_.exit().remove(),_.enter().append("g").classed(n.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",T),_.each(function(e,r){t._fullData[r]._sankey=e;var n="bgsankey-"+e.trace.uid+"-"+r;h.ensureSingle(t._fullLayout._draggers,"rect",n),t._fullData[r]._bgRect=i.select("."+n),t._fullData[r]._bgRect.style("pointer-events","all").attr("width",e.width).attr("height",e.height).attr("x",e.translateX).attr("y",e.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),_.transition().ease(n.ease).duration(n.duration).attr("transform",T);var z=_.selectAll("."+n.cn.sankeyLinks).data(d,p);z.enter().append("g").classed(n.cn.sankeyLinks,!0).style("fill","none");var I=z.selectAll("."+n.cn.sankeyLink).data(function(t){return t.graph.links.filter(function(t){return t.value}).map(function(t,e,r){var n=a(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:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:y,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}.bind(null,t))},p);I.enter().append("path").classed(n.cn.sankeyLink,!0).call(P,_,f.linkEvents),I.style("stroke",function(t){return k(t)?o.tinyRGB(a(t.linkLineColor)):t.tinyColorHue}).style("stroke-opacity",function(t){return k(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style("fill",function(t){return t.tinyColorHue}).style("fill-opacity",function(t){return t.tinyColorAlpha}).style("stroke-width",function(t){return k(t)?t.linkLineWidth:1}).attr("d",y()),I.style("opacity",function(){return t._context.staticPlot||v||m?1:0}).transition().ease(n.ease).duration(n.duration).style("opacity",1),I.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var D=_.selectAll("."+n.cn.sankeyNodeSet).data(d,p);D.enter().append("g").classed(n.cn.sankeyNodeSet,!0),D.style("cursor",function(t){switch(t.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=D.selectAll("."+n.cn.sankeyNode).data(function(t){var e=t.graph.nodes;return function(t){var e,r=[];for(e=0;e5?t.node.label:""}).attr("text-anchor",function(t){return t.horizontal&&t.left?"end":"start"}),V.transition().ease(n.ease).duration(n.duration).attr("startOffset",L).style("fill",C)}},{"../../components/color":593,"../../components/drawing":614,"../../lib":719,"../../lib/gup":717,"../../registry":847,"./constants":1105,"@plotly/d3-sankey":54,"@plotly/d3-sankey-circular":53,d3:163,"d3-force":156,"d3-interpolate":158,tinycolor2:537}],1110:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,i=n._sankey.graph.nodes,a=0;as&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;sM[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}}}}}},{}],1119:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./stack_defaults"),u=t("./marker_defaults"),h=t("./line_defaults"),f=t("./line_shape_defaults"),p=t("./text_defaults"),d=t("./fillcolor_defaults");e.exports=function(t,e,r,g){function v(r,i){return n.coerce(t,e,a,r,i)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&mG!=(F=O[L][1])>=G&&(I=O[L-1][0],D=O[L][0],F-R&&(z=I+(D-I)*(G-R)/(F-R),U=Math.min(U,z),V=Math.max(V,z)));U=Math.max(U,0),V=Math.min(V,f._length);var Y=s.defaultLine;return s.opacity(h.fillcolor)?Y=h.fillcolor:s.opacity((h.line||{}).color)&&(Y=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:U,x1:V,y0:G,y1:G,color:Y,hovertemplate:!1}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":593,"../../components/fx":632,"../../lib":719,"../../registry":847,"./get_trace_color":1121}],1123:[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"),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":778,"./arrays_to_calcdata":1111,"./attributes":1112,"./calc":1113,"./cross_trace_calc":1117,"./cross_trace_defaults":1118,"./defaults":1119,"./hover":1122,"./marker_colorbar":1129,"./plot":1131,"./select":1132,"./style":1134,"./subtypes":1135}],1124:[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":603,"../../components/colorscale/helpers":604,"../../lib":719}],1125:[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,h=t("./constants");e.exports=function(t,e){var r,n,a,f,p,d,g,v,m,y,x,b,_,w,k,T,A,M,S=e.xaxis,E=e.yaxis,C="log"===S.type,L="log"===E.type,P=S._length,O=E._length,z=e.connectGaps,I=e.baseTolerance,D=e.shape,R="linear"===D,F=e.fill&&"none"!==e.fill,B=[],N=h.minTolerance,j=t.length,U=new Array(j),V=0;function q(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),a=E.c2p(r.y);if(n===i){if(C&&(n=S.c2p(r.x,!0)),n===i)return!1;L&&a===i&&(n*=Math.abs(S._m*O*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),n*=1e3}if(a===i){if(L&&(a=E.c2p(r.y,!0)),a===i)return!1;a*=1e3}return[n,a]}function H(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 ht(t){if(A=t[0]/P,M=t[1]/O,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=Q(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else $=Q(U[V-1],t)[0],U[V++]=$;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(Q(K,t)[0]),U[V++]=t;var n,i,a,o}for("linear"===D||"spline"===D?Q=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,ft))break;a=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,f=d,g=!1):_=t.length||!d)break;ht(d),n=d}}else ht(f)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{"../../constants/numerical":695,"../../lib":719,"./constants":1116}],1126:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1127:[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,h=-1,f=0,p=-1;for(a=0;a=0?l=p:(l=p=f,f++),l0?Math.max(e,i):0}}},{"fast-isnumeric":225}],1129:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1130:[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),h=(t.line||{}).color;(c=c||{},h&&(r=h),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",h&&!Array.isArray(h)&&e.marker.color!==h?h: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":593,"../../components/colorscale/defaults":603,"../../components/colorscale/helpers":604,"./subtypes":1135}],1131:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../registry"),a=t("../../lib"),o=a.ensureSingle,s=a.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),h=t("./link_traces"),f=t("../../lib/polygon").tester;function p(t,e,r,h,p,d,g){var v;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),h=n.extent(a.simpleMap(l.range,l.r2c)),f=i[0].trace;if(!c.hasMarkers(f))return;var p=f.marker.maxdisplayed;if(0===p)return;var d=i.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),g=Math.ceil(d.length/p),v=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=h[0].trace,w=_.line,k=n.select(d),T=o(k,"g","errorbars"),A=o(k,"g","lines"),M=o(k,"g","points"),S=o(k,"g","text");if(i.getComponentMethod("errorbars","plot")(t,T,r,g),!0===_.visible){var E,C;y(k).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var P,O,z="",I=[],D=_._prevtrace;D&&(z=D._prevRevpath||"",C=D._nextFill,I=D._polygons);var R,F,B,N,j,U,V,q="",H="",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(h),-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(h,{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),v=0;v1){var r=n.select(this);if(r.datum(h),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(h,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(h),N&&U&&(L?("y"===L?N[1]=U[1]=b.c2p(0,!0):"x"===L&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr("d","M"+U+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(E).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&z?("tonext"===_.fill?y(C).attr("d",q+"Z"+z+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+z.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(I)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=V):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(h),S.datum(h),function(e,i,a){var o,u=a[0].trace,h=c.hasMarkers(u),f=c.hasText(u),p=tt(u),d=et,g=et;if(h||f){var v=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?K:J:_&&!w&&(v=$),h&&(d=v),f&&(g=v)}var k,T=(o=e.selectAll("path.point").data(d,p)).enter().append("path").classed("point",!0);m&&T.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),h&&(k=l.makePointStyleFns(u)),o.each(function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):a.remove()}),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=i.selectAll("g").data(g,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each(function(t){var e=n.select(this),i=y(e.select("text"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()}),o.selectAll("text").call(l.textPointStyle,u,t).each(function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each(function(){y(n.select(this)).attr({x:e,y:r})})}),o.exit().remove()}(M,S,h);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 $(t){return t.filter(function(t){return!t.gap})}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,f,d=!a,g=!!a&&a.duration>0,v=h(t,e,r);((u=i.selectAll("g.trace").data(v,function(t){return t[0].trace.uid})).enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each(function(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&&(f=c()),n.transition().duration(a.duration).ease(a.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()}).each(function(){i.selectAll("g.trace").each(function(r,n){p(t,n,e,r,v,this,a)})})):u.each(function(r,n){p(t,n,e,r,v,this,a)});d&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},{"../../components/drawing":614,"../../lib":719,"../../lib/polygon":731,"../../registry":847,"./line_points":1125,"./link_traces":1127,"./subtypes":1135,d3:163}],1132:[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=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}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 y(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function x(t,e){return e(4*t)}function b(t){return p[t]}function _(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&&h("surfacecolor",f||p);for(var d=["x","y","z"],g=0;g<3;++g){var v="projection."+d[g];h(v+".show")&&(h(v+".opacity"),h(v+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,f||p||r,{axis:"z"}),m(t,e,f||p||r,{axis:"y",inherit:"z"}),m(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":719,"../../registry":847,"../scatter/line_defaults":1124,"../scatter/marker_defaults":1130,"../scatter/subtypes":1135,"../scatter/text_defaults":1136,"./attributes":1138}],1143:[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"],meta:{}}},{"../../constants/gl3d_markers":693,"../../plots/gl3d":807,"./attributes":1138,"./calc":1139,"./convert":1141,"./defaults":1142}],1144:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../components/fx/hovertemplate_attributes"),o=t("../../components/colorscale/attributes"),s=t("../../lib/extend").extendFlat,l=n.marker,c=n.line,u=l.line;e.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:s({},n.mode,{dflt:"markers"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:s({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:s({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:s({width:u.width,editType:"calc"},o("marker.line")),gradient:l.gradient,editType:"calc"},o("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a()}},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../scatter/attributes":1112}],1145:[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,h,f=e._length,p=new Array(f),d=!1;for(c=0;c")}return o}function k(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,_.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":719,"../scatter/hover":1122}],1149:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":778,"../scatter/marker_colorbar":1129,"../scatter/select":1132,"../scatter/style":1134,"./attributes":1144,"./calc":1145,"./defaults":1146,"./event_data":1147,"./hover":1148,"./plot":1150}],1150:[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,h={xaxis:i.getFromId(t,u.xaxis||"x"),yaxis:i.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,h,r,o),s=0;s")}(u,v,t,c[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/get_trace_color":1121,"./attributes":1151}],1156:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./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":797,"../scatter/marker_colorbar":1129,"../scatter/style":1134,"./attributes":1151,"./calc":1152,"./defaults":1153,"./event_data":1154,"./hover":1155,"./plot":1157,"./select":1158,"./style":1159}],1157:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../constants/numerical").BADNUM,o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("../../lib/geojson_utils"),c=t("../scatter/subtypes"),u=t("./style");function h(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l=g,k=2*_,T={},A=y.makeCalcdata(e,"x"),M=x.makeCalcdata(e,"y"),S=new Array(k);for(r=0;r<_;r++)o=A[r],s=M[r],S[2*r]=o===d?NaN:o,S[2*r+1]=s===d?NaN:s;if("log"===y.type)for(r=0;r1&&i.extendFlat(s.line,f.linePositions(t,r,n));if(s.errorX||s.errorY){var l=f.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},f.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,S,A,M),P=p(t,b);return u(m,e),w?L.marker&&(C=2*(L.marker.sizeAvg||Math.max(L.marker.size,3))):C=l(e,_),c(t,e,y,x,A,M,C),L.errorX&&v(e,y,L.errorX),L.errorY&&v(e,x,L.errorY),L.fill&&!P.fill2d&&(P.fill2d=!0),L.marker&&!P.scatter2d&&(P.scatter2d=!0),L.line&&!P.line2d&&(P.line2d=!0),!L.errorX&&!L.errorY||P.error2d||(P.error2d=!0),L.text&&!P.glText&&(P.glText=!0),L.marker&&(L.marker.snap=T.tree||g),P.lineOptions.push(L.line),P.errorXOptions.push(L.errorX),P.errorYOptions.push(L.errorY),P.fillOptions.push(L.fill),P.markerOptions.push(L.marker),P.markerSelectedOptions.push(L.markerSel),P.markerUnselectedOptions.push(L.markerUnsel),P.textOptions.push(L.text),P.textSelectedOptions.push(L.textSel),P.textUnselectedOptions.push(L.textUnsel),P.selectBatch.push([]),P.unselectBatch.push([]),T._scene=P,T.index=P.count,T.x=A,T.y=M,T.positions=S,P.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/autorange":766,"../../plots/cartesian/axis_ids":770,"../scatter/calc":1113,"../scatter/colorscale_calc":1115,"./constants":1162,"./convert":1163,"./scene_update":1169,"point-cluster":469}],1162:[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]}}},{}],1163:[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,h=t("../scatter/subtypes"),f=t("../scatter/make_bubble_size_func"),p=t("./constants"),d=t("../../constants/interactions").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1};function v(t){var e,r=t._length,i=t.textfont,a=t.textposition,o=Array.isArray(a)?a:[a],s=i.color,l=i.size,c=i.family,u={};for(u.text=t.text,u.opacity=t.opacity,u.font={},u.align=[],u.baseline=[],e=0;ep.TOO_MANY_POINTS?"rect":h.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var f=n[0],d=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,v=g[p],m=g[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[i]=[v*y/f,x/f]}}return o}}},{"../../components/drawing":614,"../../constants/interactions":694,"../../lib":719,"../../lib/gl_format_color":716,"../../plots/cartesian/axis_ids":770,"../../registry":847,"../scatter/make_bubble_size_func":1128,"../scatter/subtypes":1135,"./constants":1162,"color-normalize":120,"fast-isnumeric":225,"svg-path-sdf":535}],1164:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("../scatter/constants"),s=t("../scatter/subtypes"),l=t("../scatter/xy_defaults"),c=t("../scatter/marker_defaults"),u=t("../scatter/line_defaults"),h=t("../scatter/fillcolor_defaults"),f=t("../scatter/text_defaults");e.exports=function(t,e,r,p){function d(r,i){return n.coerce(t,e,a,r,i)}var g=!!t.marker&&/-open/.test(t.marker.symbol),v=s.isBubble(t),m=l(t,e,p,d);if(m){var y=m-1;c--)s=x[i[c]],l=b[i[c]],u=m.c2p(s)-_,h=y.c2p(l)-w,(f=Math.sqrt(u*u+h*h))g.glText.length){var b=y-g.glText.length;for(f=0;fr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),g.line2d.update(g.lineOptions)),g.error2d){var w=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(w)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=s.repeat(null,y),g.fill2d&&(g.fillOptions=g.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=g.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(g.fillOrder[e]=u);var h,f,p=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;hh&&isNaN(d[f+1]);)f-=2;0!==d[h+1]&&(p=[d[h],0]),p=p.concat(d.slice(h,f+2)),0!==d[f+1]&&(p=p.concat([d[f],0]))}else if("tozerox"===s.fill){for(h=0;hh&&isNaN(d[f]);)f-=2;0!==d[h]&&(p=[0,d[h+1]]),p=p.concat(d.slice(h,f+2)),0!==d[f]&&(p=p.concat([0,d[f+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],i=0,a=0;a-1;for(f=0;f=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=f.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-h.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[i.modHalf(v[0],360)+p,v[1]],y=u.c2p(m),x=h.c2p(m),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=a(c,g),t.extraText=function(t,e,r){if(t.hovertemplate)return;var n=(e.hi||t.hoverinfo).split("+"),i=-1!==n.indexOf("all"),a=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}i||a&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):a?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==n.indexOf("text"))&&o(e,t,c);return c.join("
")}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../scatter/get_trace_color":1121}],1176:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),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","scatterlike"],meta:{}}},{"../../plots/mapbox":822,"../scatter/marker_colorbar":1129,"../scattergeo/calc":1152,"./attributes":1171,"./defaults":1173,"./event_data":1174,"./hover":1175,"./plot":1177,"./select":1178}],1177:[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.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(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(e),l=i.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:o}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/hover":1122}],1183:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":831,"../scatter/marker_colorbar":1129,"../scatter/select":1132,"../scatter/style":1134,"./attributes":1179,"./calc":1180,"./defaults":1181,"./hover":1182,"./plot":1184}],1184:[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&&!f.fill2d&&(f.fill2d=!0),y.marker&&!f.scatter2d&&(f.scatter2d=!0),y.line&&!f.line2d&&(f.line2d=!0),y.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(y.line),f.fillOptions.push(y.fill),f.markerOptions.push(y.marker),f.markerSelectedOptions.push(y.markerSel),f.markerUnselectedOptions.push(y.markerUnsel),f.textOptions.push(y.text),f.textSelectedOptions.push(y.textSel),f.textUnselectedOptions.push(y.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=f,d.index=f.count,f.count++}}),a(t,e,r)}}},{"../../lib":719,"../scattergl/constants":1162,"../scattergl/convert":1163,"../scattergl/plot":1168,"../scattergl/scene_update":1169,"fast-isnumeric":225,"point-cluster":469}],1191:[function(t,e,r){"use strict";var n=t("../../components/fx/hovertemplate_attributes"),i=t("../scatter/attributes"),a=t("../../plots/attributes"),o=t("../../components/colorscale/attributes"),s=t("../../components/drawing/attributes").dash,l=t("../../lib/extend").extendFlat,c=i.marker,u=i.line,h=c.line;e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:l({},i.mode,{dflt:"markers"}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:l({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.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:h.width,editType:"calc"},o("marker.line")),gradient:c.gradient,editType:"calc"},o("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:l({},a.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":600,"../../components/drawing/attributes":613,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plots/attributes":764,"../scatter/attributes":1112}],1192:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc"),a=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,h,f,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r"),s.hovertemplate=d.hovertemplate,o}function y(t,e){v.push(t._hovertitle+": "+e)}}},{"../../plots/cartesian/axes":767,"../scatter/hover":1122}],1196:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":843,"../scatter/marker_colorbar":1129,"../scatter/select":1132,"../scatter/style":1134,"./attributes":1191,"./calc":1192,"./defaults":1193,"./event_data":1194,"./hover":1195,"./plot":1197}],1197:[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":1131}],1198:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/colorscale/attributes"),a=t("../../components/fx/hovertemplate_attributes"),o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,h=u.line,f=c(i("marker.line",{editTypeOverride:"calc"}),{width:c({},h.width,{editType:"calc"}),editType:"calc"}),p=c(i("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:f,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:l("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:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:a(),marker:p,xaxes:d("x"),yaxes:d("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:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../scatter/attributes":1112,"../scattergl/attributes":1160}],1199:[function(t,e,r){"use strict";var n=t("regl-line2d"),i=t("../../registry"),a=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine,u="splom";function h(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;of?2*(b.sizeAvg||Math.max(b.size,3)):a(e,x),p=0;pa&&l?r._splomSubplots[S]=1:i-1,A=!0;if("lasso"===y||"select"===y||!!f.selectedpoints||T){var M=f._length;if(f.selectedpoints){d.selectBatch=f.selectedpoints;var S=f.selectedpoints,E={};for(s=0;s2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function d(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function g(t,e){var r=t.fullSceneLayout,i=t.dataScale,u=e._len,h={};function g(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,function(t){return n.d2l(t)*o})}h.vectors=l(g(e.u,"xaxis"),g(e.v,"yaxis"),g(e.w,"zaxis"),u);var v=f(e.x.slice(0,u)),m=f(e.y.slice(0,u)),y=f(e.z.slice(0,u));if(v.length*m.length*y.length>u)return{positions:[],cells:[]};var x=g(v,"xaxis"),b=g(m,"yaxis"),_=g(y,"zaxis");if(h.meshgrid=[x,b,_],e.starts){var w=e._slen;h.startingPositions=l(g(e.starts.x.slice(0,w),"xaxis"),g(e.starts.y.slice(0,w),"yaxis"),g(e.starts.z.slice(0,w),"zaxis"))}else{for(var k=b[0],T=p(x),A=p(_),M=new Array(T.length*A.length),S=0,E=0;E=0};g?(r=Math.min(d.length,m.length),s=function(t){return k(d[t])&&T(t)},c=function(t){return String(d[t])}):(r=Math.min(v.length,m.length),s=function(t){return k(v[t])&&T(t)},c=function(t){return String(v[t])}),x&&(r=Math.min(r,y.length));for(var A=0;A1){for(var C=a.randstr(),L=0;L0,f=n.select(r).selectAll("g.slice"),p=e[0],m=p.trace,y=x(p.hierarchy,m.level),w=m.maxdepth>=0?m.maxdepth:1/0,M=o._size,S=m.domain,E=M.w*(S.x[1]-S.x[0]),C=M.h*(S.y[1]-S.y[0]),L=.5*Math.min(E,C),P=p.cx=M.l+M.w*(S.x[1]+S.x[0])/2,O=p.cy=M.t+M.h*(1-S.y[0])-C/2;if(!y)return f.remove();var z=null,I={};u&&f.each(function(t){I[k(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!z&&_(t)&&(z=t)});var D=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(y).descendants(),R=y.height+1,F=0,B=w;p.hasMultipleRoots&&b(y)&&(D=D.slice(1),R-=1,F=1,B+=1),D=D.filter(function(t){return t.y1<=B});var N=Math.min(R,w),j=function(t){return(t-F)/N*L},U=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},V=function(t){return c.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,P,O)},q=function(t){return P+t.pxmid[0]*t.transform.rCenter+(t.transform.x||0)},H=function(t){return O+t.pxmid[1]*t.transform.rCenter+(t.transform.y||0)};(f=f.data(D,function(t){return k(t)})).enter().append("g").classed("slice",!0),u?f.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=k(t),i=I[r],a=I[k(y)];if(a){var o=t.x1>a.x1?2*Math.PI:0;e=t.rpx1G?2*Math.PI:0;e={x0:a,x1:a}}else e={rpx0:L,rpx1:L},c.extendFlat(e,X(t));else e={rpx0:0,rpx1:0};else e={x0:0,x1:0};return n.interpolate(e,i)}(t);return function(t){return V(e(t))}}):a.attr("d",V),i.call(A,t,e).call(T,t,{isTransitioning:t._transitioning}),a.call(v,r,m);var f=c.ensureSingle(i,"g","slicetext"),y=c.ensureSingle(f,"text","",function(t){t.attr("data-notex",1)});y.text(function(t,e,r){var n=e.textinfo;if(!n||"none"===n)return"";var i=t.data.data,a=r.separators,o=n.split("+"),s=function(t){return-1!==o.indexOf(t)},l=[];s("label")&&i.label&&l.push(i.label);i.hasOwnProperty("v")&&s("value")&&l.push(g(i.v,a));if(s("text")){var u=c.castOption(e,i.i,"text");c.isValidTextValue(u)&&l.push(u)}return l.join("
")}(r,m,o)).classed("slicetext",!0).attr("text-anchor","middle").call(l.font,b(r)?function(t,e,r){var n=e.data.data.i,i=c.castOption(t,n,"outsidetextfont.color")||c.castOption(t,n,"textfont.color")||r.color,a=c.castOption(t,n,"outsidetextfont.family")||c.castOption(t,n,"textfont.family")||r.family,o=c.castOption(t,n,"outsidetextfont.size")||c.castOption(t,n,"textfont.size")||r.size;return{color:i,family:a,size:o}}(m,r,o.font):function(t,e,r){var n=e.data.data,i=n.i,a=c.castOption(t,i,"insidetextfont.color");!a&&t._input.textfont&&(a=c.castOption(t._input,i,"textfont.color"));var o=c.castOption(t,i,"insidetextfont.family")||c.castOption(t,i,"textfont.family")||r.family,l=c.castOption(t,i,"insidetextfont.size")||c.castOption(t,i,"textfont.size")||r.size;return{color:a||s.contrast(n.color),family:o,size:l}}(m,r,o.font)).call(h.convertToTspans,t);var x=l.bBox(y.node());r.transform=d(x,r,p),r.translateX=q(r),r.translateY=H(r);var _=function(t,e){return"translate("+t.translateX+","+t.translateY+")"+(t.transform.scale<1?"scale("+t.transform.scale+")":"")+(t.transform.rotate?"rotate("+t.transform.rotate+")":"")+"translate("+-(e.left+e.right)/2+","+-(e.top+e.bottom)/2+")"};u?y.transition().attrTween("transform",function(t){var e=function(t){var e,r=I[k(t)],i=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},z)if(t.parent)if(G){var a=t.x1>G?2*Math.PI:0;e.x0=e.x1=a}else c.extendFlat(e,X(t));else e.x0=e.x1=0;else e.x0=e.x1=0;var o=n.interpolate(e.rpx1,t.rpx1),s=n.interpolate(e.x0,t.x0),l=n.interpolate(e.x1,t.x1),u=n.interpolate(e.transform.scale,i.scale),h=n.interpolate(e.transform.rotate,i.rotate),f=0===i.rCenter?3:0===e.transform.rCenter?1/3:1,p=n.interpolate(e.transform.rCenter,i.rCenter);return function(t){var e=o(t),r=s(t),n=l(t),a=function(t){return p(Math.pow(t,f))}(t),c={pxmid:U(e,(r+n)/2),transform:{rCenter:a,x:i.x,y:i.y}},d={rpx1:o(t),translateX:q(c),translateY:H(c),transform:{scale:u(t),rotate:h(t),rCenter:a}};return d}}(t);return function(t){return _(e(t),x)}}):y.attr("transform",_(r,x))})}function x(t,e){var r;return e&&t.eachAfter(function(t){if(k(t)===e)return r=t.copy()}),r||t}function b(t){return""===t.data.data.pid}function _(t){return!t.parent}function w(t){return!t.children}function k(t){return t.data.data.id}function T(t,e,r){var n=t.datum(),i=(r||{}).isTransitioning;f(t,i||w(n)||b(n)?null:"pointer")}function A(t,e,r){var i=r[0],s=i.trace;"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1),t.on("mouseover",function(t){var r=e._fullLayout;if(!e._dragging&&!1!==r.hovermode){var a=e._fullData[s.index],l=t.data.data,u=l.i,h=function(t){return c.castOption(a,u,t)},f=h("hovertemplate"),p=o.castHoverinfo(a,r,u),d=r.separators;if(f||p&&"none"!==p&&"skip"!==p){var v=t.rInscribed,m=i.cx+t.pxmid[0]*(1-v),y=i.cy+t.pxmid[1]*(1-v),x={},b=[],_=[],w=function(t){return-1!==b.indexOf(t)};if(p&&(b="all"===p?a._module.attributes.hoverinfo.flags:p.split("+")),x.label=l.label,w("label")&&x.label&&_.push(x.label),l.hasOwnProperty("v")&&(x.value=l.v,x.valueLabel=g(x.value,d),w("value")&&_.push(x.valueLabel)),x.text=h("hovertext")||h("text"),w("text")){var k=x.text;c.isValidTextValue(k)&&_.push(k)}o.loneHover({trace:a,x0:m-v*t.rpx1,x1:m+v*t.rpx1,y:y,idealAlign:t.pxmid[0]<0?"left":"right",text:_.join("
"),name:f||w("name")?a.name:void 0,color:h("hoverlabel.bgcolor")||l.color,borderColor:h("hoverlabel.bordercolor"),fontFamily:h("hoverlabel.font.family"),fontSize:h("hoverlabel.font.size"),fontColor:h("hoverlabel.font.color"),nameLength:h("hoverlabel.namelength"),textAlign:h("hoverlabel.align"),hovertemplate:f,hovertemplateLabels:x,eventData:[M(t,a)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),s._hasHoverLabel=!0}s._hasHoverEvent=!0,e.emit("plotly_hover",{points:[M(t,a)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,i=e._fullData[s.index],a=n.select(this).datum();s._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[M(a,i)],event:n.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(o.loneUnhover(r._hoverlayer.node()),s._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,l=e._fullData[s.index];if(!1===u.triggerHandler(e,"plotly_sunburstclick",{points:[M(t,l)],event:n.event})||w(t)||b(t))r.hovermode&&(e._hoverdata=[M(t,l)],o.click(e,n.event));else if(!e._dragging&&!e._transitioning){a.call("_storeDirectGUIEdit",l,r._tracePreGUI[l.uid],{level:l.level});var c=i.hierarchy,h=k(t),f=_(t)?function(t,e){var r;return t.eachAfter(function(t){for(var n=t.children||[],i=0;i0;((a=s.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(),c)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){s.selectAll("g.trace").each(function(e){y(t,e,this,r)})})):a.each(function(e){y(t,e,this,r)});l&&a.exit().remove()}},{"../../components/color":593,"../../components/drawing":614,"../../components/fx":632,"../../components/fx/helpers":628,"../../lib":719,"../../lib/events":709,"../../lib/setcursor":739,"../../lib/svg_text_utils":743,"../../registry":847,"../pie/helpers":1091,"../pie/plot":1095,"./constants":1217,"./style":1223,d3:163,"d3-hierarchy":157}],1223:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/color"),a=t("../../lib");function o(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){t._fullLayout._sunburstlayer.selectAll(".trace").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(o,t,r)})})},styleOne:o}},{"../../components/color":593,"../../lib":719,d3:163}],1224:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/attributes"),a=t("../../components/fx/hovertemplate_attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},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 u=e.exports=l(s({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:a(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo)}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":593,"../../components/colorscale/attributes":600,"../../components/fx/hovertemplate_attributes":631,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764}],1225:[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":601}],1226:[function(t,e,r){"use strict";var n=t("gl-surface3d"),i=t("ndarray"),a=t("ndarray-homography"),o=t("ndarray-fill"),s=t("../../lib").isArrayOrTypedArray,l=t("../../lib/gl_format_color").parseColorScale,c=t("../../lib/str2rgbarray"),u=t("../../components/colorscale").extractOpts,h=t("../heatmap/interp2d"),f=t("../heatmap/find_empties");function p(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 d=p.prototype;d.getXat=function(t,e,r,n){var i=s(this.data.x)?s(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},d.getYat=function(t,e,r,n){var i=s(this.data.y)?s(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},d.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)},d.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 g=[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 v(t,e){if(t0){r=g[n];break}return r}function x(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;aw;)r--,r/=y(r),++r<_&&(r=w);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),c=1+n+1,u=1+o+1,h=i(new Float32Array(c*u),[c,u]),f=0;f0&&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"}}},{}],1233:[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)})),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=f(b,y-_+n.uplift),k=h(f(x,_),[]),T=h(w,k),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*m});var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:M,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map(function(t){return t[0]}),gdColumnsOriginalOrder:g.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+"__"+A[t],label:t,specIndex:e,xIndex:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}})};return L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{"../../lib/extend":710,"./constants":1232,"fast-isnumeric":225}],1234:[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":710}],1235:[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&&a.match(/[<&>]/);var c,u="string"==typeof(c=a)&&c.match(n.latexCheck);t.latex=u;var h,f,p=u?"":_(t.calcdata.cells.prefix,e,r)||"",d=u?"":_(t.calcdata.cells.suffix,e,r)||"",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(h=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===h?b(v):h),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(" "===n.wrapSplitCharacter?v.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){return"translate(0 "+(z(t.rowBlocks,t.page)-t.scrollY)+")"}),t&&(E(t,r,e,c,n.prevPages,n,0),E(t,r,e,c,n.prevPages,n,1),m(r,t))}}function S(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter(function(t){return s.key===t.key}),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var h=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return M(t,h,l),s.scrollY===u}}function E(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&&n[e]!==i[e]});y(t,e,a,r),i[o]=n[o]}))}function C(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(),x(o.select("."+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(O)}}function L(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,f=Math.max(h,u);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,t.selectAll("."+n.cn.columnCell).call(O),M(null,t.filter(k),0),m(r,a,!0)),s.attr("transform",function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return"translate("+P(o,i.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+a+")"}),o.settledY=!0}}}function P(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function O(t){t.attr("transform",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+I(e,1/0)},0);return"translate(0 "+(I(R(t),t.key)+e)+")"}).selectAll("."+n.cn.cellRect).attr("height",function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function z(t,e){for(var r=0,n=e-1;n>=0;n--)r+=D(t[n]);return r}function I(t,e){for(var r=0,n=0;n0){var y,x,b,_,w,k=t.xa,T=t.ya;"h"===f.orientation?(w=e,y="y",b=T,x="x",_=k):(w=r,y="x",b=k,x="y",_=T);var A=h[t.index];if(w>=A.span[0]&&w<=A.span[1]){var M=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,f,w),C=o.getPositionOnKdePath(A,f,S),L=b._offset,P=b._length;M[y+"0"]=C[0],M[y+"1"]=C[1],M[x+"0"]=M[x+"1"]=S,M[x+"Label"]=x+": "+i.hoverLabelText(_,w)+", "+h[0].t.labels.kde+" "+E.toFixed(3),M.spikeDistance=m[0].spikeDistance;var O=y+"Spike";M[O]=m[0][O],m[0].spikeDistance=void 0,m[0][O]=void 0,M.hovertemplate=!1,v.push(M),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+P),u[y+"2"]=n.constrain(L+C[1],L,L+P),u[x+"1"]=u[x+"2"]=_._offset+S}}d&&(v=v.concat(m))}-1!==p.indexOf("points")&&(c=a.hoverOnPoints(t,e,r));var z=l.selectAll(".violinline-"+f.uid).data(u?[0]:[]);return z.enter().append("line").classed("violinline-"+f.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":719,"../../plots/cartesian/axes":767,"../box/hover":885,"./helpers":1242}],1244:[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":778,"../box/defaults":883,"../box/select":890,"../scatter/style":1134,"./attributes":1238,"./calc":1239,"./cross_trace_calc":1240,"./defaults":1241,"./hover":1243,"./layout_attributes":1245,"./layout_defaults":1246,"./plot":1247,"./style":1248}],1245:[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":719,"../box/layout_attributes":887}],1246:[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":719,"../box/layout_defaults":888,"./layout_attributes":1245}],1247:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../box/plot"),s=t("../scatter/line_points"),l=t("./helpers");e.exports=function(t,e,r,c){var u=t._fullLayout,h=e.xaxis,f=e.yaxis;function p(t){var e=s(t,{xaxis:h,yaxis:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,"trace violins").each(function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+"axis"],m=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,h,f,_=n.select(this),w=t.density,k=w.length,T=t.pos+d,A=m.c2p(T);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(h=new Array(k),o=0;o")),c.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,d),[c]}function w(t){return n(p,t)}}},{"../../components/color":593,"../../constants/delta.js":689,"../../plots/cartesian/axes":767,"../bar/hover":863}],1260:[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":778,"../bar/select":868,"./attributes":1253,"./calc":1254,"./cross_trace_calc":1256,"./defaults":1257,"./event_data":1258,"./hover":1259,"./layout_attributes":1261,"./layout_defaults":1262,"./plot":1263,"./style":1264}],1261:[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"}}},{}],1262:[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&&(g+=h?"M"+u[0]+","+p[1]+"V"+p[0]:"M"+u[1]+","+p[0]+"H"+u[0]),"between"!==f&&(r.isSum||o path").each(function(t){if(!t.isBlank){var e=l[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",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".lines").each(function(){var t=l.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":593,"../../components/drawing":614,"../../constants/interactions":694,"../bar/style":870,d3:163}],1265:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),i=t("../lib"),a=t("../plot_api/plot_schema"),o=t("./helpers").pointsAccessorFunction,s=t("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var l=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,i=e.c2d;switch(r){case"count":return h;case"first":return f;case"last":return p;case"sum":return function(t,e){for(var r=0,a=0;aa&&(a=u,o=c)}}return a?i(o):s};case"rms":return function(t,e){for(var r=0,a=0,o=0;o":return function(t){return f(t)>s};case">=":return function(t){return f(t)>=s};case"[]":return function(t){var e=f(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=f(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=f(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=f(t);return es[1]};case"](":return function(t){var e=f(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=f(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(f(t))};case"}{":return function(t){return-1===s.indexOf(f(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),f),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(a=0;a:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},{"../src/lib":719}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1279}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":865}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":877}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":887}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":592}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":896}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":915}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":929}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":936}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":942}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":957}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":968}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":697}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":976}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1280}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":986}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":995}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1281}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1008}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1017}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1029}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1035}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1039}],25:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./pie"),t("./sunburst"),t("./treemap"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./indicator":26,"./isosurface":27,"./mesh3d":28,"./ohlc":29,"./parcats":30,"./parcoords":31,"./pie":32,"./pointcloud":33,"./sankey":34,"./scatter3d":35,"./scattercarpet":36,"./scattergeo":37,"./scattergl":38,"./scattermapbox":39,"./scatterpolar":40,"./scatterpolargl":41,"./scatterternary":42,"./sort":43,"./splom":44,"./streamtube":45,"./sunburst":46,"./surface":47,"./table":48,"./treemap":49,"./violin":50,"./volume":51,"./waterfall":52}],26:[function(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1045}],27:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1051}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1056}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1061}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1070}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1080}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1091}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1100}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1106}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1142}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1148}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1155}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1166}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1175}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1182}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1188}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1195}],43:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1283}],44:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1204}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1212}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1220}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1229}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1237}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/treemap")},{"../src/traces/treemap":1246}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1258}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1266}],52:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1274}],53:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),h=a(),f=i();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),new o({turntable:u,orbit:h,matrix:f},c)};var n=t("turntable-camera-controller"),a=t("orbit-camera-controller"),i=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n1||a>1)}function E(t,e,r){return t.sort(L),t.forEach(function(n,a){var i,o,s=0;if(Y(n,r)&&S(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}}),t}function C(t,r,a,i){var o=e.min(t.links,function(t){return t.source.y0});t.links.forEach(function(t){t.circular&&(t.circularPathData={})}),E(t.links.filter(function(t){return"top"==t.circularLinkType}),r,i),E(t.links.filter(function(t){return"bottom"==t.circularLinkType}),r,i),t.links.forEach(function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+w,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,Y(e,i)&&S(e))e.circularPathData.leftSmallArcRadius=w+e.width/2,e.circularPathData.leftLargeArcRadius=w+e.width/2,e.circularPathData.rightSmallArcRadius=w+e.width/2,e.circularPathData.rightLargeArcRadius=w+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter(function(t){return t.source.column==s&&t.circularLinkType==l});"bottom"==e.circularLinkType?c.sort(O):c.sort(P);var u=0;c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=w+e.width/2+u,e.circularPathData.leftLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),s=e.target.column,c=t.links.filter(function(t){return t.target.column==s&&t.circularLinkType==l}),"bottom"==e.circularLinkType?c.sort(z):c.sort(I),u=0,c.forEach(function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=w+e.width/2+u,e.circularPathData.rightLargeArcRadius=w+e.width/2+n*r+u),u+=t.width}),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(a,e.source.y1,e.target.y1)+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){var e="";e="top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY;return e}(e);else{var h=n.linkHorizontal().source(function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]}).target(function(t){return[t.target.x0,t.y1]});e.path=h(e)}})}function L(t,e){return D(t)==D(e)?"bottom"==t.circularLinkType?O(t,e):P(t,e):D(e)-D(t)}function P(t,e){return t.y0-e.y0}function O(t,e){return e.y0-t.y0}function I(t,e){return t.y1-e.y1}function z(t,e){return e.y1-t.y1}function D(t){return t.target.column-t.source.column}function R(t){return t.target.x0-t.source.x1}function F(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1+n:t.y1-n}function B(t,e){var r=A(t),n=R(e)/Math.tan(r);return"up"==G(t)?t.y1-n:t.y1+n}function N(t,e,r,n){t.links.forEach(function(a){if(!a.circular&&a.target.column-a.source.column>1){var i=a.source.column+1,o=a.target.column-1,s=1,l=o-i+1;for(s=1;i<=o;i++,s++)t.nodes.forEach(function(o){if(o.column==i){var c,u=s/(l+1),h=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=h*a.y0+f*a.y0+p*a.y1+d*a.y1,v=g-a.width/2,m=g+a.width/2;v>o.y0&&vo.y0&&mo.y1&&V(t,c,e,r)})):vo.y1&&(c=m-o.y0+10,o=V(o,c,e,r),t.nodes.forEach(function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&V(t,c,e,r)}))}})}})}function j(t,e){return t.y0>e.y0&&t.y0e.y0&&t.y1e.y1)}function V(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach(function(t){t.y1=t.y1+e}),t.sourceLinks.forEach(function(t){t.y0=t.y0+e})),t}function U(t,e,r,n){t.nodes.forEach(function(a){n&&a.y+(a.y1-a.y0)>e&&(a.y=a.y-(a.y+(a.y1-a.y0)-e));var i=t.links.filter(function(t){return b(t.source,r)==b(a,r)}),o=i.length;o>1&&i.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!H(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=B(e,t);return t.y1-r}if(e.target.column>t.target.column)return B(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0});var s=a.y0;i.forEach(function(t){t.y0=s+t.width/2,s+=t.width}),i.forEach(function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!H(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function Y(t,e){return b(t.source,e)==b(t.target,e)}t.sankeyCircular=function(){var t,n,i=0,b=0,A=1,S=1,E=24,L=v,P=o,O=m,I=y,z=32,D=2,R=null;function F(){var o={nodes:O.apply(null,arguments),links:I.apply(null,arguments)};!function(t){t.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var e=r.map(t.nodes,L);t.links.forEach(function(t,r){t.index=r;var n=t.source,a=t.target;"object"!==("undefined"==typeof n?"undefined":l(n))&&(n=t.source=x(e,n)),"object"!==("undefined"==typeof a?"undefined":l(a))&&(a=t.target=x(e,a)),n.sourceLinks.push(t),a.targetLinks.push(t)})}(o),function(t,e,r){var n=0;if(null===r){for(var i=[],o=0;o0?r+_+w:r,bottom:n=n>0?n+_+w:n,left:i=i>0?i+_+w:i,right:a=a>0?a+_+w:a}}(a),u=function(t,r){var n=e.max(t.nodes,function(t){return t.column}),a=A-i,o=S-b,s=a+r.right+r.left,l=o+r.top+r.bottom,c=a/s,u=o/l;return i=i*c+r.left,A=0==r.right?A:A*c,b=b*u+r.top,S*=u,t.nodes.forEach(function(t){t.x0=i+t.column*((A-i-E)/n),t.x1=t.x0+E}),u}(a,c);s*=u,a.links.forEach(function(t){t.width=t.value*s}),l.forEach(function(t){var e=t.length;t.forEach(function(t,n){t.depth==l.length-1&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):0==t.depth&&1==e?(t.y0=S/2-t.value*s,t.y1=t.y0+t.value*s):t.partOfCycle?0==M(t,r)?(t.y0=S/2+n,t.y1=t.y0+t.value*s):"top"==t.circularLinkType?(t.y0=b+n,t.y1=t.y0+t.value*s):(t.y0=S-t.value*s-n,t.y1=t.y0+t.value*s):0==c.top||0==c.bottom?(t.y0=(S-b)/e*n,t.y1=t.y0+t.value*s):(t.y0=(S-b)/2-e/2+n,t.y1=t.y0+t.value*s)})})})(s),m();for(var c=1,u=o;u>0;--u)v(c*=.99,s),m();function v(t,r){var n=l.length;l.forEach(function(a){var i=a.length,o=a[0].depth;a.forEach(function(a){var s;if(a.sourceLinks.length||a.targetLinks.length)if(a.partOfCycle&&M(a,r)>0);else if(0==o&&1==i)s=a.y1-a.y0,a.y0=S/2-s/2,a.y1=S/2+s/2;else if(o==n-1&&1==i)s=a.y1-a.y0,a.y0=S/2-s/2,a.y1=S/2+s/2;else{var l=e.mean(a.sourceLinks,g),c=e.mean(a.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(a))*t;a.y0+=u,a.y1+=u}})})}function m(){l.forEach(function(e){var r,n,a,i=b,o=e.length;for(e.sort(h),a=0;a0&&(r.y0+=n,r.y1+=n),i=r.y1+t;if((n=i-t-S)>0)for(i=r.y0-=n,r.y1-=n,a=o-2;a>=0;--a)r=e[a],(n=r.y1+t-i)>0&&(r.y0-=n,r.y1-=n),i=r.y0})}}(o,z,L),B(o);for(var s=0;s<4;s++)U(o,S,L),q(o,0,L),N(o,b,S,L),U(o,S,L),q(o,0,L);return function(t,r,n){var a=t.nodes,i=t.links,o=!1,s=!1;if(i.forEach(function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)}),0==o||0==s){var l=e.min(a,function(t){return t.y0}),c=e.max(a,function(t){return t.y1}),u=c-l,h=n-r,f=h/u;a.forEach(function(t){var e=(t.y1-t.y0)*f;t.y0=(t.y0-l)*f,t.y1=t.y0+e}),i.forEach(function(t){t.y0=(t.y0-l)*f,t.y1=(t.y1-l)*f,t.width=t.width*f})}}(o,b,S),C(o,D,S,L),o}function B(t){t.nodes.forEach(function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)}),t.nodes.forEach(function(t){var e=t.y0,r=e,n=t.y1,a=n;t.sourceLinks.forEach(function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=a-t.width/2,a-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}return F.nodeId=function(t){return arguments.length?(L="function"==typeof t?t:s(t),F):L},F.nodeAlign=function(t){return arguments.length?(P="function"==typeof t?t:s(t),F):P},F.nodeWidth=function(t){return arguments.length?(E=+t,F):E},F.nodePadding=function(e){return arguments.length?(t=+e,F):t},F.nodes=function(t){return arguments.length?(O="function"==typeof t?t:s(t),F):O},F.links=function(t){return arguments.length?(I="function"==typeof t?t:s(t),F):I},F.size=function(t){return arguments.length?(i=b=0,A=+t[0],S=+t[1],F):[A-i,S-b]},F.extent=function(t){return arguments.length?(i=+t[0][0],A=+t[1][0],b=+t[0][1],S=+t[1][1],F):[[i,b],[A,S]]},F.iterations=function(t){return arguments.length?(z=+t,F):z},F.circularLinkGap=function(t){return arguments.length?(D=+t,F):D},F.nodePaddingRatio=function(t){return arguments.length?(n=+t,F):n},F.sortNodes=function(t){return arguments.length?(R=t,F):R},F.update=function(t){return T(t,L),B(t),t.links.forEach(function(t){t.circular&&(t.circularLinkType=t.y0+t.y1i&&(b=i);var o=e.min(a,function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)});a.forEach(function(t){t.forEach(function(t,e){t.y1=(t.y0=e)+t.value*o})}),t.links.forEach(function(t){t.width=t.value*o})})(),d();for(var i=1,o=A;o>0;--o)l(i*=.99),d(),s(i),d();function s(t){a.forEach(function(r){r.forEach(function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,f)/e.sum(r.targetLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function l(t){a.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,u)-h(r))*t;r.y0+=n,r.y1+=n}})})}function d(){a.forEach(function(t){var e,r,a,i=n,o=t.length;for(t.sort(c),a=0;a0&&(e.y0+=r,e.y1+=r),i=e.y1+b;if((r=i-b-y)>0)for(i=e.y0-=r,e.y1-=r,a=o-2;a>=0;--a)e=t[a],(r=e.y1+b-i)>0&&(e.y0-=r,e.y1-=r),i=e.y0})}}(i),E(i),i}function E(t){t.nodes.forEach(function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)}),t.nodes.forEach(function(t){var e=t.y0,r=e;t.sourceLinks.forEach(function(t){t.y0=e+t.width/2,e+=t.width}),t.targetLinks.forEach(function(t){t.y1=r+t.width/2,r+=t.width})})}return S.update=function(t){return E(t),t},S.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),S):_},S.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),S):w},S.nodeWidth=function(t){return arguments.length?(x=+t,S):x},S.nodePadding=function(t){return arguments.length?(b=+t,S):b},S.nodes=function(t){return arguments.length?(k="function"==typeof t?t:o(t),S):k},S.links=function(t){return arguments.length?(T="function"==typeof t?t:o(t),S):T},S.size=function(e){return arguments.length?(t=n=0,a=+e[0],y=+e[1],S):[a-t,y-n]},S.extent=function(e){return arguments.length?(t=+e[0][0],a=+e[1][0],n=+e[0][1],y=+e[1][1],S):[[t,n],[a,y]]},S.iterations=function(t){return arguments.length?(A=+t,S):A},S},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,a)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=i,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof r&&"undefined"!=typeof e?a(r,t("d3-array"),t("d3-collection"),t("d3-shape")):a(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{"d3-array":153,"d3-collection":154,"d3-shape":162}],56:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/meta"),a=6378137;function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=h,r.lengthToRadians=f,r.lengthToDegrees=function(t,e){return p(f(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return h(f(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var a=r.areaFactors[e];if(!a)throw new Error("invalid original units");var i=r.areaFactors[n];if(!i)throw new Error("invalid final units");return t/a*i},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!d(t))throw new Error("bbox must only contain numbers")})},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],59:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function a(t,e,r){if(null!==t)for(var n,i,o,s,l,c,u,h,f=0,p=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;yc||p>u||d>h)return l=a,c=r,u=p,h=d,void(o=0);var g=n.lineString([l,a],t.properties);if(!1===e(g,r,i,d,o))return!1;o++,l=a})&&void 0}}})}function u(t,e){if(!t)throw new Error("geojson is required");l(t,function(t,r,a){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,r,a,0,0))return!1;break;case"Polygon":for(var s=0;sa&&(a=t[o]),t[o]=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!x(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var a;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),a=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!a&&m(a,r,"Missing expected exception"+n);var i="string"==typeof n,s=!t&&a&&!r;if((!t&&o.isError(a)&&i&&_(a,r)||s)&&m(a,r,"Got unwanted exception"+n),t&&a&&r&&!_(a,r)||!t&&a)throw a}f.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(v((e=this).actual),128)+" "+e.operator+" "+g(v(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var a=n.stack,i=d(r),o=a.indexOf("\n"+i);if(o>=0){var s=a.indexOf("\n",o+1);a=a.substring(s+1)}this.stack=a}}},o.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(t,e,r){t!=e&&m(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){x(t,e,!1)||m(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){x(t,e,!0)||m(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){x(t,e,!1)&&m(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){w(!0,t,e,r)},f.doesNotThrow=function(t,e,r){w(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n(function t(e,r){e||m(e,!0,r,"==",t)},f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":455,"util/":72}],70:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],71:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],72:[function(t,e,r){(function(e,n){var a=/%[sdj%]/g;r.format=function(t){if(!m(t)){for(var e=[],r=0;r=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var a=e.inspect(n,t);return m(a)||(a=u(t,a,n)),a}var i=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(e);if(0===o.length){if(k(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return h(e)}var c,b="",T=!1,A=["{","}"];(p(e)&&(T=!0,A=["[","]"]),k(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return x(e)&&(b=" "+RegExp.prototype.toString.call(e)),_(e)&&(b=" "+Date.prototype.toUTCString.call(e)),w(e)&&(b=" "+h(e)),0!==o.length||T&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=T?function(t,e,r,n,a){for(var i=[],o=0,s=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,A)):A[0]+b+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,a,i){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),S(n,a)||(o="["+a+"]"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function _(t){return b(t)&&"[object Date]"===T(t)}function w(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function k(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(i)&&(i=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(i)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=v,r.isString=m,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t},r.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":71,_process:483,inherits:70}],73:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],74:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=e.length,i=new Array(r+1),o=0;o0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[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,a=r%3,i=[],o=0,s=r-a;os?s:o+16383));1===a?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===a&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="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 a,i,o=[],s=e;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],76:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{"./lib/rationalize":86}],77:[function(t,e,r){"use strict";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],78:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{"./lib/rationalize":86}],79:[function(t,e,r){"use strict";var n=t("./is-rat"),a=t("./lib/is-bn"),i=t("./lib/num-to-bn"),o=t("./lib/str-to-bn"),s=t("./lib/rationalize"),l=t("./div");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c=0;var u,h;if(a(e))u=e.clone();else if("string"==typeof e)u=o(e);else{if(0===e)return[i(0),i(1)];if(e===Math.floor(e))u=i(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;u=i(e)}}if(n(r))u.mul(r[1]),h=r[0].clone();else if(a(r))h=r.clone();else if("string"==typeof r)h=o(r);else if(r)if(r===Math.floor(r))h=i(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),c+=256;h=i(r)}else h=i(1);c>0?u=u.ushln(c):c<0&&(h=h.ushln(-c));return s(u,h)}},{"./div":78,"./is-rat":80,"./lib/is-bn":84,"./lib/num-to-bn":85,"./lib/rationalize":86,"./lib/str-to-bn":87}],80:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":84}],81:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":95}],82:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,a=0;if(1===e)a=r[0];else if(2===e)a=r[0]+67108864*r[1];else for(var i=0;i20)return 52;return r+32}},{"bit-twiddle":93,"double-bits":168}],84:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":95}],85:[function(t,e,r){"use strict";var n=t("bn.js"),a=t("double-bits");e.exports=function(t){var e=a.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":95,"double-bits":168}],86:[function(t,e,r){"use strict";var n=t("./num-to-bn"),a=t("./bn-sign");e.exports=function(t,e){var r=a(t),i=a(e);if(0===r)return[n(0),n(1)];if(0===i)return[n(0),n(0)];i<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{"./bn-sign":81,"./num-to-bn":85}],87:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":95}],88:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":86}],89:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":81}],90:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":86}],91:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),a=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var i=e.abs().divmod(r.abs()),o=i.div,s=n(o),l=i.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=a(s)+4,h=n(l.ushln(u).divRound(r));return c*(s+h*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{"./lib/bn-to-num":82,"./lib/ctz":83}],92:[function(t,e,r){"use strict";function n(t,e,r,n,a,i){var o=["function ",t,"(a,l,h,",n.join(","),"){",i?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",a?".get(m)":"[m]"];return i?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),i?o.push("return -1};"):o.push("return i};"),o.join("")}function a(t,e,r,a){return new Function([n("A","x"+t+"y",e,["y"],!1,a),n("B","x"+t+"y",e,["y"],!0,a),n("P","c(x,y)"+t+"0",e,["y","c"],!1,a),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,a),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],93:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var a=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--a;t[e]=n<>>8&255]<<16|a[t>>>16&255]<<8|a[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],94:[function(t,e,r){"use strict";var n=t("clamp");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,h,f,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(h=(f=t).getContext("2d"),r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t.canvas,h=t,r=f.width,o=f.height,p=h.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var a=0,i=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return a}i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var a=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&a++,16===e?this._parseHex(t,a):this._parseBase(t,e,a),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},i.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},i.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var a=0;a=0;a-=3)o=t[a]|t[a-1]<<8|t[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)a=s(t,r,r+6),this.words[n]|=a<>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);r+6!==e&&(a=s(t,e,r+6),this.words[n]|=a<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=e)n++;n--,a=a/e|0;for(var i=t.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var a=0|t.words[0],i=0|e.words[0],o=a*i,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;u+=(o=(a=0|t.words[d])*(i=0|e.words[p])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}i.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var a=0,i=0,o=0;o>>24-a&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=u[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(t,e){return n("undefined"!=typeof o),this.toArrayLike(o,t,e)},i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},i.prototype.toArrayLike=function(t,e,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(i),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,a=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;it.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,a=this.cmp(t);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,T=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],O=8191&P,I=P>>>13,z=0|o[8],D=8191&z,R=z>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],V=8191&j,U=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,at=0|s[6],it=8191&at,ot=at>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ht=8191&ut,ft=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(h,V))|0)+((8191&(a=(a=Math.imul(h,U))+Math.imul(f,V)|0))<<13)|0;c=((i=Math.imul(f,U))+(a>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,V),a=(a=Math.imul(d,U))+Math.imul(g,V)|0,i=Math.imul(g,U);var mt=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(a=(a=a+Math.imul(h,G)|0)+Math.imul(f,H)|0))<<13)|0;c=((i=i+Math.imul(f,G)|0)+(a>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,V),a=(a=Math.imul(m,U))+Math.imul(y,V)|0,i=Math.imul(y,U),n=n+Math.imul(d,H)|0,a=(a=a+Math.imul(d,G)|0)+Math.imul(g,H)|0,i=i+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(a=(a=a+Math.imul(h,X)|0)+Math.imul(f,W)|0))<<13)|0;c=((i=i+Math.imul(f,X)|0)+(a>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,V),a=(a=Math.imul(b,U))+Math.imul(_,V)|0,i=Math.imul(_,U),n=n+Math.imul(m,H)|0,a=(a=a+Math.imul(m,G)|0)+Math.imul(y,H)|0,i=i+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,a=(a=a+Math.imul(d,X)|0)+Math.imul(g,W)|0,i=i+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(a=(a=a+Math.imul(h,K)|0)+Math.imul(f,J)|0))<<13)|0;c=((i=i+Math.imul(f,K)|0)+(a>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,V),a=(a=Math.imul(k,U))+Math.imul(T,V)|0,i=Math.imul(T,U),n=n+Math.imul(b,H)|0,a=(a=a+Math.imul(b,G)|0)+Math.imul(_,H)|0,i=i+Math.imul(_,G)|0,n=n+Math.imul(m,W)|0,a=(a=a+Math.imul(m,X)|0)+Math.imul(y,W)|0,i=i+Math.imul(y,X)|0,n=n+Math.imul(d,J)|0,a=(a=a+Math.imul(d,K)|0)+Math.imul(g,J)|0,i=i+Math.imul(g,K)|0;var bt=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(a=(a=a+Math.imul(h,tt)|0)+Math.imul(f,$)|0))<<13)|0;c=((i=i+Math.imul(f,tt)|0)+(a>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,V),a=(a=Math.imul(M,U))+Math.imul(S,V)|0,i=Math.imul(S,U),n=n+Math.imul(k,H)|0,a=(a=a+Math.imul(k,G)|0)+Math.imul(T,H)|0,i=i+Math.imul(T,G)|0,n=n+Math.imul(b,W)|0,a=(a=a+Math.imul(b,X)|0)+Math.imul(_,W)|0,i=i+Math.imul(_,X)|0,n=n+Math.imul(m,J)|0,a=(a=a+Math.imul(m,K)|0)+Math.imul(y,J)|0,i=i+Math.imul(y,K)|0,n=n+Math.imul(d,$)|0,a=(a=a+Math.imul(d,tt)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(a=(a=a+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((i=i+Math.imul(f,nt)|0)+(a>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,V),a=(a=Math.imul(C,U))+Math.imul(L,V)|0,i=Math.imul(L,U),n=n+Math.imul(M,H)|0,a=(a=a+Math.imul(M,G)|0)+Math.imul(S,H)|0,i=i+Math.imul(S,G)|0,n=n+Math.imul(k,W)|0,a=(a=a+Math.imul(k,X)|0)+Math.imul(T,W)|0,i=i+Math.imul(T,X)|0,n=n+Math.imul(b,J)|0,a=(a=a+Math.imul(b,K)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,K)|0,n=n+Math.imul(m,$)|0,a=(a=a+Math.imul(m,tt)|0)+Math.imul(y,$)|0,i=i+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,a=(a=a+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,i=i+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(h,it)|0)|0)+((8191&(a=(a=a+Math.imul(h,ot)|0)+Math.imul(f,it)|0))<<13)|0;c=((i=i+Math.imul(f,ot)|0)+(a>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,V),a=(a=Math.imul(O,U))+Math.imul(I,V)|0,i=Math.imul(I,U),n=n+Math.imul(C,H)|0,a=(a=a+Math.imul(C,G)|0)+Math.imul(L,H)|0,i=i+Math.imul(L,G)|0,n=n+Math.imul(M,W)|0,a=(a=a+Math.imul(M,X)|0)+Math.imul(S,W)|0,i=i+Math.imul(S,X)|0,n=n+Math.imul(k,J)|0,a=(a=a+Math.imul(k,K)|0)+Math.imul(T,J)|0,i=i+Math.imul(T,K)|0,n=n+Math.imul(b,$)|0,a=(a=a+Math.imul(b,tt)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,a=(a=a+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,i=i+Math.imul(y,nt)|0,n=n+Math.imul(d,it)|0,a=(a=a+Math.imul(d,ot)|0)+Math.imul(g,it)|0,i=i+Math.imul(g,ot)|0;var kt=(c+(n=n+Math.imul(h,lt)|0)|0)+((8191&(a=(a=a+Math.imul(h,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((i=i+Math.imul(f,ct)|0)+(a>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,V),a=(a=Math.imul(D,U))+Math.imul(R,V)|0,i=Math.imul(R,U),n=n+Math.imul(O,H)|0,a=(a=a+Math.imul(O,G)|0)+Math.imul(I,H)|0,i=i+Math.imul(I,G)|0,n=n+Math.imul(C,W)|0,a=(a=a+Math.imul(C,X)|0)+Math.imul(L,W)|0,i=i+Math.imul(L,X)|0,n=n+Math.imul(M,J)|0,a=(a=a+Math.imul(M,K)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,K)|0,n=n+Math.imul(k,$)|0,a=(a=a+Math.imul(k,tt)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,n=n+Math.imul(b,rt)|0,a=(a=a+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,i=i+Math.imul(_,nt)|0,n=n+Math.imul(m,it)|0,a=(a=a+Math.imul(m,ot)|0)+Math.imul(y,it)|0,i=i+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,a=(a=a+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,i=i+Math.imul(g,ct)|0;var Tt=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(a=(a=a+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((i=i+Math.imul(f,ft)|0)+(a>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(B,V),a=(a=Math.imul(B,U))+Math.imul(N,V)|0,i=Math.imul(N,U),n=n+Math.imul(D,H)|0,a=(a=a+Math.imul(D,G)|0)+Math.imul(R,H)|0,i=i+Math.imul(R,G)|0,n=n+Math.imul(O,W)|0,a=(a=a+Math.imul(O,X)|0)+Math.imul(I,W)|0,i=i+Math.imul(I,X)|0,n=n+Math.imul(C,J)|0,a=(a=a+Math.imul(C,K)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,K)|0,n=n+Math.imul(M,$)|0,a=(a=a+Math.imul(M,tt)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,a=(a=a+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,n=n+Math.imul(b,it)|0,a=(a=a+Math.imul(b,ot)|0)+Math.imul(_,it)|0,i=i+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,a=(a=a+Math.imul(m,ct)|0)+Math.imul(y,lt)|0,i=i+Math.imul(y,ct)|0,n=n+Math.imul(d,ht)|0,a=(a=a+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,i=i+Math.imul(g,ft)|0;var At=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(a=(a=a+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((i=i+Math.imul(f,gt)|0)+(a>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,H),a=(a=Math.imul(B,G))+Math.imul(N,H)|0,i=Math.imul(N,G),n=n+Math.imul(D,W)|0,a=(a=a+Math.imul(D,X)|0)+Math.imul(R,W)|0,i=i+Math.imul(R,X)|0,n=n+Math.imul(O,J)|0,a=(a=a+Math.imul(O,K)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,K)|0,n=n+Math.imul(C,$)|0,a=(a=a+Math.imul(C,tt)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,a=(a=a+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,n=n+Math.imul(k,it)|0,a=(a=a+Math.imul(k,ot)|0)+Math.imul(T,it)|0,i=i+Math.imul(T,ot)|0,n=n+Math.imul(b,lt)|0,a=(a=a+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,i=i+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,a=(a=a+Math.imul(m,ft)|0)+Math.imul(y,ht)|0,i=i+Math.imul(y,ft)|0;var Mt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(a=(a=a+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((i=i+Math.imul(g,gt)|0)+(a>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,W),a=(a=Math.imul(B,X))+Math.imul(N,W)|0,i=Math.imul(N,X),n=n+Math.imul(D,J)|0,a=(a=a+Math.imul(D,K)|0)+Math.imul(R,J)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(O,$)|0,a=(a=a+Math.imul(O,tt)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,a=(a=a+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,i=i+Math.imul(L,nt)|0,n=n+Math.imul(M,it)|0,a=(a=a+Math.imul(M,ot)|0)+Math.imul(S,it)|0,i=i+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,a=(a=a+Math.imul(k,ct)|0)+Math.imul(T,lt)|0,i=i+Math.imul(T,ct)|0,n=n+Math.imul(b,ht)|0,a=(a=a+Math.imul(b,ft)|0)+Math.imul(_,ht)|0,i=i+Math.imul(_,ft)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(a=(a=a+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((i=i+Math.imul(y,gt)|0)+(a>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),a=(a=Math.imul(B,K))+Math.imul(N,J)|0,i=Math.imul(N,K),n=n+Math.imul(D,$)|0,a=(a=a+Math.imul(D,tt)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,a=(a=a+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,i=i+Math.imul(I,nt)|0,n=n+Math.imul(C,it)|0,a=(a=a+Math.imul(C,ot)|0)+Math.imul(L,it)|0,i=i+Math.imul(L,ot)|0,n=n+Math.imul(M,lt)|0,a=(a=a+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,i=i+Math.imul(S,ct)|0,n=n+Math.imul(k,ht)|0,a=(a=a+Math.imul(k,ft)|0)+Math.imul(T,ht)|0,i=i+Math.imul(T,ft)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(a=(a=a+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((i=i+Math.imul(_,gt)|0)+(a>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,$),a=(a=Math.imul(B,tt))+Math.imul(N,$)|0,i=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,a=(a=a+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,i=i+Math.imul(R,nt)|0,n=n+Math.imul(O,it)|0,a=(a=a+Math.imul(O,ot)|0)+Math.imul(I,it)|0,i=i+Math.imul(I,ot)|0,n=n+Math.imul(C,lt)|0,a=(a=a+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,i=i+Math.imul(L,ct)|0,n=n+Math.imul(M,ht)|0,a=(a=a+Math.imul(M,ft)|0)+Math.imul(S,ht)|0,i=i+Math.imul(S,ft)|0;var Ct=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(a=(a=a+Math.imul(k,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((i=i+Math.imul(T,gt)|0)+(a>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,rt),a=(a=Math.imul(B,nt))+Math.imul(N,rt)|0,i=Math.imul(N,nt),n=n+Math.imul(D,it)|0,a=(a=a+Math.imul(D,ot)|0)+Math.imul(R,it)|0,i=i+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,a=(a=a+Math.imul(O,ct)|0)+Math.imul(I,lt)|0,i=i+Math.imul(I,ct)|0,n=n+Math.imul(C,ht)|0,a=(a=a+Math.imul(C,ft)|0)+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0;var Lt=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(a=(a=a+Math.imul(M,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((i=i+Math.imul(S,gt)|0)+(a>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,it),a=(a=Math.imul(B,ot))+Math.imul(N,it)|0,i=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,a=(a=a+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,i=i+Math.imul(R,ct)|0,n=n+Math.imul(O,ht)|0,a=(a=a+Math.imul(O,ft)|0)+Math.imul(I,ht)|0,i=i+Math.imul(I,ft)|0;var Pt=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(a=(a=a+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((i=i+Math.imul(L,gt)|0)+(a>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,lt),a=(a=Math.imul(B,ct))+Math.imul(N,lt)|0,i=Math.imul(N,ct),n=n+Math.imul(D,ht)|0,a=(a=a+Math.imul(D,ft)|0)+Math.imul(R,ht)|0,i=i+Math.imul(R,ft)|0;var Ot=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(a=(a=a+Math.imul(O,gt)|0)+Math.imul(I,dt)|0))<<13)|0;c=((i=i+Math.imul(I,gt)|0)+(a>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ht),a=(a=Math.imul(B,ft))+Math.imul(N,ht)|0,i=Math.imul(N,ft);var It=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(a=(a=a+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((i=i+Math.imul(R,gt)|0)+(a>>>13)|0)+(It>>>26)|0,It&=67108863;var zt=(c+(n=Math.imul(B,dt))|0)+((8191&(a=(a=Math.imul(B,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((i=Math.imul(N,gt))+(a>>>13)|0)+(zt>>>26)|0,zt&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Tt,l[9]=At,l[10]=Mt,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=Pt,l[16]=Ot,l[17]=It,l[18]=zt,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),i.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=i.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=a/67108864|0,e+=i>>>26,this.words[r]=67108863&i}return 0!==e&&(this.words[r]=e,this.length++),this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>a}return e}(t);if(0===e.length)return new i(1);for(var r=this,n=0;n=0);var e,r=t%26,a=(t-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==a){for(e=this.length-1;e>=0;e--)this.words[e+a]=this.words[e];for(e=0;e=0),a=e?(e-e%26)/26:0;var i=t%26,o=Math.min((t-i)/26,this.length),s=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=a);c--){var h=0|this.words[c];this.words[c]=u<<26-i|h>>>i,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,a=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var a=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),a=t,o=0|a.words[a.length-1];0!==(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,l=n.length-a.length;if("mod"!==e){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[a.length+h])+(0|n.words[a.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(a,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(a,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(a=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:a,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e);var a,o,s},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),a=t.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,a=this.length-1;a>=0;a--)r=(e*r+(0|this.words[a]))%t;return r},i.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*e;this.words[r]=a/t|0,e=a%t}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var a=new i(1),o=new i(0),s=new i(0),l=new i(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(h)),a.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s),o.isub(l)):(r.isub(e),s.isub(a),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var a,o=new i(1),s=new i(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(a=0===e.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(t),a},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=e.cmp(r);if(a<0){var i=e;e=r,r=i}else if(0===a||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,a=1<>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var a=0|this.words[0];e=a===t?0:at.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|t.words[r];if(n!==a){na&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return-1===this.cmpn(t)},i.prototype.lt=function(t){return-1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new w(t)},i.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},a(y,m),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,a=i}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=a,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return v[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new i(1)).iushrn(2);return this.pow(t,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,a),f=this.pow(t,a.addn(1).iushrn(1)),p=this.pow(t,a),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var h=c>>u&1;a!==r[0]&&(a=this.sqr(a)),0!==h||0!==o?(o<<=1,o|=h,(4===++s||0===n&&0===u)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}l=26}return a},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new k(t)},a(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof e||e,this)},{buffer:104}],96:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,a=t.length,i=0;for(e=0;e>>1;if(!(u<=0)){var h,f=a.mallocDouble(2*u*s),p=a.mallocInt32(s);if((s=l(t,u,f,p))>0){if(1===u&&n)i.init(s),h=i.sweepComplete(u,r,0,s,f,p,0,s,f,p);else{var d=a.mallocDouble(2*u*c),g=a.mallocInt32(c);(c=l(e,u,d,g))>0&&(i.init(s+c),h=1===u?i.sweepBipartite(u,r,0,s,f,p,0,c,d,g):o(u,r,n,s,f,p,c,d,g),a.free(d),a.free(g))}a.free(f),a.free(p)}return h}}}function u(t,e){n.push([t,e])}},{"./lib/intersect":99,"./lib/sweep":103,"typedarray-pool":546}],98:[function(t,e,r){"use strict";var n="d",a="ax",i="vv",o="fp",s="es",l="rs",c="re",u="rb",h="ri",f="rp",p="bs",d="be",g="bb",v="bi",m="bp",y="rv",x="Q",b=[n,a,i,l,c,u,h,p,d,g,v];function _(t){var e="bruteForce"+(t?"Full":"Partial"),r=[],_=b.slice();t||_.splice(3,0,o);var w=["function "+e+"("+_.join()+"){"];function k(e,o){var _=function(t,e,r){var o="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),_=["function ",o,"(",b.join(),"){","var ",s,"=2*",n,";"],w="for(var i="+l+","+f+"="+s+"*"+l+";i<"+c+";++i,"+f+"+="+s+"){var x0="+u+"["+a+"+"+f+"],x1="+u+"["+a+"+"+f+"+"+n+"],xi="+h+"[i];",k="for(var j="+p+","+m+"="+s+"*"+p+";j<"+d+";++j,"+m+"+="+s+"){var y0="+g+"["+a+"+"+m+"],"+(r?"y1="+g+"["+a+"+"+m+"+"+n+"],":"")+"yi="+v+"[j];";return t?_.push(w,x,":",k):_.push(k,x,":",w),r?_.push("if(y1"+d+"-"+p+"){"),t?(k(!0,!1),w.push("}else{"),k(!1,!1)):(w.push("if("+o+"){"),k(!0,!0),w.push("}else{"),k(!0,!1),w.push("}}else{if("+o+"){"),k(!1,!0),w.push("}else{"),k(!1,!1),w.push("}")),w.push("}}return "+e);var T=r.join("")+w.join("");return new Function(T)()}r.partial=_(!1),r.full=_(!0)},{}],99:[function(t,e,r){"use strict";e.exports=function(t,e,r,i,u,S,E,C,L){!function(t,e){var r=8*a.log2(e+1)*(t+1)|0,i=a.nextPow2(b*r);w.length0;){var z=(O-=1)*b,D=w[z],R=w[z+1],F=w[z+2],B=w[z+3],N=w[z+4],j=w[z+5],V=O*_,U=k[V],q=k[V+1],H=1&j,G=!!(16&j),Y=u,W=S,X=C,Z=L;if(H&&(Y=C,W=L,X=u,Z=S),!(2&j&&(F=v(t,D,R,F,Y,W,q),R>=F)||4&j&&(R=m(t,D,R,F,Y,W,U))>=F)){var J=F-R,K=N-B;if(G){if(t*J*(J+K)=p0)&&!(p1>=hi)",["p0","p1"]),g=u("lo===p0",["p0"]),v=u("lo>>1,f=2*t,p=h,d=s[f*h+e];for(;c=x?(p=y,d=x):m>=_?(p=v,d=m):(p=b,d=_):x>=_?(p=y,d=x):_>=m?(p=v,d=m):(p=b,d=_);for(var w=f*(u-1),k=f*p,T=0;Tr&&a[h+e]>c;--u,h-=o){for(var f=h,p=h+o,d=0;d=0&&a.push("lo=e[k+n]");t.indexOf("hi")>=0&&a.push("hi=e[k+o]");return r.push(n.replace("_",a.join()).replace("$",t)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],102:[function(t,e,r){"use strict";e.exports=function(t,e){e<=4*n?a(0,e-1,t):function t(e,r,h){var f=(r-e+1)/6|0,p=e+f,d=r-f,g=e+r>>1,v=g-f,m=g+f,y=p,x=v,b=g,_=m,w=d,k=e+1,T=r-1,A=0;c(y,x,h)&&(A=y,y=x,x=A);c(_,w,h)&&(A=_,_=w,w=A);c(y,b,h)&&(A=y,y=b,b=A);c(x,b,h)&&(A=x,x=b,b=A);c(y,_,h)&&(A=y,y=_,_=A);c(b,_,h)&&(A=b,b=_,_=A);c(x,w,h)&&(A=x,x=w,w=A);c(x,b,h)&&(A=x,x=b,b=A);c(_,w,h)&&(A=_,_=w,w=A);var M=h[2*x];var S=h[2*x+1];var E=h[2*_];var C=h[2*_+1];var L=2*y;var P=2*b;var O=2*w;var I=2*p;var z=2*g;var D=2*d;for(var R=0;R<2;++R){var F=h[L+R],B=h[P+R],N=h[O+R];h[I+R]=F,h[z+R]=B,h[D+R]=N}o(v,e,h);o(m,r,h);for(var j=k;j<=T;++j)if(u(j,M,S,h))j!==k&&i(j,k,h),++k;else if(!u(j,E,C,h))for(;;){if(u(T,E,C,h)){u(T,M,S,h)?(s(j,k,T,h),++k,--T):(i(j,T,h),--T);break}if(--Tt;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function u(t,e,r,n){var a=n[t*=2];return a>>1;i(p,S);for(var E=0,C=0,k=0;k=o)d(c,u,C--,L=L-o|0);else if(L>=0)d(s,l,E--,L);else if(L<=-o){L=-L-o|0;for(var P=0;P>>1;i(p,E);for(var C=0,L=0,P=0,T=0;T>1==p[2*T+3]>>1&&(I=2,T+=1),O<0){for(var z=-(O>>1)-1,D=0;D>1)-1;0===I?d(s,l,C--,z):1===I?d(c,u,L--,z):2===I&&d(h,f,P--,z)}}},scanBipartite:function(t,e,r,n,a,c,u,h,f,v,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,T=1;n?T=o:k=o;for(var A=a;A>>1;i(p,C);for(var L=0,A=0;A=o?(O=!n,M-=o):(O=!!n,M-=1),O)g(s,l,L++,M);else{var I=y[M],z=b*M,D=m[z+e+1],R=m[z+e+1+t];t:for(var F=0;F>>1;i(p,k);for(var T=0,x=0;x=o)s[T++]=b-o;else{var M=d[b-=1],S=v*b,E=f[S+e+1],C=f[S+e+1+t];t:for(var L=0;L=0;--L)if(s[L]===b){for(var z=L+1;z0&&s.length>i){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[e]=r,++t._eventsCount;return t}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var l=new Error('Unhandled "error" event. ('+e+")");throw l.context=e,l}if(!(r=o[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,a=v(t,n),i=0;i=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(var r=e,n=r+1,a=t.length;n=0;i--)this.removeListener(t,e[i]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],106:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),a=t("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,e.prototype),r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|p(t,r),a=s(n),i=a.write(t,r);i!==n&&(a=a.slice(0,i));return a}(t,r);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(i)return a?-1:F(t).length;r=(""+r).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,r,n,a,i){if(0===t.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=e.from(r,a)),e.isBuffer(r))return 0===r.length?-1:v(t,r,n,a,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):v(t,[r],n,a,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,a){var i,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(a){var u=-1;for(i=r;is&&(r=s-l),i=r;i>=0;i--){for(var h=!0,f=0;fa&&(n=a):n=a;var i=e.length;n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],a=e;a239?4:c>223?3:c>191?2:1;if(a+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(i=t[a+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=t[a+1],o=t[a+2],128==(192&i)&&128==(192&o)&&(l=(15&c)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=t[a+1],o=t[a+2],s=t[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=h}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.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 E(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},i&&(e.prototype[i]=e.prototype.inspect),e.prototype.compare=function(t,r,n,a,i){if(j(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),r<0||n>t.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(a>>>=0),s=(n>>>=0)-(r>>>=0),l=Math.min(o,s),c=this.slice(a,i),u=t.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-e;if((void 0===r||r>a)&&(r=a),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function M(t,e,r){var n="";r=Math.min(t.length,r);for(var a=e;an)&&(r=n);for(var a="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function P(t,r,n,a,i,o){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function O(t,e,r,n,a,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,0,r,4),a.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,0,r,8),a.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],a=1,i=0;++i>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],a=1;e>0&&(a*=256);)n+=this[t+--e]*a;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,a=1,i=this[t+--n];n>0&&(a*=256);)i+=this[t+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*e)),i},e.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),a.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),a.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),a.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),a.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[e]=255&t;++i>>=0,r>>>=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[e+a]=255&t;--a>=0&&(i*=256);)this[e+a]=t/i&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var a=Math.pow(2,8*r-1);P(this,t,e,r,a-1,-a)}var i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var a=Math.pow(2,8*r-1);P(this,t,e,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(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},e.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,a){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),r>=t.length&&(r=t.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-r=0;--o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,a),r);return i},e.prototype.fill=function(t,r,n,a){if("string"==typeof t){if("string"==typeof r?(a=r,r=0,n=this.length):"string"==typeof n&&(a=n,n=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!e.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===t.length){var i=t.charCodeAt(0);("utf8"===a&&i<128||"latin1"===a)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&r<57344){if(!a){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(e-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function B(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function N(t,e,r,n){for(var a=0;a=e.length||a>=t.length);++a)e[a+r]=t[a];return a}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":75,buffer:106,ieee754:413}],107:[function(t,e,r){"use strict";var n=t("./lib/monotone"),a=t("./lib/triangulation"),i=t("./lib/delaunay"),o=t("./lib/filter");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,"delaunay",!0),h=!!c(r,"interior",!0),f=!!c(r,"exterior",!0),p=!!c(r,"infinity",!1);if(!h&&!f||0===t.length)return[];var d=n(t,e);if(u||h!==f||p){for(var g=a(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v0;){for(var u=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],d=1;d=0||(e.flip(s,u),a(t,e,r,h,s,f),a(t,e,r,s,f,h),a(t,e,r,f,u,h),a(t,e,r,u,h,f)))}}},{"binary-search-bounds":112,"robust-in-sphere":509}],109:[function(t,e,r){"use strict";var n,a=t("binary-search-bounds");function i(t,e,r,n,a,i,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=a,this.next=i,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,a=0;a0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-a){c[p]=a;u[p];for(var d=0;d<3;++d){var g=f[3*p+d];g>=0&&0===c[g]&&(h[3*p+d]?l.push(g):(s.push(g),c[g]=a))}}}var v=l;l=s,s=v,l.length=0,a=-a}var m=function(t,e,r){for(var n=0,a=0;a1&&a(r[f[p-2]],r[f[p-1]],i)>0;)t.push([f[p-1],f[p-2],o]),p-=1;f.length=p,f.push(o);var d=u.upperIds;for(p=d.length;p>1&&a(r[d[p-2]],r[d[p-1]],i)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function p(t,e){var r;return(r=t.a[0]m[0]&&a.push(new c(m,v,s,h),new c(v,m,o,h))}a.sort(u);for(var y=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),x=[new l([y,1],[y,0],-1,[],[],[],[])],b=[],h=0,_=a.length;h<_;++h){var w=a[h],k=w.type;k===i?f(b,x,t,w.a,w.idx):k===s?d(x,t,w):g(x,t,w)}return b}},{"binary-search-bounds":112,"robust-orientation":511}],111:[function(t,e,r){"use strict";var n=t("binary-search-bounds");function a(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n=0}}(),i.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},i.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},i.opposite=function(t,e){for(var r=this.stars[e],n=1,a=r.length;n>>1,x=a[m]"];return a?e.indexOf("c")<0?i.push(";if(x===y){return m}else if(x<=y){"):i.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):i.push(";if(",e,"){i=m;"),r?i.push("l=m+1}else{h=m-1}"):i.push("h=m-1}else{l=m+1}"),i.push("}"),a?i.push("return -1};"):i.push("return i};"),i.join("")}function a(t,e,r,a){return new Function([n("A","x"+t+"y",e,["y"],a),n("P","c(x,y)"+t+"0",e,["y","c"],a),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],113:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1,r=1;rr?r:t:te?e:t}},{}],117:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n;if(r){n=e;for(var a=new Array(e.length),i=0;ie[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--i){var x=e[u=(S=n[i])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var T=b;b=_,_=T}x[0]=b;var A,M=x[1]=S[1];for(a&&(A=x[2]);i>0&&n[i-1][0]===u;){var S,E=(S=n[--i])[1];a?e.push([M,E,A]):e.push([M,E]),M=E}a?e.push([M,_,A]):e.push([M,_])}return f}(t,e,f,v,r));return m(e,y,r),!!y||(f.length>0||v.length>0)}},{"./lib/rat-seg-intersect":118,"big-rat":79,"big-rat/cmp":77,"big-rat/to-float":91,"box-intersect":97,nextafter:452,"rat-vec":487,"robust-segment-intersect":514,"union-find":547}],118:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=s(e,t),h=s(n,r),f=u(i,h);if(0===o(f))return null;var p=s(t,r),d=u(h,p),g=a(d,f),v=c(i,g);return l(t,v)};var n=t("big-rat/mul"),a=t("big-rat/div"),i=t("big-rat/sub"),o=t("big-rat/sign"),s=t("rat-vec/sub"),l=t("rat-vec/add"),c=t("rat-vec/muls");function u(t,e){return i(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":78,"big-rat/mul":88,"big-rat/sign":89,"big-rat/sub":90,"rat-vec/add":486,"rat-vec/muls":488,"rat-vec/sub":489}],119:[function(t,e,r){"use strict";var n=t("clamp");function a(t,e){null==e&&(e=!0);var r=t[0],a=t[1],i=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,a*=255,i*=255,o*=255),16777216*(r=255&n(r,0,255))+((a=255&n(a,0,255))<<16)+((i=255&n(i,0,255))<<8)+(o=255&n(o,0,255))}e.exports=a,e.exports.to=a,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,a=(65280&t)>>>8,i=255&t;return!1===e?[r,n,a,i]:[r/255,n/255,a/255,i/255]}},{clamp:116}],120:[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]}},{}],121:[function(t,e,r){"use strict";var n=t("color-rgba"),a=t("clamp"),i=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(i(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]=a(Math.floor(255*t[0]),0,255),r[1]=a(Math.floor(255*t[1]),0,255),r[2]=a(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:a(Math.floor(255*t[3]),0,255)),r)}},{clamp:116,"color-rgba":123,dtype:170}],122:[function(t,e,r){(function(r){"use strict";var n=t("color-name"),a=t("is-plain-obj"),i=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1),h=u.length,f=h<=4;c=1,f?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var p=e[1],d="rgb"===p,u=p.replace(/a$/,"");s=u;var h="cmyk"===u?4:"gray"===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:"rgb"===u?255*parseFloat(t)/100:parseFloat(t);if("h"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),p===u&&l.push(1),c=d?1:void 0===l[h]?1:l[h],l=l.slice(0,h)}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(a(t)){var g=i(t.r,t.red,t.R,null);null!==g?(s="rgb",l=[g,i(t.g,t.green,t.G),i(t.b,t.blue,t.B)]):(s="hsl",l=[i(t.h,t.hue,t.H),i(t.s,t.saturation,t.S),i(t.l,t.lightness,t.L,t.b,t.brightness)]),c=i(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":120,defined:165,"is-plain-obj":423}],123:[function(t,e,r){"use strict";var n=t("color-parse"),a=t("color-space/hsl"),i=t("clamp");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=i(r.values[0],0,255),e[1]=i(r.values[1],0,255),e[2]=i(r.values[2],0,255),"h"===r.space[0]&&(e=a.rgb(e)),e.push(i(r.alpha,0,1)),e):[]}},{clamp:116,"color-parse":122,"color-space/hsl":124}],124:[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,a,i,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[i=255*l,i,i];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,i=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,a[c]=255*i;return a}},n.hsl=function(t){var e,r,n=t[0]/255,a=t[1]/255,i=t[2]/255,o=Math.min(n,a,i),s=Math.max(n,a,i),l=s-o;return s===o?e=0:n===s?e=(a-i)/l:a===s?e=2+(i-n)/l:i===s&&(e=4+(n-a)/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":125}],125:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],126:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],127:[function(t,e,r){"use strict";var n=t("./colorScale"),a=t("lerp");function i(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,l,c,u,h,f,p,d,g;t||(t={});p=(t.nshades||72)-1,f=t.format||"hex",(h=t.colormap)||(h="jet");if("string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>p+1)throw new Error(h+" map requires nshades to be at least size "+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map(function(t){return Math.round(t.index*p)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=u.map(function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=d[0]+(d[1]-d[0])*r,n)}),m=[];for(g=0;g0?-1:l(t,e,i)?-1:1:0===s?c>0?1:l(t,e,r)?1:-1:a(c-s)}var f=n(t,e,r);if(f>0)return o>0&&n(t,e,i)>0?1:-1;if(f<0)return o>0||n(t,e,i)>0?1:-1;var p=n(t,e,i);return p>0?1:l(t,e,r)?1:-1};var n=t("robust-orientation"),a=t("signum"),i=t("two-sum"),o=t("robust-product"),s=t("robust-sum");function l(t,e,r){var n=i(t[0],-e[0]),a=i(t[1],-e[1]),l=i(r[0],-e[0]),c=i(r[1],-e[1]),u=s(o(n,l),o(a,c));return u[u.length-1]>=0}},{"robust-orientation":511,"robust-product":512,"robust-sum":516,signum:517,"two-sum":545}],129:[function(t,e,r){e.exports=function(t,e){var r=t.length,i=t.length-e.length;if(i)return i;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(i=o+t[2]-(s+e[2]))return i;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],h=t[1],f=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return u+h+f+p-(d+g+v+m)||n(u,h,f,p)-n(d,g,v,m,d)||n(u+h,u+f,u+p,h+f,h+p,f+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(u+h+f,u+h+p,u+f+p,h+f+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(a),x=e.slice().sort(a),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],133:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var a=new Array(r),i=e[r-1],o=0;o=e[l]&&(s+=1);i[o]=s}}return t}(o,r)}};var n=t("incremental-convex-hull"),a=t("affine-hull")},{"affine-hull":63,"incremental-convex-hull":414}],135:[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"}},{}],136:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],137:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],138:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],139:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],140:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":142,"./stringify":143}],141:[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":136}],142:[function(t,e,r){"use strict";var n=t("unquote"),a=t("css-global-keywords"),i=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=f;var h=f.cache={};function f(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(h[t])return h[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==i.indexOf(t))return h[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=c(t,/\s+/);e=f.shift();){if(-1!==a.indexOf(e))return["style","variant","weight","stretch"].forEach(function(t){r[t]=e}),h[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]):"/"===f[0]&&(f.shift(),r.lineHeight=p(f.shift())),!f.length)throw new Error("Missing required font-family.");return r.family=c(f.join(" "),/\s*,\s*/).map(n),h[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":141,"css-font-stretch-keywords":137,"css-font-style-keywords":138,"css-font-weight-keywords":139,"css-global-keywords":144,"css-system-font-keywords":145,"string-split-by":530,unquote:549}],143:[function(t,e,r){"use strict";var n=t("pick-by-alias"),a=t("./lib/util").isSize,i=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},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},f="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!i[t])throw Error("Unknown keyword `"+t+"`");return t}function g(t){for(var e={},r=0;r=0;--p)i[p]=c*t[p]+u*e[p]+h*r[p]+f*n[p];return i}return c*t+u*e+h*r+f*n},e.exports.derivative=function(t,e,r,n,a,i){var o=6*a*a-6*a,s=3*a*a-4*a+1,l=-6*a*a+6*a,c=3*a*a-2*a;if(t.length){i||(i=new Array(t.length));for(var u=t.length-1;u>=0;--u)i[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return i}return o*t+s*e+l*r[u]+c*n}},{}],147:[function(t,e,r){"use strict";var n=t("./lib/thunk.js");function a(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new a;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,n(e)}},{"./lib/thunk.js":149}],148:[function(t,e,r){"use strict";var n=t("uniq");function a(t,e,r){var n,a,i=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,h=0;for(n=0;n0&&l.push("var "+c.join(",")),n=i-1;n>=0;--n)u=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",h,"]-=s",h].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r){for(var n=t.body,a=[],i=[],o=0;o0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l0&&m.push("var "+y.join(",")),l=0;l3&&m.push(i(t.pre,t,s));var k=i(t.body,t,s),T=function(t){for(var e=0,r=t[0].length;e0,c=[],u=0;u0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",e[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",e[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",e[u],"]=j",u].join(""));for(u=0;u3&&m.push(i(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+m.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",T,function(t){for(var e=new Array(t.length),r=!0,n=0;n0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}(s)].join("");return new Function(["function ",A,"(",v.join(","),"){",m.join("\n"),"} return ",A].join(""))()}},{uniq:548}],149:[function(t,e,r){"use strict";var n=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],a=t.funcName+"_cwise_thunk";e.push(["return function ",a,"(",t.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+h+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+h+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;ue?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,a){for(null==n&&(n=0),null==a&&(a=e.length);n>>1;t(e[i],r)<0?n=i+1:a=i}return n},right:function(e,r,n,a){for(null==n&&(n=0),null==a&&(a=e.length);n>>1;t(e[i],r)>0?a=i:n=i+1}return n}}}var n=r(e),a=n.right,i=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,a=t.length,i=0,o=-1,l=0,c=0;if(null==e)for(;++o1)return c/(i-1)}function c(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function u(t,e){var r,n,a,i=t.length,o=-1;if(null==e){for(;++o=r)for(n=a=r;++or&&(n=r),a=r)for(n=a=r;++or&&(n=r),a=0?(i>=m?10:i>=y?5:i>=x?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=m?10:i>=y?5:i>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),a=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/a;return i>=m?a*=10:i>=y?a*=5:i>=x&&(a*=2),e=1)return+r(t[n-1],n-1,t);var n,a=(n-1)*e,i=Math.floor(a),o=+r(t[i],i,t);return o+(+r(t[i+1],i+1,t)-o)*(a-i)}}function T(t,e){var r,n,a=t.length,i=-1;if(null==e){for(;++i=r)for(n=r;++ir&&(n=r)}else for(;++i=r)for(n=r;++ir&&(n=r);return n}function A(t){if(!(a=t.length))return[];for(var e=-1,r=T(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 i,o,s=n.length,l=new Array(s);for(i=0;ih;)f.pop(),--p;var d,g=new Array(p+1);for(i=0;i<=p;++i)(d=g[i]=[]).x0=i>0?f[i-1]:u,d.x1=i=r)for(n=r;++in&&(n=r)}else for(;++i=r)for(n=r;++in&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,a=n,i=-1,o=0;if(null==e)for(;++i=0;)for(e=(n=t[a]).length;--e>=0;)r[--o]=n[e];return r},t.min=T,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),i=new Array(a=Math.ceil(e-t+1));++s=l.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,h,f=-1,p=n.length,d=l[a++],g=r(),v=i();++fl.length)return r;var a,i=c[n-1];return null!=e&&n>=l.length?a=r.entries():(a=[],r.each(function(e,r){a.push({key:r,values:t(e,n)})})),null!=i?a.sort(function(t,e){return i(t.key,e.key)}):a}(u(t,0,i,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],155:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var a="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),u=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,i]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,i]+"\\)$"),p=new RegExp("^hsl\\("+[i,o,o]+"\\)$"),d=new RegExp("^hsla\\("+[i,o,o,i]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var e;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?new _((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=l.exec(t))?m(parseInt(e[1],16)):(e=c.exec(t))?new _(e[1],e[2],e[3],1):(e=u.exec(t))?new _(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?y(e[1],e[2],e[3],e[4]):(e=f.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?m(g[t]):"transparent"===t?new _(NaN,NaN,NaN,0):null}function m(t){return new _(t>>16&255,t>>8&255,255&t,1)}function y(t,e,r,n){return n<=0&&(t=e=r=NaN),new _(t,e,r,n)}function x(t){return t instanceof n||(t=v(t)),t?new _((t=t.rgb()).r,t.g,t.b,t.opacity):new _}function b(t,e,r,n){return 1===arguments.length?x(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function k(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new A(t,e,r,n)}function T(t,e,r,a){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new A;if(t instanceof A)return t;var e=(t=t.rgb()).r/255,r=t.g/255,a=t.b/255,i=Math.min(e,r,a),o=Math.max(e,r,a),s=NaN,l=o-i,c=(o+i)/2;return l?(s=e===o?(r-a)/l+6*(r0&&c<1?0:s,new A(s,l,c,t.opacity)}(t):new A(t,e,r,null==a?1:a)}function A(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function M(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),e(_,b,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),e(A,T,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new _(M(t>=240?t-240:t+120,a,n),M(t,a,n),M(t<120?t+240:t-120,a,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,E=180/Math.PI,C=.96422,L=1,P=.82521,O=4/29,I=6/29,z=3*I*I,D=I*I*I;function R(t){if(t instanceof B)return new B(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new B(t.l,0,0,t.opacity);var e=t.h*S;return new B(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof _||(t=x(t));var r,n,a=U(t.r),i=U(t.g),o=U(t.b),s=N((.2225045*a+.7168786*i+.0606169*o)/L);return a===i&&i===o?r=n=s:(r=N((.4360747*a+.3850649*i+.1430804*o)/C),n=N((.0139322*a+.0971045*i+.7141733*o)/P)),new B(116*s-16,500*(r-s),200*(s-n),t.opacity)}function F(t,e,r,n){return 1===arguments.length?R(t):new B(t,e,r,null==n?1:n)}function B(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function N(t){return t>D?Math.pow(t,1/3):t/z+O}function j(t){return t>I?t*t*t:z*(t-O)}function V(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof B||(t=R(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E;return new G(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function H(t,e,r,n){return 1===arguments.length?q(t):new G(t,e,r,null==n?1:n)}function G(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}e(B,F,r(n,{brighter:function(t){return new B(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new B(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _(V(3.1338561*(e=C*j(e))-1.6168667*(t=L*j(t))-.4906146*(r=P*j(r))),V(-.9787684*e+1.9161415*t+.033454*r),V(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(G,H,r(n,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return R(this).rgb()}}));var Y=-.14861,W=1.78277,X=-.29227,Z=-.90649,J=1.97294,K=J*Z,Q=J*W,$=W*X-Z*Y;function tt(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);t instanceof _||(t=x(t));var e=t.r/255,r=t.g/255,n=t.b/255,a=($*n+K*e-Q*r)/($+K-Q),i=n-a,o=(J*(r-a)-X*i)/Z,s=Math.sqrt(o*o+i*i)/(J*a*(1-a)),l=s?Math.atan2(o,i)*E-120:NaN;return new et(l<0?l+360:l,s,a,t.opacity)}(t):new et(t,e,r,null==n?1:n)}function et(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(et,tt,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*S,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),a=Math.sin(t);return new _(255*(e+r*(Y*n+W*a)),255*(e+r*(X*n+Z*a)),255*(e+r*(J*n)),this.opacity)}})),t.color=v,t.rgb=b,t.hsl=T,t.lab=F,t.hcl=H,t.lch=function(t,e,r,n){return 1===arguments.length?q(t):new G(r,e,t,null==n?1:n)},t.gray=function(t,e){return new B(t,0,0,null==e?1:e)},t.cubehelix=tt,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],156:[function(t,e,r){var n;n=this,function(t){"use strict";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,a={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var r,n,a=new Array(r),i=0;if+c||np+c||iu.index){var h=f-s.x-s.vx,v=p-s.y-s.vy,m=h*h+v*v;mt.r&&(t.r=t[e].r)}function f(){if(r){var e,a,i=r.length;for(n=new Array(i),e=0;e=c)){(t.data!==r||t.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d1?(null==r?u.remove(t):u.set(t,y(r)),e):u.get(t)},find:function(e,r,n){var a,i,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(t,r),e):f.on(t)}}},t.forceX=function(t){var e,r,n,a=i(.1);function o(t){for(var a,i=0,o=e.length;i=0;)e+=r[n].value;else e=1;t.value=e}function i(t,e){var r,n,a,i,s,u=new c(t),h=+t.value&&(u.value=t.value),f=[u];for(null==e&&(e=o);r=f.pop();)if(h&&(r.value=+r.data.value),(a=e(r.data))&&(s=a.length))for(r.children=new Array(s),i=s-1;i>=0;--i)f.push(n=r.children[i]=new c(a[i])),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=i.prototype={constructor:c,count:function(){return this.eachAfter(a)},each:function(t){var e,r,n,a,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(t(i),r=i.children)for(n=0,a=r.length;n=0;--r)a.push(e[r]);return this},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,a=n&&n.length;--a>=0;)r+=n[a].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(),a=null;for(t=r.pop(),e=n.pop();t===e;)a=t,t=r.pop(),e=n.pop();return a}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var a=n.length;t!==r;)n.splice(a,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 i(this).eachBefore(s)}};var u=Array.prototype.slice;function h(t){for(var e,r,n=0,a=(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,i=[];n0&&r*r>n*n+a*a}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-a)/(2*c),i=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-i*l,r.y=t.y-n*l+i*s):(n=(c+a-o)/(2*c),i=Math.sqrt(Math.max(0,a/c-n*n)),r.x=e.x+n*s-i*l,r.y=e.y+n*l+i*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,a=e.y-t.y;return r>0&&r*r>n*n+a*a}function _(t){var e=t._,r=t.next._,n=e.r+r.r,a=(e.x*r.r+r.x*e.r)/n,i=(e.y*r.r+r.y*e.r)/n;return a*a+i*i}function w(t){this._=t,this.next=null,this.previous=null}function k(t){if(!(a=t.length))return 0;var e,r,n,a,i,o,s,l,c,u,f;if((e=t[0]).x=0,e.y=0,!(a>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(a>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;sf&&(f=s),v=u*u*g,(p=Math.max(f/v,v/h))>d){u-=s;break}d=p}m.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,a,i){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,h=-1,f=o.length,p=t.value;++h1?e:1)},r}(G);t.cluster=function(){var t=e,a=1,i=1,o=!1;function s(e){var s,l=0;e.eachAfter(function(e){var a=e.children;a?(e.x=function(t){return t.reduce(r,0)/t.length}(a),e.y=function(t){return 1+t.reduce(n,0)}(a)):(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),h=c.x-t(c,u)/2,f=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*a,t.y=(e.y-t.y)*i}:function(t){t.x=(t.x-h)/(f-h)*a,t.y=(1-(e.y?t.y/e.y:1))*i})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,a=+t[0],i=+t[1],s):o?null:[a,i]},s.nodeSize=function(t){return arguments.length?(o=!0,a=+t[0],i=+t[1],s):o?[a,i]:null},s},t.hierarchy=i,t.pack=function(){var t=null,e=1,r=1,n=A;function a(a){return a.x=e/2,a.y=r/2,t?a.eachBefore(E(t)).eachAfter(C(n,.5)).eachBefore(L(1)):a.eachBefore(E(S)).eachAfter(C(A,1)).eachAfter(C(n,a.r/Math.min(e,r))).eachBefore(L(Math.min(e,r)/(2*a.r))),a}return a.radius=function(e){return arguments.length?(t=null==(r=e)?null:T(r),a):t;var r},a.size=function(t){return arguments.length?(e=+t[0],r=+t[1],a):[e,r]},a.padding=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),a):n},a},t.packSiblings=function(t){return k(t),t},t.packEnclose=h,t.partition=function(){var t=1,e=1,r=0,n=!1;function a(a){var i=a.height+1;return a.x0=a.y0=r,a.x1=t,a.y1=e/i,a.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 a=n.x0,i=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return i}return r.id=function(e){return arguments.length?(t=T(e),r):t},r.parentId=function(t){return arguments.length?(e=T(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function a(a){var l=function(t){for(var e,r,n,a,i,o=new q(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(i=n.length),a=i-1;a>=0;--a)s.push(r=e.children[a]=new q(n[a],a)),r.parent=e;return(o.parent=new q(null,0)).children=[o],o}(a);if(l.eachAfter(i),l.parent.m=-l.z,l.eachBefore(o),n)a.eachBefore(s);else{var c=a,u=a,h=a;a.eachBefore(function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)});var f=c===u?1:t(c,u)/2,p=f-c.x,d=e/(u.x+f+p),g=r/(h.depth||1);a.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*g})}return a}function i(e){var r=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,a=t.children,i=a.length;--i>=0;)(e=a[i]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var i=(r[0].z+r[r.length-1].z)/2;a?(e.z=a.z+t(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+t(e._,a._));e.parent.A=function(e,r,n){if(r){for(var a,i=e,o=e,s=r,l=i.parent.children[0],c=i.m,u=o.m,h=s.m,f=l.m;s=j(s),i=N(i),s&&i;)l=N(l),(o=j(o)).a=e,(a=s.z+h-i.z-c+t(s._,i._))>0&&(V(U(s,e,n),e,a),c+=a,u+=a),h+=s.m,c+=i.m,f+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=h-u),i&&!N(l)&&(l.t=i,l.m+=c-f,n=e)}return n}(e,a,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 a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],a):n?null:[e,r]},a.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],a):n?[e,r]:null},a},t.treemap=function(){var t=W,e=!1,r=1,n=1,a=[0],i=A,o=A,s=A,l=A,c=A;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(h),a=[0],e&&t.eachBefore(P),t}function h(e){var r=a[e.depth],n=e.x0+r,u=e.y0+r,h=e.x1-r,f=e.y1-r;h=r-1){var u=s[e];return u.x0=a,u.y0=i,u.x1=o,void(u.y1=l)}for(var h=c[e],f=n/2+h,p=e+1,d=r-1;p>>1;c[g]l-i){var y=(a*m+o*v)/n;t(e,p,v,a,i,y,l),t(p,r,m,y,i,o,l)}else{var x=(i*m+l*v)/n;t(e,p,v,a,i,o,x),t(p,r,m,a,x,o,l)}}(0,l,t.value,e,r,n,a)},t.treemapDice=O,t.treemapSlice=H,t.treemapSliceDice=function(t,e,r,n,a){(1&t.depth?H:O)(t,e,r,n,a)},t.treemapSquarify=W,t.treemapResquarify=X,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],159:[function(t,e,r){var n,a;n=this,a=function(t,e){"use strict";function r(t,e,r,n,a){var i=t*t,o=i*t;return((1-3*t+3*i-o)*e+(4-6*i+3*o)*r+(1+3*t+3*i-3*o)*n+o*a)/6}function n(t){var e=t.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[a],o=t[a+1],s=a>0?t[a-1]:2*i-o,l=a180||r<-180?r-360*Math.round(r/360):r):i(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):i(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):i(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function a(t,r){var a=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),i=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=a(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return a.gamma=t,a}(1);function h(t){return function(r){var n,a,i=r.length,o=new Array(i),s=new Array(i),l=new Array(i);for(n=0;ni&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:v(r,n)})),i=x.lastIndex;return i180?e+=360:e-t>180&&(t+=360),i.push({i:r.push(a(r)+"rotate(",null,n)-2,x:v(t,e)})):e&&r.push(a(r)+"rotate("+e+n)}(i.rotate,o.rotate,s,l),function(t,e,r,i){t!==e?i.push({i:r.push(a(r)+"skewX(",null,n)-2,x:v(t,e)}):e&&r.push(a(r)+"skewX("+e+n)}(i.skewX,o.skewX,s,l),function(t,e,r,n,i,o){if(t!==r||e!==n){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:v(t,r)},{i:s-2,x:v(e,n)})}else 1===r&&1===n||i.push(a(i)+"scale("+r+","+n+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(t){for(var e,r=-1,n=l.length;++r1e-6)if(Math.abs(h*l-c*u)>1e-6&&i){var p=n-o,d=a-s,g=l*l+c*c,v=p*p+d*d,m=Math.sqrt(g),y=Math.sqrt(f),x=i*Math.tan((e-Math.acos((g+f-v)/(2*m*y)))/2),b=x/y,_=x/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(r+b*h)),this._+="A"+i+","+i+",0,0,"+ +(h*p>u*d)+","+(this._x1=t+_*l)+","+(this._y1=r+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=r);else;},arc:function(t,a,i,o,s,l){t=+t,a=+a;var c=(i=+i)*Math.cos(o),u=i*Math.sin(o),h=t+c,f=a+u,p=1^l,d=l?o-s:s-o;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+h+","+f:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+h+","+f),i&&(d<0&&(d=d%r+r),d>n?this._+="A"+i+","+i+",0,1,"+p+","+(t-c)+","+(a-u)+"A"+i+","+i+",0,1,"+p+","+(this._x1=h)+","+(this._y1=f):d>1e-6&&(this._+="A"+i+","+i+",0,"+ +(d>=e)+","+p+","+(this._x1=t+i*Math.cos(s))+","+(this._y1=a+i*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=i,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],161:[function(t,e,r){var n;n=this,function(t){"use strict";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var a,i,o,s,l,c,u,h,f,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(i=(g+m)/2))?g=i:m=i,(u=r>=(o=(v+y)/2))?v=o:y=o,a=p,!(p=p[h=u<<1|c]))return a[h]=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,a?a[h]=d:t._root=d,t;do{a=a?a[h]=new Array(4):t._root=new Array(4),(c=e>=(i=(g+m)/2))?g=i:m=i,(u=r>=(o=(v+y)/2))?v=o:y=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=i));return a[f]=p,a[h]=d,t}var r=function(t,e,r,n,a){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=a};function n(t){return t[0]}function a(t){return t[1]}function i(t,e,r){var i=new o(null==e?n:e,null==r?a:r,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function o(t,e,r,n,a,i){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=a,this._y1=i,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=i.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 a=0;a<4;++a)(e=n.source[a])&&(e.length?t.push({source:e,target:n.target[a]=new Array(4)}):n.target[a]=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,a,i,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=a),if&&(f=i));for(ht||t>a||n>e||e>i))return this;var o,s,l=a-r,c=this._root;switch(s=(e<(n+i)/2)<<1|t<(r+a)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(i=n+(l*=2),t>(a=r+l)||e>i);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(i=n+(l*=2),(r=a-l)>t||e>i);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=i-(l*=2),t>(a=r+l)||n>e);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=i-(l*=2),(r=a-l)>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=a,this._y1=i,this},l.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,e,n){var a,i,o,s,l,c,u,h=this._x0,f=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,h,f,p,d)),null==n?n=1/0:(h=t-n,f=e-n,p=t+n,d=e+n,n*=n);c=g.pop();)if(!(!(v=c.node)||(i=c.x0)>p||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=m)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_=(s=(d+v)/2))?d=s:v=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(r=e,f=h)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(a=p.next)&&delete p.next,n?(a?n.next=a:delete n.next,this):e?(a?e[h]=a:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[f]=p:this._root=p),this):(this._root=a,this)},l.removeAll=function(t){for(var e=0,r=t.length;e=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function v(t){return t.outerRadius}function m(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,a,i,s){var l=t-r,u=e-n,h=(s?i:-i)/c(l*l+u*u),f=h*u,p=-h*l,d=t+f,g=e+p,v=r+f,m=n+p,y=(d+v)/2,x=(g+m)/2,b=v-d,_=m-g,w=b*b+_*_,k=a-i,T=d*m-v*g,A=(_<0?-1:1)*c(o(0,k*k*w-T*T)),M=(T*_-b*A)/w,S=(-T*b-_*A)/w,E=(T*_+b*A)/w,C=(-T*b+_*A)/w,L=M-y,P=S-x,O=E-y,I=C-x;return L*L+P*P>O*O+I*I&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-p,x11:M*(a/k-1),y11:S*(a/k-1)}}function _(t){this._context=t}function w(t){return new _(t)}function k(t){return t[0]}function T(t){return t[1]}function A(){var t=k,n=T,a=r(!0),i=null,o=w,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==i&&(s=o(u=e.path())),l=0;l<=h;++l)!(l=h;--f)c.point(m[f],y[f]);c.lineEnd(),c.areaEnd()}v&&(m[u]=+t(p,u,r),y[u]=+a(p,u,r),c.point(n?+n(p,u,r):m[u],i?+i(p,u,r):y[u]))}if(d)return c=null,d+""||null}function h(){return A().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?(a="function"==typeof t?t:r(+t),i=null,u):a},u.y0=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),u):a},u.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:r(+t),u):i},u.lineX0=u.lineY0=function(){return h().x(t).y(a)},u.lineY1=function(){return h().x(t).y(i)},u.lineX1=function(){return h().x(n).y(a)},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 S(t,e){return et?1:e>=t?0:NaN}function E(t){return t}_.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=P(w);function L(t){this._curve=t}function P(t){function e(e){return new L(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(P(t)):e()._curve},t}function I(){return O(A().curve(C))}function z(){var t=M().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,a=t.lineY0,i=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(a())},delete t.lineY0,t.lineOuterRadius=function(){return O(i())},delete t.lineY1,t.curve=function(t){return arguments.length?e(P(t)):e()._curve},t}function D(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}L.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 R=Array.prototype.slice;function F(t){return t.source}function B(t){return t.target}function N(t){var n=F,a=B,i=k,o=T,s=null;function l(){var r,l=R.call(arguments),c=n.apply(this,l),u=a.apply(this,l);if(s||(s=r=e.path()),t(s,+i.apply(this,(l[0]=c,l)),+o.apply(this,l),+i.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?(a=t,l):a},l.x=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),l):i},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 j(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,a,n,a)}function V(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+a)/2,n,r,n,a)}function U(t,e,r,n,a){var i=D(e,r),o=D(e,r=(r+a)/2),s=D(n,r),l=D(n,a);t.moveTo(i[0],i[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/h);t.moveTo(r,0),t.arc(0,0,r,0,p)}},H={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()}},G=Math.sqrt(1/3),Y=2*G,W={draw:function(t,e){var r=Math.sqrt(e/Y),n=r*G;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},X=Math.sin(h/10)/Math.sin(7*h/10),Z=Math.sin(p/10)*X,J=-Math.cos(p/10)*X,K={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=Z*r,a=J*r;t.moveTo(0,-r),t.lineTo(n,a);for(var i=1;i<5;++i){var o=p*i/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*a,l*n+s*a)}t.closePath()}},Q={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},$=Math.sqrt(3),tt={draw:function(t,e){var r=-Math.sqrt(e/(3*$));t.moveTo(0,2*r),t.lineTo(-$*r,-r),t.lineTo($*r,-r),t.closePath()}},et=-.5,rt=Math.sqrt(3)/2,nt=1/Math.sqrt(12),at=3*(nt/2+1),it={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,a=r*nt,i=n,o=r*nt+r,s=-i,l=o;t.moveTo(n,a),t.lineTo(i,o),t.lineTo(s,l),t.lineTo(et*n-rt*a,rt*n+et*a),t.lineTo(et*i-rt*o,rt*i+et*o),t.lineTo(et*s-rt*l,rt*s+et*l),t.lineTo(et*n+rt*a,et*a-rt*n),t.lineTo(et*i+rt*o,et*o-rt*i),t.lineTo(et*s+rt*l,et*l-rt*s),t.closePath()}},ot=[q,H,W,Q,K,tt,it];function st(){}function lt(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 ct(t){this._context=t}function ut(t){this._context=t}function ht(t){this._context=t}function ft(t,e){this._basis=new ct(t),this._beta=e}ct.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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ut.prototype={areaStart:st,areaEnd:st,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:lt(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:lt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.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,a=t[0],i=e[0],o=t[r]-a,s=e[r]-i,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(a+n*o),this._beta*e[l]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var pt=function t(e){function r(t){return 1===e?new ct(t):new ft(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function dt(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 gt(t,e){this._context=t,this._k=(1-e)/6}gt.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:dt(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:dt(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 gt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:st,areaEnd:st,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:dt(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 yt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function xt(t,e){this._context=t,this._k=(1-e)/6}xt.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:dt(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 bt=function t(e){function r(t){return new xt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _t(t,e,r){var n=t._x1,a=t._y1,i=t._x2,o=t._y2;if(t._l01_a>u){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,a=(a*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>u){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,a,i,o,t._x2,t._y2)}function wt(t,e){this._context=t,this._alpha=e}wt.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:_t(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 wt(t,e):new gt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:st,areaEnd:st,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:_t(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 At=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 Mt(t,e){this._context=t,this._alpha=e}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._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:_t(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 St=function t(e){function r(t){return e?new Mt(t,e):new xt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Et(t){this._context=t}function Ct(t){return t<0?-1:1}function Lt(t,e,r){var n=t._x1-t._x0,a=e-t._x1,i=(t._y1-t._y0)/(n||a<0&&-0),o=(r-t._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Ct(i)+Ct(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Pt(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,a=t._y0,i=t._x1,o=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,a+s*e,i-s,o-s*r,i,o)}function It(t){this._context=t}function zt(t){this._context=new Dt(t)}function Dt(t){this._context=t}function Rt(t){this._context=t}function Ft(t){var e,r,n=t.length-1,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)a[e]=(o[e]-a[e+1])/i[e];for(i[n-1]=(t[n]+a[n-1])/2,e=0;e1)for(var r,n,a,i=1,o=t[e[0]],s=o.length;i=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ut(t){var e=t.map(qt);return jt(t).sort(function(t,r){return e[t]-e[r]})}function qt(t){for(var e,r=-1,n=0,a=t.length,i=-1/0;++ri&&(i=e,n=r);return n}function Ht(t){var e=t.map(Gt);return jt(t).sort(function(t,r){return e[t]-e[r]})}function Gt(t){for(var e,r=0,n=-1,a=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=v,_=r(0),w=null,k=m,T=y,A=x,M=null;function S(){var r,g,v,m=+t.apply(this,arguments),y=+o.apply(this,arguments),x=k.apply(this,arguments)-f,S=T.apply(this,arguments)-f,E=n(S-x),C=S>x;if(M||(M=r=e.path()),yu)if(E>p-u)M.moveTo(y*i(x),y*l(x)),M.arc(0,0,y,x,S,!C),m>u&&(M.moveTo(m*i(S),m*l(S)),M.arc(0,0,m,S,x,C));else{var L,P,O=x,I=S,z=x,D=S,R=E,F=E,B=A.apply(this,arguments)/2,N=B>u&&(w?+w.apply(this,arguments):c(m*m+y*y)),j=s(n(y-m)/2,+_.apply(this,arguments)),V=j,U=j;if(N>u){var q=d(N/m*l(B)),H=d(N/y*l(B));(R-=2*q)>u?(z+=q*=C?1:-1,D-=q):(R=0,z=D=(x+S)/2),(F-=2*H)>u?(O+=H*=C?1:-1,I-=H):(F=0,O=I=(x+S)/2)}var G=y*i(O),Y=y*l(O),W=m*i(D),X=m*l(D);if(j>u){var Z,J=y*i(I),K=y*l(I),Q=m*i(z),$=m*l(z);if(E1?0:v<-1?h:Math.acos(v))/2),it=c(Z[0]*Z[0]+Z[1]*Z[1]);V=s(j,(m-it)/(at-1)),U=s(j,(y-it)/(at+1))}}F>u?U>u?(L=b(Q,$,G,Y,y,U,C),P=b(J,K,W,X,y,U,C),M.moveTo(L.cx+L.x01,L.cy+L.y01),Uu&&R>u?V>u?(L=b(W,X,J,K,m,-V,C),P=b(G,Y,Q,$,m,-V,C),M.lineTo(L.cx+L.x01,L.cy+L.y01),V0&&(d+=h);for(null!=e?g.sort(function(t,r){return e(v[t],v[r])}):null!=n&&g.sort(function(t,e){return n(r[t],r[e])}),s=0,c=d?(y-f*b)/d:0;s0?h*c:0)+b,v[l]={data:r[l],index:s,value:h,startAngle:m,endAngle:u,padAngle:x};return v}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?(a="function"==typeof t?t:r(+t),s):a},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),s):o},s},t.areaRadial=z,t.radialArea=z,t.lineRadial=I,t.radialLine=I,t.pointRadial=D,t.linkHorizontal=function(){return N(j)},t.linkVertical=function(){return N(V)},t.linkRadial=function(){var t=N(U);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){var t=r(q),n=r(64),a=null;function i(){var r;if(a||(a=r=e.path()),t.apply(this,arguments).draw(a,+n.apply(this,arguments)),r)return a=null,r+""||null}return i.type=function(e){return arguments.length?(t="function"==typeof e?e:r(e),i):t},i.size=function(t){return arguments.length?(n="function"==typeof t?t:r(+t),i):n},i.context=function(t){return arguments.length?(a=null==t?null:t,i):a},i},t.symbols=ot,t.symbolCircle=q,t.symbolCross=H,t.symbolDiamond=W,t.symbolSquare=Q,t.symbolStar=K,t.symbolTriangle=tt,t.symbolWye=it,t.curveBasisClosed=function(t){return new ut(t)},t.curveBasisOpen=function(t){return new ht(t)},t.curveBasis=function(t){return new ct(t)},t.curveBundle=pt,t.curveCardinalClosed=yt,t.curveCardinalOpen=bt,t.curveCardinal=vt,t.curveCatmullRomClosed=At,t.curveCatmullRomOpen=St,t.curveCatmullRom=kt,t.curveLinearClosed=function(t){return new Et(t)},t.curveLinear=w,t.curveMonotoneX=function(t){return new It(t)},t.curveMonotoneY=function(t){return new zt(t)},t.curveNatural=function(t){return new Rt(t)},t.curveStep=function(t){return new Bt(t,.5)},t.curveStepAfter=function(t){return new Bt(t,1)},t.curveStepBefore=function(t){return new Bt(t,0)},t.stack=function(){var t=r([]),e=jt,n=Nt,a=Vt;function i(r){var i,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(i=0;i0){for(var r,n,a,i=0,o=t[0].length;i1)for(var r,n,a,i,o,s,l=0,c=t[e[0]].length;l=0?(n[0]=i,n[1]=i+=a):a<0?(n[1]=o,n[0]=o+=a):n[0]=i},t.stackOffsetNone=Nt,t.stackOffsetSilhouette=function(t,e){if((r=t.length)>0){for(var r,n=0,a=t[e[0]],i=a.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,a,i=0,o=1;o=0&&r._call.call(null,t),r=r._next;--n}function m(){l=(s=u.now())+c,n=a=0;try{v()}finally{n=0,function(){var t,n,a=e,i=1/0;for(;a;)a._call?(i>a._time&&(i=a._time),t=a,a=a._next):(n=a._next,a._next=null,a=t?t._next=n:e=n);r=t,x(i)}(),l=0}}function y(){var t=u.now(),e=t-s;e>o&&(c-=e,s=t)}function x(t){n||(a&&(a=clearTimeout(a)),t-l>24?(t<1/0&&(a=setTimeout(m,t-u.now()-c)),i&&(i=clearInterval(i))):(i||(s=u.now(),i=setInterval(y,o)),n=1,h(m)))}d.prototype=g.prototype={constructor:d,restart:function(t,n,a){if("function"!=typeof t)throw new TypeError("callback is not a function");a=(null==a?f():+a)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=a,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};t.now=f,t.timer=g,t.timerFlush=v,t.timeout=function(t,e,r){var n=new d;return e=null==e?0:+e,n.restart(function(r){n.stop(),t(r+e)},e,r),n},t.interval=function(t,e,r){var n=new d,a=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart(function i(o){o+=a,n.restart(i,a+=e,r),t(o)},e,r),n)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&"undefined"!=typeof e?r:n.d3=n.d3||{})},{}],164:[function(t,e,r){!function(){var t={version:"3.5.17"},r=[].slice,n=function(t){return r.call(t)},a=this.document;function i(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(a)try{n(a.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+"")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+"")},u.setProperty=function(t,e,r){h.call(this,t,e+"",r)}}function f(t,e){return te?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[i],r)<0?n=i+1:a=i}return n},right:function(e,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=e.length);n>>1;t(e[i],r)>0?a=i:n=i+1}return n}}}t.ascending=f,t.descending=function(t,e){return et?1:e>=t?0:NaN},t.min=function(t,e){var r,n,a=-1,i=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},t.max=function(t,e){var r,n,a=-1,i=t.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},t.extent=function(t,e){var r,n,a,i=-1,o=t.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(f);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return f(t(e),r)}:t)},t.shuffle=function(t,e,r){(i=arguments.length)<3&&(r=t.length,i<2&&(e=0));for(var n,a,i=r-e;i;)a=Math.random()*i--|0,n=t[i+e],t[i+e]=t[a+e],t[a+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],a=new Array(r<0?0:r);e=0;)for(e=(n=t[a]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function b(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,a=[],i=function(t){var e=1;for(;t*e%1;)e*=10;return e}(y(r)),o=-1;if(t*=i,e*=i,(r*=i)<0)for(;(n=t+r*++o)>e;)a.push(n/i);else for(;(n=t+r*++o)=a.length)return r?r.call(n,i):e?i.sort(e):i;for(var l,c,u,h,f=-1,p=i.length,d=a[s++],g=new b;++f=a.length)return e;var n=[],o=i[r++];return e.forEach(function(e,a){n.push({key:e,values:t(a,r)})}),o?n.sort(function(t,e){return o(t.key,e.key)}):n}(o(t.map,e,0),0)},n.key=function(t){return a.push(t),n},n.sortKeys=function(t){return i[a.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return U(t,W),t}var H=function(t,e){return e.querySelector(t)},G=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var r=t.matches||t[I(t,"matchesSelector")];return(Y=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},G=Sizzle,Y=Sizzle.matchesSelector),t.selection=function(){return t.select(a.documentElement)};var W=t.selection.prototype=[];function X(t){return"function"==typeof t?t:function(){return H(t,this)}}function Z(t){return"function"==typeof t?t:function(){return G(t,this)}}W.select=function(t){var e,r,n,a,i=[];t=X(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),K.hasOwnProperty(r)?{space:K[r],local:t}:t}},W.attr=function(e,r){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(Q(r,e[r]));return this}return this.each(Q(e,r))},W.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=et(t)).length,a=-1;if(e=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},W.sort=function(t){t=function(t){arguments.length||(t=f);return function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(e=e.slice(0,o));var l=dt.get(e);function c(){var t=this[i];t&&(this.removeEventListener(e,t,t.$),delete this[i])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[i]=t,t.$=a),t._=r}:c:r?D:function(){var r,n=new RegExp("^__on([^.]+)"+t.requote(e)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}t.selection.enter=ht,t.selection.enter.prototype=ft,ft.append=W.append,ft.empty=W.empty,ft.node=W.node,ft.call=W.call,ft.size=W.size,ft.select=function(t){for(var e,r,n,a,i,o=[],s=-1,l=this.length;++s=n&&(n=e+1);!(o=s[n])&&++n0?1:t<0?-1:0}function Ot(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function It(t){return t>1?0:t<-1?At:Math.acos(t)}function zt(t){return t>1?Et:t<-1?-Et:Math.asin(t)}function Dt(t){return((t=Math.exp(t))+1/t)/2}function Rt(t){return(t=Math.sin(t/2))*t}var Ft=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,a=t[0],i=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-a,h=l-i,f=u*u+h*h;if(f0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map(function(t){return(t-f.x)/f.k}).map(l.invert)),h&&h.domain(u.range().map(function(t){return(t-f.y)/f.k}).map(u.invert))}function E(t){v++||t({type:"zoomstart"})}function C(t){S(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(t){--v||(t({type:"zoomend"}),r=null)}function P(){var e=this,r=_.of(e,arguments),n=0,a=t.select(o(e)).on(y,function(){n=1,A(t.mouse(e),i),C(r)}).on(x,function(){a.on(y,null).on(x,null),s(n),L(r)}),i=k(t.mouse(e)),s=xt(e);hs.call(e),E(r)}function O(){var e,r=this,n=_.of(r,arguments),a={},i=0,o=".zoom-"+t.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=t.select(r),p=xt(r);function d(){var n=t.touches(r);return e=f.k,n.forEach(function(t){t.identifier in a&&(a[t.identifier]=k(t))}),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,h=n.length;o1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];i=b*b+_*_}}function v(){var o,l,c,u,h=t.touches(r);hs.call(r);for(var f=0,p=h.length;f360?t-=360:t<0&&(t+=360),t<60?n+(a-n)*t/60:t<180?a:t<240?n+(a-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+e):r+e-r*e),new ie(i(t+120),i(t),i(t-120))}function Gt(e,r,n){return this instanceof Gt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Gt?new Gt(e.h,e.c,e.l):ee(e instanceof Xt?e.l:(e=fe((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Gt(e,r,n)}qt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,this.l/t)},qt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ut(this.h,this.s,t*this.l)},qt.rgb=function(){return Ht(this.h,this.s,this.l)},t.hcl=Gt;var Yt=Gt.prototype=new Vt;function Wt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Gt?Wt(t.h,t.c,t.l):fe((t=ie(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Zt*(arguments.length?t:1)))},Yt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Zt*(arguments.length?t:1)))},Yt.rgb=function(){return Wt(this.h,this.c,this.l).rgb()},t.lab=Xt;var Zt=18,Jt=.95047,Kt=1,Qt=1.08883,$t=Xt.prototype=new Vt;function te(t,e,r){var n=(t+16)/116,a=n+e/500,i=n-r/200;return new ie(ae(3.2404542*(a=re(a)*Jt)-1.5371385*(n=re(n)*Kt)-.4985314*(i=re(i)*Qt)),ae(-.969266*a+1.8760108*n+.041556*i),ae(.0556434*a-.2040259*n+1.0572252*i))}function ee(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ae(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ie(t,e,r){return this instanceof ie?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ie?new ie(t.r,t.g,t.b):ue(""+t,ie,Ht):new ie(t,e,r)}function oe(t){return new ie(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+""}$t.brighter=function(t){return new Xt(Math.min(100,this.l+Zt*(arguments.length?t:1)),this.a,this.b)},$t.darker=function(t){return new Xt(Math.max(0,this.l-Zt*(arguments.length?t:1)),this.a,this.b)},$t.rgb=function(){return te(this.l,this.a,this.b)},t.rgb=ie;var le=ie.prototype=new Vt;function ce(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,a,i,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(de(a[0]),de(a[1]),de(a[2]))}return(i=ge.get(t))?e(i.r,i.g,i.b):(null==t||"#"!==t.charAt(0)||isNaN(i=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&i)>>4,o|=o>>4,s=240&i,s|=s>>4,l=15&i,l|=l<<4):7===t.length&&(o=(16711680&i)>>16,s=(65280&i)>>8,l=255&i)),e(o,s,l))}function he(t,e,r){var n,a,i=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-i,l=(o+i)/2;return s?(a=l<.5?s/(o+i):s/(2-o-i),n=t==o?(e-r)/s+(e0&&l<1?0:n),new Ut(n,a,l)}function fe(t,e,r){var n=ne((.4124564*(t=pe(t))+.3575761*(e=pe(e))+.1804375*(r=pe(r)))/Jt),a=ne((.2126729*t+.7151522*e+.072175*r)/Kt);return Xt(116*a-16,500*(n-a),200*(a-ne((.0193339*t+.119192*e+.9503041*r)/Qt)))}function pe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,a=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=a.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+"",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return a=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}}),o.send=function(t,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),c.open(t,e,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var i in l)c.setRequestHeader(i,l[i]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",function(t){a(null,t)}),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,"on"),null==i?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(i))}ge.forEach(function(t,e){ge.set(t,oe(e))}),t.functor=ve,t.xhr=me(P),t.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function a(t,r,n){arguments.length<3&&(n=r,r=null);var a=ye(t,e,null==r?i:o(r),n);return a.row=function(t){return arguments.length?a.response(null==(r=t)?i:o(t)):r},a}function i(t){return a.parse(t.responseText)}function o(t){return function(e){return a.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return a.parse=function(t,e){var r;return a.parseRows(t,function(t,n){if(r)return r(t,n-1);var a=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,r){return e(a(t),r)}:a})},a.parseRows=function(t,e){var r,a,i={},o={},s=[],l=t.length,c=0,u=0;function h(){if(c>=l)return o;if(a)return a=!1,i;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,ke(Ae))}function Me(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=xe,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}});t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ee(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Ce[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Pe=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ee(e,r))).toFixed(Math.max(0,Math.min(20,Ee(e*(1+1e-15),r))))}});function Oe(t){return t+""}var Ie=t.time={},ze=Date;function De(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}De.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Re.setUTCDate.apply(this._,arguments)},setDay:function(){Re.setUTCDay.apply(this._,arguments)},setFullYear:function(){Re.setUTCFullYear.apply(this._,arguments)},setHours:function(){Re.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Re.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Re.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Re.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Re.setUTCSeconds.apply(this._,arguments)},setTime:function(){Re.setTime.apply(this._,arguments)}};var Re=Date.prototype;function Fe(t,e,r){function n(e){var r=t(e),n=i(r,1);return e-r1)for(;o68?1900:2e3),r+a[0].length):-1}function Je(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function $e(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ar(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=y(e)/60|0,a=y(e)%60;return r+Ue(n,"0",2)+Ue(a,"0",2)}function ir(t,e,r){Ve.lastIndex=0;var n=Ve.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),i.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=a[o=(o+1)%a.length];return i.reverse().join(n)}:P;return function(e){var n=Le.exec(e),a=n[1]||" ",s=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],h=+n[6],f=n[7],p=n[8],d=n[9],g=1,v="",m="",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||"0"===a&&"="===s)&&(u=a="0",s="="),d){case"n":f=!0,d="g";break;case"%":g=100,m="%",d="f";break;case"p":g=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+d.toLowerCase());case"c":x=!1;case"d":y=!0,p=0;break;case"s":g=-1,d="r"}"$"===c&&(v=i[0],m=i[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Pe.get(d)||Oe;var b=u&&f;return function(e){var n=m;if(y&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+m}else e*=g;var _,w,k=(e=d(e,p)).lastIndexOf(".");if(k<0){var T=x?e.lastIndexOf("e"):-1;T<0?(_=e,w=""):(_=e.substring(0,T),w=e.substring(T))}else _=e.substring(0,k),w=r+e.substring(k+1);!u&&f&&(_=o(_,1/0));var A=v.length+_.length+w.length+(b?0:i.length),M=A"===s?M+i+e:"^"===s?M.substring(0,A>>=1)+i+e+M.substring(A):i+(b?e:M+e))+n}}}(e),timeFormat:function(e){var r=e.dateTime,n=e.date,a=e.time,i=e.periods,o=e.days,s=e.shortDays,l=e.months,c=e.shortMonths;function u(t){var e=t.length;function r(r){for(var n,a,i,o=[],s=-1,l=0;++s=c)return-1;if(37===(a=e.charCodeAt(s++))){if(o=e.charAt(s++),!(i=w[o in Ne?e.charAt(s++):o])||(n=i(t,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(ze=De);return r._=t,e(r)}finally{ze=Date}}return r.parse=function(t){try{ze=De;var r=e.parse(t);return r&&r._}finally{ze=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var f=t.map(),p=qe(o),d=He(o),g=qe(s),v=He(s),m=qe(l),y=He(l),x=qe(c),b=He(c);i.forEach(function(t,e){f.set(t.toLowerCase(),e)});var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ue(t.getDate(),e,2)},e:function(t,e){return Ue(t.getDate(),e,2)},H:function(t,e){return Ue(t.getHours(),e,2)},I:function(t,e){return Ue(t.getHours()%12||12,e,2)},j:function(t,e){return Ue(1+Ie.dayOfYear(t),e,3)},L:function(t,e){return Ue(t.getMilliseconds(),e,3)},m:function(t,e){return Ue(t.getMonth()+1,e,2)},M:function(t,e){return Ue(t.getMinutes(),e,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,e){return Ue(t.getSeconds(),e,2)},U:function(t,e){return Ue(Ie.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ue(Ie.mondayOfYear(t),e,2)},x:u(n),X:u(a),y:function(t,e){return Ue(t.getFullYear()%100,e,2)},Y:function(t,e){return Ue(t.getFullYear()%1e4,e,4)},Z:ar,"%":function(){return"%"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=v.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){m.lastIndex=0;var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return h(t,_.c.toString(),e,r)},d:Qe,e:Qe,H:tr,I:tr,j:$e,L:nr,m:Ke,M:er,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:Ye,w:Ge,W:We,x:function(t,e,r){return h(t,_.x.toString(),e,r)},X:function(t,e,r){return h(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:Je,"%":ir};return u}(e)}};var sr=t.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lr(){}t.format=sr.numberFormat,t.geo={},lr.prototype={s:0,t:0,add:function(t){ur(t,this.t,cr),ur(cr.s,this.s,this),this.s?this.t+=cr.t:this.s=cr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cr=new lr;function ur(t,e,r){var n=r.s=t+e,a=n-t,i=n-a;r.t=t-i+(e-a)}function hr(t,e){t&&pr.hasOwnProperty(t.type)&&pr[t.type](t,e)}t.geo.stream=function(t,e){t&&fr.hasOwnProperty(t.type)?fr[t.type](t,e):hr(t,e)};var fr={Feature:function(t,e){hr(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,a=r.length;++n=0?1:-1,s=o*i,l=Math.cos(e),c=Math.sin(e),u=a*c,h=n*l+u*Math.cos(s),f=u*o*Math.sin(s);Er.add(Math.atan2(f,h)),r=t,n=l,a=c}Cr.point=function(o,s){Cr.point=i,r=(t=o)*Ct,n=Math.cos(s=(e=s)*Ct/2+At/4),a=Math.sin(s)},Cr.lineEnd=function(){i(t,e)}}function Pr(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ir(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zr(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Fr(t){return[Math.atan2(t[1],t[0]),zt(t[2])]}function Br(t,e){return y(t[0]-e[0])kt?a=90:c<-kt&&(r=-90),h[0]=e,h[1]=n}};function p(t,i){u.push(h=[e=t,n=t]),ia&&(a=i)}function d(t,o){var s=Pr([t*Ct,o*Ct]);if(l){var c=Ir(l,s),u=Ir([c[1],-c[0],0],c);Rr(u),u=Fr(u);var h=t-i,f=h>0?1:-1,d=u[0]*Lt*f,g=y(h)>180;if(g^(f*ia&&(a=v);else if(g^(f*i<(d=(d+360)%360-180)&&da&&(a=o);g?t_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(tn&&(n=t)):t>i?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,i=t}function g(){f.point=d}function v(){h[0]=e,h[1]=n,f.point=p,l=null}function m(t,e){if(l){var r=t-i;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){m(o,s),Cr.lineEnd(),y(c)>kt&&(e=-(n=180)),h[0]=e,h[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=h=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,a]]}}(),t.geo.centroid=function(e){mr=yr=xr=br=_r=wr=kr=Tr=Ar=Mr=Sr=0,t.geo.stream(e,Nr);var r=Ar,n=Mr,a=Sr,i=r*r+n*n+a*a;return i=0;--s)a.point((h=u[s])[0],h[1]);else n(p.x,p.p.x,-1,a);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);a.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,a=t[0];++n=0?1:-1,k=w*_,T=k>At,A=d*x;if(Er.add(Math.atan2(A*w*Math.sin(k),g*b+A*Math.cos(k))),i+=T?_+w*Mt:_,T^f>=r^m>=r){var M=Ir(Pr(h),Pr(t));Rr(M);var S=Ir(a,M);Rr(S);var E=(T^_>=0?-1:1)*zt(S[2]);(n>E||n===E&&(M[0]||M[1]))&&(o+=T^_>=0?1:-1)}if(!v++)break;f=m,d=x,g=b,h=t}}return(i<-kt||i0){for(x||(o.polygonStart(),x=!0),o.lineStart();++i1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Kr))}return u}}function Kr(t){return t.length>1}function Qr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:D,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function $r(t,e){return((t=t.x)[0]<0?t[1]-Et-kt:Et-t[1])-((e=e.x)[0]<0?e[1]-Et-kt:Et-e[1])}var tn=Jr(Yr,function(t){var e,r=NaN,n=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,o){var s=i>0?At:-At,l=y(i-r);y(l-At)0?Et:-Et),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(i,n),e=0):a!==s&&l>=At&&(y(r-a)kt?Math.atan((Math.sin(e)*(i=Math.cos(n))*Math.sin(r)-Math.sin(n)*(a=Math.cos(e))*Math.sin(t))/(a*i*o)):(e+n)/2}(r,n,i,o),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=i,n=o),a=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var a;if(null==t)a=r*Et,n.point(-At,a),n.point(0,a),n.point(At,a),n.point(At,0),n.point(At,-a),n.point(0,-a),n.point(-At,-a),n.point(-At,0),n.point(-At,a);else if(y(t[0]-e[0])>kt){var i=t[0]0)){if(i/=f,f<0){if(i0){if(i>h)return;i>u&&(u=i)}if(i=r-l,f||!(i<0)){if(i/=f,f<0){if(i>h)return;i>u&&(u=i)}else if(f>0){if(i0)){if(i/=p,p<0){if(i0){if(i>h)return;i>u&&(u=i)}if(i=n-c,p||!(i<0)){if(i/=p,p<0){if(i>h)return;i>u&&(u=i)}else if(p>0){if(i0&&(a.a={x:l+u*f,y:c+u*p}),h<1&&(a.b={x:l+h*f,y:c+h*p}),a}}}}}}var rn=1e9;function nn(e,r,n,a){return function(l){var c,u,h,f,p,d,g,v,m,y,x,b=l,_=Qr(),w=en(e,r,n,a),k={point:M,lineStart:function(){k.point=S,u&&u.push(h=[]);y=!0,m=!1,g=v=NaN},lineEnd:function(){c&&(S(f,p),d&&m&&_.rejoin(),c.push(_.buffer()));k.point=M,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],a=0;an&&Ot(c,i,t)>0&&++e:i[1]<=n&&Ot(c,i,t)<0&&--e,c=i;return 0!==e}([e,a]),n=x&&r,i=c.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),T(null,null,1,l),l.lineEnd()),i&&Wr(c,o,r,T,l),l.polygonEnd()),c=u=h=null}};function T(t,o,l,c){var u=0,h=0;if(null==t||(u=i(t,l))!==(h=i(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?a:r)}while((u=(u+l+4)%4)!==h);else c.point(o[0],o[1])}function A(t,i){return e<=t&&t<=n&&r<=i&&i<=a}function M(t,e){A(t,e)&&l.point(t,e)}function S(t,e){var r=A(t=Math.max(-rn,Math.min(rn,t)),e=Math.max(-rn,Math.min(rn,e)));if(u&&h.push([t,e]),y)f=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&m)l.point(t,e);else{var n={a:{x:g,y:v},b:{x:t,y:e}};w(n)?(m||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,v=e,m=r}return k};function i(t,a){return y(t[0]-e)0?0:3:y(t[0]-n)0?2:1:y(t[1]-r)0?1:0:a>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Cn(t),a=n(e,r);return a.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},a}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,a=1+r*(2*n-r),i=Math.sqrt(a)/n;function o(t,e){var r=Math.sqrt(a-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),i-r*Math.cos(t)]}return o.invert=function(t,e){var r=i-e;return[Math.atan2(t,r)/n,zt((a-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,a,i,o={stream:function(t){return a&&(a.valid=!1),(a=i(t)).valid=!0,a},extent:function(s){return arguments.length?(i=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),a&&(a.valid=!1,a=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,a,i=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var i=t[0],o=t[1];return e=null,r(i,o),e||(n(i,o),e)||a(i,o),e}return c.invert=function(t){var e=i.scale(),r=i.translate(),n=(t[0]-r[0])/e,a=(t[1]-r[1])/e;return(a>=.12&&a<.234&&n>=-.425&&n<-.214?o:a>=.166&&a<.234&&n>=-.214&&n<-.115?s:i).invert(t)},c.stream=function(t){var e=i.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,a){e.point(t,a),r.point(t,a),n.point(t,a)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),s.precision(t),c):i.precision()},c.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),s.scale(t),c.translate(i.translate())):i.scale()},c.translate=function(t){if(!arguments.length)return i.translate();var e=i.scale(),u=+t[0],h=+t[1];return r=i.translate(t).clipExtent([[u-.455*e,h-.238*e],[u+.455*e,h+.238*e]]).stream(l).point,n=o.translate([u-.307*e,h+.201*e]).clipExtent([[u-.425*e+kt,h+.12*e+kt],[u-.214*e-kt,h+.234*e-kt]]).stream(l).point,a=s.translate([u-.205*e,h+.212*e]).clipExtent([[u-.214*e+kt,h+.166*e+kt],[u-.115*e-kt,h+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,hn,fn,pn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=D,sn+=y(ln/2)}};function dn(){var t,e,r,n;function a(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(i,o){pn.point=a,t=r=i,e=n=o},pn.lineEnd=function(){a(t,e)}}var gn={point:function(t,e){thn&&(hn=t);efn&&(fn=e)},lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D};function vn(){var t=mn(4.5),e=[],r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=mn(e),r},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function n(r,n){e.push("M",r,",",n,t)}function a(t,n){e.push("M",t,",",n),r.point=i}function i(t,r){e.push("L",t,",",r)}function o(){r.point=n}function s(){e.push("Z")}return r}function mn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=kn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var a=r-t,i=n-e,o=Math.sqrt(a*a+i*i);wr+=o*(t+r)/2,kr+=o*(e+n)/2,Tr+=o,bn(t=r,e=n)}xn.point=function(n,a){xn.point=r,bn(t=n,e=a)}}function wn(){xn.point=bn}function kn(){var t,e,r,n;function a(t,e){var a=t-r,i=e-n,o=Math.sqrt(a*a+i*i);wr+=o*(r+t)/2,kr+=o*(n+e)/2,Tr+=o,Ar+=(o=n*t-r*e)*(r+t),Mr+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(i,o){xn.point=a,bn(t=r=i,e=n=o)},xn.lineEnd=function(){a(t,e)}}function Tn(t){var e=4.5,r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:D};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,Mt)}function a(e,n){t.moveTo(e,n),r.point=i}function i(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function An(t){var e=.5,r=Math.cos(30*Ct),n=16;function a(e){return(n?function(e){var r,a,o,s,l,c,u,h,f,p,d,g,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){h=NaN,v.point=x,e.lineStart()}function x(r,a){var o=Pr([r,a]),s=t(r,a);i(h,f,u,p,d,g,h=s[0],f=s[1],u=r,p=o[0],d=o[1],g=o[2],n,e),e.point(h,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=k}function w(t,e){x(r=t,e),a=h,o=f,s=p,l=d,c=g,v.point=x}function k(){i(h,f,u,p,d,g,a,o,r,s,l,c,n,e),v.lineEnd=b,b()}return v}:function(e){return Sn(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function i(n,a,o,s,l,c,u,h,f,p,d,g,v,m){var x=u-n,b=h-a,_=x*x+b*b;if(_>4*e&&v--){var w=s+p,k=l+d,T=c+g,A=Math.sqrt(w*w+k*k+T*T),M=Math.asin(T/=A),S=y(y(T)-1)e||y((x*P+b*O)/_-.5)>.3||s*p+l*d+c*g0&&16,a):Math.sqrt(e)},a}function Mn(t){this.stream=t}function Sn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function En(t){return Cn(function(){return t})()}function Cn(e){var r,n,a,i,o,s,l=An(function(t,e){return[(t=r(t,e))[0]*c+i,o-t[1]*c]}),c=150,u=480,h=250,f=0,p=0,d=0,g=0,v=0,m=tn,x=P,b=null,_=null;function w(t){return[(t=a(t[0]*Ct,t[1]*Ct))[0]*c+i,o-t[1]*c]}function k(t){return(t=a.invert((t[0]-i)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function T(){a=Gr(n=In(d,g,v),r);var t=r(f,p);return i=u-t[0]*c,o=h+t[1]*c,A()}function A(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Ln(m(n,l(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(m=null==t?(b=t,tn):function(t){var e=Math.cos(t),r=e>0,n=y(e)>kt;return Jr(a,function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var p,d=[h,f],g=a(h,f),v=r?g?0:o(h,f):g?o(h+(h<0?At:-At),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=i(e,d),(Br(e,p)||Br(d,p))&&(d[0]+=kt,d[1]+=kt,g=a(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=i(d,e),t.point(p[0],p[1])):(p=i(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var m;v&s||!(m=i(d,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&Br(e,d)||t.point(d[0],d[1]),e=d,l=g,s=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}},Fn(t,6*Ct),r?[0,-t]:[-At,t-At]);function a(t,r){return Math.cos(t)*Math.cos(r)>e}function i(t,r,n){var a=[1,0,0],i=Ir(Pr(t),Pr(r)),o=Or(i,i),s=i[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,h=Ir(a,i),f=Dr(a,c);zr(f,Dr(i,u));var p=h,d=Or(f,p),g=Or(p,p),v=d*d-g*(Or(f,f)-1);if(!(v<0)){var m=Math.sqrt(v),x=Dr(p,(-d-m)/g);if(zr(x,f),x=Fr(x),!n)return x;var b,_=t[0],w=r[0],k=t[1],T=r[1];w<_&&(b=_,_=w,w=b);var A=w-_,M=y(A-At)0^x[1]<(y(x[0]-_)At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+m)/g);return zr(S,f),[x,Fr(S)]}}}function o(e,n){var a=r?t:At-t,i=0;return e<-a?i|=1:e>a&&(i|=2),n<-a?i|=4:n>a&&(i|=8),i}}((b=+t)*Ct),A()):b},w.clipExtent=function(t){return arguments.length?(_=t,x=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):P,A()):_},w.scale=function(t){return arguments.length?(c=+t,T()):c},w.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],T()):[u,h]},w.center=function(t){return arguments.length?(f=t[0]%360*Ct,p=t[1]%360*Ct,T()):[f*Lt,p*Lt]},w.rotate=function(t){return arguments.length?(d=t[0]%360*Ct,g=t[1]%360*Ct,v=t.length>2?t[2]%360*Ct:0,T()):[d*Lt,g*Lt,v*Lt]},t.rebind(w,l,"precision"),function(){return r=e.apply(this,arguments),w.invert=r.invert&&k,T()}}function Ln(t){return Sn(t,function(e,r){t.point(e*Ct,r*Ct)})}function Pn(t,e){return[t,e]}function On(t,e){return[t>At?t-Mt:t<-At?t+Mt:t,e]}function In(t,e,r){return t?e||r?Gr(Dn(t),Rn(e,r)):Dn(t):e||r?Rn(e,r):On}function zn(t){return function(e,r){return[(e+=t)>At?e-Mt:e<-At?e+Mt:e,r]}}function Dn(t){var e=zn(t);return e.invert=zn(-t),e}function Rn(t,e){var r=Math.cos(t),n=Math.sin(t),a=Math.cos(e),i=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*a-u*i,s*r-c*n),zt(u*a+l*i)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*a-l*i;return[Math.atan2(l*a+c*i,s*r+u*n),zt(u*r-s*n)]},o}function Fn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(a,i,o,s){var l=o*e;null!=a?(a=Bn(r,a),i=Bn(r,i),(o>0?ai)&&(a+=o*Mt)):(a=t+o*Mt,i=t-.5*l);for(var c,u=a;o>0?u>i:u2?t[2]*Ct:0),e.invert=function(e){return(e=t.invert(e[0]*Ct,e[1]*Ct))[0]*=Lt,e[1]*=Lt,e},e},On.invert=Pn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function a(){var t="function"==typeof r?r.apply(this,arguments):r,n=In(-t[0]*Ct,-t[1]*Ct,0).invert,a=[];return e(null,null,1,{point:function(t,e){a.push(t=n(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:"Polygon",coordinates:[a]}}return a.origin=function(t){return arguments.length?(r=t,a):r},a.angle=function(r){return arguments.length?(e=Fn((t=+r)*Ct,n*Ct),a):t},a.precision=function(r){return arguments.length?(e=Fn(t*Ct,(n=+r)*Ct),a):n},a.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ct,a=t[1]*Ct,i=e[1]*Ct,o=Math.sin(n),s=Math.cos(n),l=Math.sin(a),c=Math.cos(a),u=Math.sin(i),h=Math.cos(i);return Math.atan2(Math.sqrt((r=h*o)*r+(r=c*u-l*h*s)*r),l*u+c*h*s)},t.geo.graticule=function(){var e,r,n,a,i,o,s,l,c,u,h,f,p=10,d=p,g=90,v=360,m=2.5;function x(){return{type:"MultiLineString",coordinates:b()}}function b(){return t.range(Math.ceil(a/g)*g,n,g).map(h).concat(t.range(Math.ceil(l/v)*v,s,v).map(f)).concat(t.range(Math.ceil(r/p)*p,e,p).filter(function(t){return y(t%g)>kt}).map(c)).concat(t.range(Math.ceil(o/d)*d,i,d).filter(function(t){return y(t%v)>kt}).map(u))}return x.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},x.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(f(s).slice(1),h(n).reverse().slice(1),f(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(a=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],a>n&&(t=a,a=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(m)):[[a,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],i=+t[1][1],r>e&&(t=r,r=e,e=t),o>i&&(t=o,o=i,i=t),x.precision(m)):[[r,o],[e,i]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],x):[g,v]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(m=+t,c=Nn(o,i,90),u=jn(r,e,m),h=Nn(l,s,90),f=jn(a,n,m),x):m},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,a=Un;function i(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||a.apply(this,arguments)]}}return i.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||a.apply(this,arguments))},i.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,i):n},i.target=function(t){return arguments.length?(a=t,r="function"==typeof t?null:t,i):a},i.precision=function(){return arguments.length?i:0},i},t.geo.interpolate=function(t,e){return r=t[0]*Ct,n=t[1]*Ct,a=e[0]*Ct,i=e[1]*Ct,o=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=o*Math.cos(r),h=o*Math.sin(r),f=l*Math.cos(a),p=l*Math.sin(a),d=2*Math.asin(Math.sqrt(Rt(i-n)+o*l*Rt(a-r))),g=1/Math.sin(d),(v=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*f,a=r*h+e*p,i=r*s+e*c;return[Math.atan2(a,n)*Lt,Math.atan2(i,Math.sqrt(n*n+a*a))*Lt]}:function(){return[r*Lt,n*Lt]}).distance=d,v;var r,n,a,i,o,s,l,c,u,h,f,p,d,g,v},t.geo.length=function(e){return yn=0,t.geo.stream(e,qn),yn};var qn={sphere:D,point:D,lineStart:function(){var t,e,r;function n(n,a){var i=Math.sin(a*=Ct),o=Math.cos(a),s=y((n*=Ct)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*i-e*o*l)*s),e*i+r*o*l),t=n,e=i,r=o}qn.point=function(a,i){t=a*Ct,e=Math.sin(i*=Ct),r=Math.cos(i),qn.point=n},qn.lineEnd=function(){qn.point=qn.lineEnd=D}},lineEnd:D,polygonStart:D,polygonEnd:D};function Hn(t,e){function r(e,r){var n=Math.cos(e),a=Math.cos(r),i=t(n*a);return[i*a*Math.sin(e),i*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),a=e(n),i=Math.sin(a),o=Math.cos(a);return[Math.atan2(t*i,n*o),Math.asin(n&&r*i/n)]},r}var Gn=Hn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(t.geo.azimuthalEqualArea=function(){return En(Gn)}).raw=Gn;var Yn=Hn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},P);function Wn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},a=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),i=r*Math.pow(n(t),a)/a;if(!a)return Jn;function o(t,e){i>0?e<-Et+kt&&(e=-Et+kt):e>Et-kt&&(e=Et-kt);var r=i/Math.pow(n(e),a);return[r*Math.sin(a*t),i-r*Math.cos(a*t)]}return o.invert=function(t,e){var r=i-e,n=Pt(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(i/n,1/a))-Et]},o}function Xn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),a=r/n+t;if(y(n)1&&Ot(t[r[n-2]],t[r[n-1]],t[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function aa(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return En($n)}).raw=$n,ta.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Et]},(t.geo.transverseMercator=function(){var t=Kn(ta),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ta,t.geom={},t.geom.hull=function(t){var e=ea,r=ra;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,a=ve(e),i=ve(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+h;nkt)s=s.L;else{if(!((a=i-wa(s,o))>kt)){n>-kt?(e=s.P,r=s):a>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=ma(t);if(ha.insert(e,l),e||r){if(e===r)return Sa(e),r=ma(e.site),ha.insert(l,r),l.edge=r.edge=La(e.site,l.site),Ma(e),void Ma(r);if(r){Sa(e),Sa(r);var c=e.site,u=c.x,h=c.y,f=t.x-u,p=t.y-h,d=r.site,g=d.x-u,v=d.y-h,m=2*(f*v-p*g),y=f*f+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+u,y:(f*x-g*y)/m+h};Pa(r.edge,c,d,b),l.edge=La(c,t,null,b),r.edge=La(t,d,null,b),Ma(e),Ma(r)}else l.edge=La(e.site,l.site)}}function _a(t,e){var r=t.site,n=r.x,a=r.y,i=a-e;if(!i)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,h=1/i-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+a-i/2)))/h+n:(n+s)/2}function wa(t,e){var r=t.N;if(r)return _a(r,e);var n=t.site;return n.y===e?n.x:1/0}function ka(t){this.site=t,this.edges=[]}function Ta(t,e){return e.angle-t.angle}function Aa(){za(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ma(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,a=t.site,i=r.site;if(n!==i){var o=a.x,s=a.y,l=n.x-o,c=n.y-s,u=i.x-o,h=2*(l*(v=i.y-s)-c*u);if(!(h>=-Tt)){var f=l*l+c*c,p=u*u+v*v,d=(v*f-c*p)/h,g=(l*p-u*f)/h,v=g+s,m=ga.pop()||new Aa;m.arc=t,m.site=a,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=pa._;x;)if(m.y=s)return;if(f>d){if(i){if(i.y>=c)return}else i={x:v,y:l};r={x:v,y:c}}else{if(i){if(i.y1)if(f>d){if(i){if(i.y>=c)return}else i={x:(l-a)/n,y:l};r={x:(c-a)/n,y:c}}else{if(i){if(i.y=s)return}else i={x:o,y:n*o+a};r={x:s,y:n*s+a}}else{if(i){if(i.xkt||y(a-r)>kt)&&(s.splice(o,0,new Oa((m=i.site,x=u,b=y(n-h)kt?{x:h,y:y(e-h)kt?{x:y(r-d)kt?{x:f,y:y(e-f)kt?{x:y(r-p)=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(a(t,e)/kt)*kt,i:e}})}return o.links=function(t){return Ba(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},o.triangles=function(t){var e=[];return Ba(s(t)).cells.forEach(function(r,n){for(var a,i,o,s,l=r.site,c=r.edges.sort(Ta),u=-1,h=c.length,f=c[h-1].edge,p=f.l===l?f.r:f.l;++ui&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Ga(r,n)})),i=Xa.lastIndex;return ig&&(g=l.x),l.y>v&&(v=l.y),c.push(l.x),u.push(l.y);else for(h=0;hg&&(g=b),_>v&&(v=_),c.push(b),u.push(_)}var w=g-p,k=v-d;function T(t,e,r,n,a,i,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,a,i,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,a,i,o,s),A(t,e,r,n,a,i,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,a,i,o,s)}function A(t,e,r,n,a,i,o,s){var l=.5*(a+o),c=.5*(i+s),u=r>=l,h=n>=c,f=h<<1|u;t.leaf=!1,u?a=l:o=l,h?i=c:s=c,T(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}}),e,r,n,a,i,o,s)}w>k?v=d+w:g=p+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(M,t,+m(t,++h),+x(t,h),p,d,g,v)}};if(M.visit=function(t){!function t(e,r,n,a,i,o){if(!e(r,n,a,i,o)){var s=.5*(n+i),l=.5*(a+o),c=r.nodes;c[0]&&t(e,c[0],n,a,s,l),c[1]&&t(e,c[1],s,a,i,l),c[2]&&t(e,c[2],n,l,s,o),c[3]&&t(e,c[3],s,l,i,o)}}(t,M,p,d,g,v)},M.find=function(t){return function(t,e,r,n,a,i,o){var s,l=1/0;return function t(c,u,h,f,p){if(!(u>i||h>o||f=_)<<1|e>=b,k=w+4;w=0&&!(n=t.interpolators[a](e,r)););return n}function Ja(t,e){var r,n=[],a=[],i=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function ii(t){return 1-Math.cos(t*Et)}function oi(t){return Math.pow(2,10*(t-1))}function si(t){return 1-Math.sqrt(1-t*t)}function li(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ci(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ui(t){var e,r,n,a=[t.a,t.b],i=[t.c,t.d],o=fi(a),s=hi(a,i),l=fi(((e=i)[0]+=(n=-s)*(r=a)[0],e[1]+=n*r[1],e))||0;a[0]*i[1]=0?t.slice(0,n):t,i=n>=0?t.slice(n+1):"in";return a=Qa.get(a)||Ka,i=$a.get(i)||P,e=i(a.apply(null,r.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,a=e.c,i=e.l,o=r.h-n,s=r.c-a,l=r.l-i;isNaN(s)&&(s=0,a=isNaN(a)?r.c:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Wt(n+o*t,a+s*t,i+l*t)+""}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,a=e.s,i=e.l,o=r.h-n,s=r.s-a,l=r.l-i;isNaN(s)&&(s=0,a=isNaN(a)?r.s:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,a+s*t,i+l*t)+""}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,a=e.a,i=e.b,o=r.l-n,s=r.a-a,l=r.b-i;return function(t){return te(n+o*t,a+s*t,i+l*t)+""}},t.interpolateRound=ci,t.transform=function(e){var r=a.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(t){if(null!=t){r.setAttribute("transform",t);var e=r.transform.baseVal.consolidate()}return new ui(e?e.matrix:pi)})(e)},ui.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pi={a:1,b:0,c:0,d:1,e:0,f:0};function di(t){return t.length?t.pop()+",":""}function gi(e,r){var n=[],a=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:Ga(t[0],e[0])},{i:a-2,x:Ga(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(e.translate,r.translate,n,a),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(di(r)+"rotate(",null,")")-2,x:Ga(t,e)})):e&&r.push(di(r)+"rotate("+e+")")}(e.rotate,r.rotate,n,a),function(t,e,r,n){t!==e?n.push({i:r.push(di(r)+"skewX(",null,")")-2,x:Ga(t,e)}):e&&r.push(di(r)+"skewX("+e+")")}(e.skew,r.skew,n,a),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var a=r.push(di(r)+"scale(",null,",",null,")");n.push({i:a-4,x:Ga(t[0],e[0])},{i:a-2,x:Ga(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(di(r)+"scale("+e+")")}(e.scale,r.scale,n,a),e=r=null,function(t){for(var e,r=-1,i=a.length;++r0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Te(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,u=c[0],d=c[1];for(t=0;t=0;)r.push(a[n])}function Ci(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(i=t.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(u=c[l]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Ci(a,function(e){var n,a;t&&(n=e.children)&&n.sort(t),r&&(a=e.parent)&&(a.value+=e.value)}),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ei(t,function(t){t.children&&(t.value=0)}),Ci(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var a=e.call(this,t,n);return function t(e,r,n,a){var i=e.children;if(e.x=r,e.y=e.depth*a,e.dx=n,e.dy=a,i&&(o=i.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ra&&(n=r,a=e);return n}function qi(t){return t.reduce(Hi,0)}function Hi(t,e){return t+e[1]}function Gi(t,e){return Yi(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Yi(t,e){for(var r=-1,n=+t[0],a=(t[1]-n)/e,i=[];++r<=e;)i[r]=a*r+n;return i}function Wi(e){return[t.min(e),t.max(e)]}function Xi(t,e){return t.value-e.value}function Zi(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Ji(t,e){t._pack_next=e,e._pack_prev=t}function Ki(t,e){var r=e.x-t.x,n=e.y-t.y,a=t.r+e.r;return.999*a*a>r*r+n*n}function Qi(t){if((e=t.children)&&(l=e.length)){var e,r,n,a,i,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(e.forEach($i),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(eo(r,n,a=e[2]),x(a),Zi(r,a),r._pack_prev=a,Zi(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=h[0]&&l<=h[1]&&((s=c[t.bisect(f,l,1,d)-1]).y+=g,s.push(i[o]));return c}return i.value=function(t){return arguments.length?(r=t,i):r},i.range=function(t){return arguments.length?(n=ve(t),i):n},i.bins=function(t){return arguments.length?(a="number"==typeof t?function(e){return Yi(e,t)}:ve(t),i):a},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(Xi),n=0,a=[1,1];function i(t,i){var o=r.call(this,t,i),s=o[0],l=a[0],c=a[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Ci(s,function(t){t.r=+u(t.value)}),Ci(s,Qi),n){var h=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Ci(s,function(t){t.r+=h}),Ci(s,Qi),Ci(s,function(t){t.r-=h})}return function t(e,r,n,a){var i=e.children;e.x=r+=a*e.x;e.y=n+=a*e.y;e.r*=a;if(i)for(var o=-1,s=i.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)});var g=r(f,p)/2-f.x,v=n[0]/(p.x+r(p,f)/2+g),m=n[1]/(d.depth||1);Ei(u,function(t){t.x=(t.x+g)*v,t.y=t.depth*m})}return c}function o(t){var e=t.children,n=t.parent.children,a=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,a=t.children,i=a.length;for(;--i>=0;)(e=a[i]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var i=(e[0].z+e[e.length-1].z)/2;a?(t.z=a.z+r(t._,a._),t.m=t.z-i):t.z=i}else a&&(t.z=a.z+r(t._,a._));t.parent.A=function(t,e,n){if(e){for(var a,i=t,o=t,s=e,l=i.parent.children[0],c=i.m,u=o.m,h=s.m,f=l.m;s=ao(s),i=no(i),s&&i;)l=no(l),(o=ao(o)).a=t,(a=s.z+h-i.z-c+r(s._,i._))>0&&(io(oo(s,t,n),t,a),c+=a,u+=a),h+=s.m,c+=i.m,f+=l.m,u+=o.m;s&&!ao(o)&&(o.t=s,o.m+=h-u),i&&!no(l)&&(l.t=i,l.m+=c-f,n=t)}return n}(t,a,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return i.separation=function(t){return arguments.length?(r=t,i):r},i.size=function(t){return arguments.length?(a=null==(n=t)?l:null,i):a?null:n},i.nodeSize=function(t){return arguments.length?(a=null==(n=t)?null:l,i):a?n:null},Si(i,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=ro,n=[1,1],a=!1;function i(i,o){var s,l=e.call(this,i,o),c=l[0],u=0;Ci(c,function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),e.y=function(e){return 1+t.max(e,function(t){return t.y})}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)});var h=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),f=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=h.x-r(h,f)/2,d=f.x+r(f,h)/2;return Ci(c,a?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return i.separation=function(t){return arguments.length?(r=t,i):r},i.size=function(t){return arguments.length?(a=null==(n=t),i):a?null:n},i.nodeSize=function(t){return arguments.length?(a=null!=(n=t),i):a?n:null},Si(i,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=so,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,a=-1,i=t.length;++a0;)s.push(r=c[a-1]),s.area+=r.area,"squarify"!==l||(n=p(s,g))<=f?(c.pop(),f=n):(s.area-=s.pop().area,d(s,g,i,!1),g=Math.min(i.dx,i.dy),s.length=s.area=0,f=1/0);s.length&&(d(s,g,i,!0),s.length=s.area=0),e.forEach(h)}}function f(t){var e=t.children;if(e&&e.length){var r,n=o(t),a=e.slice(),i=[];for(u(a,n.dx*n.dy/t.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(d(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);e.forEach(f)}}function p(t,e){for(var r,n=t.area,a=0,i=1/0,o=-1,s=t.length;++oa&&(a=r));return e*=e,(n*=n)?Math.max(e*a*c/n,n/(e*i*c)):1/0}function d(t,e,r,a){var i,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((a||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?vo:ho,s=a?mi:vi;return i=t(e,r,s,n),o=t(r,e,s,Za),l}function l(t){return i(t)}l.invert=function(t){return o(t)};l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};l.range=function(t){return arguments.length?(r=t,s()):r};l.rangeRound=function(t){return l.range(t).interpolate(ci)};l.clamp=function(t){return arguments.length?(a=t,s()):a};l.interpolate=function(t){return arguments.length?(n=t,s()):n};l.ticks=function(t){return bo(e,t)};l.tickFormat=function(t,r){return _o(e,t,r)};l.nice=function(t){return yo(e,t),s()};l.copy=function(){return t(e,r,n,a)};return s()}([0,1],[0,1],Za,!1)};var wo={s:1,g:1,p:1,r:1,e:1};function ko(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,a,i){function o(t){return(a?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return a?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}l.invert=function(t){return s(r.invert(t))};l.domain=function(t){return arguments.length?(a=t[0]>=0,r.domain((i=t.map(Number)).map(o)),l):i};l.base=function(t){return arguments.length?(n=+t,r.domain(i.map(o)),l):n};l.nice=function(){var t=fo(i.map(o),a?Math:Ao);return r.domain(t),i=t.map(s),l};l.ticks=function(){var t=co(i),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),h=n%1?2:n;if(isFinite(u-c)){if(a){for(;c0;f--)e.push(s(c)*f);for(c=0;e[c]l;u--);e=e.slice(c,u)}return e};l.tickFormat=function(e,r){if(!arguments.length)return To;arguments.length<2?r=To:"function"!=typeof r&&(r=t.format(r));var a=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n0?a[t-1]:r[0],th?0:1;if(c=St)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,g,v,m,y,x,b,_,w,k,T,A,M=0,S=0,E=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===Oo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=zt(v/c*Math.sin(m))),s&&(M=zt(v/s*Math.sin(m)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(h-S),_=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=At?0:1;if(S&&Bo(y,x,b,_)===p^C){var L=(u+h)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(h-M),k=s*Math.sin(h-M),T=s*Math.cos(u+M),A=s*Math.sin(u+M);var P=Math.abs(u-h+2*M)<=At?0:1;if(M&&Bo(w,k,T,A)===1-p^P){var O=(u+h)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=A=null}}else w=k=0;if(f>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s0?0:1}function No(t,e,r,n,a){var i=t[0]-e[0],o=t[1]-e[1],s=(a?n:-n)/Math.sqrt(i*i+o*o),l=s*o,c=-s*i,u=t[0]+l,h=t[1]+c,f=e[0]+l,p=e[1]+c,d=(u+f)/2,g=(h+p)/2,v=f-u,m=p-h,y=v*v+m*m,x=r-n,b=u*p-f*h,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,T=(b*m+v*_)/y,A=(-b*v+m*_)/y,M=w-d,S=k-g,E=T-d,C=A-g;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function jo(t){var e=ea,r=ra,n=Yr,a=Uo,i=a.key,o=.7;function s(i){var s,l=[],c=[],u=-1,h=i.length,f=ve(e),p=ve(r);function d(){l.push("M",a(t(c),o))}for(;++u1&&a.push("H",n[0]);return a.join("")},"step-before":Ho,"step-after":Go,basis:Xo,"basis-open":function(t){if(t.length<4)return Uo(t);var e,r=[],n=-1,a=t.length,i=[0],o=[0];for(;++n<3;)e=t[n],i.push(e[0]),o.push(e[1]);r.push(Zo(Qo,i)+","+Zo(Qo,o)),--n;for(;++n9&&(a=3*e/Math.sqrt(a),o[s]=a*r,o[s+1]=a*n));s=-1;for(;++s<=l;)a=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),i.push([a||0,o[s]*a||0]);return i}(t))}});function Uo(t){return t.length>1?t.join("L"):t+"Z"}function qo(t){return t.join("L")+"Z"}function Ho(t){for(var e=0,r=t.length,n=t[0],a=[n[0],",",n[1]];++e1){s=e[1],i=t[l],l++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1];for(var c=2;cAt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return i.radius=function(t){return arguments.length?(r=ve(t),i):r},i.source=function(e){return arguments.length?(t=ve(e),i):t},i.target=function(t){return arguments.length?(e=ve(t),i):e},i.startAngle=function(t){return arguments.length?(n=ve(t),i):n},i.endAngle=function(t){return arguments.length?(a=ve(t),i):a},i},t.svg.diagonal=function(){var t=Vn,e=Un,r=as;function n(n,a){var i=t.call(this,n,a),o=e.call(this,n,a),s=(i.y+o.y)/2,l=[i,{x:i.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=as,n=e.projection;return e.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}(r=t)):r},e},t.svg.symbol=function(){var t=os,e=is;function r(r,n){return(ls.get(t.call(this,r,n))||ss)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var ls=t.map({circle:ss,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*us)),r=e*us;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/cs),r=e*cs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});t.svg.symbolTypes=ls.keys();var cs=Math.sqrt(3),us=Math.tan(30*Ct);W.transition=function(t){for(var e,r,n=ds||++ms,a=bs(t),i=[],o=gs||{time:Date.now(),ease:ai,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(t,o);if(i>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}h||(i=a.time,o=Te(function(t){var e=h.delay;if(o.t=e+i,e<=t)return f(t-e);o.c=f},0,i),h=u[n]={tween:new b,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++u.count)}vs.call=W.call,vs.empty=W.empty,vs.node=W.node,vs.size=W.size,t.transition=function(e,r){return e&&e.transition?ds?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=vs,vs.select=function(t){var e,r,n,a=this.id,i=this.namespace,o=[];t=X(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function g(t){t.select(".extent").attr("y",l[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function v(){var h,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&a,k=!/^(e|w)$/.test(_)&&i,T=y.classed("extent"),A=xt(m),M=t.mouse(m),S=t.select(o(m)).on("keydown.brush",function(){32==t.event.keyCode&&(T||(h=null,M[0]-=s[1],M[1]-=l[1],T=2),B())}).on("keyup.brush",function(){32==t.event.keyCode&&2==T&&(M[0]+=s[1],M[1]+=l[1],T=0,B())});if(t.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);v=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else t.event.altKey&&(h=M.slice());function L(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),T||(t.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(e[0]1?{floor:function(e){for(;s(e=t.floor(e));)e=Is(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Is(+e+1);return e}}:t))},a.ticks=function(t,e){var r=co(a.domain()),n=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],Is(+r[1]+1),e<1?1:e)},a.tickFormat=function(){return n},a.copy=function(){return Os(e.copy(),r,n)},mo(a,e)}function Is(t){return new Date(t)}Es.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ps:Ls,Ps.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ps.toString=Ls.toString,Ie.second=Fe(function(t){return new ze(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ie.seconds=Ie.second.range,Ie.seconds.utc=Ie.second.utc.range,Ie.minute=Fe(function(t){return new ze(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ie.minutes=Ie.minute.range,Ie.minutes.utc=Ie.minute.utc.range,Ie.hour=Fe(function(t){var e=t.getTimezoneOffset()/60;return new ze(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ie.hours=Ie.hour.range,Ie.hours.utc=Ie.hour.utc.range,Ie.month=Fe(function(t){return(t=Ie.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ie.months=Ie.month.range,Ie.months.utc=Ie.month.utc.range;var zs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[Ie.second,1],[Ie.second,5],[Ie.second,15],[Ie.second,30],[Ie.minute,1],[Ie.minute,5],[Ie.minute,15],[Ie.minute,30],[Ie.hour,1],[Ie.hour,3],[Ie.hour,6],[Ie.hour,12],[Ie.day,1],[Ie.day,2],[Ie.week,1],[Ie.month,1],[Ie.month,3],[Ie.year,1]],Rs=Es.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Yr]]),Fs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Is)},floor:P,ceil:P};Ds.year=Ie.year,Ie.scale=function(){return Os(t.scale.linear(),Ds,Rs)};var Bs=Ds.map(function(t){return[t[0].utc,t[1]]}),Ns=Cs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Yr]]);function js(t){return JSON.parse(t.responseText)}function Vs(t){var e=a.createRange();return e.selectNode(a.body),e.createContextualFragment(t.responseText)}Bs.year=Ie.year.utc,Ie.scale.utc=function(){return Os(t.scale.linear(),Bs,Ns)},t.text=me(function(t){return t.responseText}),t.json=function(t,e){return ye(t,"application/json",js,e)},t.html=function(t,e){return ye(t,"text/html",Vs,e)},t.xml=me(function(t){return t.responseXML}),"object"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],165:[function(t,e,r){e.exports=function(){for(var t=0;t=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0});if(1&s)for(var u=0;u<_.length;++u){var b=_[u],f=b[0];b[0]=b[1],b[1]=f}return _}},{"incremental-convex-hull":414,uniq:548}],167:[function(t,e,r){"use strict";e.exports=i;var n=(i.canvas=document.createElement("canvas")).getContext("2d"),a=o([32,126]);function i(t,e){Array.isArray(t)&&(t=t.join(", "));var r,i={},s=16,l=.05;e&&(2===e.length&&"number"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=a),n.font=s+"px "+t;for(var c=0;cs*l){var p=(f-h)/s;i[u]=1e3*p}}return i}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),a=t[0];a>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),a=1048575&n;return 2146435072&n&&(a+=1<<20),[r,a]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:106}],169:[function(t,e,r){var n=t("abs-svg-path"),a=t("normalize-svg-path"),i={M:"moveTo",C:"bezierCurveTo"};e.exports=function(t,e){t.beginPath(),a(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[i[r]].apply(t,n)}),t.closePath()}},{"abs-svg-path":61,"normalize-svg-path":453}],170:[function(t,e,r){e.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],171:[function(t,e,r){"use strict";e.exports=function(t,e){switch("undefined"==typeof e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=e})}(e);for(var r,a=n(t).components.filter(function(t){return t.length>1}),i=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=k?f.call(k,T,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r0?1:-1}},{}],184:[function(t,e,r){"use strict";var n=t("../math/sign"),a=Math.abs,i=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*i(a(t)):t}},{"../math/sign":181}],185:[function(t,e,r){"use strict";var n=t("./to-integer"),a=Math.max;e.exports=function(t){return a(0,n(t))}},{"./to-integer":184}],186:[function(t,e,r){"use strict";var n=t("./valid-callable"),a=t("./valid-value"),i=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,h=arguments[2],f=arguments[3];return r=Object(a(r)),n(c),u=s(r),f&&u.sort("function"==typeof f?i.call(f,r):void 0),"function"!=typeof t&&(t=u[t]),o.call(t,u,function(t,n){return l.call(r,t)?o.call(c,h,r[t],t,r,n):e})}}},{"./valid-callable":204,"./valid-value":206}],187:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":188,"./shim":189}],188:[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")}},{}],189:[function(t,e,r){"use strict";var n=t("../keys"),a=t("../valid-value"),i=Math.max;e.exports=function(t,e){var r,o,s,l=i(arguments.length,2);for(t=Object(a(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o-1}},{}],210:[function(t,e,r){"use strict";var n=Object.prototype.toString,a=n.call("");e.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||n.call(t)===a)||!1}},{}],211:[function(t,e,r){"use strict";var n=Object.create(null),a=Math.random;e.exports=function(){var t;do{t=a().toString(36).slice(2)}while(n[t]);return t}},{}],212:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/set-prototype-of"),i=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?i.call(e,"key+value")?"key+value":i.call(e,"key")?"key":"value":"value",c(this,"__kind__",o("",e))},a&&a(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"))},{"./":215,d:152,"es5-ext/object/set-prototype-of":201,"es5-ext/string/#/contains":207,"es6-symbol":220}],213:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),a=t("es5-ext/object/valid-callable"),i=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,h,f,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r="array":i(t)?r="string":t=o(t),a(e),h=function(){f=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,m,u.value,h),f)return;u=t.next()}else for(d=t.length,p=0;p=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,h),!f);++p);else c.call(t,function(t){return l.call(e,m,t,h),f})}},{"./get":214,"es5-ext/function/is-arguments":178,"es5-ext/object/valid-callable":204,"es5-ext/string/is-string":210}],214:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),a=t("es5-ext/string/is-string"),i=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 i(t):a(t)?new o(t):new i(t)}},{"./array":212,"./string":217,"./valid-iterable":218,"es5-ext/function/is-arguments":178,"es5-ext/string/is-string":210,"es6-symbol":220}],215:[function(t,e,r){"use strict";var n,a=t("es5-ext/array/#/clear"),i=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"),h=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(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,f(n.prototype,i({_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)):h(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__&&a.call(this.__redo__),this.__nextIndex__=0})}))),h(n.prototype,u.iterator,l(function(){return this}))},{d:152,"d/auto-bind":151,"es5-ext/array/#/clear":174,"es5-ext/object/assign":187,"es5-ext/object/valid-callable":204,"es5-ext/object/valid-value":206,"es6-symbol":220}],216:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),a=t("es5-ext/object/is-value"),i=t("es5-ext/string/is-string"),o=t("es6-symbol").iterator,s=Array.isArray;e.exports=function(t){return!!a(t)&&(!!s(t)||(!!i(t)||(!!n(t)||"function"==typeof t[o])))}},{"es5-ext/function/is-arguments":178,"es5-ext/object/is-value":195,"es5-ext/string/is-string":210,"es6-symbol":220}],217:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/set-prototype-of"),i=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__",i("",t.length))},a&&a(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:i(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,i("c","String Iterator"))},{"./":215,d:152,"es5-ext/object/set-prototype-of":201,"es6-symbol":220}],218:[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":216}],219:[function(t,e,r){(function(n,a){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,function(){"use strict";function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,o=void 0,s=void 0,l=function(t,e){g[i]=t,g[i+1]=e,2===(i+=2)&&(s?s(v):_())};var c="undefined"!=typeof window?window:void 0,u=c||{},h=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof n&&"[object process]"==={}.toString.call(n),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var g=new Array(1e3);function v(){for(var t=0;t=r-1){f=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var u=s.length-1,h=(e[r-1],0);h=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--h)n.push(i(l[h-1],c[h-1],arguments[h])),a.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var f=r;f>0;--f){var p=i(c[f-1],u[f-1],arguments[f]);n.push(p),a.push((p-n[o++])*h)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(i(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,a=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,h=u>1e-6?1/u:0;this._time.push(t);for(var f=r;f>0;--f){var p=arguments[f];n.push(i(l[f-1],c[f-1],n[o++]+p)),a.push(p*h)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--h)n.push(i(l[h],c[h],n[o]+u*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":92,"cubic-hermite":146}],228:[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 a,i,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(a=0,o=r;ae[0]-o[0]/2&&(f=o[0]/2,p+=o[1]);return r}},{"css-font/stringify":143}],230:[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 a(n.cache[r],c);var u=e.canvas||n.canvas,h=u.getContext("2d"),f={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,h.font=t;var d={top:0};h.clearRect(0,0,p,p),h.textBaseline="top",h.fillStyle="black",h.fillText("H",0,0);var g=i(h.getImageData(0,0,p,p));h.clearRect(0,0,p,p),h.textBaseline="bottom",h.fillText("H",0,p);var v=i(h.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-v+g,h.clearRect(0,0,p,p),h.textBaseline="alphabetic",h.fillText("H",0,p);var m=p-i(h.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=m,h.clearRect(0,0,p,p),h.textBaseline="middle",h.fillText("H",0,.5*p);var y=i(h.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="hanging",h.fillText("H",0,.5*p);var x=i(h.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,h.clearRect(0,0,p,p),h.textBaseline="ideographic",h.fillText("H",0,p);var b=i(h.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,f.upper&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.upper,0,0),d.upper=i(h.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),f.lower&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.lower,0,0),d.lower=i(h.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),f.tittle&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.tittle,0,0),d.tittle=i(h.getImageData(0,0,p,p))),f.ascent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.ascent,0,0),d.ascent=i(h.getImageData(0,0,p,p))),f.descent&&(h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.descent,0,0),d.descent=o(h.getImageData(0,0,p,p))),f.overshoot){h.clearRect(0,0,p,p),h.textBaseline="top",h.fillText(f.overshoot,0,0);var _=o(h.getImageData(0,0,p,p));d.overshoot=_-m}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,a(d,c)}function a(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 i(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={}},{}],231:[function(t,e,r){"use strict";e.exports=function(t){return new c(t||d,null)};var n=0,a=1;function i(t,e,r,n,a,i){this._color=t,this.key=e,this.value=r,this.left=n,this.right=a,this._count=i}function o(t){return new i(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new i(t,e.key,e.value,e.left,e.right,e._count)}function l(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var u=c.prototype;function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(u,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(u,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(t,e){for(var r=this._compare,o=this.root,u=[],h=[];o;){var f=r(t,o.key);u.push(o),h.push(f),o=f<=0?o.left:o.right}u.push(new i(n,t,e,null,null,1));for(var p=u.length-2;p>=0;--p){o=u[p];h[p]<=0?u[p]=new i(o._color,o.key,o.value,u[p+1],o.right,o._count+1):u[p]=new i(o._color,o.key,o.value,o.left,u[p+1],o._count+1)}for(p=u.length-1;p>1;--p){var d=u[p-1];o=u[p];if(d._color===a||o._color===a)break;var g=u[p-2];if(g.left===d)if(d.left===o){if(!(v=g.right)||v._color!==n){if(g._color=n,g.left=d.right,d._color=a,d.right=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).left===g?m.left=d:m.right=d;break}d._color=a,g.right=s(a,v),g._color=n,p-=1}else{if(!(v=g.right)||v._color!==n){if(d.right=o.left,g._color=n,g.left=o.right,o._color=a,o.left=d,o.right=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).left===g?m.left=o:m.right=o;break}d._color=a,g.right=s(a,v),g._color=n,p-=1}else if(d.right===o){if(!(v=g.left)||v._color!==n){if(g._color=n,g.right=d.left,d._color=a,d.left=g,u[p-2]=d,u[p-1]=o,l(g),l(d),p>=3)(m=u[p-3]).right===g?m.right=d:m.left=d;break}d._color=a,g.left=s(a,v),g._color=n,p-=1}else{var v;if(!(v=g.left)||v._color!==n){var m;if(d.left=o.right,g._color=n,g.right=o.left,o._color=a,o.right=d,o.left=g,u[p-2]=o,u[p-1]=d,l(g),l(d),l(o),p>=3)(m=u[p-3]).right===g?m.right=o:m.left=o;break}d._color=a,g.left=s(a,v),g._color=n,p-=1}}return u[0]._color=a,new c(r,u[0])},u.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){var n;if(r.left&&(n=t(e,r.left)))return n;return(n=e(r.key,r.value))||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,a){if(r(e,a.key)<=0){var i;if(a.left&&(i=t(e,r,n,a.left)))return i;if(i=n(a.key,a.value))return i}if(a.right)return t(e,r,n,a.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,a,i){var o,s=n(e,i.key),l=n(r,i.key);if(s<=0){if(i.left&&(o=t(e,r,n,a,i.left)))return o;if(l>0&&(o=a(i.key,i.value)))return o}if(l>0&&i.right)return t(e,r,n,a,i.right)}(e,r,this._compare,t,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(u,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),u.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},u.ge=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i<=0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new h(this,n)},u.gt=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i<0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new h(this,n)},u.lt=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i>0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new h(this,n)},u.le=function(t){for(var e=this._compare,r=this.root,n=[],a=0;r;){var i=e(t,r.key);n.push(r),i>=0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new h(this,n)},u.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var a=e(t,r.key);if(n.push(r),0===a)return new h(this,n);r=a<=0?r.left:r.right}return new h(this,[])},u.remove=function(t){var e=this.find(t);return e?e.remove():this},u.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=h.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return te?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new h(this.tree,this._stack.slice())},f.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new i(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=t.length-2;u>=0;--u){(r=t[u]).left===t[u+1]?e[u]=new i(r._color,r.key,r.value,e[u+1],r.right,r._count):e[u]=new i(r._color,r.key,r.value,r.left,e[u+1],r._count)}if((r=e[e.length-1]).left&&r.right){var h=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var f=e[h-1];e.push(new i(r._color,f.key,f.value,r.left,r.right,r._count)),e[h-1].key=r.key,e[h-1].value=r.value;for(u=e.length-2;u>=h;--u)r=e[u],e[u]=new i(r._color,r.key,r.value,r.left,e[u+1],r._count);e[h-1].left=e[h]}if((r=e[e.length-1])._color===n){var d=e[e.length-2];d.left===r?d.left=null:d.right===r&&(d.right=null),e.pop();for(u=0;u=0;--u){if(e=t[u],0===u)return void(e._color=a);if((r=t[u-1]).left===e){if((i=r.right).right&&i.right._color===n)return c=(i=r.right=o(i)).right=o(i.right),r.right=i.left,i.left=r,i.right=c,i._color=r._color,e._color=a,r._color=a,c._color=a,l(r),l(i),u>1&&((h=t[u-2]).left===r?h.left=i:h.right=i),void(t[u-1]=i);if(i.left&&i.left._color===n)return c=(i=r.right=o(i)).left=o(i.left),r.right=c.left,i.left=c.right,c.left=r,c.right=i,c._color=r._color,r._color=a,i._color=a,e._color=a,l(r),l(i),l(c),u>1&&((h=t[u-2]).left===r?h.left=c:h.right=c),void(t[u-1]=c);if(i._color===a){if(r._color===n)return r._color=a,void(r.right=s(n,i));r.right=s(n,i);continue}i=o(i),r.right=i.left,i.left=r,i._color=r._color,r._color=n,l(r),l(i),u>1&&((h=t[u-2]).left===r?h.left=i:h.right=i),t[u-1]=i,t[u]=r,u+11&&((h=t[u-2]).right===r?h.right=i:h.left=i),void(t[u-1]=i);if(i.right&&i.right._color===n)return c=(i=r.left=o(i)).right=o(i.right),r.left=c.right,i.right=c.left,c.right=r,c.left=i,c._color=r._color,r._color=a,i._color=a,e._color=a,l(r),l(i),l(c),u>1&&((h=t[u-2]).right===r?h.right=c:h.left=c),void(t[u-1]=c);if(i._color===a){if(r._color===n)return r._color=a,void(r.left=s(n,i));r.left=s(n,i);continue}var h;i=o(i),r.left=i.right,i.right=r,i._color=r._color,r._color=n,l(r),l(i),u>1&&((h=t[u-2]).right===r?h.right=i:h.left=i),t[u-1]=i,t[u]=r,u+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),f.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),f.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),n=e[e.length-1];r[r.length-1]=new i(n._color,n.key,t,n.left,n.right,n._count);for(var a=e.length-2;a>=0;--a)(n=e[a]).left===e[a+1]?r[a]=new i(n._color,n.key,n.value,r[a+1],n.right,n._count):r[a]=new i(n._color,n.key,n.value,n.left,r[a+1],n._count);return new c(this.tree._compare,r[0])},f.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],232:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number("0/0");for(var e=i[0],r=i.length-1;r>0;--r)e+=i[r]/(t+r);var n=t+a+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],a=1;a<9;a++)r+=n[a]/(e+a);var i=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(i,e+.5)*Math.exp(-i)*r},e.exports.log=o},{}],233:[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,a=e;try{var i=[t];0===t.indexOf("webgl")&&i.push("experimental-"+t);for(var o=0;o0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};h.isOpaque=function(){return!0},h.isTransparent=function(){return!1},h.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];h.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,a=t.projection||l,i=this.bounds,s=t._ortho||!1,u=o(r,n,a,i,s),h=u.cubeEdges,f=u.axis,b=n[12],_=n[13],w=n[14],k=n[15],T=(s?2:1)*this.pixelRatio*(a[3]*b+a[7]*_+a[11]*w+a[15]*k)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=h[A],this.lastCubeProps.axis[A]=f[A];var M=p;for(A=0;A<3;++A)d(p[A],A,this.bounds,h,f);e=this.gl;var S,E=g;for(A=0;A<3;++A)this.backgroundEnable[A]?E[A]=f[A]:E[A]=0;this._background.draw(r,n,a,i,E,this.backgroundColor),this._lines.bind(r,n,a,this);for(A=0;A<3;++A){var C=[0,0,0];f[A]>0?C[A]=i[1][A]:C[A]=i[0][A];for(var L=0;L<2;++L){var P=(A+1+L)%3,O=(A+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,O,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(L=0;L<2;++L){P=(A+1+L)%3,O=(A+1+(1^L))%3;this.zeroEnable[O]&&Math.min(i[0][O],i[1][O])<=0&&Math.max(i[0][O],i[1][O])>=0&&this._lines.drawZero(P,O,this.bounds,C,this.zeroLineColor[O],this.zeroLineWidth[O]*this.pixelRatio)}}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var I=c(m,M[A].primalMinor),z=c(y,M[A].mirrorMinor),D=this.lineTickLength;for(L=0;L<3;++L){var R=T/r[5*L];I[L]*=D[L]*R,z[L]*=D[L]*R}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,I,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,a,this.pixelRatio);var F,B;function N(t){(B=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,a=(t+2)%3,i=e[n],o=e[a],s=r[n],l=r[a];i>0&&l>0?N(n):i>0&&l<0?N(n):i<0&&l>0?N(n):i<0&&l<0?N(n):o>0&&s>0?N(a):o>0&&s<0?N(a):o<0&&s>0?N(a):o<0&&s<0&&N(a)}for(A=0;A<3;++A){var V=M[A].primalMinor,U=M[A].mirrorMinor,q=c(x,M[A].primalOffset);for(L=0;L<3;++L)this.lineTickEnable[A]&&(q[L]+=T*V[L]*Math.max(this.lineTickLength[L],0)/r[5*L]);var H=[0,0,0];if(H[A]=1,this.tickEnable[A]){-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,F=1,"auto"===(S=[this.tickAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]),B=[0,0,0],j(A,V,U);for(L=0;L<3;++L)q[L]+=T*V[L]*this.tickPad[L]/r[5*L];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],q,this.tickColor[A],H,B,S)}if(this.labelEnable[A]){F=0,B=[0,0,0],this.labels[A].length>4&&(N(A),F=1),"auto"===(S=[this.labelAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]);for(L=0;L<3;++L)q[L]+=T*V[L]*this.labelPad[L]/r[5*L];q[A]+=.5*(i[0][A]+i[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],q,this.labelColor[A],[0,0,0],B,S)}}this._text.unbind()},h.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":235,"./lib/cube.js":236,"./lib/lines.js":237,"./lib/text.js":239,"./lib/ticks.js":240}],235:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],f=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=p,f[l]=p;for(var d=-1;d<=1;d+=2){h[c]=d;for(var g=-1;g<=1;g+=2)h[u]=g,e.push(h[0],h[1],h[2],f[0],f[1],f[2]),s+=1}var v=c;c=u,u=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=a(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=i(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t("gl-buffer"),a=t("gl-vao"),i=t("./shaders").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,a,i){for(var o=!1,s=0;s<3;++s)o=o||a[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:a,colors:i},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":238,"gl-buffer":242,"gl-vao":328}],236:[function(t,e,r){"use strict";e.exports=function(t,e,r,i,p){a(s,e,t),a(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=i[x][2];for(var b=0;b<2;++b){u[1]=i[b][1];for(var _=0;_<2;++_)u[0]=i[_][0],f(l[y],u,s),y+=1}}for(var w=-1,x=0;x<8;++x){for(var k=l[x][3],T=0;T<3;++T)c[x][T]=l[x][T]/k;p&&(c[x][2]*=-1),k<0&&(w<0?w=x:c[x][2]E&&(w|=1<E&&(w|=1<c[x][1]&&(R=x));for(var F=-1,x=0;x<3;++x){var B=R^1<c[N][0]&&(N=B)}}var j=g;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^N)]=R&N;var V=7^N;V===w||V===D?(V=7^F,j[n.log2(N^V)]=V&N):j[n.log2(F^V)]=V&F;for(var U=v,q=w,A=0;A<3;++A)U[A]=q&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(t){return a(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(t){return a(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":302,glslify:410}],239:[function(t,e,r){(function(r){"use strict";e.exports=function(t,e,r,i,s,l){var u=n(t),h=a(t,[{buffer:u,size:3}]),f=o(t);f.attributes.position.location=0;var p=new c(t,f,u,h);return p.update(e,r,i,s,l),p};var n=t("gl-buffer"),a=t("gl-vao"),i=t("vectorize-text"),o=t("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,h=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var a=this.shader.uniforms;a.model=t,a.view=e,a.projection=r,a.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,a){var o=[];function s(t,e,r,n,a,s){var c=l[r];c||(c=l[r]={});var u=c[e];u||(u=c[e]=function(t,e){try{return i(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:a,styletags:s}));for(var h=(n||12)/12,f=u.positions,p=u.cells,d=0,g=p.length;d=0;--m){var y=f[v[m]];o.push(h*y[0],-h*y[1],t)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){h[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),f[d]=(o.length/3|0)-h[d],c[d]=o.length/3|0;for(var g=0;g=0&&(a=r.length-n-1);var i=Math.pow(10,a),o=Math.round(t*e*i),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/i,c=o%i;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),a){for(var h=""+c;h.length=t[0][a];--o)i.push({x:o*e[a],text:n(e[a],o)});r.push(i)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,i,a),r}function u(t,e){for(var r=n.malloc(t.length,e),a=t.length,i=0;i=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=i(s,t.shape);a.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?h:h.subarray(0,t.length),e),n.free(h)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=t.createBuffer(),i=new s(t,r,a,0,n);return i.update(e),i}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":546}],243:[function(t,e,r){"use strict";var n=t("gl-vec3"),a=function(t,e){for(var r=0;r=e)return r-1;return r},i=n.create(),o=n.create(),s=function(t,e,r){return tr?r:t},l=function(t,e,r,l){var c=t[0],u=t[1],h=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=a(r[0],c),v=a(r[1],u),m=a(r[2],h),y=g+1,x=v+1,b=m+1;if(l&&(g=s(g,0,f-1),y=s(y,0,f-1),v=s(v,0,p-1),x=s(x,0,p-1),m=s(m,0,d-1),b=s(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(c-r[0][g])/(r[0][y]-r[0][g]),w=(u-r[1][v])/(r[1][x]-r[1][v]),k=(h-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],I=e[S+T+C],z=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(i,O,I,_),n.lerp(B,B,i,w),n.lerp(i,z,D,_),n.lerp(o,R,F,_),n.lerp(i,i,o,w),n.lerp(B,B,i,k),B};e.exports=function(t,e){var r;r=t.positions?t.positions:function(t){for(var e=t[0],r=t[1],n=t[2],a=[],i=0;is&&(s=n.length(b)),x&&(y=Math.min(y,2*n.distance(g,_)/(n.length(v)+n.length(b)))),g=_,v=b,m.push(b)}var w=[c,h,p],k=[u,f,d];e&&(e[0]=w,e[1]=k),0===s&&(s=1);var T=1/s;isFinite(y)&&!isNaN(y)||(y=1),o.vectorScale=y;var A=function(t,e,r){var a=n.create();return void 0!==t&&n.set(a,t,e,r),a}(0,1,0),M=t.coneSize||.5;t.absoluteConeSize&&(M=t.absoluteConeSize*T),o.coneScale=M;x=0;for(var S=0;x=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,a=e.vertexWeights,i=r.length,o=p.mallocFloat32(6*i),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,a=t.projection||m,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:a,clipBounds:i,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:Math.floor(r[1]/48),position:n,dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=a(t),h=a(t),f=a(t),p=a(t),d=a(t),v=a(t),m=i(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:3}]),x=a(t),_=a(t),w=a(t),k=a(t),T=i(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=a(t),M=a(t),S=a(t),E=a(t),C=a(t),L=i(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=a(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,i(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":245,colormap:127,"gl-buffer":242,"gl-mat4/invert":266,"gl-mat4/multiply":268,"gl-shader":302,"gl-texture2d":323,"gl-vao":328,ndarray:451,normals:454,"simplicial-complex-contour":519,"typedarray-pool":546}],245:[function(t,e,r){var n=t("glslify"),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float coneScale;\n\nuniform float coneOffset;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nuniform float vectorScale;\nuniform float coneScale;\nuniform float coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:410}],246:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34000:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],247:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":246}],248:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=n(e),o=a(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=i(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t("gl-buffer"),a=t("gl-vao"),i=t("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,a=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var i=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho||!1?2:1)*this.pixelRatio*(a[3]*i+a[7]*s+a[11]*l+a[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)e.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&e.drawArrays(e.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var a=-1;a<=1;a+=2){var i=[0,0,0];i[(n+e)%3]=a,r.push(i)}t[e]=r}return t}();function h(t,e,r,n){for(var a=u[n],i=0;i0)(g=u.slice())[s]+=p[1][s],a.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+h(a,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(a)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":249,"gl-buffer":242,"gl-vao":328}],249:[function(t,e,r){"use strict";var n=t("glslify"),a=t("gl-shader"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(t){return a(t,i,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":302,glslify:410}],250:[function(t,e,r){"use strict";var n=t("gl-texture2d");e.exports=function(t,e,r,n){a||(a=t.FRAMEBUFFER_UNSUPPORTED,i=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var a=new Array(r),i=0;iu||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var f=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&h>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");f=t.FLOAT}else n.preferFloat&&h>0&&p&&(f=t.FLOAT);var g=!0;"depth"in n&&(g=!!n.depth);var v=!1;"stencil"in n&&(v=!!n.stencil);return new d(t,e,r,f,h,g,v,c)};var a,i,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function h(t){switch(t){case a:throw new Error("gl-fbo: Framebuffer unsupported");case i:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(t,e,r,a,i,o){if(!a)return null;var s=n(t,e,r,i,a);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,a){var i=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,i),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,a,t.RENDERBUFFER,i),i}function d(t,e,r,n,a,i,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(a);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?d?t.depth=f(r,a,i,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=f(r,a,i,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,a,i,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,a,i,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,a,i,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;ma||r<0||r>a)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var i=c(n),o=0;o>8*p&255;this.pickOffset=r,a.bind();var d=a.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=a.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),h.pick=function(t,e,r){var n=this.pickOffset,a=this.shape[0]*this.shape[1];if(r=n+a)return null;var i=r-n,o=this.xData,s=this.yData;return{object:this,pointId:i,dataCoord:[o[i%this.shape[0]],s[i/this.shape[0]|0]]}},h.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||a(e[0]),o=t.y||a(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=o;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,h=this.bounds,p=h[0]=r[0],d=h[1]=o[0],g=1/((h[2]=r[r.length-1])-p),v=1/((h[3]=o[o.length-1])-d),m=e[0],y=e[1];this.shape=[m,y];var x=(m-1)*(y-1)*(f.length>>>1);this.numVertices=x;for(var b=i.mallocUint8(4*x),_=i.mallocFloat32(2*x),w=i.mallocUint8(2*x),k=i.mallocUint32(x),T=0,A=0;A max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\nlowp vec4 encode_float_1604150559(highp float v) {\n highp float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n highp float e = floor(log2(av));\n highp float m = av * pow(2.0, -e) - 1.0;\n \n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n \n //Unpack exponent\n highp float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0; \n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, encode_float_1604150559(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(t){return a(t,i,o,null,l)},r.createPickShader=function(t){return a(t,i,s,null,l)}},{"gl-shader":302,glslify:410}],256:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=u(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),c=a(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),f=l(new Array(1024),[256,1,4]),p=0;p<1024;++p)f.data[p]=255;var d=i(e,f);d.wrap=e.REPEAT;var g=new v(e,r,o,s,c,d);return g.update(t),g};var n=t("gl-buffer"),a=t("gl-vao"),i=t("gl-texture2d"),o=t("glsl-read-float"),s=t("binary-search-bounds"),l=t("ndarray"),c=t("./lib/shaders"),u=c.createShader,h=c.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var a=t[n]-e[n];r+=a*a}return Math.sqrt(r)}function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,a,i){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=a,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=i,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var m=v.prototype;m.isTransparent=function(){return this.hasAlpha},m.isOpaque=function(){return!this.hasAlpha},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||f,view:t.view||f,projection:t.projection||f,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var a=[],i=[],o=[],c=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=t.position||t.positions;if(f){var d=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e0){for(var w=0;w<24;++w)a.push(a[a.length-12]);u+=2,v=!0}continue t}h[0][r]=Math.min(h[0][r],b[r],_[r]),h[1][r]=Math.max(h[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=c;if(c+=p(b,_),v){for(r=0;r<2;++r)a.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);u+=2,v=!1}a.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],c,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],c,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(a),i.push(c),o.push(f[f.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=o,this.arcLength=i,"dashes"in t){var T=t.dashes.slice();for(T.unshift(0),e=1;e1.0001)return null;v+=g[u]}if(Math.abs(v-1)>.001)return null;return[h,function(t,e){for(var r=[0,0,0],n=0;n max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},{glslify:410}],281:[function(t,e,r){"use strict";var n=t("gl-shader"),a=t("gl-buffer"),i=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./lib/shaders"),g=t("./lib/closest-point"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_,k,T,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=a,this.pickShader=i,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=T,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=k.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function E(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(t){this.pickId=t},T.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,a=e.vertexWeights,i=r.length,o=p.mallocFloat32(6*i),s=0,l=0;l0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,a=t.projection||w,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:a,clipBounds:i,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,a=new Array(r.length),i=0;ia[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t],r.uniforms.angle=m[t],i.drawArrays(i.TRIANGLES,a[T],a[A]-a[T]))),y[t]&&k&&(u[1^t]-=M*p*x[t],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],i.drawArrays(i.TRIANGLES,w,k)),u[1^t]=M*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=M*p*g[t+2],Ta[T]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],i.drawArrays(i.TRIANGLES,a[T],a[A]-a[T]))),y[t+2]&&k&&(u[1^t]+=M*p*x[t+2],r.uniforms.dataAxis=h,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],i.drawArrays(i.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,a=r.gl,i=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-i[u])/(i[2+u]-i[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,a.drawArrays(a.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(f=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,a=t.screenBox,i=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],h=i[o],g=i[o+2]-h,v=a[o],m=a[o+2]-v;p[o]=2*l/u*g/m,f[o]=2*(s-c)/u*g/m}d[1]=2*t.pixelRatio/(a[3]-a[1]),d[0]=d[1]*(a[3]-a[1])/(a[2]-a[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=f,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,a,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],h=[-1/0],f=l[o];for(e=0;e=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],f[d]):o.drawLine(e[0],g,e[2],g,p[d],f[d])}}for(d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(i,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*a*e/window.innerHeight*(i-c.lastT())/20;c.pan(i,0,0,h*(Math.exp(o)-1))}}},!0)},d.enableMouseListeners(),d};var n=t("right-now"),a=t("3d-view"),i=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset"),l=t("has-passive-events")},{"3d-view":53,"has-passive-events":412,"mouse-change":436,"mouse-event-offset":437,"mouse-wheel":439,"right-now":505}],290:[function(t,e,r){var n=t("glslify"),a=t("gl-shader"),i=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(t){return a(t,i,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":302,glslify:410}],291:[function(t,e,r){"use strict";var n=t("./camera.js"),a=t("gl-axes3d"),i=t("gl-axes3d/properties"),o=t("gl-spikes3d"),s=t("gl-select-static"),l=t("gl-fbo"),c=t("a-big-triangle"),u=t("mouse-change"),h=t("mouse-wheel"),f=t("gl-mat4/perspective"),p=t("gl-mat4/ortho"),d=t("./lib/shader"),g=t("is-mobile")({tablet:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function y(t){return"boolean"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;if(!e)if(e=document.createElement("canvas"),t.container){var r=t.container;r.appendChild(e)}else document.body.appendChild(e);var x=t.gl;x||(x=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:g}));if(!x)throw new Error("webgl not supported");var b=t.bounds||[[-10,-10,-10],[10,10,10]],_=new v,w=l(x,[x.drawingBufferWidth,x.drawingBufferHeight],{preferFloat:!g}),k=d(x),T=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,A={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:T},M=t.axes||{},S=a(x,M);S.enable=!M.disable;var E=t.spikes||{},C=o(x,E),L=[],P=[],O=[],I=[],z=!0,D=!0,R=new Array(16),F=new Array(16),B={view:null,projection:R,model:F,_ortho:!1},D=!0,N=[x.drawingBufferWidth,x.drawingBufferHeight],j=t.cameraObject||n(e,A),V={gl:x,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:_,camera:j,axes:S,axesPixels:null,spikes:C,bounds:b,objects:L,shape:N,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:y(t.autoResize),autoBounds:y(t.autoBounds),autoScale:!!t.autoScale,autoCenter:y(t.autoCenter),clipToBounds:y(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:B,oncontextloss:null,mouseListener:null,_stopped:!1},U=[x.drawingBufferWidth/V.pixelRatio|0,x.drawingBufferHeight/V.pixelRatio|0];function q(){if(!V._stopped&&V.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var a=0|Math.ceil(r*V.pixelRatio),i=0|Math.ceil(n*V.pixelRatio);if(a!==e.width||i!==e.height){e.width=a,e.height=i;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",z=!0}}}V.autoResize&&q();function H(){for(var t=L.length,e=I.length,r=0;r0&&0===O[e-1];)O.pop(),I.pop().dispose()}function G(){if(V.contextLost)return!0;x.isContextLost()&&(V.contextLost=!0,V.mouseListener.enabled=!1,V.selection.object=null,V.oncontextloss&&V.oncontextloss())}window.addEventListener("resize",q),V.update=function(t){V._stopped||(t=t||{},z=!0,D=!0)},V.add=function(t){V._stopped||(t.axes=S,L.push(t),P.push(-1),z=!0,D=!0,H())},V.remove=function(t){if(!V._stopped){var e=L.indexOf(t);e<0||(L.splice(e,1),P.pop(),z=!0,D=!0,H())}},V.dispose=function(){if(!V._stopped&&(V._stopped=!0,window.removeEventListener("resize",q),e.removeEventListener("webglcontextlost",G),V.mouseListener.enabled=!1,!V.contextLost)){S.dispose(),C.dispose();for(var t=0;te?1.1:1/1.1;V.aspect[0]*=r,V.aspect[1]*=r,V.aspect[2]*=r,V.redraw()}},!0),V._mouseRotating=!1,V._prevButtons=0,V.enableMouseListeners=function(){V.mouseListener=u(e,function(t,e,r){if(!V._stopped){var n=I.length,a=L.length,i=_.object;_.distance=1/0,_.mouse[0]=e,_.mouse[1]=r,_.object=null,_.screen=null,_.dataCoordinate=_.dataPosition=null;var o=!1;if(t&&V._prevButtons)V._mouseRotating=!0;else{V._mouseRotating&&(D=!0),V._mouseRotating=!1;for(var s=0;s_.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:410}],293:[function(t,e,r){"use strict";var n=t("gl-shader"),a=t("gl-buffer"),i=t("typedarray-pool"),o=t("./lib/shader");function s(t,e,r,n,a){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=a,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,i=a(r),l=a(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),h=new s(t,i,l,c,u);return h.update(e),t.addObject(h),h};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,a=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=a?s:i.mallocFloat32(s.length),c=o?t.idToIndex:i.mallocInt32(n);if(a||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&i<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,a),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/i,l[4]=2/o,l[6]=-2*a[0]/i-1,l[7]=-2*a[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var h=n.getParameter(n.BLEND),f=n.getParameter(n.DITHER);return h&&!this.blend&&n.disable(n.BLEND),f&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),h&&!this.blend&&n.enable(n.BLEND),f&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,a=this.pointCount;if(r=n+a)return null;var i=r-n,o=this.points;return{object:this,pointId:i,dataCoord:[o[2*i],o[2*i+1]]}}},{"./lib/shader":292,"gl-buffer":242,"gl-shader":302,"typedarray-pool":546}],294:[function(t,e,r){e.exports=function(t,e,r,n){var a,i,o,s,l,c=e[0],u=e[1],h=e[2],f=e[3],p=r[0],d=r[1],g=r[2],v=r[3];(i=c*p+u*d+h*g+f*v)<0&&(i=-i,p=-p,d=-d,g=-g,v=-v);1-i>1e-6?(a=Math.acos(i),o=Math.sin(a),s=Math.sin((1-n)*a)/o,l=Math.sin(n*a)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*h+l*g,t[3]=s*f+l*v,t}},{}],295:[function(t,e,r){"use strict";e.exports=function(t){return t||0===t?t.toString():""}},{}],296:[function(t,e,r){"use strict";var n=t("vectorize-text");e.exports=function(t,e,r){var i=a[e];i||(i=a[e]={});if(t in i)return i[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,c,u=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:i,fragment:l,attributes:u},f={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:i,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},v={vertex:s,fragment:c,attributes:u};function m(t,e){var r=n(t,e),a=r.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,r}r.createPerspective=function(t){return m(t,h)},r.createOrtho=function(t){return m(t,f)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{"gl-shader":302,glslify:410}],298:[function(t,e,r){"use strict";var n=t("is-string-blank"),a=t("gl-buffer"),i=t("gl-vao"),o=t("typedarray-pool"),s=t("gl-mat4/multiply"),l=t("./lib/shaders"),c=t("./lib/glyphs"),u=t("./lib/get-simple-string"),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(t,e){var r=t[0],n=t[1],a=t[2],i=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*n+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*n+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*n+e[11]*a+e[15]*i,t}function p(t,e,r,n){return f(n,n),f(n,n),f(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t){return!0===t?1:t>1?1:t}function v(t,e,r,n,a,i,o,s,l,c,u,h){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=a,this.colorBuffer=i,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),h=a(e),f=a(e),p=a(e),d=a(e),g=i(e,[{buffer:h,size:3,type:e.FLOAT},{buffer:f,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),m=new v(e,r,n,o,h,f,p,d,g,s,c,u);return m.update(t),m};var m=v.prototype;m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],k=h.slice(),T=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n){var a,i=e.axesProject,o=e.gl,l=t.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,d=e.axesBounds,g=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);a=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=u,l.projection=f,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=g,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var v=0;v<3;++v)if(i[v]){l.scale=e.projectScale[v],l.opacity=e.projectOpacity[v];for(var m=k,C=0;C<16;++C)m[C]=0;for(C=0;C<4;++C)m[5*C]=1;m[5*v]=0,a[v]<0?m[12+v]=d[0][v]:m[12+v]=d[1][v],s(m,c,m),l.model=m;var L=(v+1)%3,P=(v+2)%3,O=M(x),I=M(b);O[L]=1,I[P]=1;var z=p(0,0,0,S(_,O)),D=p(0,0,0,S(w,I));if(Math.abs(z[1])>Math.abs(D[1])){var R=z;z=D,D=R,R=O,O=I,I=R;var F=L;L=P,P=F}z[0]<0&&(O[L]=-1),D[1]>0&&(I[P]=-1);var B=0,N=0;for(C=0;C<4;++C)B+=Math.pow(c[4*L+C],2),N+=Math.pow(c[4*P+C],2);O[L]/=Math.sqrt(B),I[P]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=I,l.fragClipBounds[0]=E(T,g[0],v,-1e8),l.fragClipBounds[1]=E(T,g[1],v,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function P(t,e,r,n,a,i,o){var s=r.gl;if((i===r.projectHasAlpha||o)&&C(e,r,n,a),i===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||h,l.view=n.view||h,l.projection=n.projection||h,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=L,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=a,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*a),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(t,e,r,a){var i;i=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var a=0;a<3;++a)n.position[a]=n.dataCoordinate[a]=r[a];return n},m.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,a=e>>16&255;this.highlightId=[r/255,n/255,a/255,0]}else this.highlightId=[1,1,1,1]},m.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=g(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=g(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var a,i,s=t.position,l=t.font||"normal",c=t.alignment||[0,0];if(2===c.length)a=c[0],i=c[1];else{a=[],i=[];for(n=0;n0){var I=0,z=x,D=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(m)&&Array.isArray(m[0]);t:for(n=0;n<_;++n){y+=1;for(w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue t;h[k]=Math.max(h[k],w[k]),u[k]=Math.min(u[k],w[k])}T=(N=O(f,n,l,this.pixelRatio)).mesh,A=N.lines,M=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(V=F?n0?1-M[0][0]:Y<0?1+M[1][0]:1,W*=W>0?1-M[0][1]:W<0?1+M[1][1]:1],Z=T.cells||[],J=T.positions||[];for(k=0;k0){var m=r*u;o.drawBox(h-m,f-m,p+m,f+m,i),o.drawBox(h-m,d-m,p+m,d+m,i),o.drawBox(h-m,f-m,h+m,d+m,i),o.drawBox(p-m,f-m,p+m,d+m,i)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":299,"gl-buffer":242,"gl-shader":302}],301:[function(t,e,r){"use strict";e.exports=function(t,e){var r=n(t,e),i=a.mallocUint8(e[0]*e[1]*4);return new c(t,r,i)};var n=t("gl-fbo"),a=t("typedarray-pool"),i=t("ndarray"),o=t("bit-twiddle").nextPow2,s=t("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_fthis.buffer.length){a.free(this.buffer);for(var n=this.buffer=a.mallocUint8(o(r*e*4)),i=0;ir)for(t=r;te)for(t=e;t=0){for(var k=0|w.type.charAt(w.type.length-1),T=new Array(k),A=0;A=0;)M+=1;_[y]=M}var S=new Array(r.length);function E(){f.program=o.program(p,f._vref,f._fref,b,_);for(var t=0;t=0){var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);o(t,e,p[0],a,d,i,h)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+f);var d=f.charCodeAt(f.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);s(t,e,p,a,d,i,h)}}}return i};var n=t("./GLError");function a(t,e,r,n,a,i){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=a,this._constFunc=i}var i=a.prototype;function o(t,e,r,n,i,o,s){for(var l=["gl","v"],c=[],u=0;u4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+e+"],false,obj"+t+")"}throw new a("","Unknown uniform data type for "+name+": "+r)}var i=r.charCodeAt(r.length-1)-48;if(i<2||i>4)throw new a("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+i+"fv(locations["+e+"],obj"+t+")";default:throw new a("","Unrecognized data type for vector "+name+": "+r)}}}function c(e){for(var n=["return function updateProperty(obj){"],a=function t(e,r){if("object"!=typeof r)return[[e,r]];var n=[];for(var a in r){var i=r[a],o=e;parseInt(a)+""===a?o+="["+a+"]":o+="."+a,"object"==typeof i?n.push.apply(n,t(o,i)):n.push([o,i])}return n}("",e),i=0;i4)throw new a("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new a("","Unknown uniform data type for "+name+": "+t)}}(r[u].type);var p}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){l[0]in o||(o[l[0]]=[]),o=o[l[0]];for(var c=1;c1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\nuniform float vectorScale;\nuniform float tubeScale;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal,0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular\n , opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data\n , f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:410}],313:[function(t,e,r){"use strict";var n=t("gl-shader"),a=t("gl-buffer"),i=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),h=t("colormap"),f=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./shaders"),g=d.meshShader,v=d.pickShader,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,y,x,b,_,w,k,T){this.gl=t,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=a,this.triangleVectors=i,this.triangleColors=s,this.triangleNormals=c,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=u,this.triangleCount=0,this.lineWidth=1,this.edgePositions=h,this.edgeColors=p,this.edgeUVs=d,this.edgeIds=f,this.edgeVAO=g,this.edgeCount=0,this.pointPositions=v,this.pointColors=x,this.pointUVs=b,this.pointSizes=_,this.pointIds=y,this.pointVAO=w,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=T,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!1,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.tubeScale=1,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1],this.pixelRatio=1}var x=y.prototype;function b(t){var e=n(t,v.vertex,v.fragment,null,v.attributes);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.vector.location=5,e}x.isOpaque=function(){return this.opacity>=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(t){this.pickId=t},x.highlight=function(t){if(t&&this.contourEnable){for(var e=f(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,a=e.vertexWeights,i=r.length,o=p.mallocFloat32(6*i),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||m,n=t.view||m,a=t.projection||m,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:a,clipBounds:i,tubeScale:this.tubeScale,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind())},x.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3);return{index:e,position:n,intensity:this.intensity[r[1]],velocity:this.vectors[r[1]].slice(0,3),divergence:this.vectors[r[1]][3],dataCoordinate:n}},x.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=e.triShader||function(t){var e=n(t,g.vertex,g.fragment,null,g.attributes);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.vector.location=5,e}(t),s=b(t),l=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=t.LINEAR_MIPMAP_LINEAR,l.magFilter=t.LINEAR;var c=a(t),h=a(t),f=a(t),p=a(t),d=a(t),v=a(t),m=i(t,[{buffer:c,type:t.FLOAT,size:4},{buffer:v,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:f,type:t.FLOAT,size:4},{buffer:p,type:t.FLOAT,size:2},{buffer:d,type:t.FLOAT,size:3},{buffer:h,type:t.FLOAT,size:4}]),x=a(t),_=a(t),w=a(t),k=a(t),T=i(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:k,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:t.FLOAT,size:4},{buffer:w,type:t.FLOAT,size:2}]),A=a(t),M=a(t),S=a(t),E=a(t),C=a(t),L=i(t,[{buffer:A,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:S,type:t.FLOAT,size:2},{buffer:E,type:t.FLOAT,size:1}]),P=a(t),O=new y(t,l,r,s,c,h,v,f,p,d,m,x,k,_,w,T,A,C,M,S,E,L,P,i(t,[{buffer:P,type:t.FLOAT,size:3}]));return O.update(e),O}},{"./shaders":312,colormap:127,"gl-buffer":242,"gl-mat4/invert":266,"gl-mat4/multiply":268,"gl-shader":302,"gl-texture2d":323,"gl-vao":328,ndarray:451,normals:454,"simplicial-complex-contour":519,"typedarray-pool":546}],314:[function(t,e,r){"use strict";var n=t("gl-vec3"),a=t("gl-vec4"),i=function(t,e,r,i){for(var o=0,s=0;so&&(o=u)}var h=t.map(function(t){return function(t,e,r,i){var o,s,l,c=t.points,u=t.velocities,h=t.divergences;n.set(n.create(),0,1,0),n.create(),n.create();n.create();for(var f=[],p=[],d=[],g=[],v=[],m=[],y=0,x=0,b=a.create(),_=a.create(),w=0;w0)for(k=0;k<8;k++){var T=(k+1)%8;f.push(g[k],v[k],v[T],v[T],g[T],g[k]),d.push(_,b,b,b,_,_),m.push(y,x,x,x,y,y),p.push([f.length-6,f.length-5,f.length-4],[f.length-3,f.length-2,f.length-1])}var A=g;g=v,v=A,A=_,_=b,b=A,A=y,y=x,x=A}return{positions:f,cells:p,vectors:d,vertexIntensity:m}}(t,r,i,o)}),f=[],p=[],d=[],g=[];for(s=0;se)return r-1}return r},c=n.create(),u=n.create(),h=function(t,e,r){return tr?r:t},f=function(t,e,r,a){var i=t[0],o=t[1],s=t[2],f=r[0].length,p=r[1].length,d=r[2].length,g=l(r[0],i),v=l(r[1],o),m=l(r[2],s),y=g+1,x=v+1,b=m+1;if(r[0][g]===i&&(y=g),r[1][v]===o&&(x=v),r[2][m]===s&&(b=m),a&&(g=h(g,0,f-1),y=h(y,0,f-1),v=h(v,0,p-1),x=h(x,0,p-1),m=h(m,0,d-1),b=h(b,0,d-1)),g<0||v<0||m<0||y>=f||x>=p||b>=d)return n.create();var _=(i-r[0][g])/(r[0][y]-r[0][g]),w=(o-r[1][v])/(r[1][x]-r[1][v]),k=(s-r[2][m])/(r[2][b]-r[2][m]);(_<0||_>1||isNaN(_))&&(_=0),(w<0||w>1||isNaN(w))&&(w=0),(k<0||k>1||isNaN(k))&&(k=0);var T=m*f*p,A=b*f*p,M=v*f,S=x*f,E=g,C=y,L=e[M+T+E],P=e[M+T+C],O=e[S+T+E],I=e[S+T+C],z=e[M+A+E],D=e[M+A+C],R=e[S+A+E],F=e[S+A+C],B=n.create();return n.lerp(B,L,P,_),n.lerp(c,O,I,_),n.lerp(B,B,c,w),n.lerp(c,z,D,_),n.lerp(u,R,F,_),n.lerp(c,c,u,w),n.lerp(B,B,c,k),B},p=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=1;r=h&&r<=g&&n>=f&&n<=v&&a>=d&&a<=m},x=10*n.distance(e[0],e[1])/a,b=x*x,_=1,w=0;n.create();r.length>=2&&(_=function(t){for(var e=[],r=[],n=[],a={},i={},o={},s=0;sw&&!isNaN(z)&&isFinite(z)&&(w=z),C.push(z),u.push({points:A,velocities:M,divergences:C});for(var P=0;P<100*a&&A.lengthb&&n.scale(O,O,x/Math.sqrt(I)),n.add(O,O,T),S=t.getVelocity(O),n.squaredDistance(E,O)-b>-1e-4*b){A.push(O),E=O,M.push(S);L=t.getDivergence(O,S);(z=n.length(L))>w&&!isNaN(z)&&isFinite(z)&&(w=z),C.push(z)}T=O}}for(k=0;k max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(t){var e=n(t,i,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,i,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":302,glslify:410}],316:[function(t,e,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],317:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=a(e),u=i(e,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=a(e),f=i(e,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),p=a(e),d=i(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,S,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,h,f,p,d,[0,0,0]),m={levels:[[],[],[]]};for(var k in t)m[k]=t[k];return m.colormap=m.colormap||"jet",v.update(m),v};var n=t("bit-twiddle"),a=t("gl-buffer"),i=t("gl-vao"),o=t("gl-texture2d"),s=t("typedarray-pool"),l=t("colormap"),c=t("ndarray-ops"),u=t("ndarray-pack"),h=t("ndarray"),f=t("surface-nets"),p=t("gl-mat4/multiply"),d=t("gl-mat4/invert"),g=t("binary-search-bounds"),v=t("ndarray-gradient"),m=t("./lib/shaders"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,a){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=a}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(t,e,r,n,a,i,o,l,c,u,f,p,d,g,v){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=v,this.intensityBounds=[],this._shader=n,this._pickShader=a,this._coordinateBuffer=i,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.isTransparent=function(){return this.opacity<1},C.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},C.pickSlots=1,C.setPickBase=function(t){this.pickId=t};var L=[0,0,0],P={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(t,e){var r,n,a,i=e.axes&&e.axes.lastCubeProps.axis||L,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=P.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(i[r]>0)][r],p(l,t.model,l);var c=P.clipBounds[r];for(a=0;a<2;++a)for(n=0;n<3;++n)c[a][n]=t.clipBounds[a][n];c[0][r]=-1e8,c[1][r]=1e8}return P.showSurface=o,P.showContour=s,P}var I={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},z=k.slice(),D=[1,0,0,0,1,0,0,0,1];function R(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=t.model||k,n.view=t.view||k,n.projection=t.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var a=0;a<2;++a)for(var i=n.clipBounds[a],o=0;o<3;++o)i[o]=Math.min(Math.max(this.clipBounds[a][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=z;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),a=0;a<3;++a)n.eyePosition[a]=s[12+a]/s[15];var l=s[15];for(a=0;a<3;++a)l+=this.lightPosition[a]*s[4*a+3];for(a=0;a<3;++a){var c=s[12+a];for(o=0;o<3;++o)c+=s[4*o+a]*this.lightPosition[o];n.lightPosition[a]=c/l}var u=O(n,this);if(u.showSurface&&e===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[a],this._shader.uniforms.clipBounds=u.clipBounds[a],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!e){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var f=this._contourVAO;for(f.bind(),a=0;a<3;++a)for(h.uniforms.permutation=A[a],r.lineWidth(this.contourWidth[a]*this.pixelRatio),o=0;o>4)/16)/255,a=Math.floor(n),i=n-a,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;a+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?i:1-i,f=0;f<2;++f)for(var p=a+u,d=s+f,v=h*(f?l:1-l),m=0;m<3;++m)c[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=i<.5?a:a+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},C.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},C.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=B(t.contourWidth,Number)),"showContour"in t&&(this.showContour=B(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=B(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=j(t.contourColor)),"contourProject"in t&&(this.contourProject=B(t.contourProject,function(t){return B(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=j(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=B(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=B(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0);var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var a=(e.shape[0]+2)*(e.shape[1]+2);a>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(a))),this._field[2]=h(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var i=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[i[0]+2,i[1]+2]);if(t.coords){var p=t.coords;if(!Array.isArray(p)||3!==p.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var d=p[o];for(b=0;b<2;++b)if(d.shape[b]!==i[b])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],d)}}else if(t.ticks){var g=t.ticks;if(!Array.isArray(g)||2!==g.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var m=g[o];if((Array.isArray(m)||m.length)&&(m=h(m)),m.shape[0]!==i[o])throw new Error("gl-surface: invalid tick length");var y=h(m.data,i);y.stride[o]=m.stride[0],y.stride[1^o]=0,this.padField(this._field[o],y)}}else{for(o=0;o<2;++o){var x=[0,0];x[o]=1,this._field[o]=h(this._field[o].data,[i[0]+2,i[1]+2],x,0)}this._field[0].set(0,0,0);for(var b=0;b0){for(var kt=0;kt<5;++kt)rt.pop();G-=1}continue t}rt.push(st[0],st[1],ut[0],ut[1],st[2]),G+=1}}ot.push(G)}this._contourOffsets[nt]=it,this._contourCounts[nt]=ot}var Tt=s.mallocFloat(rt.length);for(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:{}}},k.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=a(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=h(t.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+"px sans-serif");var r,i=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var a=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&a==e.font[r].baseString||(i=!0,e.font[r]=k.fonts[a],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:a,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[a]=e.font[r]}}),(i||o)&&this.font.forEach(function(r,a){var i=n.stringify({size:e.fontSize[a],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[a]=e.shader.atlas[i],!e.fontAtlas[a]){var o=r.metrics;e.shader.atlas[i]=e.fontAtlas[a]={fontString:i,step:2*Math.ceil(e.fontSize[a]*o.bottom*.5),em:e.fontSize[a],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),f=0;f2){for(var w=!t.position[0].length,T=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,a=0;return a+=.5*n.bottom,a+="number"==typeof t?t-n.baseline:-n[t],k.normalViewport||(a*=-1),a})),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var 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=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{"bit-twiddle":93,"color-normalize":121,"css-font":140,"detect-kerning":167,"es6-weak-map":319,"flatten-vertex-data":228,"font-atlas":229,"font-measure":230,"gl-util/context":324,"is-plain-obj":423,"object-assign":455,"parse-rect":460,"parse-unit":462,"pick-by-alias":466,regl:503,"to-px":540,"typedarray-pool":546}],319:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?WeakMap:t("./polyfill")},{"./is-implemented":320,"./polyfill":322}],320:[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)))))}},{}],321:[function(t,e,r){"use strict";e.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],322:[function(t,e,r){"use strict";var n,a=t("es5-ext/object/is-value"),i=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"),h=t("es6-iterator/for-of"),f=t("es6-symbol").toStringTag,p=t("./is-native-implemented"),d=Array.isArray,g=Object.defineProperty,v=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=p&&i&&WeakMap!==n?i(new WeakMap,m(this)):this,a(e)&&(d(e)||(e=u(e))),g(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(h(e,function(e){s(e),t.set(e[0],e[1])}),t):t},p&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c(function(t){return!!v.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:c(function(t){if(v.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:c(function(t){return v.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,f,c("c","WeakMap"))},{"./is-native-implemented":321,d:152,"es5-ext/object/is-value":195,"es5-ext/object/set-prototype-of":201,"es5-ext/object/valid-object":205,"es5-ext/object/valid-value":206,"es5-ext/string/random-uniq":211,"es6-iterator/for-of":213,"es6-iterator/get":214,"es6-symbol":220}],323:[function(t,e,r){"use strict";var n=t("ndarray"),a=t("ndarray-ops"),i=t("typedarray-pool");e.exports=function(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t);if("number"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return function(t,e,r,n,a,i){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,a,a,i,e),new f(t,o,r,n,a,i)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=d(o,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var h,p,v=0;if(2===o.length)v=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])v=t.ALPHA;else if(2===o[2])v=t.LUMINANCE_ALPHA;else if(3===o[2])v=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)h=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];p=i.malloc(m,r);var x=n(p,o,y,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?a.assign(x,e):u(x,e),h=p.subarray(0,m)}var b=g(t);t.texImage2D(t.TEXTURE_2D,0,v,o[0],o[1],0,v,c,h),l||i.free(p);return new f(t,b,o[0],o[1],v,c)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var u=function(t,e){a.muls(t,e,255)};function h(t,e,r){var n=t.gl,a=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function f(t,e,r,n,a,i){this.gl=t,this.handle=e,this.format=a,this.type=i,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=f.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,a){var i=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture shape");if(a===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,a,null),new f(t,o,e,r,n,a)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,c,h){var f=h.dtype,p=h.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var g=0,v=0,m=d(p,h.stride.slice());"float32"===f?g=t.FLOAT:"float64"===f?(g=t.FLOAT,m=!1,f="float32"):"uint8"===f?g=t.UNSIGNED_BYTE:(g=t.UNSIGNED_BYTE,m=!1,f="uint8");if(2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],h=n(h.data,p,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");v=t.RGBA}p[2]}v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s);if(v!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=h.size,x=c.indexOf(o)<0;x&&c.push(o);if(g===l&&m)0===h.offset&&h.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data.subarray(h.offset,h.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,h.data.subarray(h.offset,h.offset+y));else{var b;b=l===t.FLOAT?i.mallocFloat32(y):i.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);g===t.FLOAT&&l===t.UNSIGNED_BYTE?u(_,h):a.assign(_,h),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?i.freeFloat32(b):i.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":546}],324:[function(t,e,r){(function(r){"use strict";var n=t("pick-by-alias");function a(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 i(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={},i(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}i(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),a(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),a(t)}if(!t.gl)try{t.gl=t.canvas.getContext("webgl",t.attrs)}catch(e){try{t.gl=t.canvas.getContext("experimental-webgl",t.attrs)}catch(e){t.gl=t.canvas.getContext("webgl-experimental",t.attrs)}}return t.gl}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":466}],325:[function(t,e,r){"use strict";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var a=0;a1?0:Math.acos(s)};var n=t("./fromValues"),a=t("./normalize"),i=t("./dot")},{"./dot":340,"./fromValues":346,"./normalize":357}],331:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],332:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],333:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],334:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],335:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[0],s=r[1],l=r[2];return t[0]=a*l-i*s,t[1]=i*o-n*l,t[2]=n*s-a*o,t}},{}],336:[function(t,e,r){e.exports=t("./distance")},{"./distance":337}],337:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return Math.sqrt(r*r+n*n+a*a)}},{}],338:[function(t,e,r){e.exports=t("./divide")},{"./divide":339}],339:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],340:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],341:[function(t,e,r){e.exports=1e-6},{}],342:[function(t,e,r){e.exports=function(t,e){var r=t[0],a=t[1],i=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(a-s)<=n*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-l)<=n*Math.max(1,Math.abs(i),Math.abs(l))};var n=t("./epsilon")},{"./epsilon":341}],343:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],344:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],345:[function(t,e,r){e.exports=function(t,e,r,a,i,o){var s,l;e||(e=3);r||(r=0);l=a?Math.min(a*e+r,t.length):t.length;for(s=r;s0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i);return t}},{}],358:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=n*e,t}},{}],359:[function(t,e,r){e.exports=function(t,e,r,n){var a=r[1],i=r[2],o=e[1]-a,s=e[2]-i,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=a+o*c-s*l,t[2]=i+o*l+s*c,t}},{}],360:[function(t,e,r){e.exports=function(t,e,r,n){var a=r[0],i=r[2],o=e[0]-a,s=e[2]-i,l=Math.sin(n),c=Math.cos(n);return t[0]=a+s*l+o*c,t[1]=e[1],t[2]=i+s*c-o*l,t}},{}],361:[function(t,e,r){e.exports=function(t,e,r,n){var a=r[0],i=r[1],o=e[0]-a,s=e[1]-i,l=Math.sin(n),c=Math.cos(n);return t[0]=a+o*c-s*l,t[1]=i+o*l+s*c,t[2]=e[2],t}},{}],362:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],363:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],364:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],365:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],366:[function(t,e,r){e.exports=t("./squaredDistance")},{"./squaredDistance":368}],367:[function(t,e,r){e.exports=t("./squaredLength")},{"./squaredLength":369}],368:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return r*r+n*n+a*a}},{}],369:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],370:[function(t,e,r){e.exports=t("./subtract")},{"./subtract":371}],371:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],372:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2];return t[0]=n*r[0]+a*r[3]+i*r[6],t[1]=n*r[1]+a*r[4]+i*r[7],t[2]=n*r[2]+a*r[5]+i*r[8],t}},{}],373:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[3]*n+r[7]*a+r[11]*i+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])/o,t[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])/o,t[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])/o,t}},{}],374:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*i-l*a,h=c*a+l*n-o*i,f=c*i+o*a-s*n,p=-o*n-s*a-l*i;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t}},{}],375:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],376:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],377:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],378:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],379:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2],i=e[3]-t[3];return Math.sqrt(r*r+n*n+a*a+i*i)}},{}],380:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],381:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],382:[function(t,e,r){e.exports=function(t,e,r,n){var a=new Float32Array(4);return a[0]=t,a[1]=e,a[2]=r,a[3]=n,a}},{}],383:[function(t,e,r){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),inverse:t("./inverse"),normalize:t("./normalize"),dot:t("./dot"),lerp:t("./lerp"),random:t("./random"),transformMat4:t("./transformMat4"),transformQuat:t("./transformQuat")}},{"./add":375,"./clone":376,"./copy":377,"./create":378,"./distance":379,"./divide":380,"./dot":381,"./fromValues":382,"./inverse":384,"./length":385,"./lerp":386,"./max":387,"./min":388,"./multiply":389,"./negate":390,"./normalize":391,"./random":392,"./scale":393,"./scaleAndAdd":394,"./set":395,"./squaredDistance":396,"./squaredLength":397,"./subtract":398,"./transformMat4":399,"./transformQuat":400}],384:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],385:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],a=t[3];return Math.sqrt(e*e+r*r+n*n+a*a)}},{}],386:[function(t,e,r){e.exports=function(t,e,r,n){var a=e[0],i=e[1],o=e[2],s=e[3];return t[0]=a+n*(r[0]-a),t[1]=i+n*(r[1]-i),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],387:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],388:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],389:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],390:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],391:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],a=e[2],i=e[3],o=r*r+n*n+a*a+i*i;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=a*o,t[3]=i*o);return t}},{}],392:[function(t,e,r){var n=t("./normalize"),a=t("./scale");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),a(t,t,e),t}},{"./normalize":391,"./scale":393}],393:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],394:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],395:[function(t,e,r){e.exports=function(t,e,r,n,a){return t[0]=e,t[1]=r,t[2]=n,t[3]=a,t}},{}],396:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2],i=e[3]-t[3];return r*r+n*n+a*a+i*i}},{}],397:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],a=t[3];return e*e+r*r+n*n+a*a}},{}],398:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],399:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,t}},{}],400:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],a=e[1],i=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*i-l*a,h=c*a+l*n-o*i,f=c*i+o*a-s*n,p=-o*n-s*a-l*i;return t[0]=u*c+p*-o+h*-l-f*-s,t[1]=h*c+p*-s+f*-o-u*-l,t[2]=f*c+p*-l+u*-s-h*-o,t[3]=e[3],t}},{}],401:[function(t,e,r){e.exports=function(t,e,r,i){return n[0]=i,n[1]=r,n[2]=e,n[3]=t,a[0]};var n=new Uint8Array(4),a=new Float32Array(n.buffer)},{}],402:[function(t,e,r){var n=t("glsl-tokenizer"),a=t("atob-lite");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return F(r),P+=r.length,(S=S.slice(r.length)).length}}function H(){return/[^a-fA-F0-9]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function G(){return"."===e?(S.push(e),M=g,r=e,T+1):/[eE]/.test(e)?(S.push(e),M=g,r=e,T+1):"x"===e&&1===S.length&&"0"===S[0]?(M=_,S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function Y(){return"f"===e&&(S.push(e),r=e,T+=1),/[eE]/.test(e)?(S.push(e),r=e,T+1):"-"===e&&/[eE]/.test(r)?(S.push(e),r=e,T+1):/[^\d]/.test(e)?(F(S.join("")),M=l,T):(S.push(e),r=e,T+1)}function W(){if(/[^\d\w_]/.test(e)){var t=S.join("");return M=R.indexOf(t)>-1?y:D.indexOf(t)>-1?m:v,F(S.join("")),M=l,T}return S.push(e),r=e,T+1}};var n=t("./lib/literals"),a=t("./lib/operators"),i=t("./lib/builtins"),o=t("./lib/literals-300es"),s=t("./lib/builtins-300es"),l=999,c=9999,u=0,h=1,f=2,p=3,d=4,g=5,v=6,m=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":405,"./lib/builtins-300es":404,"./lib/literals":407,"./lib/literals-300es":406,"./lib/operators":408}],404:[function(t,e,r){var n=t("./builtins");n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":405}],405:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],406:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":407}],407:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],408:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],409:[function(t,e,r){var n=t("./index");e.exports=function(t,e){var r=n(e),a=[];return a=(a=a.concat(r(t))).concat(r(null))}},{"./index":403}],410:[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,h=r?a-1:0,f=r?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+t[e+h],h+=f,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=c}return(p?-1:1)*o*Math.pow(2,i-n)},r.write=function(t,e,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<>1,f=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,a),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,a),o=0));a>=8;t[r+p]=255&s,p+=d,s/=256,a-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],414:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var a=t[0].length;if(r<=a)throw new Error("Must input at least d+1 points");var o=t.slice(0,a+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(a+1),u=0;u<=a;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new i(l,new Array(a+1),!1),f=h.adjacent,p=new Array(a+2),u=0;u<=a;++u){for(var d=l.slice(),g=0;g<=a;++g)g===u&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new i(d,new Array(a+1),!0);f[u]=m,p[u]=m}p[a+1]=h;for(var u=0;u<=a;++u)for(var d=f[u].vertices,y=f[u].adjacent,g=0;g<=a;++g){var x=d[g];if(x<0)y[g]=h;else for(var b=0;b<=a;++b)f[b].vertices.indexOf(x)<0&&(y[g]=f[b])}for(var _=new c(a,o,p),w=!!e,u=a+1;u0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var a=new Function("test",e.join("")),i=n[t+1];return i||(i=n),a(i)}(t)),this.orient=i}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,a=this.tuple,i=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var f=u[h];a[h]=f<0?e:i[f]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,i=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)i[u]=a[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=i[u];i[u]=t;var p=this.orient();if(i[u]=f,p<0){s=h;continue t}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var f=[];h.length>0;){var p=(e=h.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=a[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,c.push(m),h.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),T=new i(w,k,!0);u.push(T);var A=_.indexOf(e);if(!(A<0)){_[A]=T,k[g]=m,w[v]=-1,k[v]=e,d[v]=T,T.flip();for(b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}f.push(new o(S,T,b))}}}}}}f.sort(s);for(v=0;v+1=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var h=o[0];o[0]=o[1],o[1]=h}e.push(o)}}return e}},{"robust-orientation":511,"simplicial-complex":521}],415:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),a=0,i=1;function o(t,e,r,n,a){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=a,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new x(null);return new x(y(t))};var s=o.prototype;function l(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var r=y(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,e){var r=t.intervals([]);r.push(e),c(t,r)}function h(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?a:(r.splice(n,1),c(t,r),i)}function f(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var a=r(t[n]);if(a)return a}}function d(t,e){for(var r=0;r>1],a=[],i=[],s=[];for(r=0;r3*(e+1)?u(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,t):this.right.insert(t):this.right=y([t]);else{var r=n.ge(this.leftPoints,t,v),a=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(a,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?h(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,i):(c===i&&(this.count-=1),c):a;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?h(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,i):(c===i&&(this.count-=1),c):a;if(1===this.count)return this.leftPoints[0]===t?2:a;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return i}for(s=n.ge(this.leftPoints,t,v);sthis.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,r){var n;if(tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return ethis.mid?p(this.rightPoints,t,r):d(this.leftPoints,r)};var b=x.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new o(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==a}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":92}],416:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r13)&&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}},{}],425:[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))}},{}],426:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],427:[function(t,e,r){var n,a;n=this,a=function(){"use strict";var t,e,r;function n(n,a){if(t)if(e){var i="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",o={};t(o),(r=a(o)).workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"}))}else e=a;else t=a}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,a,i,o;for(void 0===e&&(e=1e-6),a=t,o=0;o<8;o++){if(i=this.sampleCurveX(a)-t,Math.abs(i)(n=1))return n;for(;ri?r=a:n=a,a=.5*(n-r)+r}return a},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var a=i;function i(t,e){this.x=t,this.y=e}function o(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r0;)e[r]=arguments[r+1];for(var n=0,a=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function g(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 v(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 y(t,e,r){var n={};for(var a in t)n[a]=e.call(r||this,t[a],a,t);return n}function x(t,e,r){var n={};for(var a in t)e.call(r||this,t[a],a,t)&&(n[a]=t[a]);return n}function b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?y(t,b):t}var _={};function w(t){_[t]||("undefined"!=typeof console&&console.warn(t),_[t]=!0)}function k(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,a=n-1,i=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,r,n,a){var i=n||a;return e[r]=!i||i.toLowerCase(),""}),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}function M(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var S,E,C,L,P=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),O=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,I=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,z={now:P,frame:function(t){var e=O(t);return{cancel:function(){return I(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){return S||(S=self.document.createElement("a")),S.href=t,S.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==E&&(E=self.matchMedia("(prefers-reduced-motion: reduce)")),E.matches)}},D={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},R={supported:!1,testSupport:function(t){!F&&L&&(B?N(t):C=t)}},F=!1,B=!1;function N(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,L),t.isContextLost())return;R.supported=!0}catch(t){}t.deleteTexture(e),F=!0}self.document&&((L=self.document.createElement("img")).onload=function(){C&&N(C),C=null,B=!0},L.onerror=function(){F=!0,C=null},L.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var j="01",V=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function U(t){return 0===t.indexOf("mapbox:")}V.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",j,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},V.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},V.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},V.prototype.normalizeStyleURL=function(t,e){if(!U(t))return t;var r=Y(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},V.prototype.normalizeGlyphsURL=function(t,e){if(!U(t))return t;var r=Y(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},V.prototype.normalizeSourceURL=function(t,e){if(!U(t))return t;var r=Y(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},V.prototype.normalizeSpriteURL=function(t,e,r,n){var a=Y(t);return U(t)?(a.path="/styles/v1"+a.path+"/sprite"+e+r,this._makeAPIURL(a,this._customAccessToken||n)):(a.path+=""+e+r,W(a))},V.prototype.normalizeTileURL=function(t,e,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),!e||!U(e))return t;var n=Y(t),a=z.devicePixelRatio>=2||512===r?"@2x":"",i=R.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+a+i),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,D.REQUIRE_ACCESS_TOKEN&&(D.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},V.prototype.canonicalizeTileURL=function(t){var e=Y(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match(/\.[\w]+$/))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var n=e.params.filter(function(t){return!t.match(/^access_token=/)});return n.length&&(r+="?"+n.join("&")),r},V.prototype.canonicalizeTileset=function(t,e){if(!U(e))return t.tiles||[];for(var r=[],n=0,a=t.tiles;n=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Z.prototype.processRequests=function(t){},Z.prototype.postEvent=function(t,e,r,n){var a=this;if(D.EVENTS_URL){var i=Y(D.EVENTS_URL);i.params.push("access_token="+(n||D.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.3.2",skuId:j,userId:this.anonId},s=e?h(o,e):o,l={url:W(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=mt(l,function(t){a.pendingRequest=null,r(t),a.saveEventData(),a.processRequests(n)})}},Z.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var J,K=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,(D.EVENTS_URL&&n||D.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return U(t)||H(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,a=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=d()),this.postEvent(a,{skuToken:this.skuToken},function(t){t||n&&(e.success[n]=!0)},t))}},e}(Z),Q=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){D.EVENTS_URL&&D.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return U(t)||H(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=X(D.ACCESS_TOKEN),n=r?r.u:D.ACCESS_TOKEN,a=n!==this.eventData.tokenU;g(this.anonId)||(this.anonId=d(),a=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(i),l=(i-this.eventData.lastSuccess)/864e5;a=a||l>=1||l<-1||o.getDate()!==s.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},function(t){t||(e.eventData.lastSuccess=i,e.eventData.tokenU=n)},t)}},e}(Z)),$=Q.postTurnstileEvent.bind(Q),tt=new K,et=tt.postMapLoadEvent.bind(tt),rt="mapbox-tiles",nt=500,at=50,it=42e4;function ot(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var st=1/0,lt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(lt);var ct=function(t){function e(e,r,n){401===r&&H(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);function ut(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var ht=ut()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function ft(t,e){var r,n=new self.AbortController,a=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:ht(),signal:n.signal}),i=!1,o=!1,s=(r=a.url).indexOf("sku=")>0&&H(r);"json"===t.type&&a.headers.set("Accept","application/json");var l=function(r,n,i){if(!o){if(r&&"SecurityError"!==r.message&&w(r),n&&i)return c(n);var l=Date.now();self.fetch(a).then(function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new ct(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&&function(t,e,r){if(self.caches){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 a=A(e.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&n.headers.set("Expires",new Date(r+1e3*a["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-rDate.now()&&!r["no-cache"]}(n);t.delete(r),a&&t.put(r,n.clone()),e(null,n,a)}).catch(e)}).catch(e)}(a,l):l(null,null),{cancel:function(){o=!0,i||n.abort()}}}var pt,dt,gt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(ht())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return ft(t,e);if(ut()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}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 ct(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},vt=function(t,e){return gt(h(t,{type:"arrayBuffer"}),e)},mt=function(t,e){return gt(h(t,{method:"POST"}),e)};pt=[],dt=0;var yt=function(t,e){if(dt>=D.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return pt.push(r),r}dt++;var n=!1,a=function(){if(!n)for(n=!0,dt--;pt.length&&dt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},kt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Tt={$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"},"*":{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}},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:"string",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"},{"!":"text-variable-anchor"}],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":{}}},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:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"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"},"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"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"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:"string",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:"string",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:"string",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:"string",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"}}},At=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Mt(t){var e=t.key,r=t.value;return r?[new At(e,r,"constants have been deprecated as of v8")]:[]}function St(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,a=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Ht=[It,zt,Dt,Rt,Ft,Vt,Bt,Ut(Nt)];function Gt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Gt(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=Ht;r255?255:t}function a(t){return t<0?0:t>1?1:t}function i(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?a(parseFloat(t)/100):a(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,a=t.replace(/ /g,"").toLowerCase();if(a in r)return r[a].slice();if("#"===a[0])return 4===a.length?(e=parseInt(a.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===a.length&&(e=parseInt(a.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=a.indexOf("("),c=a.indexOf(")");if(-1!==l&&c+1===a.length){var u=a.substr(0,l),h=a.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[i(h[0]),i(h[1]),i(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),g=o(h[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),f];default:return null}}return null}}catch(t){}}).parseCSSColor,Wt=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};Wt.parse=function(t){if(t){if(t instanceof Wt)return t;if("string"==typeof t){var e=Yt(t);if(e)return new Wt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Wt.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],a=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+a+")"},Wt.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]},Wt.black=new Wt(0,0,0,1),Wt.white=new Wt(1,1,1,1),Wt.transparent=new Wt(0,0,0,0),Wt.red=new Wt(1,0,0,1);var Xt=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"})};Xt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Xt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Zt=function(t,e,r,n){this.text=t,this.scale=e,this.fontStack=r,this.textColor=n},Jt=function(t){this.sections=t};function Kt(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Qt(t){if(null===t)return It;if("string"==typeof t)return Dt;if("boolean"==typeof t)return Rt;if("number"==typeof t)return zt;if(t instanceof Wt)return Ft;if(t instanceof Xt)return jt;if(t instanceof Jt)return Vt;if(Array.isArray(t)){for(var e,r=t.length,n=0,a=t;n2){var s=t[1];if("string"!=typeof s||!(s in re)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);i=re[s],n++}else i=Nt;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=Ut(i,o)}else r=re[a];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var ae=function(t){this.type=Vt,this.sections=t};ae.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],n=1;n4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":Kt(e[0],e[1],e[2],e[3])))return new Wt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ee(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=0)return!1;var r=!0;return t.eachChild(function(t){r&&!pe(t,e)&&(r=!1)}),r}ue.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Rt);if(!n)return null;var a=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Rt);if(!a)return null;var i=null;return r.locale&&!(i=e.parse(r.locale,1,Dt))?null:new ue(n,a,i)},ue.prototype.evaluate=function(t){return new Xt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ue.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ue.prototype.possibleOutputs=function(){return[void 0]},ue.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var de=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};de.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new de(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},de.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},de.prototype.eachChild=function(){},de.prototype.possibleOutputs=function(){return[void 0]},de.prototype.serialize=function(){return["var",this.name]};var ge=function(t,e,r,n,a){void 0===e&&(e=[]),void 0===n&&(n=new Ot),void 0===a&&(a=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=n,this.errors=a,this.expectedType=r};function ve(t,e){for(var r,n,a=t.length-1,i=0,o=a,s=0;i<=o;)if(r=t[s=Math.floor((i+o)/2)],n=t[s+1],r<=e){if(s===a||ee))throw new ee("Input is not a number.");o=s-1}return 0}ge.prototype.parse=function(t,e,r,n,a){return void 0===a&&(a={}),e?this.concat(e,r,n)._parse(t,a):this._parse(t,a)},ge.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ne(e,[t]):"coerce"===r?new oe(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 a=this.registry[n];if(a){var i=a.parse(t,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.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||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=r(i,o,e.typeAnnotation||"coerce");else i=r(i,o,e.typeAnnotation||"assert")}if(!(i instanceof te)&&function t(e){if(e instanceof de)return t(e.boundExpression);if(e instanceof ce&&"error"===e.name)return!1;if(e instanceof ue)return!1;var r=e instanceof oe||e instanceof ne,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof te}),!!n&&(he(e)&&pe(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]))}(i)){var l=new le;try{i=new te(i.type,i.evaluate(l))}catch(t){return this.error(t.message),null}}return i}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.")},ge.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,a=r?this.scope.concat(r):this.scope;return new ge(this.registry,n,e||null,a,this.errors)},ge.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 Pt(n,t))},ge.prototype.checkSubtype=function(t,e){var r=Gt(t,e);return r&&this.error(r),r};var me=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,a=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,a);if(!u)return null;a=a||u.type,n.push([o,u])}return new me(a,r,n)},me.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 a=e.length;return n>=e[a-1]?r[a-1].evaluate(t):r[ve(e,n)].evaluate(t)},me.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 xe=Object.freeze({number:ye,color:function(t,e,r){return new Wt(ye(t.r,e.r,r),ye(t.g,e.g,r),ye(t.b,e.b,r),ye(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return ye(t,e[n],r)})}}),be=.95047,_e=1,we=1.08883,ke=4/29,Te=6/29,Ae=3*Te*Te,Me=Te*Te*Te,Se=Math.PI/180,Ee=180/Math.PI;function Ce(t){return t>Me?Math.pow(t,1/3):t/Ae+ke}function Le(t){return t>Te?t*t*t:Ae*(t-ke)}function Pe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ie(t){var e=Oe(t.r),r=Oe(t.g),n=Oe(t.b),a=Ce((.4124564*e+.3575761*r+.1804375*n)/be),i=Ce((.2126729*e+.7151522*r+.072175*n)/_e);return{l:116*i-16,a:500*(a-i),b:200*(i-Ce((.0193339*e+.119192*r+.9503041*n)/we)),alpha:t.a}}function ze(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=_e*Le(e),r=be*Le(r),n=we*Le(n),new Wt(Pe(3.2404542*r-1.5371385*e-.4985314*n),Pe(-.969266*r+1.8760108*e+.041556*n),Pe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var De={forward:Ie,reverse:ze,interpolate:function(t,e,r){return{l:ye(t.l,e.l,r),a:ye(t.a,e.a,r),b:ye(t.b,e.b,r),alpha:ye(t.alpha,e.alpha,r)}}},Re={forward:function(t){var e=Ie(t),r=e.l,n=e.a,a=e.b,i=Math.atan2(a,n)*Ee;return{h:i<0?i+360:i,c:Math.sqrt(n*n+a*a),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Se,r=t.c;return ze({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}(t.h,e.h,r),c:ye(t.c,e.c,r),l:ye(t.l,e.l,r),alpha:ye(t.alpha,e.alpha,r)}}},Fe=Object.freeze({lab:De,hcl:Re}),Be=function(t,e,r,n,a){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=a;i1}))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(!(a=e.parse(a,2,zt)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Ft:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(f,d,c);if(!g)return null;c=c||g.type,l.push([h,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new Be(c,r,n,a,l):e.error("Type "+qt(c)+" is not interpolatable.")},Be.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 a=e.length;if(n>=e[a-1])return r[a-1].evaluate(t);var i=ve(e,n),o=e[i],s=e[i+1],l=Be.interpolationFactor(this.interpolation,n,o,s),c=r[i].evaluate(t),u=r[i+1].evaluate(t);return"interpolate"===this.operator?xe[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?Re.reverse(Re.interpolate(Re.forward(c),Re.forward(u),l)):De.reverse(De.interpolate(De.forward(c),De.forward(u),l))},Be.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ee("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ee("Array index must be an integer, but found "+e+" instead.");return r[e]},Ue.prototype.eachChild=function(t){t(this.index),t(this.input)},Ue.prototype.possibleOutputs=function(){return[void 0]},Ue.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var qe=function(t,e,r,n,a,i){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=a,this.otherwise=i};qe.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 a={},i=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,Qt(f)))return null}else r=Qt(f);if(void 0!==a[String(f)])return c.error("Branch labels must be unique.");a[String(f)]=i.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,i.push(p)}var d=e.parse(t[1],1,Nt);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 qe(r,n,d,a,i,g):null},qe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(Qt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},qe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},qe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},qe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},a=0,i=Object.keys(this.cases).sort();a",function(t,e,r){return e>r},function(t,e,r,n){return n.compare(e,r)>0}),Qe=We("<=",function(t,e,r){return e<=r},function(t,e,r,n){return n.compare(e,r)<=0}),$e=We(">=",function(t,e,r){return e>=r},function(t,e,r,n){return n.compare(e,r)>=0}),tr=function(t,e,r,n,a){this.type=Dt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=a};tr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,zt);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 a=null;if(n.locale&&!(a=e.parse(n.locale,1,Dt)))return null;var i=null;if(n.currency&&!(i=e.parse(n.currency,1,Dt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,zt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,zt))?null:new tr(r,a,i,o,s)},tr.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))},tr.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)},tr.prototype.possibleOutputs=function(){return[void 0]},tr.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 er=function(t){this.type=zt,this.input=t};er.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 "+qt(r.type)+" instead."):new er(r):null},er.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 ee("Expected value to be of type string or array, but found "+qt(Qt(e))+" instead.")},er.prototype.eachChild=function(t){t(this.input)},er.prototype.possibleOutputs=function(){return[void 0]},er.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var rr={"==":Xe,"!=":Ze,">":Ke,"<":Je,">=":$e,"<=":Qe,array:ne,at:Ue,boolean:ne,case:He,coalesce:je,collator:ue,format:ae,interpolate:Be,"interpolate-hcl":Be,"interpolate-lab":Be,length:er,let:Ve,literal:te,match:qe,number:ne,"number-format":tr,object:ne,step:me,string:ne,"to-boolean":oe,"to-color":oe,"to-number":oe,"to-string":oe,var:de};function nr(t,e){var r=e[0],n=e[1],a=e[2],i=e[3];r=r.evaluate(t),n=n.evaluate(t),a=a.evaluate(t);var o=i?i.evaluate(t):1,s=Kt(r,n,a,o);if(s)throw new ee(s);return new Wt(r/255*o,n/255*o,a/255*o,o)}function ar(t,e){return t in e}function ir(t,e){var r=e[t];return void 0===r?null:r}function or(t){return{type:t}}function sr(t){return{result:"success",value:t}}function lr(t){return{result:"error",value:t}}function cr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ur(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function hr(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 pr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function dr(t){return t}function gr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function vr(t,e,r,n,a){return gr(typeof r===a?n[r]:void 0,t.default,e.default)}function mr(t,e,r){if("number"!==fr(r))return gr(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 a=ve(t.stops.map(function(t){return t[0]}),r);return t.stops[a][1]}function yr(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==fr(r))return gr(t.default,e.default);var a=t.stops.length;if(1===a)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[a-1][0])return t.stops[a-1][1];var i=ve(t.stops.map(function(t){return t[0]}),r),o=function(t,e,r,n){var a=n-r,i=t-r;return 0===a?0:1===e?i/a:(Math.pow(e,i)-1)/(Math.pow(e,a)-1)}(r,n,t.stops[i][0],t.stops[i+1][0]),s=t.stops[i][1],l=t.stops[i+1][1],c=xe[e.type]||dr;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=Fe[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 xr(t,e,r){return"color"===e.type?r=Wt.parse(r):"formatted"===e.type?r=Jt.fromString(r.toString()):fr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),gr(r,t.default,e.default)}ce.register(rr,{error:[{kind:"error"},[Dt],function(t,e){var r=e[0];throw new ee(r.evaluate(t))}],typeof:[Dt,[Nt],function(t,e){return qt(Qt(e[0].evaluate(t)))}],"to-rgba":[Ut(zt,4),[Ft],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ft,[zt,zt,zt],nr],rgba:[Ft,[zt,zt,zt,zt],nr],has:{type:Rt,overloads:[[[Dt],function(t,e){return ar(e[0].evaluate(t),t.properties())}],[[Dt,Bt],function(t,e){var r=e[0],n=e[1];return ar(r.evaluate(t),n.evaluate(t))}]]},get:{type:Nt,overloads:[[[Dt],function(t,e){return ir(e[0].evaluate(t),t.properties())}],[[Dt,Bt],function(t,e){var r=e[0],n=e[1];return ir(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Nt,[Dt],function(t,e){return ir(e[0].evaluate(t),t.featureState||{})}],properties:[Bt,[],function(t){return t.properties()}],"geometry-type":[Dt,[],function(t){return t.geometryType()}],id:[Nt,[],function(t){return t.id()}],zoom:[zt,[],function(t){return t.globals.zoom}],"heatmap-density":[zt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[zt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Nt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[zt,or(zt),function(t,e){for(var r=0,n=0,a=e;n":[Rt,[Dt,Nt],function(t,e){var r=e[0],n=e[1],a=t.properties()[r.value],i=n.value;return typeof a==typeof i&&a>i}],"filter-id->":[Rt,[Nt],function(t,e){var r=e[0],n=t.id(),a=r.value;return typeof n==typeof a&&n>a}],"filter-<=":[Rt,[Dt,Nt],function(t,e){var r=e[0],n=e[1],a=t.properties()[r.value],i=n.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[Rt,[Nt],function(t,e){var r=e[0],n=t.id(),a=r.value;return typeof n==typeof a&&n<=a}],"filter->=":[Rt,[Dt,Nt],function(t,e){var r=e[0],n=e[1],a=t.properties()[r.value],i=n.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[Rt,[Nt],function(t,e){var r=e[0],n=t.id(),a=r.value;return typeof n==typeof a&&n>=a}],"filter-has":[Rt,[Nt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Rt,[],function(t){return null!==t.id()}],"filter-type-in":[Rt,[Ut(Dt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Rt,[Ut(Nt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Rt,[Dt,Ut(Nt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Rt,[Dt,Ut(Nt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var a=r+n>>1;if(e[a]===t)return!0;e[a]>t?n=a-1:r=a+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Rt,overloads:[[[Rt,Rt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[or(Rt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in rr}function wr(t,e){var r=new ge(rr,[],e?function(t){var e={color:Ft,string:Dt,number:zt,enum:Dt,boolean:Rt,formatted:Vt};return"array"===t.type?Ut(e[t.value]||Nt,t.length):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?sr(new br(n,e)):lr(r.errors)}br.prototype.evaluateWithoutErrorHandling=function(t,e,r,n){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)},br.prototype.evaluate=function(t,e,r,n){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.formattedSection=n||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new ee("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var kr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!fe(e.expression)};kr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n)},kr.prototype.evaluate=function(t,e,r,n){return this._styleExpression.evaluate(t,e,r,n)};var Tr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!fe(e.expression),this.interpolationType=n};function Ar(t,e){if("error"===(t=wr(t,e)).result)return t;var r=t.value.expression,n=he(r);if(!n&&!cr(e))return lr([new Pt("","data expressions not supported")]);var a=pe(r,["zoom"]);if(!a&&!ur(e))return lr([new Pt("","zoom expressions not supported")]);var i=function t(e){var r=null;if(e instanceof Ve)r=t(e.result);else if(e instanceof je)for(var n=0,a=e.args;nn.maximum?[new At(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Lr(t){var e,r,n,a=t.valueSpec,i=Ct(t.value.type),o={},s="categorical"!==i&&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=Sr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===i)return[new At(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Er({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===fr(r)&&0===r.length&&e.push(new At(t.key,r,"array must have at least one stop")),e},default:function(t){return Kr({key:t.key,value:t.value,valueSpec:a,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===i&&s&&u.push(new At(t.key,t.value,'missing required property "property"')),"identity"===i||t.value.stops||u.push(new At(t.key,t.value,'missing required property "stops"')),"exponential"===i&&t.valueSpec.expression&&!hr(t.valueSpec)&&u.push(new At(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!cr(t.valueSpec)?u.push(new At(t.key,t.value,"property functions not supported")):s&&!ur(t.valueSpec)&&u.push(new At(t.key,t.value,"zoom functions not supported"))),"categorical"!==i&&!c||void 0!==t.value.property||u.push(new At(t.key,t.value,'"property" property is required')),u;function h(t){var e=[],i=t.value,s=t.key;if("array"!==fr(i))return[new At(s,i,"array expected, "+fr(i)+" found")];if(2!==i.length)return[new At(s,i,"array length 2 expected, length "+i.length+" found")];if(c){if("object"!==fr(i[0]))return[new At(s,i,"object expected, "+fr(i[0])+" found")];if(void 0===i[0].zoom)return[new At(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new At(s,i,"object stop key must have value")];if(n&&n>Ct(i[0].zoom))return[new At(s,i[0].zoom,"stop zoom values must appear in ascending order")];Ct(i[0].zoom)!==n&&(n=Ct(i[0].zoom),r=void 0,o={}),e=e.concat(Sr({key:s+"[0]",value:i[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Cr,value:f}}))}else e=e.concat(f({key:s+"[0]",value:i[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},i));return _r(Lt(i[1]))?e.concat([new At(s+"[1]",i[1],"expressions are not allowed in function stops.")]):e.concat(Kr({key:s+"[1]",value:i[1],valueSpec:a,style:t.style,styleSpec:t.styleSpec}))}function f(t,n){var s=fr(t.value),l=Ct(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new At(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 At(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==i){var u="number expected, "+s+" found";return cr(a)&&void 0===i&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(t.key,c,u)]}return"categorical"!==i||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==i&&"number"===s&&void 0!==r&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);ee?1:0}function Fr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Br(t[1],t[2],"=="):"!="===r?Vr(Br(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Br(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Fr))):"all"===r?["all"].concat(t.slice(1).map(Fr)):"none"===r?["all"].concat(t.slice(1).map(Fr).map(Vr)):"in"===r?Nr(t[1],t.slice(2)):"!in"===r?Vr(Nr(t[1],t.slice(2))):"has"===r?jr(t[1]):"!has"!==r||Vr(jr(t[1]))}function Br(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 Nr(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(Rr)]]:["filter-in-small",t,["literal",e]]}}function jr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Vr(t){return["!",t]}function Ur(t){return Ir(Lt(t.value))?Pr(St({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==fr(r))return[new At(n,r,"array expected, "+fr(r)+" found")];var a,i=e.styleSpec,o=[];if(r.length<1)return[new At(n,r,"filter array must have at least 1 element")];switch(o=o.concat(Or({key:n+"[0]",value:r[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ct(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ct(r[1])&&o.push(new At(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new At(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(a=fr(r[1]))&&o.push(new At(n+"[1]",r[1],"string expected, "+a+" found"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[f]=!0,i.push(c[f])):o[f]=!1}}},un.prototype._forEachCell=function(t,e,r,n,a,i,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=h;p++){var d=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&a.call(this,t,e,r,n,d,i,o,s))return}},un.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},un.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},un.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=cn+this.cells.length+1+1,r=0,n=0;n=0)){var h=t[u];c[u]=fn[l].shallow.indexOf(u)>=0?h:gn(h,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 vn(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof hn)return t;if(Array.isArray(t))return t.map(vn);if("object"==typeof t){var e=t.$name||"Object",r=fn[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),a=0,i=Object.keys(t);a=0?s:vn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var mn=function(){this.first=!0};mn.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 xn(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 wn(t){return!(_n(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,e){return!(!e&&(t>=1424&&t<=2303||yn["Arabic Presentation Forms-A"](t)||yn["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||yn.Khmer(t))}var Tn,An=!1,Mn=null,Sn=!1,En=new kt,Cn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Sn||null!=Cn.applyArabicShaping}},Ln=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 mn,this.transition={})};Ln.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 Pn=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(pr(t))return new Mr(t,e);if(_r(t)){var r=Ar(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=Wt.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Pn.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Pn.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var On=function(t){this.property=t,this.value=new Pn(t,void 0)};On.prototype.transitioned=function(t,e){return new zn(this.property,this.value,e,h({},t.transition,this.transition),t.now)},On.prototype.untransitioned=function(){return new zn(this.property,this.value,null,{},0)};var In=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};In.prototype.getValue=function(t){return b(this._values[t].value.value)},In.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new On(this._values[t].property)),this._values[t].value=new Pn(this._values[t].property,null===e?void 0:b(e))},In.prototype.getTransition=function(t){return b(this._values[t].transition)},In.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new On(this._values[t].property)),this._values[t].transition=b(e)||void 0},In.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e=1)return 1;var e=a*a,r=e*a;return 4*(a<.5?r:3*(a-e)+r-.75)}())}return r};var Dn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Dn.prototype.possiblyEvaluate=function(t){for(var e=new Bn(this._properties),r=0,n=Object.keys(this._values);rn.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(jn),Un=function(t){this.specification=t};Un.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Ln(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ln(Math.floor(e.zoom),e)),t.expression.evaluate(new Ln(Math.floor(e.zoom+1),e)),e)}},Un.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Un.prototype.interpolate=function(t){return t};var qn=function(t){this.specification=t};qn.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},qn.prototype.interpolate=function(){return!1};var Hn=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 Pn(r,void 0),a=this.defaultTransitionablePropertyValues[e]=new On(r);this.defaultTransitioningPropertyValues[e]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};pn("DataDrivenProperty",jn),pn("DataConstantProperty",Nn),pn("CrossFadedDataDrivenProperty",Vn),pn("CrossFadedProperty",Un),pn("ColorRampProperty",qn);var Gn=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter=function(){return!0},"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 Rn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new In(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var a in e.layout)this.setLayoutProperty(a,e.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.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(on,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(an,n,t,e,r))return!1}if(m(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var a=this._transitionablePaint._values[t],i="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),s=a.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||i||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){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(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,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&sn(this,t.call(rn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Tt,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 Fn&&cr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(kt),Yn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Wn=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},Xn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Zn(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var a,i=(a=t.type,Yn[a].BYTES_PER_ELEMENT),o=r=Jn(r,Math.max(e,i)),s=t.components||1;return n=Math.max(n,i),r+=i*s,{name:t.name,type:t.type,components:s,offset:o}}),size:Jn(r,Math.max(n,e)),alignment:e}}function Jn(t,e){return Math.ceil(t/e)*e}Xn.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Xn.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},Xn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Xn.prototype.clear=function(){this.length=0},Xn.prototype.resize=function(t){this.reserve(t),this.length=t},Xn.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)}},Xn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Kn=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}(Xn);Kn.prototype.bytesPerElement=4,pn("StructArrayLayout2i4",Kn);var Qn=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 a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,a){var i=4*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,this.int16[i+3]=a,t},e}(Xn);Qn.prototype.bytesPerElement=8,pn("StructArrayLayout4i8",Qn);var $n=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,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,a,i)},e.prototype.emplace=function(t,e,r,n,a,i,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]=a,this.int16[s+4]=i,this.int16[s+5]=o,t},e}(Xn);$n.prototype.bytesPerElement=12,pn("StructArrayLayout2i4i12",$n);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.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,a,i)},e.prototype.emplace=function(t,e,r,n,a,i,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]=a,this.uint8[l+6]=i,this.uint8[l+7]=o,t},e}(Xn);ta.prototype.bytesPerElement=8,pn("StructArrayLayout2i4ub8",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.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,a,i,o,s)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l){var c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=n,this.uint16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(Xn);ea.prototype.bytesPerElement=16,pn("StructArrayLayout8ui16",ea);var ra=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,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,n,a,i,o,s)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l){var c=8*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,t},e}(Xn);ra.prototype.bytesPerElement=16,pn("StructArrayLayout4i4ui16",ra);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._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 a=3*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,t},e}(Xn);na.prototype.bytesPerElement=12,pn("StructArrayLayout3f12",na);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._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}(Xn);aa.prototype.bytesPerElement=4,pn("StructArrayLayout1ul4",aa);var ia=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,a,i,o,s,l,c,u){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,a,i,o,s,l,c,u)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l,c,u,h){var f=12*t,p=6*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=a,this.int16[f+4]=i,this.int16[f+5]=o,this.uint32[p+3]=s,this.uint16[f+8]=l,this.uint16[f+9]=c,this.int16[f+10]=u,this.int16[f+11]=h,t},e}(Xn);ia.prototype.bytesPerElement=24,pn("StructArrayLayout6i1ul2ui2i24",ia);var oa=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,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,a,i)},e.prototype.emplace=function(t,e,r,n,a,i,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]=a,this.int16[s+4]=i,this.int16[s+5]=o,t},e}(Xn);oa.prototype.bytesPerElement=12,pn("StructArrayLayout2i2i2i12",oa);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._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,a){var i=12*t,o=3*t;return this.uint8[i+0]=e,this.uint8[i+1]=r,this.float32[o+1]=n,this.float32[o+2]=a,t},e}(Xn);sa.prototype.bytesPerElement=12,pn("StructArrayLayout2ub2f12",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._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,a,i,o,s,l,c,u,h,f,p,d,g){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v){var m=22*t,y=11*t,x=44*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=n,this.uint16[m+3]=a,this.uint32[y+2]=i,this.uint32[y+3]=o,this.uint32[y+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=c,this.uint16[m+12]=u,this.float32[y+7]=h,this.float32[y+8]=f,this.uint8[x+36]=p,this.uint8[x+37]=d,this.uint8[x+38]=g,this.uint32[y+10]=v,t},e}(Xn);la.prototype.bytesPerElement=44,pn("StructArrayLayout2i2ui3ul3ui2f3ub1ul44",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._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,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x){var b=this.length;return this.resize(b+1),this.emplace(b,t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x)},e.prototype.emplace=function(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b){var _=24*t,w=12*t;return this.int16[_+0]=e,this.int16[_+1]=r,this.int16[_+2]=n,this.int16[_+3]=a,this.int16[_+4]=i,this.int16[_+5]=o,this.uint16[_+6]=s,this.uint16[_+7]=l,this.uint16[_+8]=c,this.uint16[_+9]=u,this.uint16[_+10]=h,this.uint16[_+11]=f,this.uint16[_+12]=p,this.uint16[_+13]=d,this.uint16[_+14]=g,this.uint16[_+15]=v,this.uint16[_+16]=m,this.uint32[w+9]=y,this.float32[w+10]=x,this.float32[w+11]=b,t},e}(Xn);ca.prototype.bytesPerElement=48,pn("StructArrayLayout6i11ui1ul2f48",ca);var ua=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}(Xn);ua.prototype.bytesPerElement=4,pn("StructArrayLayout1f4",ua);var ha=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 a=3*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,t},e}(Xn);ha.prototype.bytesPerElement=6,pn("StructArrayLayout3i6",ha);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._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 a=2*t,i=4*t;return this.uint32[a+0]=e,this.uint16[i+2]=r,this.uint16[i+3]=n,t},e}(Xn);fa.prototype.bytesPerElement=8,pn("StructArrayLayout1ul2ui8",fa);var pa=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 a=3*t;return this.uint16[a+0]=e,this.uint16[a+1]=r,this.uint16[a+2]=n,t},e}(Xn);pa.prototype.bytesPerElement=6,pn("StructArrayLayout3ui6",pa);var da=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}(Xn);da.prototype.bytesPerElement=4,pn("StructArrayLayout2ui4",da);var ga=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}(Xn);ga.prototype.bytesPerElement=2,pn("StructArrayLayout1ui2",ga);var va=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}(Xn);va.prototype.bytesPerElement=8,pn("StructArrayLayout2f8",va);var ma=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 a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,a){var i=4*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,this.float32[i+3]=a,t},e}(Xn);ma.prototype.bytesPerElement=16,pn("StructArrayLayout4f16",ma);var ya=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Wn);ya.prototype.size=24;var xa=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 ya(this,t)},e}(ia);pn("CollisionBoxArray",xa);var ba=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}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.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},Object.defineProperties(e.prototype,r),e}(Wn);ba.prototype.size=44;var _a=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 ba(this,t)},e}(la);pn("PlacedSymbolArray",_a);var wa=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},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+4]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+5]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.verticalTextBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+13]=t},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numHorizontalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+14]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+15]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+15]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+16]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+16]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+9]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+9]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+10]},r.textBoxScale.set=function(t){this._structArray.float32[this._pos4+10]=t},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+11]},r.radialTextOffset.set=function(t){this._structArray.float32[this._pos4+11]=t},Object.defineProperties(e.prototype,r),e}(Wn);wa.prototype.size=48;var ka=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 wa(this,t)},e}(ca);pn("SymbolInstanceArray",ka);var Ta=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Wn);Ta.prototype.size=4;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.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new Ta(this,t)},e}(ua);pn("GlyphOffsetArray",Aa);var Ma=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Wn);Ma.prototype.size=6;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.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new Ma(this,t)},e}(ha);pn("SymbolLineVertexArray",Sa);var Ea=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Wn);Ea.prototype.size=8;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.get=function(t){return new Ea(this,t)},e}(fa);pn("FeatureIndexArray",Ca);var La=Zn([{name:"a_pos",components:2,type:"Int16"}],4).members,Pa=function(t){void 0===t&&(t=[]),this.segments=t};function Oa(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}Pa.prototype.prepareSegment=function(t,e,r,n){var a=this.segments[this.segments.length-1];return t>Pa.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Pa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!a||a.vertexLength+t>Pa.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n)&&(a={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(a.sortKey=n),this.segments.push(a)),a},Pa.prototype.get=function(){return this.segments},Pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>1;this.ids[n]>=t?r=n:e=n+1}for(var a=[];this.ids[e]===t;){var i=this.positions[3*e],o=this.positions[3*e+1],s=this.positions[3*e+2];a.push({index:i,start:o,end:s}),e++}return a},Ia.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,a){if(!(n>=a)){for(var i=e[n+a>>1],o=n-1,s=a+1;;){do{o++}while(e[o]i);if(o>=s)break;za(e,o,s),za(r,3*o,3*s),za(r,3*o+1,3*s+1),za(r,3*o+2,3*s+2)}t(e,r,n,s),t(e,r,s+1,a)}}(r,n,0,r.length-1),e.push(r.buffer,n.buffer),{ids:r,positions:n}},Ia.deserialize=function(t){var e=new Ia;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},pn("FeaturePositionMap",Ia);var Da=function(t,e){this.gl=t.gl,this.location=e},Ra=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Da),Fa=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Da),Ba=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Da),Na=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Da),ja=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Da),Va=function(t){function e(e,r){t.call(this,e,r),this.current=Wt.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Da),Ua=new Float32Array(16),qa=function(t){function e(e,r){t.call(this,e,r),this.current=Ua}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Da);function Ha(t){return[Oa(255*t.r,255*t.g),Oa(255*t.b,255*t.a)]}var Ga=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0};Ga.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ga.prototype.setConstantPatternPositions=function(){},Ga.prototype.populatePaintArray=function(){},Ga.prototype.updatePaintArray=function(){},Ga.prototype.upload=function(){},Ga.prototype.destroy=function(){},Ga.prototype.setUniforms=function(t,e,r,n){e.set(n.constantOr(this.value))},Ga.prototype.getBinding=function(t,e){return"color"===this.type?new Va(t,e):new Fa(t,e)},Ga.serialize=function(t){var e=t.value,r=t.names,n=t.type;return{value:gn(e),names:r,type:n}},Ga.deserialize=function(t){var e=t.value,r=t.names,n=t.type;return new Ga(vn(e),r,n)};var Ya=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Ya.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Ya.prototype.populatePaintArray=function(){},Ya.prototype.updatePaintArray=function(){},Ya.prototype.upload=function(){},Ya.prototype.destroy=function(){},Ya.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},Ya.prototype.setUniforms=function(t,e,r,n,a){var i=this.patternPositions;"u_pattern_to"===a&&i.patternTo&&e.set(i.patternTo),"u_pattern_from"===a&&i.patternFrom&&e.set(i.patternFrom)},Ya.prototype.getBinding=function(t,e){return new ja(t,e)};var Wa=function(t,e,r,n){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new n};Wa.prototype.defines=function(){return[]},Wa.prototype.setConstantPatternPositions=function(){},Wa.prototype.populatePaintArray=function(t,e,r,n){var a=this.paintVertexArray,i=a.length;a.reserve(t);var o=this.expression.evaluate(new Ln(0),e,{},n);if("color"===this.type)for(var s=Ha(o),l=i;lei.max||o.yei.max)&&(w("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=c(o.x,ei.min,ei.max),o.y=c(o.y,ei.min,ei.max))}return r}function ni(t,e,r,n,a){t.emplaceBack(2*e+(n+1)/2,2*r+(a+1)/2)}var ai=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 Kn,this.indexArray=new pa,this.segments=new Pa,this.programConfigurations=new Ka(La,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function ii(t,e){for(var r=0;r1){if(ci(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(a)._add(e))}function pi(t,e){for(var r,n,a,i=!1,o=0;oe.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(i=!i);return i}function di(t,e){for(var r=!1,n=0,a=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-i.x)*(e.y-i.y)/(o.y-i.y)+i.x&&(r=!r)}return r}function gi(t,e,r){var n=r[0],a=r[2];if(t.xa.x&&e.x>a.x||t.ya.y&&e.y>a.y)return!1;var i=k(t,e,r[0]);return i!==k(t,e,r[1])||i!==k(t,e,r[2])||i!==k(t,e,r[3])}function vi(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).binders[t].maxValue}function mi(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function yi(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=a.convert(e)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=ti||c<0||c>=ti)){var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=u.vertexLength;ni(this.layoutVertexArray,l,c,-1,-1),ni(this.layoutVertexArray,l,c,1,-1),ni(this.layoutVertexArray,l,c,1,1),ni(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),u.vertexLength+=4,u.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},pn("CircleBucket",ai,{omit:["layers"]});var xi,bi=new Hn({"circle-sort-key":new jn(Tt.layout_circle["circle-sort-key"])}),_i={paint:new Hn({"circle-radius":new jn(Tt.paint_circle["circle-radius"]),"circle-color":new jn(Tt.paint_circle["circle-color"]),"circle-blur":new jn(Tt.paint_circle["circle-blur"]),"circle-opacity":new jn(Tt.paint_circle["circle-opacity"]),"circle-translate":new Nn(Tt.paint_circle["circle-translate"]),"circle-translate-anchor":new Nn(Tt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Nn(Tt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Nn(Tt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new jn(Tt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new jn(Tt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new jn(Tt.paint_circle["circle-stroke-opacity"])}),layout:bi},wi="undefined"!=typeof Float32Array?Float32Array:Array;function ki(t,e,r){var n=e[0],a=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,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)}),xi=new wi(3),wi!=Float32Array&&(xi[0]=0,xi[1]=0,xi[2]=0),function(){var t=new wi(4);wi!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var Ti=function(t){function e(e){t.call(this,e,_i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new ai(t)},e.prototype.queryRadius=function(t){var e=t;return vi("circle-radius",this,e)+vi("circle-stroke-width",this,e)+mi(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,i,o,s){for(var l=yi(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.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"),h=u?l:function(t,e){return l.map(function(t){return Ai(t,e)})}(0,s),f=u?c*o:c,p=0,d=n;pt.width||a.height>t.height||r.x>t.width-a.width||r.y>t.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>e.width||a.height>e.height||n.x>e.width-a.width||n.y>e.height-a.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=i=t[0],a=o=t[1];for(var d=r;di&&(i=s),l>o&&(o=l);c=0!==(c=Math.max(i-n,o-a))?1/c:0}return qi(f,p,r,n,a,c),p}function Vi(t,e,r,n,a){var i,o;if(a===ho(t,e,r,n)>0)for(i=e;i=e;i-=n)o=lo(i,t[i],t[i+1],o);return o&&ro(o,o.next)&&(co(o),o=o.next),o}function Ui(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!ro(n,n.next)&&0!==eo(n.prev,n,n.next))n=n.next;else{if(co(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function qi(t,e,r,n,a,i,o){if(t){!o&&i&&function(t,e,r,n){var a=t;do{null===a.z&&(a.z=Ki(a.x,a.y,e,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==t);a.prevZ.nextZ=null,a.prevZ=null,function(t){var e,r,n,a,i,o,s,l,c=1;do{for(r=t,t=null,i=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)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:t=a,a.prevZ=i,i=a;r=n}i.nextZ=null,c*=2}while(o>1)}(a)}(t,n,a,i);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,i?Gi(t,n,a,i):Hi(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),co(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?qi(t=Yi(Ui(t),e,r),e,r,n,a,i,2):2===o&&Wi(t,e,r,n,a,i):qi(Ui(t),e,r,n,a,i,1);break}}}function Hi(t){var e=t.prev,r=t,n=t.next;if(eo(e,r,n)>=0)return!1;for(var a=t.next.next;a!==t.prev;){if($i(e.x,e.y,r.x,r.y,n.x,n.y,a.x,a.y)&&eo(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function Gi(t,e,r,n){var a=t.prev,i=t,o=t.next;if(eo(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,u=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,h=Ki(s,l,e,r,n),f=Ki(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,p.x,p.y)&&eo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&eo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,p.x,p.y)&&eo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&$i(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&eo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Yi(t,e,r){var n=t;do{var a=n.prev,i=n.next.next;!ro(a,i)&&no(a,n,n.next,i)&&oo(a,i)&&oo(i,a)&&(e.push(a.i/r),e.push(n.i/r),e.push(i.i/r),co(n),co(n.next),n=t=i),n=n.next}while(n!==t);return Ui(n)}function Wi(t,e,r,n,a,i){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&to(o,s)){var l=so(o,s);return o=Ui(o,o.next),l=Ui(l,l.next),qi(o,e,r,n,a,i),void qi(l,e,r,n,a,i)}s=s.next}o=o.next}while(o!==t)}function Xi(t,e){return t.x-e.x}function Zi(t,e){if(e=function(t,e){var r,n=e,a=t.x,i=t.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&a!==n.x&&$i(ir.x||n.x===r.x&&Ji(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(t,e)){var r=so(e,t);Ui(r,r.next)}}function Ji(t,e){return eo(t.prev,t,e.prev)<0&&eo(e.next,t,t.next)<0}function Ki(t,e,r,n,a){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*a)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Qi(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function to(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&&no(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(oo(t,e)&&oo(e,t)&&function(t,e){var r=t,n=!1,a=(t.x+e.x)/2,i=(t.y+e.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(eo(t.prev,t,e.prev)||eo(t,e.prev,e))||ro(t,e)&&eo(t.prev,t,t.next)>0&&eo(e.prev,e,e.next)>0)}function eo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function ro(t,e){return t.x===e.x&&t.y===e.y}function no(t,e,r,n){var a=io(eo(t,e,r)),i=io(eo(t,e,n)),o=io(eo(r,n,t)),s=io(eo(r,n,e));return a!==i&&o!==s||!(0!==a||!ao(t,r,e))||!(0!==i||!ao(t,n,e))||!(0!==o||!ao(r,t,n))||!(0!==s||!ao(r,e,n))}function ao(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 io(t){return t>0?1:t<0?-1:0}function oo(t,e){return eo(t.prev,t,t.next)<0?eo(t,e,t.next)>=0&&eo(t,t.prev,e)>=0:eo(t,e,t.prev)<0||eo(t,t.next,e)<0}function so(t,e){var r=new uo(t.i,t.x,t.y),n=new uo(e.i,e.x,e.y),a=t.next,i=e.prev;return t.next=e,e.prev=t,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function lo(t,e,r,n){var a=new uo(t,e,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function co(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 uo(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 ho(t,e,r,n){for(var a=0,i=e,o=r-n;in;){if(a-n>600){var o=a-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(a,Math.floor(r+(o-s)*c/o+u)),i)}var h=e[r],f=n,p=a;for(po(e,n,r),i(e[a],h)>0&&po(e,n,a);f0;)p--}0===i(e[n],h)?po(e,n,p):po(e,++p,a),p<=r&&(n=p+1),r<=p&&(a=p-1)}}(t,e,r||0,n||t.length-1,a||go)}function po(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function go(t,e){return te?1:0}function vo(t,e){var r=t.length;if(r<=1)return[t];for(var n,a,i=[],o=0;o1)for(var l=0;l0&&(n+=t[a-1].length,r.holes.push(n))}return r},Bi.default=Ni;var bo=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 Kn,this.indexArray=new pa,this.indexArray2=new da,this.programConfigurations=new Ka(Fi,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})};bo.prototype.populate=function(t,e){this.hasPattern=yo("fill",this.layers,e);for(var r=this.layers[0].layout.get("fill-sort-key"),n=[],a=0,i=t;a>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Mo.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,a=0,i=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos>3}if(n--,1===r||2===r)(a+=t.readSVarint())s&&(s=a),(i+=t.readSVarint())c&&(c=i);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},Mo.prototype.toGeoJSON=function(t,e,r){var n,a,i=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=Mo.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 Oo(t,e,r){if(3===t){var n=new Co(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Lo.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 Ao(this._pbf,e,this.extent,this._keys,this._values)};var Io={VectorTile:function(t,e){this.layers=t.readFields(Oo,{},e)},VectorTileFeature:Ao,VectorTileLayer:Co},zo=Io.VectorTileFeature.types,Do=Math.pow(2,13);function Ro(t,e,r,n,a,i,o,s){t.emplaceBack(e,r,2*Math.floor(n*Do)+o,a*Do*2,i*Do*2,Math.round(s))}var Fo=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 $n,this.indexArray=new pa,this.programConfigurations=new Ka(To,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 Bo(t,e){return t.x===e.x&&(t.x<0||t.x>ti)||t.y===e.y&&(t.y<0||t.y>ti)}function No(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>ti})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>ti})}Fo.prototype.populate=function(t,e){this.features=[],this.hasPattern=yo("fill-extrusion",this.layers,e);for(var r=0,n=t;r=1){var m=p[g-1];if(!Bo(v,m)){u.vertexLength+4>Pa.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=v.sub(m)._perp()._unit(),x=m.dist(v);d+x>32768&&(d=0),Ro(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,0,d),Ro(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,1,d),d+=x,Ro(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,d),Ro(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,d);var b=u.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),u.vertexLength+=4,u.primitiveLength+=2}}}}if(u.vertexLength+s>Pa.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===zo[t.type]){for(var _=[],w=[],k=u.vertexLength,T=0,A=o;T=2&&t[u-1].equals(t[u-2]);)u--;for(var h=0;h0;if(A&&x>h){var S=f.dist(g);if(S>2*p){var E=f.sub(f.sub(g)._mult(p/S)._round());this.updateDistance(g,E),this.addCurrentVertex(E,m,0,0,d),g=E}}var C=g&&v,L=C?r:c?"butt":n;if(C&&"round"===L&&(ka&&(L="bevel"),"bevel"===L&&(k>2&&(L="flipbevel"),k100)b=y.mult(-1);else{var P=k*m.add(y).mag()/m.sub(y).mag();b._perp()._mult(P*(M?-1:1))}this.addCurrentVertex(f,b,0,0,d),this.addCurrentVertex(f,b.mult(-1),0,0,d)}else if("bevel"===L||"fakeround"===L){var O=-Math.sqrt(k*k-1),I=M?O:0,z=M?0:O;if(g&&this.addCurrentVertex(f,m,I,z,d),"fakeround"===L)for(var D=Math.round(180*T/Math.PI/20),R=1;R2*p){var U=f.add(v.sub(f)._mult(p/V)._round());this.updateDistance(f,U),this.addCurrentVertex(U,y,0,0,d),f=U}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,s)}},Xo.prototype.addCurrentVertex=function(t,e,r,n,a,i){void 0===i&&(i=!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,i,!1,r,a),this.addHalfVertex(t,l,c,i,!0,-n,a),this.distance>Wo/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,a,i))},Xo.prototype.addHalfVertex=function(t,e,r,n,a,i,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(a?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===i?0:i<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++),a?this.e2=u:this.e1=u},Xo.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Wo-1):this.distance},pn("LineBucket",Xo,{omit:["layers","patternFeatures"]});var Zo=new Hn({"line-cap":new Nn(Tt.layout_line["line-cap"]),"line-join":new jn(Tt.layout_line["line-join"]),"line-miter-limit":new Nn(Tt.layout_line["line-miter-limit"]),"line-round-limit":new Nn(Tt.layout_line["line-round-limit"]),"line-sort-key":new jn(Tt.layout_line["line-sort-key"])}),Jo={paint:new Hn({"line-opacity":new jn(Tt.paint_line["line-opacity"]),"line-color":new jn(Tt.paint_line["line-color"]),"line-translate":new Nn(Tt.paint_line["line-translate"]),"line-translate-anchor":new Nn(Tt.paint_line["line-translate-anchor"]),"line-width":new jn(Tt.paint_line["line-width"]),"line-gap-width":new jn(Tt.paint_line["line-gap-width"]),"line-offset":new jn(Tt.paint_line["line-offset"]),"line-blur":new jn(Tt.paint_line["line-blur"]),"line-dasharray":new Un(Tt.paint_line["line-dasharray"]),"line-pattern":new Vn(Tt.paint_line["line-pattern"]),"line-gradient":new qn(Tt.paint_line["line-gradient"])}),layout:Zo},Ko=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 Ln(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,a){return r=h({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,a)},e}(jn))(Jo.paint.properties["line-width"].specification);Ko.useIntegerZoom=!0;var Qo=function(t){function e(e){t.call(this,e,Jo)}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=Ii(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=Ko.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Xo(t)},e.prototype.queryRadius=function(t){var e=t,r=$o(vi("line-width",this,e),vi("line-gap-width",this,e)),n=vi("line-offset",this,e);return r/2+Math.abs(n)+mi(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s){var l=yi(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*$o(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 a(0,0),i=0;i=3)for(var i=0;i0?e+2*t:t}var ts=Zn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),es=Zn([{name:"a_projected_pos",components:3,type:"Float32"}],4),rs=(Zn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Zn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),ns=(Zn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),as=Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function is(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()),Cn.applyArabicShaping&&(t=Cn.applyArabicShaping(t)),t}(t.text,e,r)}),t}Zn([{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"}]),Zn([{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:"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:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),Zn([{type:"Float32",name:"offsetX"}]),Zn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var os={"!":"\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"},ss=24,ls={horizontal:1,vertical:2,horizontalOnly:3},cs=function(){this.text="",this.sectionIndex=[],this.sections=[]};function us(t,e,r,n,a,i,o,s,l,c,u){var h,f=cs.fromFeature(t,r);c===ls.vertical&&f.verticalizePunctuation();var p=Cn.processBidirectionalText,d=Cn.processStyledBidirectionalText;if(p&&1===f.sections.length){h=[];for(var g=0,v=p(f.toString(),vs(f,s,n,e));g=0&&n>=t&&hs[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},cs.prototype.substring=function(t,e){var r=new cs;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},cs.prototype.toString=function(){return this.text},cs.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)};var hs={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},fs={};function ps(t,e,r,n){var a=Math.pow(t-e,2);return n?t=0,l=0,c=0;c0)&&("constant"!==a.value.kind||a.value.value.length>0),l="constant"!==o.value.kind||o.value.value&&o.value.value.length>0,c=n.get("symbol-sort-key");if(this.features=[],s||l){for(var u=e.iconDependencies,h=e.glyphDependencies,f=new Ln(this.zoom),p=0,d=t;p=0;for(var M=0,S=x.sections;M=0;s--)i[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:a},s>0&&(a+=e[s-1].dist(e[s]));for(var l=0;l0;this.addCollisionDebugVertices(i,o,s,l,c?this.collisionCircle:this.collisionBox,a.anchorPoint,r,c)}},Ps.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t0},Ps.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ps.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Ps.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Ps.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,n=e.vertexStartIndex;n1||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.addIndicesForPlacedTextSymbol(t)}),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(i.verticalPlacedTextSymbolIndex);var o=this.icon.placedSymbolArray.get(a);if(o.numGlyphs){var s=o.vertexStartIndex;this.icon.indexArray.emplaceBack(s,s+1,s+2),this.icon.indexArray.emplaceBack(s+1,s+2,s+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},pn("SymbolBucket",Ps,{omit:["layers","collisionBoxArray","features","compareText"]}),Ps.MAX_GLYPHS=65535,Ps.addDynamicAttributes=Es;var Os=new Hn({"symbol-placement":new Nn(Tt.layout_symbol["symbol-placement"]),"symbol-spacing":new Nn(Tt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Nn(Tt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new jn(Tt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Nn(Tt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Nn(Tt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Nn(Tt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Nn(Tt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Nn(Tt.layout_symbol["icon-rotation-alignment"]),"icon-size":new jn(Tt.layout_symbol["icon-size"]),"icon-text-fit":new Nn(Tt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Nn(Tt.layout_symbol["icon-text-fit-padding"]),"icon-image":new jn(Tt.layout_symbol["icon-image"]),"icon-rotate":new jn(Tt.layout_symbol["icon-rotate"]),"icon-padding":new Nn(Tt.layout_symbol["icon-padding"]),"icon-keep-upright":new Nn(Tt.layout_symbol["icon-keep-upright"]),"icon-offset":new jn(Tt.layout_symbol["icon-offset"]),"icon-anchor":new jn(Tt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Nn(Tt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Nn(Tt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Nn(Tt.layout_symbol["text-rotation-alignment"]),"text-field":new jn(Tt.layout_symbol["text-field"]),"text-font":new jn(Tt.layout_symbol["text-font"]),"text-size":new jn(Tt.layout_symbol["text-size"]),"text-max-width":new jn(Tt.layout_symbol["text-max-width"]),"text-line-height":new Nn(Tt.layout_symbol["text-line-height"]),"text-letter-spacing":new jn(Tt.layout_symbol["text-letter-spacing"]),"text-justify":new jn(Tt.layout_symbol["text-justify"]),"text-radial-offset":new jn(Tt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Nn(Tt.layout_symbol["text-variable-anchor"]),"text-anchor":new jn(Tt.layout_symbol["text-anchor"]),"text-max-angle":new Nn(Tt.layout_symbol["text-max-angle"]),"text-writing-mode":new Nn(Tt.layout_symbol["text-writing-mode"]),"text-rotate":new jn(Tt.layout_symbol["text-rotate"]),"text-padding":new Nn(Tt.layout_symbol["text-padding"]),"text-keep-upright":new Nn(Tt.layout_symbol["text-keep-upright"]),"text-transform":new jn(Tt.layout_symbol["text-transform"]),"text-offset":new jn(Tt.layout_symbol["text-offset"]),"text-allow-overlap":new Nn(Tt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Nn(Tt.layout_symbol["text-ignore-placement"]),"text-optional":new Nn(Tt.layout_symbol["text-optional"])}),Is={paint:new Hn({"icon-opacity":new jn(Tt.paint_symbol["icon-opacity"]),"icon-color":new jn(Tt.paint_symbol["icon-color"]),"icon-halo-color":new jn(Tt.paint_symbol["icon-halo-color"]),"icon-halo-width":new jn(Tt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new jn(Tt.paint_symbol["icon-halo-blur"]),"icon-translate":new Nn(Tt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Nn(Tt.paint_symbol["icon-translate-anchor"]),"text-opacity":new jn(Tt.paint_symbol["text-opacity"]),"text-color":new jn(Tt.paint_symbol["text-color"],{runtimeType:Ft,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new jn(Tt.paint_symbol["text-halo-color"]),"text-halo-width":new jn(Tt.paint_symbol["text-halo-width"]),"text-halo-blur":new jn(Tt.paint_symbol["text-halo-blur"]),"text-translate":new Nn(Tt.paint_symbol["text-translate"]),"text-translate-anchor":new Nn(Tt.paint_symbol["text-translate-anchor"])}),layout:Os},zs=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:It,this.defaultValue=t};zs.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},zs.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},zs.prototype.possibleOutputs=function(){return[void 0]},zs.prototype.serialize=function(){return null},pn("FormatSectionOverride",zs,{omit:["defaultValue"]});var Ds=function(t){function e(e){t.call(this,e,Is)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){if(t.prototype.recalculate.call(this,e),"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 r=this.layout.get("text-writing-mode");if(r){for(var n=[],a=0,i=r;a=0;f--){var p=o[f];if(!(h.w>p.w||h.h>p.h)){if(h.x=p.x,h.y=p.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===p.w&&h.h===p.h){var d=o.pop();f>1,u=-7,h=r?a-1:0,f=r?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+t[e+h],h+=f,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+t[e+h],h+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=c}return(p?-1:1)*o*Math.pow(2,i-n)},Qs=function(t,e,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<>1,f=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-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+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*l-1)*Math.pow(2,a),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,a),o=0));a>=8;t[r+p]=255&s,p+=d,s/=256,a-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},$s=tl;function tl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function el(t){return t.type===tl.Bytes?t.readVarint()+t.pos:t.pos+1}function rl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function nl(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 a=r.pos-1;a>=t;a--)r.buf[a+n]=r.buf[a]}function al(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function gl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}tl.Varint=0,tl.Fixed64=1,tl.Bytes=2,tl.Fixed32=5,tl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,t(a,e,this),this.pos===i&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=pl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=gl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*pl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=pl(this.buf,this.pos)+4294967296*gl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ks(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ks(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,a,i=r.buf;if(n=(112&(a=i[r.pos++]))>>4,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<3,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<10,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<17,a<128)return rl(t,n,e);if(n|=(127&(a=i[r.pos++]))<<24,a<128)return rl(t,n,e);if(n|=(1&(a=i[r.pos++]))<<31,a<128)return rl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var n="",a=e;a239?4:l>223?3:l>191?2:1;if(a+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(i=t[a+1]))&&(c=(31&l)<<6|63&i)<=127&&(c=null):3===u?(i=t[a+1],o=t[a+2],128==(192&i)&&128==(192&o)&&((c=(15&l)<<12|(63&i)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(i=t[a+1],o=t[a+2],s=t[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&i)<<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),a+=u}return n}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==tl.Bytes)return t.push(this.readVarint(e));var r=el(this);for(t=t||[];this.pos127;);else if(e===tl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===tl.Fixed32)this.pos+=4;else{if(e!==tl.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;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,a,i=0;i55295&&n<57344){if(!a){n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else a&&(t[r++]=239,t[r++]=191,t[r++]=189,a=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&&nl(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Qs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Qs(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&&nl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,tl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,al,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ll,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,sl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,cl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ul,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,fl,e)},writeBytesField:function(t,e){this.writeTag(t,tl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,tl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,tl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,tl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,tl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,tl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,tl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var vl=3;function ml(t,e,r){1===t&&r.readMessage(yl,e)}function yl(t,e,r){if(3===t){var n=r.readMessage(xl,{}),a=n.id,i=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:a,bitmap:new Li({width:o+2*vl,height:s+2*vl},i),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function xl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var bl=vl,_l=function(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};_l.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){t._triggered=!1,t._callback()},0))};var wl=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},v(["receive","process"],this),this.invoker=new _l(this.process),this.target.addEventListener("message",this.receive,!1)};function kl(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}wl.prototype.send=function(t,e,r,n){var a=this,i=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[i]=r);var o=[];return this.target.postMessage({id:i,type:t,hasCallback:!!r,targetMapId:n,sourceMapId:this.mapId,data:gn(e,o)},o),{cancel:function(){r&&delete a.callbacks[i],a.target.postMessage({id:i,type:"",targetMapId:n,sourceMapId:a.mapId})}}},wl.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 this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()},wl.prototype.process=function(){var t=this;if(this.taskQueue.length){var e=this.taskQueue.shift(),r=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),r)if(""===r.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(r.error?n(vn(r.error)):n(null,vn(r.data)))}else{var a=!1,i=r.hasCallback?function(r,n){a=!0,delete t.cancelCallbacks[e];var i=[];t.target.postMessage({id:e,type:"",sourceMapId:t.mapId,error:r?gn(r):null,data:gn(n,i)},i)}:function(t){a=!0},o=null,s=vn(r.data);if(this.parent[r.type])o=this.parent[r.type](r.sourceMapId,s,i);else if(this.parent.getWorkerSource){var l=r.type.split(".");o=this.parent.getWorkerSource(r.sourceMapId,l[0],s.source)[l[1]](s,i)}else i(new Error("Could not find function "+r.type));!a&&o&&o.cancel&&(this.cancelCallbacks[e]=o.cancel)}}},wl.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var Tl=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]))};Tl.prototype.setNorthEast=function(t){return this._ne=t instanceof Al?new Al(t.lng,t.lat):Al.convert(t),this},Tl.prototype.setSouthWest=function(t){return this._sw=t instanceof Al?new Al(t.lng,t.lat):Al.convert(t),this},Tl.prototype.extend=function(t){var e,r,n=this._sw,a=this._ne;if(t instanceof Al)e=t,r=t;else{if(!(t instanceof Tl))return Array.isArray(t)?t.every(Array.isArray)?this.extend(Tl.convert(t)):this.extend(Al.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return n||a?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new Al(e.lng,e.lat),this._ne=new Al(r.lng,r.lat)),this},Tl.prototype.getCenter=function(){return new Al((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tl.prototype.getSouthWest=function(){return this._sw},Tl.prototype.getNorthEast=function(){return this._ne},Tl.prototype.getNorthWest=function(){return new Al(this.getWest(),this.getNorth())},Tl.prototype.getSouthEast=function(){return new Al(this.getEast(),this.getSouth())},Tl.prototype.getWest=function(){return this._sw.lng},Tl.prototype.getSouth=function(){return this._sw.lat},Tl.prototype.getEast=function(){return this._ne.lng},Tl.prototype.getNorth=function(){return this._ne.lat},Tl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tl.convert=function(t){return!t||t instanceof Tl?t:new Tl(t)};var Al=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")};Al.prototype.wrap=function(){return new Al(u(this.lng,-180,180),this.lat)},Al.prototype.toArray=function(){return[this.lng,this.lat]},Al.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Al.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 Tl(new Al(this.lng-r,this.lat-e),new Al(this.lng+r,this.lat+e))},Al.convert=function(t){if(t instanceof Al)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Al(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Al(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 Ml=2*Math.PI*6378137;function Sl(t){return Ml*Math.cos(t*Math.PI/180)}function El(t){return(180+t)/360}function Cl(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Ll(t,e){return t/Sl(e)}function Pl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var Ol=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Ol.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Al.convert(t);return new Ol(El(r.lng),Cl(r.lat),Ll(e,r.lat))},Ol.prototype.toLngLat=function(){return new Al(360*this.x-180,Pl(this.y))},Ol.prototype.toAltitude=function(){return this.z*Sl(Pl(this.y))},Ol.prototype.meterInMercatorCoordinateUnits=function(){return 1/Ml*(t=Pl(this.y),1/Math.cos(t*Math.PI/180));var t};var Il=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Rl(0,t,e,r)};Il.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Il.prototype.url=function(t,e){var r,n,a,i,o,s=(r=this.x,n=this.y,a=this.z,i=kl(256*r,256*(n=Math.pow(2,a)-n-1),a),o=kl(256*(r+1),256*(n+1),a),i[0]+","+i[1]+","+o[0]+","+o[1]),l=function(t,e,r){for(var n,a="",i=t;i>0;i--)a+=(e&(n=1<this.canonical.z?new Dl(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Dl(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Dl.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},Dl.prototype.children=function(t){if(this.overscaledZ>=t)return[new Dl(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 Dl(e,this.wrap,e,r,n),new Dl(e,this.wrap,e,r+1,n),new Dl(e,this.wrap,e,r,n+1),new Dl(e,this.wrap,e,r+1,n+1)]},Dl.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)},Fl.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Fl.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Fl.prototype.getPixels=function(){return new Pi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Fl.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,a=e*this.dim+this.dim,i=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=a-1;break;case 1:a=n+1}switch(r){case-1:i=o-1;break;case 1:o=i+1}for(var s=-e*this.dim,l=-r*this.dim,c=i;c=0)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e&&e>=0)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},Ul.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},a=this.stateChanges[t]||{},i=h({},n[r],a[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var o=this.deletedStates[t][e];if(null===o)return{};for(var s in o)delete i[s]}return i},Ul.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Ul.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var a={};for(var i in this.stateChanges[n])this.state[n][i]||(this.state[n][i]={}),h(this.state[n][i],this.stateChanges[n][i]),a[i]=this.state[n][i];r[n]=a}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var c in this.deletedStates[o]){if(null===this.deletedStates[o][c])this.state[o][c]={};else for(var u=0,f=Object.keys(this.deletedStates[o][c]);u=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},ql.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Io.VectorTile(new $s(this.rawTileData)).layers,this.sourceLayerCoder=new Nl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ql.prototype.query=function(t,e,r){var n=this;this.loadVTLayers();for(var i=t.params||{},o=ti/t.tileSize/t.scale,s=Dr(i.filter),l=t.queryGeometry,c=t.queryPadding*o,u=Hl(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=Hl(t.cameraQueryGeometry),p=0,d=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,function(e,r,n,i){return function(t,e,r,n,i){for(var o=0,s=t;o=l.x&&i>=l.y)return!0}var c=[new a(e,r),new a(e,i),new a(n,i),new a(n,r)];if(t.length>2)for(var u=0,h=c;u=0)return!0;return!1}(i,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(a(new Ln(this.tileID.overscaledZ),u))for(var h=0;h-r/2;){if(--o<0)return!1;s-=t[o].dist(i),i=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>a)return!1;o++,s+=h.dist(f)}return!0}function Xl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=ye(h.x,f.x,d),v=ye(h.y,f.y,d),m=new xs(g,v,f.angleTo(h),u);return m._round(),!o||Wl(t,m,s,o,e)?m:void 0}l+=p}}function Ql(t,e,r,n,a,i,o,s,l){var c=Zl(n,i,o),u=Jl(n,a),h=u*o,f=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h=0&&_=0&&w=0&&p+u<=h){var k=new xs(_,w,x,g);k._round(),a&&!Wl(e,k,o,a,i)||d.push(k)}}f+=y}return l||d.length||s||(d=t(e,f/2,n,a,i,o,s,!0,c)),d}(t,f?e/2*s%e:(u/2+2*i)*o*s%e,e,c,r,h,f,!1,l)}Yl.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e>l.z,u=new a(l.x*c,l.y*c),h=new a(u.x+c,u.y+c),f=this.segments.prepareSegment(4,r,n);r.emplaceBack(u.x,u.y,u.x,u.y),r.emplaceBack(h.x,u.y,h.x,u.y),r.emplaceBack(u.x,h.y,u.x,h.y),r.emplaceBack(h.x,h.y,h.x,h.y);var p=f.vertexLength;n.emplaceBack(p,p+1,p+2),n.emplaceBack(p+1,p+2,p+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,Bl.members),this.maskedIndexBuffer=e.createIndexBuffer(n)}},Yl.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Yl.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Yl.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=A(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),a=!1;if(this.expirationTime>n)a=!1;else if(e)if(this.expirationTime0&&(m=Math.max(10*l,m),this._addLineCollisionCircles(t,e,r,r.segment,y,m,n,i,o,h))}else{if(f){var x=new a(g,p),b=new a(v,p),_=new a(g,d),w=new a(v,d),k=f*Math.PI/180;x._rotate(k),b._rotate(k),_._rotate(k),w._rotate(k),g=Math.min(x.x,b.x,_.x,w.x),v=Math.max(x.x,b.x,_.x,w.x),p=Math.min(x.y,b.y,_.y,w.y),d=Math.max(x.y,b.y,_.y,w.y)}t.emplaceBack(r.x,r.y,g,p,v,d,n,i,o,0,0)}this.boxEndIndex=t.length};$l.prototype._addLineCollisionCircles=function(t,e,r,n,a,i,o,s,l,c){var u=i/2,h=Math.floor(a/u)||1,f=1+.4*Math.log(c)/Math.LN2,p=Math.floor(h*f/2),d=-i/2,g=r,v=n+1,m=d,y=-a/2,x=y-a/4;do{if(--v<0){if(m>y)return;v=0;break}m-=e[v].dist(g),g=e[v]}while(m>x);for(var b=e[v].dist(e[v+1]),_=-p;_a&&(k+=w-a),!(k=e.length)return;b=e[v].dist(e[v+1])}var T=k-m,A=e[v],M=e[v+1].sub(A)._unit()._mult(T)._add(A)._round(),S=Math.abs(k-d)0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function ec(t,e){return te?1:0}function rc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,i=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 h=o-n,f=s-i,p=Math.min(h,f),d=p/2,g=new tc([],nc);if(0===p)return new a(n,i);for(var v=n;vy.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 ac(b.p.x-d,b.p.y-d,d,t)),g.push(new ac(b.p.x+d,b.p.y-d,d,t)),g.push(new ac(b.p.x-d,b.p.y+d,d,t)),g.push(new ac(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 nc(t,e){return e.max-t.max}function ac(t,e,r,n){this.p=new a(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,a=0;at.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,fi(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}tc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},tc.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}},tc.prototype.peek=function(){return this.data[0]},tc.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var a=t-1>>1,i=e[a];if(r(n,i)>=0)break;e[t]=i,t=a}e[t]=n},tc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,a=e[t];t=0)break;e[t]=o,t=i}e[t]=a};var ic=e(function(t){t.exports=function(t,e){var r,n,a,i,o,s,l,c;for(r=3&t.length,n=t.length-r,a=e,o=3432918353,s=461845907,c=0;c>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(i>>>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:a^=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 a^=t.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}}),oc=e(function(t){t.exports=function(t,e){for(var r,n=t.length,a=e^n,i=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24))+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:a^=(255&t.charCodeAt(i+2))<<16;case 2:a^=(255&t.charCodeAt(i+1))<<8;case 1:a=1540483477*(65535&(a^=255&t.charCodeAt(i)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}}),sc=ic,lc=ic,cc=oc;sc.murmur3=lc,sc.murmur2=cc;var uc=7;function hc(t,e){var r=0,n=0,a=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=a-uc;break;case"bottom-right":case"bottom-left":n=-a+uc;break;case"bottom":n=-e+uc;break;case"top":n=e-uc}switch(t){case"top-right":case"bottom-right":r=-a;break;case"top-left":case"bottom-left":r=a;break;case"left":r=e;break;case"right":r=-e}return[r,n]}function fc(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"}var pc=65535;function dc(t,e,r,n,i,o,s,l,c,u,h,f,p){var d=function(t,e,r,n,i,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=e.positionedGlyphs,h=[],f=0;fpc&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===g.kind&&((v=[bs*p.compositeTextSizes[0].evaluate(o,{}),bs*p.compositeTextSizes[1].evaluate(o,{})])[0]>pc||v[1]>pc)&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),t.addSymbols(t.text,d,v,s,i,o,c,e,l.lineStartIndex,l.lineLength);for(var m=0,y=u;m=0;o--)if(n.dist(i[o])at&&(t.getActor().send("enforceCacheSizeLimit",nt),st=0)},t.clamp=c,t.clearTileCache=function(t){var e=self.caches.delete(rt);t&&e.catch(t).then(function(){return t()})},t.clone=function(t){var e=new wi(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=b,t.config=D,t.create=function(){var t=new wi(16);return wi!=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 wi(9);return wi!=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 wi(4);return wi!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=wr,t.createLayout=Zn,t.createStyleLayer=function(t){return"custom"===t.type?new js(t):new Vs[t.type](t)},t.deepEqual=o,t.ease=l,t.emitValidationErrors=sn,t.endsWith=m,t.enforceCacheSizeLimit=function(t){self.caches&&self.caches.open(rt).then(function(e){e.keys().then(function(r){for(var n=0;n=ti||c.y<0||c.y>=ti||function(t,e,r,n,i,o,s,l,c,u,h,f,p,d,g,v,m,y,x,b,_){var k,T,A,M=t.addToLineVertexArray(e,r),S=0,E=0,C=0,L={},P=sc(""),O=(o.layout.get("text-radial-offset").evaluate(x,{})||0)*ss;if(t.allowVerticalPlacement&&n.vertical){var I=o.layout.get("text-rotate").evaluate(x,{})+90,z=n.vertical;A=new $l(s,r,e,l,c,u,z,h,f,p,t.overscaling,I)}for(var D in n.horizontal){var R=n.horizontal[D];if(!k){P=sc(R.text);var F=o.layout.get("text-rotate").evaluate(x,{});k=new $l(s,r,e,l,c,u,R,h,f,p,t.overscaling,F)}var B=1===R.lineCount;if(E+=dc(t,e,R,o,p,x,d,M,n.vertical?ls.horizontal:ls.horizontalOnly,B?Object.keys(n.horizontal):[D],L,b,_),B)break}n.vertical&&(C+=dc(t,e,n.vertical,o,p,x,d,M,ls.vertical,["vertical"],L,b,_));var N=k?k.boxStartIndex:t.collisionBoxArray.length,j=k?k.boxEndIndex:t.collisionBoxArray.length,V=A?A.boxStartIndex:t.collisionBoxArray.length,U=A?A.boxEndIndex:t.collisionBoxArray.length;if(i){var q=function(t,e,r,n,i,o){var s,l,c,u,h=e.image,f=r.layout,p=e.top-1/h.pixelRatio,d=e.left-1/h.pixelRatio,g=e.bottom+1/h.pixelRatio,v=e.right+1/h.pixelRatio;if("none"!==f.get("icon-text-fit")&&i){var m=v-d,y=g-p,x=f.get("text-size").evaluate(o,{})/24,b=i.left*x,_=i.right*x,w=i.top*x,k=_-b,T=i.bottom*x-w,A=f.get("icon-text-fit-padding")[0],M=f.get("icon-text-fit-padding")[1],S=f.get("icon-text-fit-padding")[2],E=f.get("icon-text-fit-padding")[3],C="width"===f.get("icon-text-fit")?.5*(T-y):0,L="height"===f.get("icon-text-fit")?.5*(k-m):0,P="width"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?k:m,O="height"===f.get("icon-text-fit")||"both"===f.get("icon-text-fit")?T:y;s=new a(b+L-E,w+C-A),l=new a(b+L+M+P,w+C-A),c=new a(b+L+M+P,w+C+S+O),u=new a(b+L-E,w+C+S+O)}else s=new a(d,p),l=new a(v,p),c=new a(v,g),u=new a(d,g);var I=r.layout.get("icon-rotate").evaluate(o,{})*Math.PI/180;if(I){var z=Math.sin(I),D=Math.cos(I),R=[D,-z,z,D];s._matMult(R),l._matMult(R),u._matMult(R),c._matMult(R)}return[{tl:s,tr:l,bl:u,br:c,tex:h.paddedRect,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0}]}(0,i,o,0,gc(n.horizontal),x),H=o.layout.get("icon-rotate").evaluate(x,{});T=new $l(s,r,e,l,c,u,i,g,v,!1,t.overscaling,H),S=4*q.length;var G=t.iconSizeData,Y=null;"source"===G.kind?(Y=[bs*o.layout.get("icon-size").evaluate(x,{})])[0]>pc&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===G.kind&&((Y=[bs*_.compositeIconSizes[0].evaluate(x,{}),bs*_.compositeIconSizes[1].evaluate(x,{})])[0]>pc||Y[1]>pc)&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),t.addSymbols(t.icon,q,Y,y,m,x,!1,e,M.lineStartIndex,M.lineLength)}var W=T?T.boxStartIndex:t.collisionBoxArray.length,X=T?T.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=Ps.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),t.symbolInstances.emplaceBack(e.x,e.y,L.right>=0?L.right:-1,L.center>=0?L.center:-1,L.left>=0?L.left:-1,L.vertical||-1,P,N,j,V,U,W,X,l,E,C,S,0,h,O)}(t,c,l,r,n,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,x,k,s,m,b,T,f,e,i,o)};if("line"===A)for(var E=0,C=function(t,e,r,n,i){for(var o=[],s=0;s=n&&f.x>=n||(h.x>=n?h=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),h.y>=i&&f.y>=i||(h.y>=i?h=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round():f.y>=i&&(f=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round()),c&&h.equals(c[c.length-1])||(c=[h],o.push(c)),c.push(f)))))}return o}(e.geometry,0,0,ti,ti);E1){var F=Kl(R,_,r.vertical||p,n,24,v);F&&S(R,F)}}else if("Polygon"===e.type)for(var B=0,N=vo(e.geometry,0);B=M.maxzoom||"none"!==M.visibility&&(o(A,this.zoom),(d[M.id]=M.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,g),c.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var S=t.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(S).length?n.send("getGlyphs",{uid:this.uid,stacks:S},function(t,e){u||(u=t,h=e,L.call(s))}):h={};var E=Object.keys(g.iconDependencies);E.length?n.send("getImages",{icons:E},function(t,e){u||(u=t,f=e,L.call(s))}):f={};var C=Object.keys(g.patternDependencies);function L(){if(u)return i(u);if(h&&f&&p){var e=new a(h),r=new t.ImageAtlas(f,p);for(var n in d){var s=d[n];s instanceof t.SymbolBucket?(o(s.layers,this.zoom),t.performSymbolLayout(s,h,e.positions,f,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof t.LineBucket||s instanceof t.FillBucket||s instanceof t.FillExtrusionBucket)&&(o(s.layers,this.zoom),s.addFeatures(g,r.patternPositions))}this.status="done",i(null,{buckets:t.values(d).filter(function(t){return!t.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}C.length?n.send("getImages",{icons:C},function(t,e){u||(u=t,p=e,L.call(s))}):p={},L.call(this)};var s="undefined"!=typeof performance,l={getEntriesByName:function(t){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(s&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(s&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},c=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},l.mark(this._marks.start)};function u(e,r){var n=t.getArrayBuffer(e.request,function(e,n,a,i){e?r(e):n&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(n)),rawData:n,cacheControl:a,expires:i})});return function(){n.cancel(),r()}}c.prototype.finish=function(){l.mark(this._marks.end);var t=l.getEntriesByName(this._marks.measure);return 0===t.length&&(l.measure(this._marks.measure,this._marks.start,this._marks.end),t=l.getEntriesByName(this._marks.measure),l.clearMarks(this._marks.start),l.clearMarks(this._marks.end),l.clearMeasures(this._marks.measure)),t},l.Performance=c;var h=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||u,this.loading={},this.loaded={}};h.prototype.loadTile=function(e,r){var n=this,a=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new l.Performance(e.request),s=this.loading[a]=new i(e);s.abort=this.loadVectorData(e,function(e,i){if(delete n.loading[a],e||!i)return s.status="done",n.loaded[a]=s,r(e);var l=i.rawData,c={};i.expires&&(c.expires=i.expires),i.cacheControl&&(c.cacheControl=i.cacheControl);var u={};if(o){var h=o.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=i.vectorTile,s.parse(i.vectorTile,n.layerIndex,n.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))}),n.loaded=n.loaded||{},n.loaded[a]=s})},h.prototype.reloadTile=function(t,e){var r=this.loaded,n=t.uid,a=this;if(r&&r[n]){var i=r[n];i.showCollisionBoxes=t.showCollisionBoxes;var o=function(t,r){var n=i.reloadCallback;n&&(delete i.reloadCallback,i.parse(i.vectorTile,a.layerIndex,a.actor,n)),e(t,r)};"parsing"===i.status?i.reloadCallback=o:"done"===i.status&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.actor,o):o())}},h.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()},h.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var f=function(){this.loaded={}};f.prototype.loadTile=function(e,r){var n=e.uid,a=e.encoding,i=e.rawImageData,o=new t.DEMData(n,i,a);this.loaded=this.loaded||{},this.loaded[n]=o,r(null,o)},f.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var p={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function d(t){var e=0;if(t&&t.length>0){e+=Math.abs(g(t[0]));for(var r=1;r2){for(o=0;o=0}(t)===e?t:t.reverse()}var _=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=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))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function F(t,e){for(var r=t.loadGeometry(),n=t.type,a=0,i=0,o=r.length,s=0;s>1;!function t(e,r,n,a,i,o){for(;i>a;){if(i-a>600){var s=i-a+1,l=n-a+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(a,Math.floor(n-l*u/s+h)),Math.min(i,Math.floor(n+(s-l)*u/s+h)),o)}var f=r[2*n+o],p=a,d=i;for(N(e,r,a,n),r[2*i+o]>f&&N(e,r,a,i);pf;)d--}r[2*a+o]===f?N(e,r,a,d):N(e,r,++d,i),d<=n&&(a=d+1),n<=d&&(i=d-1)}}(e,r,s,a,i,o%2),t(e,r,n,a,s-1,o+1),t(e,r,n,s+1,i,o+1)}}(o,s,n,0,o.length-1,0)};H.prototype.range=function(t,e,r,n){return function(t,e,r,n,a,i,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var h=c.pop(),f=c.pop(),p=c.pop();if(f-p<=o)for(var d=p;d<=f;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=a&&l>=n&&l<=i&&u.push(t[d]);else{var g=Math.floor((p+f)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=a&&l>=n&&l<=i&&u.push(t[g]);var v=(h+1)%2;(0===h?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(v)),(0===h?a>=s:i>=l)&&(c.push(g+1),c.push(f),c.push(v))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},H.prototype.within=function(t,e,r){return function(t,e,r,n,a,i){for(var o=[0,t.length-1,0],s=[],l=a*a;o.length;){var c=o.pop(),u=o.pop(),h=o.pop();if(u-h<=i)for(var f=h;f<=u;f++)V(e[2*f],e[2*f+1],r,n)<=l&&s.push(t[f]);else{var p=Math.floor((h+u)/2),d=e[2*p],g=e[2*p+1];V(d,g,r,n)<=l&&s.push(t[p]);var v=(c+1)%2;(0===c?r-a<=d:n-a<=g)&&(o.push(h),o.push(p-1),o.push(v)),(0===c?r+a>=d:n+a>=g)&&(o.push(p+1),o.push(u),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var G={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},Y=function(t){this.options=$(Object.create(G),t),this.trees=new Array(this.options.maxZoom+1)};function W(t,e,r,n,a){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:a}}function X(t,e){var r=t.geometry.coordinates,n=r[0],a=r[1];return{x:K(n),y:Q(a),zoom:1/0,index:e,parentId:-1}}function Z(t){return{type:"Feature",id:t.id,properties:J(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 J(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return $($({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function K(t){return t/360+.5}function Q(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 $(t,e){for(var r in e)t[r]=e[r];return t}function tt(t){return t.x}function et(t){return t.y}function rt(t,e,r,n,a,i){var o=a-r,s=i-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=a,n=i):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function nt(t,e,r,n){var a={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)at(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(a*c-l*i)/2:Math.sqrt(Math.pow(l-a,2)+Math.pow(c-i,2))),a=l,i=c}var u=e.length-3;e[2]=1,function t(e,r,n,a){for(var i,o=a,s=n-r>>1,l=n-r,c=e[r],u=e[r+1],h=e[n],f=e[n+1],p=r+3;po)i=p,o=d;else if(d===o){var g=Math.abs(p-s);ga&&(i-r>3&&t(e,r,i,a),e[i+2]=o,n-i>3&&t(e,i,n,a))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function lt(t,e,r,n){for(var a=0;a1?1:r}function ht(t,e,r,n,a,i,o,s){if(n/=e,i>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if("Point"===f||"MultiPoint"===f)ft(h,g,r,n,a);else if("LineString"===f)pt(h,g,r,n,a,!1,s.lineMetrics);else if("MultiLineString"===f)gt(h,g,r,n,a,!1);else if("Polygon"===f)gt(h,g,r,n,a,!0);else if("MultiPolygon"===f)for(var v=0;v=r&&o<=n&&(e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]))}}function pt(t,e,r,n,a,i,o){for(var s,l,c=dt(t),u=0===a?mt:yt,h=t.start,f=0;fr&&(l=u(c,p,d,v,m,r),o&&(c.start=h+s*l)):y>n?x=r&&(l=u(c,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,v,m,n),b=!0),!i&&b&&(o&&(c.end=h+s*l),e.push(c),c=dt(t)),o&&(h+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===a?p:d)>=r&&y<=n&&vt(c,p,d,g),_=c.length-3,i&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&vt(c,c[0],c[1],c[2]),c.length&&e.push(c)}function dt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function gt(t,e,r,n,a,i){for(var o=0;oo.maxX&&(o.maxX=u),h>o.maxY&&(o.maxY=h)}return o}function Tt(t,e,r,n){var a=e.geometry,i=e.type,o=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s0&&e.size<(a?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++;a&&function(t,e){for(var r=0,n=0,a=t.length,i=a-2;n0===e)for(n=0,a=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 H(s,tt,et,i,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},Y.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),a=180===t[2]?180:((t[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,a=180;else if(r>a){var o=this.getClusters([r,n,180,i],e),s=this.getClusters([-180,n,a,i],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,h=l.range(K(r),Q(i),K(a),Q(n));u>5,r=t%32,n="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(n);var i=a.points[e];if(!i)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,c=a.within(i.x,i.y,o);l1?this._map(c,!0):null,v=(l<<5)+(e+1),m=0,y=h;m1&&console.time("creation"),f=this.tiles[h]=kt(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,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=t,a){if(e===l.maxZoom||e===a)continue;var d=1<1&&console.time("clipping");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,T=1+_;g=v=m=y=null,x=ht(t,u,r-_,r+k,0,f.minX,f.maxX,l),b=ht(t,u,r+w,r+T,0,f.minX,f.maxX,l),t=null,x&&(g=ht(x,u,n-_,n+k,1,f.minY,f.maxY,l),v=ht(x,u,n+w,n+T,1,f.minY,f.maxY,l),x=null),b&&(m=ht(b,u,n-_,n+k,1,f.minY,f.maxY,l),y=ht(b,u,n+w,n+T,1,f.minY,f.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},Mt.prototype.getTile=function(t,e,r){var n=this.options,a=n.extent,i=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,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[St(c,u,h)];return l&&l.source?(i>1&&console.log("found parent tile z%d-%d-%d",c,u,h),i>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,t,e,r),i>1&&console.timeEnd("drilling down"),this.tiles[s]?_t(this.tiles[s],a):null):null};var Ct=function(e){function r(t,r,n){e.call(this,t,r,Et),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(n&&n.request&&n.request.collectResourceTiming)&&new l.Performance(n.request);this.loadGeoJSON(n,function(i,o){if(i||!o)return r(i);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(y(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(y(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=x(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(y(x,e))),t}(e,r);default:return e}}(o,!0);try{e._geoJSONIndex=n.cluster?new Y(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var a={},i={},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 f=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 m(t,e,r,n,a,i,o){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else{var l=i.requests[s];l||(l=i.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,function(t,e){if(e)for(var r in e)n._doesCharSupportLocalGlyph(+r)||(i.glyphs[+r]=e[+r]);for(var a=0,o=l;athis.height)return t.warnOnce("LineAtlas out of space"),null;for(var i=0,o=0;o=n&&e.x=a&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,i,r.z,a,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),a=this._data;"string"==typeof a?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(a),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(a),this.actor.send(this.type+".loadData",n,function(t,a){r._removed||a&&a.abandoned||(r._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[r.id]&&(r._resourceTiming=a.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,a=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var i={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};e.request=this.actor.send(a,i,function(t,i){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(i,n.map.painter,"reloadTile"===a),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=function(e){function r(t,r,n,a){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(a),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(a,i){n._loaded=!0,a?n.fire(new t.ErrorEvent(a)):i&&(n.image=i,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,a=-1/0,i=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("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,t.rasterBoundsAttributes.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 a=this.tiles[n];"loaded"!==a.state&&(a.state="loaded",a.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}(P),I=function(e){function r(r,n,a,i){e.call(this,r,n,a,i),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 a in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.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 i=this.tiles[a];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];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.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),a=this.data[r][n];return this.data[r].splice(n,1),a.timeout&&clearTimeout(a.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(a.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};var j=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};j.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},j.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},j.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},U=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var a=t.gl;this.buffer=a.createBuffer(),t.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};U.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},U.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},U.prototype.enableAttributes=function(t,e){for(var r=0;r1||(Math.abs(r)>1&&(1===Math.abs(r+a)?r+=a:1===Math.abs(r-a)&&(r-=a)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[i]&&(t.neighboringTiles[i].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var a in this._tiles){var i=this._tiles[a];if(!(n[a]||!i.hasData()||i.tileID.overscaledZ<=e||i.tileID.overscaledZ>r)){for(var o=i.tileID;i&&i.tileID.overscaledZ>e+1;){var s=i.tileID.scaledTo(i.tileID.overscaledZ-1);(i=this._tiles[s.key])&&i.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){for(var r=t.overscaledZ-1;r>=e;r--){var n=t.scaledTo(r);if(!n)return;var a=String(n.key),i=this._tiles[a];if(i&&i.hasData())return i;if(this._cache.has(n))return this._cache.get(n)}},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 a in this._tiles){var i=this._tiles[a];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+r),n[i.tileID.key]=i}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 a;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=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)}):(a=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&&(a=a.filter(function(t){return n._source.hasTile(t)}))):a=[];var i=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),o=Math.max(i-r.maxOverzooming,this._source.minzoom),s=Math.max(i+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(a,i);if(Ot(this._source.type)){for(var c={},u={},h=0,f=Object.keys(l);hthis._source.maxzoom){var v=d.children(this._source.maxzoom)[0],m=this.getTile(v);if(m&&m.hasData()){n[v.key]=v;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>=i;--b){var _=d.scaledTo(b);if(a[_.key])break;if(a[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"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 a=this,i=[],o=this.transform;if(!o)return i;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(),h=1/0,f=1/0,p=-1/0,d=-1/0,g=0,v=c;g=0&&m[1].y+v>=0){var y=l.map(function(t){return s.getTilePoint(t)}),x=c.map(function(t){return s.getTilePoint(t)});i.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}(t.Evented);function Pt(t,e){return t%32-e%32||e-t}function Ot(t){return"raster"===t||"image"===t||"video"===t}function It(){return new t.window.Worker(Qn.workerUrl)}Lt.maxOverzooming=10,Lt.maxUnderzooming=3;var zt=function(){this.active={}};zt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function Qt(e,r,n,a,i,o,s,l){var c=a?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],f=a?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;f.clear();for(var p=e.lineVertexArray,d=a?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;mMath.abs(n.x-r.x)*a?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function ee(e,r,n,a,i,o,s,l,c,u,h,f,p,d){var g,v=r/24,m=e.lineOffsetX*v,y=e.lineOffsetY*v;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=$t(v,l,m,y,n,h,f,e,c,o,p,!1);if(!w)return{notEnoughRoom:!0};var k=Jt(w.first.point,s).point,T=Jt(w.last.point,s).point;if(a&&!n){var A=te(e.writingMode,k,T,d);if(A)return A}g=[w.first];for(var M=e.glyphStartIndex+1;M0?L.point:re(f,C,S,1,i),O=te(e.writingMode,S,P,d);if(O)return O}var I=ne(v*l.getoffsetX(e.glyphStartIndex),m,y,n,h,f,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p,!1);if(!I)return{notEnoughRoom:!0};g=[I]}for(var z=0,D=g;z0?1:-1,v=0;a&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?l+s:l+s+1,y=m,x=i,b=i,_=0,w=0,k=Math.abs(d);_+w<=k;){if((m+=g)=c)return null;if(b=x,void 0===(x=f[m])){var T=new t.Point(u.getx(m),u.gety(m)),A=Jt(T,h);if(A.signedDistanceFromCamera>0)x=f[m]=A.point;else{var M=m-g;x=re(0===_?o:new t.Point(u.getx(M),u.gety(M)),T,b,k-_+1,h)}}_+=w,w=b.dist(x)}var S=(k-_)/w,E=x.sub(b),C=E.mult(S)._add(b);return C._add(E._unit()._perp()._mult(n*g)),{point:C,angle:v+Math.atan2(x.y-b.y,x.x-b.x),tileDistance:p?{prevTileDistance:m-g===y?0:u.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:k-_}:null}}Wt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Wt.prototype.insert=function(t,e,r,n,a){this._forEachCell(e,r,n,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(a)},Wt.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)},Wt.prototype._insertBoxCell=function(t,e,r,n,a,i){this.boxCells[a].push(i)},Wt.prototype._insertCircleCell=function(t,e,r,n,a,i){this.circleCells[a].push(i)},Wt.prototype._query=function(t,e,r,n,a,i){if(r<0||t>this.width||n<0||e>this.height)return!a&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(a)return!0;for(var s=0;s0:o},Wt.prototype._queryCircle=function(t,e,r,n,a){var i=t-r,o=t+r,s=e-r,l=e+r;if(o<0||i>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(i,s,o,l,this._queryCellCircle,c,u,a),n?c.length>0:c},Wt.prototype.query=function(t,e,r,n,a){return this._query(t,e,r,n,!1,a)},Wt.prototype.hitTest=function(t,e,r,n,a){return this._query(t,e,r,n,!0,a)},Wt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Wt.prototype._queryCell=function(t,e,r,n,a,i,o,s){var l=o.seenUids,c=this.boxCells[a];if(null!==c)for(var u=this.bboxes,h=0,f=c;h=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[a];if(null!==g)for(var v=this.circles,m=0,y=g;mo*o+s*s},Wt.prototype._circleAndRectCollide=function(t,e,r,n,a,i,o){var s=(i-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var c=(o-a)/2,u=Math.abs(e-(a+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var h=l-s,f=u-c;return h*h+f*f<=r*r};var ae=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ie(t,e){for(var r=0;rS)le(e,E,!1);else{var I=this.projectPoint(c,C,L),z=P*T;if(d.length>0){var D=I.x-d[d.length-4],R=I.y-d[d.length-3];if(z*z*2>D*D+R*R&&E+8-M&&F=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},se.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(v=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={radialOffset:i,width:n,height:a,anchor:e,textBoxScale:o,prevAnchor:v},this.markUsedJustification(d,e,p,g),d.allowVerticalPlacement&&(this.markUsedOrientation(d,g,p),this.placedOrientations[p.crossTileID]=g),y},ve.prototype.placeLayerBucket=function(e,r,n,a,i,o,s,l,c,u){var h=this,f=e.layers[0].layout,p=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom),d=f.get("text-optional"),g=f.get("icon-optional"),v=f.get("text-allow-overlap"),m=f.get("icon-allow-overlap"),y=v&&(m||!e.hasIconData()||g),x=m&&(v||!e.hasTextData()||d),b=this.collisionGroups.get(e.sourceID),_="map"===f.get("text-rotation-alignment"),w="map"===f.get("text-pitch-alignment"),k="viewport-y"===f.get("symbol-z-order");!e.collisionArrays&&u&&e.deserializeCollisionBoxes(u);var T=function(a,u){if(!c[a.crossTileID])if(l)h.placements[a.crossTileID]=new fe(!1,!1,!1);else{var m,k=!1,T=!1,A=!0,M={box:null,offscreen:null},S={box:null,offscreen:null},E=null,C=null,L=0,P=0,O=0;u.textFeatureIndex&&(L=u.textFeatureIndex),u.verticalTextFeatureIndex&&(P=u.verticalTextFeatureIndex);var I=u.textBox;if(I){var z=function(r){var n=t.WritingMode.horizontal;if(e.allowVerticalPlacement&&!r&&h.prevPlacement){var i=h.prevPlacement.placedOrientations[a.crossTileID];i&&(h.placedOrientations[a.crossTileID]=i,n=i,h.markUsedOrientation(e,n,a))}return n},D=function(r,n){if(e.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&u.verticalTextBox)for(var i=0,o=e.writingModes;i0&&(R=R.filter(function(t){return t!==F.anchor})).unshift(F.anchor)}var B=function(t,n){for(var i=t.x2-t.x1,s=t.y2-t.y1,l=a.textBoxScale,c={box:[],offscreen:!1},u=v?2*R.length:R.length,f=0;f=R.length;if((c=h.attemptAnchorPlacement(p,t,i,s,a.radialTextOffset,l,_,w,o,r,b,d,a,e,n))&&c.box&&c.box.length){k=!0;break}}return c};D(function(){return B(I,t.WritingMode.horizontal)},function(){var r=u.verticalTextBox,n=M&&M.box&&M.box.length;return e.allowVerticalPlacement&&!n&&a.numVerticalGlyphVertices>0&&r?B(r,t.WritingMode.vertical):{box:null,offscreen:null}}),M&&(k=M.box,A=M.offscreen);var N=z(M&&M.box);if(!k&&h.prevPlacement){var j=h.prevPlacement.variableOffsets[a.crossTileID];j&&(h.variableOffsets[a.crossTileID]=j,h.markUsedJustification(e,j.anchor,a,N))}}else{var V=function(t,n){var i=h.collisionIndex.placeCollisionBox(t,f.get("text-allow-overlap"),o,r,b.predicate);return i&&i.box&&i.box.length&&(h.markUsedOrientation(e,n,a),h.placedOrientations[a.crossTileID]=n),i};D(function(){return V(I,t.WritingMode.horizontal)},function(){var r=u.verticalTextBox;return e.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&r?V(r,t.WritingMode.vertical):{box:null,offscreen:null}}),z(M&&M.box&&M.box.length)}}k=(m=M)&&m.box&&m.box.length>0,A=m&&m.offscreen;var U=u.textCircles;if(U){var q=e.text.placedSymbolArray.get(a.centerJustifiedTextSymbolIndex),H=t.evaluateSizeForFeature(e.textSizeData,p,q);E=h.collisionIndex.placeCollisionCircles(U,f.get("text-allow-overlap"),i,o,q,e.lineVertexArray,e.glyphOffsetArray,H,r,n,s,w,b.predicate),k=f.get("text-allow-overlap")||E.circles.length>0,A=A&&E.offscreen}u.iconFeatureIndex&&(O=u.iconFeatureIndex),u.iconBox&&(T=(C=h.collisionIndex.placeCollisionBox(u.iconBox,f.get("icon-allow-overlap"),o,r,b.predicate)).box.length>0,A=A&&C.offscreen);var G=d||0===a.numHorizontalGlyphVertices&&0===a.numVerticalGlyphVertices,Y=g||0===a.numIconVertices;G||Y?Y?G||(T=T&&k):k=T&&k:T=k=T&&k,k&&m&&m.box&&(S&&S.box&&P?h.collisionIndex.insertCollisionBox(m.box,f.get("text-ignore-placement"),e.bucketInstanceId,P,b.ID):h.collisionIndex.insertCollisionBox(m.box,f.get("text-ignore-placement"),e.bucketInstanceId,L,b.ID)),T&&C&&h.collisionIndex.insertCollisionBox(C.box,f.get("icon-ignore-placement"),e.bucketInstanceId,O,b.ID),k&&E&&h.collisionIndex.insertCollisionCircles(E.circles,f.get("text-ignore-placement"),e.bucketInstanceId,L,b.ID),h.placements[a.crossTileID]=new fe(k||y,T||x,A||e.justReloaded),c[a.crossTileID]=!0}};if(k)for(var A=e.getSortedSymbolIndexes(this.transform.angle),M=A.length-1;M>=0;--M){var S=A[M];T(e.symbolInstances.get(S),e.collisionArrays[S])}else for(var E=0;E=0&&(e.text.placedSymbolArray.get(c).crossTileID=i>=0&&c!==i?0:n.crossTileID)}},ve.prototype.markUsedOrientation=function(e,r,n){for(var a=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,i=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||g>0,b=p.numIconVertices>0;if(x){for(var _=Ae(y.text),w=(d+g)/4,k=0;k=0&&(e.text.placedSymbolArray.get(t).hidden=T||S)}),p.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(p.verticalPlacedTextSymbolIndex).hidden=T||M);var E=this.variableOffsets[p.crossTileID];E&&this.markUsedJustification(e,E.anchor,p,A);var C=this.placedOrientations[p.crossTileID];C&&(this.markUsedJustification(e,"left",p,C),this.markUsedOrientation(e,C,p))}if(b){for(var L=Ae(y.icon),P=0;Pt},ve.prototype.setStale=function(){this.stale=!0};var ye=Math.pow(2,25),xe=Math.pow(2,24),be=Math.pow(2,17),_e=Math.pow(2,16),we=Math.pow(2,9),ke=Math.pow(2,8),Te=Math.pow(2,1);function Ae(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*ye+e*xe+r*be+e*_e+r*we+e*ke+r*Te+e}var Me=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Me.prototype.continuePlacement=function(t,e,r,n,a){for(;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 Me),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Se.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Ee=512/t.EXTENT/2,Ce=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,a)}else{var c=o[t.scaledTo(Number(i)).key];c&&c.findMatches(e.symbolInstances,t,a)}}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,a=e,u())}),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){c=null,o||(o=t,i=e,u())});function u(){if(o)n(o);else if(a&&i){var e=t.browser.getImageData(i),r={};for(var s in a){var l=a[s],c=l.width,u=l.height,h=l.x,f=l.y,p=l.sdf,d=l.pixelRatio,g=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,g,{x:h,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:g,pixelRatio:d,sdf:p}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e.sprite,this.map._requestManager,function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var a in r)n.imageManager.addImage(a,r[a]);n.imageManager.setLoaded(!0),n.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=Bt(this.stylesheet.layers);this._order=i.map(function(t){return t.id}),this._layers={};for(var o=0,s=i;o0)throw new Error("Unimplemented: "+a.map(function(t){return t.command}).join(", ")+".");return n.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.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.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 a=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 i=this.sourceCaches[e]=new Lt(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,function(){return{isSourceLoaded:a.loaded(),source:i.serialize(),sourceId:e}}),i.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 a=e.id;if(this.getLayer(a))this.fire(new t.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var i;if("custom"===e.type){if(Ie(this,t.validateCustomStyleLayer(e)))return;i=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(a,e.source),e=t.clone$1(e),e=t.extend(e,{source:a})),this._validate(t.validateStyle.layer,"layers."+a,e,{arrayIndex:-1},n))return;i=t.createStyleLayer(e),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}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,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){var s=this._removedLayers[a];delete this._removedLayers[a],s.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.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 a=r?this._order.indexOf(r):this._order.length;r&&-1===a?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(a,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],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.setLayerZoomRange=function(e,r,n){this._checkLoaded();var a=this.getLayer(e);a?a.minzoom===r&&a.maxzoom===n||(null!=r&&(a.minzoom=r),null!=n&&(a.maxzoom=n),this._updateLayer(a)):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 a=this.getLayer(e);if(a){if(!t.deepEqual(a.filter,r))return null==r?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(t.validateStyle.filter,"layers."+a.id+".filter",r,null,n)||(a.filter=t.clone$1(r),this._updateLayer(a)))}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,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(e);i?t.deepEqual(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n,a),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(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,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(e);i?t.deepEqual(i.getPaintProperty(r),n)||(i.setPaintProperty(r,n,a)&&this._updateLayer(i),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,a=e.sourceLayer,i=this.sourceCaches[n],o=parseInt(e.id,10);if(void 0!==i){var s=i.getSource().type;"geojson"===s&&a?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||a?isNaN(o)||o<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):i.setFeatureState(a,o,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,a=this.sourceCaches[n];if(void 0!==a){var i=a.getSource().type,o="vector"===i?e.sourceLayer:void 0,s=parseInt(e.id,10);"vector"!==i||o?void 0!==e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):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."))):a.removeFeatureState(o,s,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,a=this.sourceCaches[r],i=parseInt(e.id,10);if(void 0!==a)if("vector"!==a.getSource().type||n){if(!(isNaN(i)||i<0))return a.getFeatureState(n,i);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else 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]&&(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={},a=[],i=this._order.length-1;i>=0;i--){var o=this._order[i];if(r(o)){n[o]=i;for(var s=0,l=t;s=0;d--){var g=this._order[d];if(r(g))for(var v=a.length-1;v>=0;v--){var m=a[v].feature;if(n[m.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;}"),Ye=cr("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;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);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),We=cr("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Xe=cr("#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);}"),Ze=cr("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;}"),Je=cr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),Ke=cr("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 vec4 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\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;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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);}"),Qe=cr("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;}"),$e=cr("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\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\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 vec4 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\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\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 pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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;}"),tr=cr("#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;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/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;}"),er=cr("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;}"),rr=cr("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);}"),nr=cr("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);}"),ar=cr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 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 pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);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 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,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));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;\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 vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_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 mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_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);}"),ir=cr("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);}"),or=cr("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;}"),sr=cr("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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),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));}"),lr=cr("#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 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;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[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} 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),0.0,1.0);float gamma_scale=gl_Position.w;vec2 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;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function cr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:t=t.replace(r,function(t,e,r,a,i){return n[i]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"}),vertexSource:e=e.replace(r,function(t,e,r,a,i){var o="float"===a?"vec2":"vec4",s=i.match(/color/)?"color":o;return n[i]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = a_"+i+";\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+a+" "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"})}}var ur=Object.freeze({prelude:Be,background:Ne,backgroundPattern:je,circle:Ve,clippingMask:Ue,heatmap:qe,heatmapTexture:He,collisionBox:Ge,collisionCircle:Ye,debug:We,fill:Xe,fillOutline:Ze,fillOutlinePattern:Je,fillPattern:Ke,fillExtrusion:Qe,fillExtrusionPattern:$e,hillshadePrepare:tr,hillshade:er,line:rr,lineGradient:nr,linePattern:ar,lineSDF:ir,raster:or,symbolIcon:sr,symbolSDF:lr}),hr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};hr.prototype.bind=function(t,e,r,n,a,i,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}fr.prototype.draw=function(t,e,r,n,a,i,o,s,l,c,u,h,f,p,d,g){var v,m=t.gl;for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(a),t.setCullFace(i),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,h,{zoom:f});for(var x=(v={},v[m.LINES]=2,v[m.TRIANGLES]=3,v[m.LINE_STRIP]=1,v)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new hr)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),m.drawElements(e,w.primitiveLength*x,m.UNSIGNED_SHORT,w.primitiveOffset*x*2)}};var dr=function(e,r,n,a){var i=r.style.light,o=i.properties.get("position"),s=[o.x,o.y,o.z],l=t.create$1();"viewport"===i.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=i.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:i.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:a}},gr=function(e,r,n,a,i,o,s){return t.extend(dr(e,r,n,a),pr(o,r,s),{u_height_factor:-Math.pow(2,i.overscaledZ)/s.tileSize/8})},vr=function(t){return{u_matrix:t}},mr=function(e,r,n,a){return t.extend(vr(e),pr(n,r,a))},yr=function(t,e){return{u_matrix:t,u_world:e}},xr=function(e,r,n,a,i){return t.extend(mr(e,r,n,a),{u_world:i})},br=function(e,r,n,a){var i,o,s=e.transform;if("map"===a.paint.get("circle-pitch-alignment")){var l=ce(n,1,s.zoom);i=!0,o=[l,l]}else i=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===a.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+i,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},_r=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)}},wr=function(t,e,r){var n=ce(r,1,e.zoom),a=Math.pow(2,e.zoom-r.tileID.overscaledZ),i=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*a),e.pixelsToGLUnits[1]/(n*a)],u_overscale_factor:i}},kr=function(t,e){return{u_matrix:t,u_color:e}},Tr=function(t){return{u_matrix:t}},Ar=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:ce(e,1,r),u_intensity:n}},Mr=function(t,e,r){var n=r.paint.get("hillshade-shadow-color"),a=r.paint.get("hillshade-highlight-color"),i=r.paint.get("hillshade-accent-color"),o=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Er(t,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),o],u_shadow:n,u_highlight:a,u_accent:i}},Sr=function(e,r){var n=e.dem.stride,a=t.create();return t.ortho(a,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(a,a,[0,-t.EXTENT,0]),{u_matrix:a,u_image:1,u_dimension:[n,n],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function Er(e,r){var n=Math.pow(2,r.canonical.z),a=r.canonical.y;return[new t.MercatorCoordinate(0,a/n).toLngLat().lat,new t.MercatorCoordinate(0,(a+1)/n).toLngLat().lat]}var Cr=function(e,r,n){var a=e.transform;return{u_matrix:zr(e,r,n),u_ratio:1/ce(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Lr=function(e,r,n){return t.extend(Cr(e,r,n),{u_image:0})},Pr=function(e,r,n,a){var i=e.transform,o=Ir(r,i);return{u_matrix:zr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ce(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[t.browser.devicePixelRatio,o,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Or=function(e,r,n,a,i){var o=e.transform,s=e.lineAtlas,l=Ir(r,o),c="round"===n.layout.get("line-cap"),u=s.getDash(a.from,c),h=s.getDash(a.to,c),f=u.width*i.fromScale,p=h.width*i.toScale;return t.extend(Cr(e,r,n),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/p,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:i.t})};function Ir(t,e){return 1/ce(t,1,e.tileZoom)}function zr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Dr=function(t,e,r,n,a){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*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(o=a.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(i=a.paint.get("raster-contrast"),i>0?1/(1-i):1+i),u_spin_weights:function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(a.paint.get("raster-hue-rotate"))};var i,o};var Rr=function(t,e,r,n,a,i,o,s,l,c){var u=a.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:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:i,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Fr=function(e,r,n,a,i,o,s,l,c,u,h){var f=i.transform;return t.extend(Rr(e,r,n,a,i,o,s,l,c,u),{u_gamma_scale:a?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+h})},Br=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Nr=function(e,r,n,a,i,o){return t.extend(function(t,e,r,n){var a=r.imageManager.getPattern(t.from),i=r.imageManager.getPattern(t.to),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,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:i.tl,u_pattern_br_b:i.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:i.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ce(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,f>>16],u_pixel_coord_lower:[65535&h,65535&f]}}(a,o,n,i),{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.Uniform4f(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.Uniform4f(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.Uniform4f(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:_r,collisionCircle:_r,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},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)}},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.Uniform4f(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.Uniform1f(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.Uniform1f(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.Uniform1f(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 Vr(e,r){for(var n=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),a=0;a0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),h=i.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),p=f&&e.refreshedUponExpiration?1:t.clamp(f?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}}function en(e,r,n){var a=e.context,i=a.gl,o=n.posMatrix,s=e.useProgram("debug"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass(),h="$debug";s.draw(a,i.LINE_STRIP,l,c,u,Et.disabled,kr(o,t.Color.red),h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var f=r.getTileByID(n.key).latestRawTileData,p=f&&f.byteLength||0,d=Math.floor(p/1024),g=r.getTile(n).tileSize,v=512/Math.min(g,512),m=function(t,e,r,n){n=n||1;var a,i,o,s,l,c,u,h,f=[];for(a=0,i=t.length;a":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},nn={symbol:function(t,e,r,n,a){if("translucent"===t.renderPass){var i=Mt.disabled,o=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Xr(t,e,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),i,o,a),0!==r.paint.get("text-opacity").constantOr(1)&&Xr(t,e,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),i,o,a),e.map.showCollisionBoxes&&function(t,e,r,n){qr(t,e,r,n,!1),qr(t,e,r,n,!0)}(t,e,r,n)}},circle:function(e,r,n,a){if("translucent"===e.renderPass){var i=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==s.constantOr(1)){for(var c=e.context,u=c.gl,h=e.depthModeForSublayer(0,At.ReadOnly),f=Mt.disabled,p=e.colorModeForRenderPass(),d=[],g=0;ge.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function sn(t,e,r,n,a){var i=Math.max(r,Math.floor(e.y0)),o=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx0,h=e.dx<0,f=i;fl.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&sn(c,s,n,a,i),l.dy&&sn(c,l,n,a,i)}an.prototype.resize=function(e,r){var n=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var a=0,i=this.style._order;a256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var i=0,o=e;i256&&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)},an.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)},an.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new St([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?St.unblended:St.alphaBlended},an.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return At.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new At(r||this.context.gl.LEQUAL,e,[n,n])},an.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var M=this.style._layers[n[this.currentLayer]],S=a[M.source],E=s[M.source];this._renderTileClippingMasks(M,E),this.renderLayer(this,S,M,E)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},an.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},an.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new fr(this.context,ur[t],e,jr[t],this._showOverdrawInspector)),this.cache[r]},an.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()},an.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)};var cn=function(e,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=e||0,this._maxZoom=r||22,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._posMatrixCache={},this._alignedPosMatrixCache={}},un={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};cn.prototype.clone=function(){var t=new cn(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},un.minZoom.get=function(){return this._minZoom},un.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},un.maxZoom.get=function(){return this._maxZoom},un.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},un.renderWorldCopies.get=function(){return this._renderWorldCopies},un.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},un.worldSize.get=function(){return this.tileSize*this.scale},un.centerPoint.get=function(){return this.size._div(2)},un.size.get=function(){return new t.Point(this.width,this.height)},un.bearing.get=function(){return-this.angle/Math.PI*180},un.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))},un.pitch.get=function(){return this._pitch/Math.PI*180},un.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},un.fov.get=function(){return this._fov/Math.PI*180},un.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())},un.zoom.get=function(){return this._zoom},un.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())},un.center.get=function(){return this._center},un.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},cn.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},cn.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),a=this.pointCoordinate(new t.Point(this.width,0)),i=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,a.x,i.x,o.x)),l=Math.floor(Math.max(n.x,a.x,i.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},cn.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var a=t.MercatorCoordinate.fromLngLat(this.center),i=Math.pow(2,r),o=new t.Point(i*a.x-.5,i*a.y-.5);return function(e,r,n,a){void 0===a&&(a=!0);var i=1<=0&&l<=i)for(c=r;co&&(a=o-v)}if(this.lngRange){var m=p.x,y=c.x/2;m-yl&&(n=l-y)}void 0===n&&void 0===a||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==a?a:p.y))),this._unmodified=u,this._constraining=!1}},cn.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),a=this.point,i=a.x,o=a.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,l,s),t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-i,-o,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c;var u=this.width%2/2,h=this.height%2/2,f=Math.cos(this.angle),p=Math.sin(this.angle),d=i-Math.round(i)+f*u+p*h,g=o-Math.round(o)+f*h+p*u,v=new Float64Array(c);if(t.translate(v,v,[d>.5?d-1:d,g>.5?g-1:g,0]),this.alignedProjMatrix=v,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},cn.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},cn.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},cn.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,a=r.y,i=r.x,o=r.y,s=0,l=e;s=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},hn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var fn=function(e){function n(n,a,i,o){void 0===o&&(o={});var s=r.mousePos(a.getCanvasContainer(),i),l=a.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:i},o)),this._defaultPrevented=!1,this.target=a}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(t.Event),pn=function(e){function n(n,a,i){var o=r.touchPos(a.getCanvasContainer(),i),s=o.map(function(t){return a.unproject(t)}),l=o.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new t.Point(0,0)),c=a.unproject(l);e.call(this,n,{points:o,point:l,lngLats:s,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(t.Event),dn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),gn=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};gn.prototype.setZoomRate=function(t){this._defaultZoomRate=t},gn.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},gn.prototype.isEnabled=function(){return!!this._enabled},gn.prototype.isActive=function(){return!!this._active},gn.prototype.isZooming=function(){return!!this._zooming},gn.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},gn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},gn.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),a=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":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},gn.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},gn.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var 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=this._map._requestRenderFrame(this._onScrollFrame))}},gn.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==a&&(a=1/a);var i="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(i*a))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&s&&l){var u=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=l(u);r.zoom=t.number(s,o,h),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else r.zoom=o,c=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},gn.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,a=(t.browser.now()-n.start)/n.duration,i=n.easing(a+.01)-n.easing(a),o=.27/Math.sqrt(i*i+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};var vn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};vn.prototype.isEnabled=function(){return!!this._enabled},vn.prototype.isActive=function(){return!!this._active},vn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},vn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},vn.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},vn.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)180&&(p=180);var d=p/180;c+=h*p*(d/2),Math.abs(r._normalizeBearing(c,0))0&&r-e[0][0]>160;)e.shift()};var xn=t.bezier(0,0,.3,1),bn=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};bn.prototype.isEnabled=function(){return"disabled"!==this._state},bn.prototype.isActive=function(){return"active"===this._state},bn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},bn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},bn.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},bn.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},bn.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._prevPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},bn.prototype._onMove=function(e){e.preventDefault();var n=r.mousePos(this._el,e);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:xn,noMoveStart:!0},{originalEvent:t})}}},bn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},bn.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var _n=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function wn(t){return t*(2-t)}_n.prototype.isEnabled=function(){return!!this._enabled},_n.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},_n.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},_n.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,a=0,i=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),i=-1);break;case 40:t.shiftKey?n=-1:(i=1,t.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:wn,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-a,100*-i],center:o.getCenter()};o.easeTo(l,{originalEvent:t})}};var kn=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};kn.prototype.isEnabled=function(){return!!this._enabled},kn.prototype.isActive=function(){return!!this._active},kn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},kn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kn.prototype.onTouchStart=function(t){var e=this;if(this.isEnabled()&&!(t.points.length>1))if(this._tapped){var r=t.points[0],n=this._tappedPoint;if(n&&n.dist(r)<=30){t.originalEvent.preventDefault();var a=function(){e._tapped&&e._zoom(t),e._map.off("touchcancel",i),e._resetTapped()},i=function(){e._map.off("touchend",a),e._resetTapped()};this._map.once("touchend",a),this._map.once("touchcancel",i)}else this._resetTapped()}else this._tappedPoint=t.points[0],this._tapped=setTimeout(function(){e._tapped=null,e._tappedPoint=null},300)},kn.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},kn.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},kn.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},kn.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Tn=t.bezier(0,0,.15,1),An=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};An.prototype.isEnabled=function(){return!!this._enabled},An.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},An.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},An.prototype.disableRotation=function(){this._rotationDisabled=!0},An.prototype.enableRotation=function(){this._rotationDisabled=!1},An.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var n=r.mousePos(this._el,e.touches[0]),a=r.mousePos(this._el,e.touches[1]),i=n.add(a).div(2);this._startVec=n.sub(a),this._startAround=this._map.transform.pointLocation(i),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},An.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),n=r.mousePos(this._el,t.touches[1]),a=e.sub(n);return{vec:a,center:e.add(n).div(2),scale:a.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI}},An.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),n=r.vec,a=r.scale,i=r.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==a||Math.abs(1-a)>.15;Math.abs(i)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=n)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},An.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),a=n.center,i=n.bearing,o=n.scale,s=r.pointLocation(a),l=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+i),r.zoom=r.scaleZoom(this._startScale*o),r.setLocationAtPoint(this._startAround,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),o,a])}},An.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var n=this._gestureIntent,a=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new t.Event(n+"end",{originalEvent:e})),this._drainInertiaBuffer();var i=this._inertia,o=this._map;if(i.length<2)o.snapToNorth({},{originalEvent:e});else{var s=i[i.length-1],l=i[0],c=o.transform.scaleZoom(a*s[1]),u=o.transform.scaleZoom(a*l[1]),h=c-u,f=(s[0]-l[0])/1e3,p=s[2];if(0!==f&&c!==u){var d=.15*h/f;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var g=1e3*Math.abs(d/(12*.15)),v=c+d*g/2e3;v<0&&(v=0),o.easeTo({zoom:v,duration:g,easing:Tn,around:this._aroundCenter?o.getCenter():o.unproject(p),noMoveStart:!0},{originalEvent:e})}else o.snapToNorth({},{originalEvent:e})}}},An.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Mn={scrollZoom:gn,boxZoom:vn,dragRotate:yn,dragPan:bn,keyboard:_n,doubleClickZoom:kn,touchZoomRotate:An},Sn=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.resetNorthPitch=function(e,r){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())e?1:0}),["bottom","left","right","top"])){var o=this.transform,s=o.project(t.LngLat.convert(e)),l=o.project(t.LngLat.convert(r)),c=s.rotate(-n*Math.PI/180),u=l.rotate(-n*Math.PI/180),h=new t.Point(Math.max(c.x,u.x),Math.max(c.y,u.y)),f=new t.Point(Math.min(c.x,u.x),Math.min(c.y,u.y)),p=h.sub(f),d=(o.width-a.padding.left-a.padding.right)/p.x,g=(o.height-a.padding.top-a.padding.bottom)/p.y;if(!(g<0||d<0)){var v=Math.min(o.scaleZoom(o.scale*Math.min(d,g)),a.maxZoom),m=t.Point.convert(a.offset),y=(a.padding.left-a.padding.right)/2,x=(a.padding.top-a.padding.bottom)/2,b=new t.Point(m.x+y,m.y+x).mult(o.scale/o.zoomScale(v));return{center:o.unproject(s.add(l).div(2).sub(b)),zoom:v,bearing:n}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,a,i){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,a),a,i)},r.prototype._fitInternal=function(e,r,n){return e?(r=t.extend(e,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,a=!1,i=!1,o=!1;return"zoom"in e&&n.zoom!==+e.zoom&&(a=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),"bearing"in e&&n.bearing!==+e.bearing&&(i=!0,n.bearing=+e.bearing),"pitch"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),a&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),i&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),o&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var n=this;this.stop(),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||t.browser.prefersReducedMotion)&&(e.duration=0);var a=this.transform,i=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:i,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:s,h=a.centerPoint.add(t.Point.convert(e.offset)),f=a.pointLocation(h),p=t.LngLat.convert(e.center||f);this._normalizeCenter(p);var d,g,v=a.project(f),m=a.project(p).sub(v),y=a.zoomScale(l-i);return e.around&&(d=t.LngLat.convert(e.around),g=a.locationPoint(d)),this._zooming=l!==i,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(n._zooming&&(a.zoom=t.number(i,l,e)),n._rotating&&(a.bearing=t.number(o,c,e)),n._pitching&&(a.pitch=t.number(s,u,e)),d)a.setLocationAtPoint(d,g);else{var f=a.zoomScale(a.zoom-i),p=l>i?Math.min(2,y):Math.max(.5,y),x=Math.pow(p,1-e),b=a.unproject(v.add(m.mult(e*x)).mult(f));a.setLocationAtPoint(a.renderWorldCopies?b.wrap():b,h)}n._fireMoveEvents(r)},function(){e.delayEndEvents?n._easeEndTimeoutID=setTimeout(function(){return n._afterEase(r)},e.delayEndEvents):n._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,n=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),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(t.browser.prefersReducedMotion){var a=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var i=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c="zoom"in e?t.clamp(+e.zoom,i.minZoom,i.maxZoom):o,u="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f=i.zoomScale(c-o),p=i.centerPoint.add(t.Point.convert(e.offset)),d=i.pointLocation(p),g=t.LngLat.convert(e.center||d);this._normalizeCenter(g);var v=i.project(d),m=i.project(g).sub(v),y=e.curve,x=Math.max(i.width,i.height),b=x/f,_=m.mag();if("minZoom"in e){var w=t.clamp(Math.min(e.minZoom,o,c),i.minZoom,i.maxZoom),k=x/i.zoomScale(w-o);y=Math.sqrt(k/_*2)}var T=y*y;function A(t){var e=(b*b-x*x+(t?-1:1)*T*T*_*_)/(2*(t?b:x)*T*_);return Math.log(Math.sqrt(e*e+1)-e)}function M(t){return(Math.exp(t)-Math.exp(-t))/2}function S(t){return(Math.exp(t)+Math.exp(-t))/2}var E=A(0),C=function(t){return S(E)/S(E+y*t)},L=function(t){return x*((S(E)*(M(e=E+y*t)/S(e))-M(E))/T)/_;var e},P=(A(1)-E)/y;if(Math.abs(_)<1e-6||!isFinite(P)){if(Math.abs(x-b)<1e-6)return this.easeTo(e,r);var O=be.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==u,this._pitching=h!==l,this._prepareEase(r,!1),this._ease(function(e){var a=e*P,f=1/C(a);i.zoom=1===e?c:o+i.scaleZoom(f),n._rotating&&(i.bearing=t.number(s,u,e)),n._pitching&&(i.pitch=t.number(l,h,e));var d=1===e?g:i.unproject(v.add(m.mult(L(a))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?d.wrap():d,p),n._fireMoveEvents(r)},function(){return n._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(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),En=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};En.prototype.getDefaultPosition=function(){return"bottom-right"},En.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},En.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},En.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)}},En.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Cn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Cn.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","Mapbox logo"),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},Cn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Cn.prototype.getDefaultPosition=function(){return"bottom-left"},Cn.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Cn.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}},Cn.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 Ln=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ln.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Ln.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 minZoom");var i=new cn(e.minZoom,e.maxZoom,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 Ln,this._controls=[],this._mapId=t.uniqueId(),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 On))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 a._update(!1)}),this.on("moveend",function(){return a._update(!1)}),this.on("zoom",function(){return a._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var n=t.getCanvasContainer(),a=null,i=!1,o=null;for(var s in Mn)t[s]=new Mn[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(n,"mouseout",function(e){t.fire(new fn("mouseout",t,e))}),r.addEventListener(n,"mousedown",function(a){i=!0,o=r.mousePos(n,a);var s=new fn("mousedown",t,a);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(a),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(a),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(a))}),r.addEventListener(n,"mouseup",function(e){var r=t.dragRotate.isActive();a&&!r&&t.fire(new fn("contextmenu",t,a)),a=null,i=!1,t.fire(new fn("mouseup",t,e))}),r.addEventListener(n,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new fn("mousemove",t,e))}}),r.addEventListener(n,"mouseover",function(e){for(var r=e.target;r&&r!==n;)r=r.parentNode;r===n&&t.fire(new fn("mouseover",t,e))}),r.addEventListener(n,"touchstart",function(r){var n=new pn("touchstart",t,r);t.fire(n),n.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(n))},{passive:!1}),r.addEventListener(n,"touchmove",function(e){t.fire(new pn("touchmove",t,e))},{passive:!1}),r.addEventListener(n,"touchend",function(e){t.fire(new pn("touchend",t,e))}),r.addEventListener(n,"touchcancel",function(e){t.fire(new pn("touchcancel",t,e))}),r.addEventListener(n,"click",function(a){var i=r.mousePos(n,a);(!o||i.equals(o)||i.dist(o)-1&&this._controls.splice(r,1),e.onRemove(this),this},a.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],a=r[1];return this._resizeCanvas(n,a),this.transform.resize(n,a),this.painter.resize(n,a),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},a.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&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")},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},a.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},a.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},a.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},a.prototype.on=function(t,e,r){var a=this;if(void 0===r)return n.prototype.on.call(this,t,e);var i=function(){var n;if("mouseenter"===t||"mouseover"===t){var i=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=a.getLayer(e)?a.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?i||(i=!0,r.call(a,new fn(t,a,n.originalEvent,{features:o}))):i=!1},mouseout:function(){i=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(a.getLayer(e)?a.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(a,new fn(t,a,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(a,new fn(t,a,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=a.getLayer(e)?a.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(a,t),delete t.features)},n)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(o,i.delegates[o]);return this},a.prototype.off=function(t,e,r){if(void 0===r)return n.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var a=this._delegatedListeners[t],i=0;i180;){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}Fn.prototype._updateZoomButtons=function(){var t=this._map.getZoom();t===this._map.getMaxZoom()?this._zoomInButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomInButton.classList.remove("mapboxgl-ctrl-icon-disabled"),t===this._map.getMinZoom()?this._zoomOutButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomOutButton.classList.remove("mapboxgl-ctrl-icon-disabled")},Fn.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Fn.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new yn(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.addEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.enable()),this._container},Fn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.removeEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.disable(),delete this._handler),delete this._map},Fn.prototype._createButton=function(t,e,n){var a=r.create("button",t,this._container);return a.type="button",a.title=e,a.setAttribute("aria-label",e),a.addEventListener("click",n),a};var Nn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function jn(t,e,r){var n=t.classList;for(var a in Nn)n.remove("mapboxgl-"+r+"-anchor-"+a);n.add("mapboxgl-"+r+"-anchor-"+e)}var Vn,Un=function(e){function n(n,a){if(e.call(this),(n instanceof t.window.HTMLElement||a)&&(n=t.extend({element:n},a)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var i=r.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var c=0,u=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c5280?Xn(e,c,f/5280,"mi"):Xn(e,c,f,"ft")}else r&&"nautical"===r.unit?Xn(e,c,h/1852,"nm"):Xn(e,c,h,"m")}function Xn(t,e,r,n){var a,i,o,s=(a=r,(i=Math.pow(10,(""+Math.floor(a)).length-1))*(o=(o=a/i)>=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))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),t.style.width=e*l+"px",t.innerHTML=s+n}Yn.prototype.getDefaultPosition=function(){return"bottom-left"},Yn.prototype._onMove=function(){Wn(this._map,this._container,this.options)},Yn.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},Yn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Yn.prototype.setUnit=function(t){this.options.unit=t,Wn(this._map,this._container,this.options)};var Zn=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"),this._className="mapboxgl-ctrl"};Zn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Zn.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zn.prototype._updateTitle=function(){var t=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Zn.prototype._isFullscreen=function(){return this._fullscreen},Zn.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(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Zn.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 Jn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Kn=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Jn),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){var r=this;return this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",function(t){r._update(t.point)}),this._map.on("mouseup",function(t){r._update(t.point)}),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("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),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._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){var t=this;return this._trackPointer=!0,this._pos=null,this._map&&(this._map.off("move",this._update),this._map.on("mousemove",function(e){t._update(e.point)}),this._map.on("drag",function(e){t._update(e.point)}),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(),a=t.window.document.createElement("body");for(a.innerHTML=e;r=a.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return 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._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._onClickClose))},n.prototype._update=function(e){var n=this,a=this._lngLat||this._trackPointer;if(this._map&&a&&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.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Bn(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=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 a=t.Point.convert(r);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}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=i.y+s.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-c/2&&l.push("right"),o=0===l.length?"bottom":l.join("-")}var h=i.add(s[o]).round();r.setTransform(this._container,Nn[o]+" translate("+h.x+"px,"+h.y+"px)"),jn(this._container,o,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(t.Evented),Qn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:zn,NavigationControl:Fn,GeolocateControl:Hn,AttributionControl:En,ScaleControl:Yn,FullscreenControl:Zn,Popup:Kn,Marker:Un,Style:Re,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,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 zt.workerCount},set workerCount(t){zt.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 Qn}),r},"object"==typeof r&&"undefined"!=typeof e?e.exports=a():(n=n||self).mapboxgl=a()},{}],428:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1<p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{"./normalize":430,"gl-mat4/clone":260,"gl-mat4/create":261,"gl-mat4/determinant":262,"gl-mat4/invert":266,"gl-mat4/transpose":277,"gl-vec3/cross":335,"gl-vec3/dot":340,"gl-vec3/length":350,"gl-vec3/normalize":357}],430:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,a=0;a<16;a++)t[a]=e[a]*n;return!0}},{}],431:[function(t,e,r){var n=t("gl-vec3/lerp"),a=t("mat4-recompose"),i=t("mat4-decompose"),o=t("gl-mat4/determinant"),s=t("quat-slerp"),l=h(),c=h(),u=h();function h(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,h){if(0===o(e)||0===o(r))return!1;var f=i(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=i(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!p||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),a(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{"gl-mat4/determinant":262,"gl-vec3/lerp":351,"mat4-decompose":429,"mat4-recompose":432,"quat-slerp":484}],432:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},a=(n.create(),n.create());e.exports=function(t,e,r,i,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(a),0!==i[2]&&(a[9]=i[2],n.multiply(t,t,a)),0!==i[1]&&(a[9]=0,a[8]=i[1],n.multiply(t,t,a)),0!==i[0]&&(a[8]=0,a[4]=i[0],n.multiply(t,t,a)),n.scale(t,t,r),t}},{"gl-mat4/create":261,"gl-mat4/fromRotationTranslation":264,"gl-mat4/identity":265,"gl-mat4/multiply":268,"gl-mat4/scale":275,"gl-mat4/translate":276}],433:[function(t,e,r){"use strict";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],434:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),a=t("mat4-interpolate"),i=t("gl-mat4/invert"),o=t("gl-mat4/rotateX"),s=t("gl-mat4/rotateY"),l=t("gl-mat4/rotateZ"),c=t("gl-mat4/lookAt"),u=t("gl-mat4/translate"),h=(t("gl-mat4/scale"),t("gl-vec3/normalize")),f=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],f=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)f[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&f[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=f[c];else a(o,f,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],h(g,g);var v=this.computedInverse;i(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=m[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=new Array(s.length+o.length-2),h=0,a=0,f=o.length;a0;--p)r[h++]=s[p];return r};var n=t("robust-orientation")[3]},{"robust-orientation":511}],436:[function(t,e,r){"use strict";e.exports=function(t,e){e||(e=t,t=window);var r=0,a=0,i=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!==a||u!==i||l(s))&&(r=0|t,a=c||0,i=u||0,e&&e(r,a,i,o))}function u(t){c(0,t)}function h(){(r||a||i||o.shift||o.alt||o.meta||o.control)&&(a=i=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function f(t){l(t)&&e&&e(r,a,i,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",g),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",h),t.addEventListener("keyup",f),t.addEventListener("keydown",f),t.addEventListener("keypress",f),t!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",g),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",h),t.removeEventListener("keyup",f),t.removeEventListener("keydown",f),t.removeEventListener("keypress",f),t!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return i},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t("mouse-event")},{"mouse-event":438}],437:[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 a=t.clientX||0,i=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=a-o.left,r[1]=i-o.top,r}},{}],438:[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< 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var E=t.getters||[],C=new Array(M),L=0;L=0?C[L]=!0:C[L]=!1;return function(t,e,r,M,S,E){var C=E.length,L=S.length;if(L<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var P="extractContour"+S.join("_"),O=[],I=[],z=[],D=0;D0&&N.push(l(D,S[R-1])+"*"+s(S[R-1])),I.push(d(D,S[R])+"=("+N.join("-")+")|0")}for(var D=0;D=0;--D)j.push(s(S[D]));I.push(w+"=("+j.join("*")+")|0",b+"=mallocUint32("+w+")",x+"=mallocUint32("+w+")",k+"=0"),I.push(g(0)+"=0");for(var R=1;R<1<0;T=T-1&d)w.push(x+"["+k+"+"+m(T)+"]");w.push(y(0));for(var T=0;T=0;--e)G(e,0);for(var r=[],e=0;e0){",p(S[e]),"=1;");t(e-1,r|1<=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),i.push("1"),o.push("s["+l+"]-2"));var c=".lo("+i.join()+").hi("+o.join()+")";if(0===i.length&&(c=""),a>0){n.push("if(1");for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");n.push("){grad",a,"(src.pick(",s.join(),")",c);for(var l=0;l=0||e.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",c);n.push(");")}for(var l=0;l1){dst.set(",s.join(),",",u,",0.5*(src.get(",f.join(),")-src.get(",p.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>1){diff(",h,",src.pick(",f.join(),")",c,",src.pick(",p.join(),")",c,");}else{zero(",h,");};");break;case"mirror":0===a?n.push("dst.set(",s.join(),",",u,",0);"):n.push("zero(",h,");");break;case"wrap":var d=s.slice(),g=s.slice();e[l]<0?(d[u]="s["+u+"]-2",g[u]="0"):(d[u]="s["+u+"]-1",g[u]="1"),0===a?n.push("if(s[",u,"]>2){dst.set(",s.join(),",",u,",0.5*(src.get(",d.join(),")-src.get(",g.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>2){diff(",h,",src.pick(",d.join(),")",c,",src.pick(",g.join(),")",c,");}else{zero(",h,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}a>0&&n.push("};")}for(var s=0;s<1<>",rrshift:">>>"};!function(){for(var t in s){var e=s[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in l){var e=l[t];r[t]=o({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:a,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":147}],446:[function(t,e,r){"use strict";var n=t("ndarray"),a=t("./doConvert.js");e.exports=function(t,e){for(var r=[],i=t,o=1;Array.isArray(i);)r.push(i.length),o*=i.length,i=i[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),a(e,t),e)}},{"./doConvert.js":447,ndarray:451}],447:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":147}],448:[function(t,e,r){"use strict";var n=t("typedarray-pool"),a=32;function i(t){switch(t){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r0?s.push(["d",d,"=s",d,"-d",h,"*n",h].join("")):s.push(["d",d,"=s",d].join("")),h=d),0!=(p=t.length-1-l)&&(f>0?s.push(["e",p,"=s",p,"-e",f,"*n",f,",f",p,"=",c[p],"-f",f,"*n",f].join("")):s.push(["e",p,"=s",p,",f",p,"=",c[p]].join("")),f=p)}r.push("var "+s.join(","));var g=["0","n0-1","data","offset"].concat(o(t.length));r.push(["if(n0<=",a,"){","insertionSort(",g.join(","),")}else{","quickSort(",g.join(","),")}"].join("")),r.push("}return "+n);var v=new Function("insertionSort","quickSort",r.join("\n")),m=function(t,e){var r=["'use strict'"],n=["ndarrayInsertionSort",t.join("d"),e].join(""),a=["left","right","data","offset"].concat(o(t.length)),s=i(e),l=["i,j,cptr,ptr=left*s0+offset"];if(t.length>1){for(var c=[],u=1;u1){for(r.push("dptr=0;sptr=ptr"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"b){break __l}"].join("")),u=t.length-1;u>=1;--u)r.push("sptr+=e"+u,"dptr+=f"+u,"}");for(r.push("dptr=cptr;sptr=cptr-s0"),u=t.length-1;u>=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"=0;--u)0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"scratch)){",f("cptr",h("cptr-s0")),"cptr-=s0","}",f("cptr","scratch"));return r.push("}"),t.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(t,e),y=function(t,e,r){var n=["'use strict'"],s=["ndarrayQuickSort",t.join("d"),e].join(""),l=["left","right","data","offset"].concat(o(t.length)),c=i(e),u=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var h=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var f=[],p=1;p=0;--i)0!==(o=t[i])&&n.push(["for(i",o,"=0;i",o,"1)for(i=0;i1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function y(e,r,a,i){if(1===r.length)n.push("ptr0="+d(r[0]));else{for(var o=0;o1)for(o=0;o=1;--o)a&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function x(){t.length>1&&c&&n.push("free(pivot1)","free(pivot2)")}function b(e,r){var a="el"+e,i="el"+r;if(t.length>1){var o="__l"+ ++u;y(o,[a,i],!1,["comp=",g("ptr0"),"-",g("ptr1"),"\n","if(comp>0){tmp0=",a,";",a,"=",i,";",i,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",g(d(a)),">",g(d(i)),"){tmp0=",a,";",a,"=",i,";",i,"=tmp0}"].join(""))}function _(e,r){t.length>1?m([e,r],!1,v("ptr0",g("ptr1"))):n.push(v(d(e),g(d(r))))}function w(e,r,a){if(t.length>1){var i="__l"+ ++u;y(i,[r],!0,[e,"=",g("ptr0"),"-pivot",a,"[pivot_ptr]\n","if(",e,"!==0){break ",i,"}"].join(""))}else n.push([e,"=",g(d(r)),"-pivot",a].join(""))}function k(e,r){t.length>1?m([e,r],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join("")):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1","tmp")].join(""))}function T(e,r,a){t.length>1?(m([e,r,a],!1,["tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join("")),n.push("++"+r,"--"+a)):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","ptr2=",d(a),"\n","++",r,"\n","--",a,"\n","tmp=",g("ptr0"),"\n",v("ptr0",g("ptr1")),"\n",v("ptr1",g("ptr2")),"\n",v("ptr2","tmp")].join(""))}function A(t,e){k(t,e),n.push("--"+e)}function M(e,r,a){t.length>1?m([e,r],!0,[v("ptr0",g("ptr1")),"\n",v("ptr1",["pivot",a,"[pivot_ptr]"].join(""))].join("")):n.push(v(d(e),g(d(r))),v(d(r),"pivot"+a))}function S(e,r){n.push(["if((",r,"-",e,")<=",a,"){\n","insertionSort(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}else{\n",s,"(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}"].join(""))}function E(e,r,a){t.length>1?(n.push(["__l",++u,":while(true){"].join("")),m([e],!0,["if(",g("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",u,"}"].join("")),n.push(a,"}")):n.push(["while(",g(d(e)),"===pivot",r,"){",a,"}"].join(""))}return n.push("var "+h.join(",")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?m(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",g("ptr1"),"\n","pivot2[pivot_ptr]=",g("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",g("ptr0"),"\n","y=",g("ptr2"),"\n","z=",g("ptr4"),"\n",v("ptr5","x"),"\n",v("ptr6","y"),"\n",v("ptr7","z")].join("")):n.push(["pivot1=",g(d("el2")),"\n","pivot2=",g(d("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",g(d("el1")),"\n","y=",g(d("el3")),"\n","z=",g(d("el5")),"\n",v(d("index1"),"x"),"\n",v(d("index3"),"y"),"\n",v(d("index5"),"z")].join("")),_("index2","left"),_("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),T("k","less","great"),n.push("break"),n.push("}else{"),A("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--greatindex5){"),E("less",1,"++less"),E("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great1&&c?new Function("insertionSort","malloc","free",n.join("\n"))(r,c[0],c[1]):new Function("insertionSort",n.join("\n"))(r)}(t,e,m);return v(m,y)}},{"typedarray-pool":546}],449:[function(t,e,r){"use strict";var n=t("./lib/compile_sort.js"),a={};e.exports=function(t){var e=t.order,r=t.dtype,i=[e,r].join(":"),o=a[i];return o||(a[i]=o=n(e,r)),o(t),t}},{"./lib/compile_sort.js":448}],450:[function(t,e,r){"use strict";var n=t("ndarray-linear-interpolate"),a=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_3_arg4_)}",args:[{name:"_inline_3_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_4_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_4_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),i=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=t("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});e.exports=function(t,e,r){switch(e.shape.length){case 1:i(t,r,n.d1,e);break;case 2:o(t,r,n.d2,e);break;case 3:s(t,r,n.d3,e);break;default:a(t,r,n.bind(void 0,e),e.shape.length)}return t}},{"cwise/lib/wrapper":150,"ndarray-linear-interpolate":444}],451:[function(t,e,r){var n=t("iota-array"),a=t("is-buffer"),i="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),a?i.push("return this.data.set("+u+",v)}"):i.push("return this.data["+u+"]=v}"),i.push("proto.get=function "+r+"_get("+l.join(",")+"){"),a?i.push("return this.data.get("+u+")}"):i.push("return this.data["+u+"]}"),i.push("proto.index=function "+r+"_index(",l.join(),"){return "+u+"}"),i.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+o.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=o.map(function(t){return"a"+t+"=this.shape["+t+"]"}),d=o.map(function(t){return"c"+t+"=this.stride["+t+"]"});i.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");i.push("return new "+r+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"c"+t}).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+o.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");return i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map(function(t){return"shape["+t+"]"}).join(",")+","+o.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",i.join("\n"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n)for(n=0,s=0;s>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-a:a;var r=n.hi(t),o=n.lo(t);e>t==t>0?o===i?(r+=1,o=0):o+=1:0===o?(o=i,r-=1):o-=1;return n.pack(o,r)}},{"double-bits":168}],453:[function(t,e,r){var n=Math.PI,a=c(120);function i(t,e,r,n){return["C",t,e,r,n,r,n]}function o(t,e,r,n,a,i){return["C",t/3+2/3*r,e/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}function s(t,e,r,i,o,c,u,h,f,p){if(p)k=p[0],T=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(h=(d=l(h,f,-o)).x))/2,v=(e-(f=d.y))/2,m=g*g/(r*r)+v*v/(i*i);m>1&&(r*=m=Math.sqrt(m),i*=m);var y=r*r,x=i*i,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/i+(t+h)/2,w=b*-i*g/r+(e+f)/2,k=Math.asin(((e-w)/i).toFixed(9)),T=Math.asin(((f-w)/i).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(T=h<_?n-T:T)<0&&(T=2*n+T),u&&k>T&&(k-=2*n),!u&&T>k&&(T-=2*n)}if(Math.abs(T-k)>a){var A=T,M=h,S=f;T=k+a*(u&&T>k?1:-1);var E=s(h=_+r*Math.cos(T),f=w+i*Math.sin(T),r,i,o,0,u,M,S,[T,A,_,w])}var C=Math.tan((T-k)/4),L=4/3*r*C,P=4/3*i*C,O=[2*t-(t+L*Math.sin(k)),2*e-(e-P*Math.cos(k)),h+L*Math.sin(T),f-P*Math.cos(T),h,f];if(p)return O;E&&(O=O.concat(E));for(var I=0;I7&&(r.push(m.splice(0,7)),m.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-n,b+=b-a),m=["C",x,b,m[1],m[2],m[3],m[4]];break;case"T":"Q"==e||"T"==e?(h=2*p-h,f=2*d-f):(h=p,f=d),m=o(p,d,h,f,m[1],m[2]);break;case"Q":h=m[1],f=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case"L":m=i(p,d,m[1],m[2]);break;case"H":m=i(p,d,m[1],d);break;case"V":m=i(p,d,p,m[1]);break;case"Z":m=i(p,d,l,u)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],a=m[m.length-3]):(n=p,a=d),r.push(m)}return r}},{}],454:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;oi){var b=a[c],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;oi)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return a},r.faceNormals=function(t,e,r){for(var n=t.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;oi?1/Math.sqrt(p):0;for(c=0;c<3;++c)f[c]*=p;a[o]=f}return a}},{}],455:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l0){var h=Math.sqrt(u+1);t[0]=.5*(o-l)/h,t[1]=.5*(s-n)/h,t[2]=.5*(r-i)/h,t[3]=.5*h}else{var f=Math.max(e,i,c),h=Math.sqrt(2*f-u+1);e>=f?(t[0]=.5*h,t[1]=.5*(a+r)/h,t[2]=.5*(s+n)/h,t[3]=.5*(o-l)/h):i>=f?(t[0]=.5*(r+a)/h,t[1]=.5*h,t[2]=.5*(l+o)/h,t[3]=.5*(s-n)/h):(t[0]=.5*(n+s)/h,t[1]=.5*(o+l)/h,t[2]=.5*h,t[3]=.5*(r-a)/h)}return t}},{}],457:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var a=new h(r,e,Math.log(n));a.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&a.lookAt(0,t.eye,t.center,t.up);return a};var n=t("filtered-vector"),a=t("gl-mat4/lookAt"),i=t("gl-mat4/fromQuat"),o=t("gl-mat4/invert"),s=t("./lib/quatFromFrame");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],a=e[2],i=e[3],o=c(r,n,a,i);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=a/o,t[3]=i/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function h(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=h.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;i(r,e);var n=this.computedCenter,a=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);a[0]=n[0]+s*r[2],a[1]=n[1]+s*r[6],a[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*a[h];r[12+l]=-c}},f.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},f.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},f.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},f.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var a=this.computedMatrix,i=a[1],o=a[5],s=a[9],c=l(i,o,s);i/=c,o/=c,s/=c;var u=a[0],h=a[4],f=a[8],p=u*i+h*o+f*s,d=l(u-=i*p,h-=o*p,f-=s*p);u/=d,h/=d,f/=d;var g=a[2],v=a[6],m=a[10],y=g*i+v*o+m*s,x=g*u+v*h+m*f,b=l(g-=y*i+x*u,v-=y*o+x*h,m-=y*s+x*f);g/=b,v/=b,m/=b;var _=u*e+i*r,w=h*e+o*r,k=f*e+s*r;this.center.move(t,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(t,Math.log(T))},f.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var a=this.computedMatrix,i=a[0],o=a[4],s=a[8],u=a[1],h=a[5],f=a[9],p=a[2],d=a[6],g=a[10],v=e*i+r*u,m=e*o+r*h,y=e*s+r*f,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=c(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var T=this.computedRotation,A=T[0],M=T[1],S=T[2],E=T[3],C=A*w+E*x+M*_-S*b,L=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){x=p,b=d,_=g;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(e))-(C=C*w+O*x+L*_-P*b)*x-(L=L*w+O*b+P*x-C*_)*b-(P=P*w+O*_+C*b-L*x)*_}var z=c(C,L,P,O);z>1e-6?(C/=z,L/=z,P/=z,O/=z):(C=L=P=0,O=1),this.rotation.set(t,C,L,P,O)},f.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;a(i,e,r,n);var o=this.computedRotation;s(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},f.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},f.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var a=n[15];if(Math.abs(a)>1e-6){var i=n[12]/a,l=n[13]/a,c=n[14]/a;this.recalcMatrix(t);var h=Math.exp(this.computedRadius[0]);this.center.set(t,i-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},f.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},f.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},f.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var a=t.distance;a&&a>0&&this.radius.set(e,Math.log(a)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":456,"filtered-vector":227,"gl-mat4/fromQuat":263,"gl-mat4/invert":266,"gl-mat4/lookAt":267}],458:[function(t,e,r){"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return n(r="undefined"!=typeof r?r+"":" ",e)+t}},{"repeat-string":504}],459:[function(t,e,r){"use strict";function n(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],a=e.escape||"___",i=!!e.flat;n.forEach(function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function i(e,i,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),a+s+a}r.forEach(function(t,n){for(var a,o=0;t!=a;)if(a=t,t=t.replace(e,i),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(new RegExp("(\\"+a+r+"\\"+a+")","g"),t[0]+"$1"+t[1])}),e})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);return i?r:function t(e,r,n){for(var a,i=[],s=0;a=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");i.push(e.slice(0,a.index)),i.push(t(r[a[1]],r)),e=e.slice(a.index+a[0].length)}return i.push(e),i}(r[0],r)}function a(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",a=t[0];if(!a)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;a!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=a,a=a.replace(i,s)}return a}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r},"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function i(t,e){return Array.isArray(t)?a(t,e):n(t,e)}i.parse=n,i.stringify=a,e.exports=i},{}],460:[function(t,e,r){"use strict";var n=t("pick-by-alias");e.exports=function(t){var e;arguments.length>1&&(t=arguments);"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]);t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{"pick-by-alias":466}],461:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(a,function(t,r,a){var o=r.toLowerCase();for(a=function(t){var e=t.match(i);return e?e.map(Number):[]}(a),"m"==o&&a.length>2&&(e.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==n[o])return a.unshift(r),e.push(a);if(a.length0;--o)i=l[o],r=s[o],s[o]=s[i],s[i]=r,l[o]=l[r],l[r]=i,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,a,i,o=1;for((r=r||new Array(t))[0]=0,i=1;i0;--i)e=e-(n=e/o|0)*o|0,o=o/i|0,a=0|r[i],r[i]=0|r[n],r[n]=0|a;return r}},{"invert-permutation":416,"typedarray-pool":546}],466:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n,i,o={};if("string"==typeof e&&(e=a(e)),Array.isArray(e)){var s={};for(i=0;i0){o=i[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var f=i[h][r],p=0;p0&&(o=d,s=g,l=h)}return a?s:(o&&c(o,l),s)}function h(t,r){var a=i[r][t][0],o=[t];c(a,r);for(var s=a[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(i[0][t].length+i[1][t].length===0)break;var l=o[o.length-1],h=t,f=o[1],p=u(l,h,!0);if(n(e[l],e[h],e[f],e[p])<0)break;o.push(t),s=u(l,h)}return o}function f(t,e){return e[1]===e[e.length-1]}for(var o=0;o0;){i[0][o].length;var g=h(o,p);f(d,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t("compare-angle")},{"compare-angle":128}],468:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=n(t,e.length),a=new Array(e.length),i=new Array(e.length),o=[],s=0;s0;){var c=o.pop();a[c]=!1;for(var u=r[c],s=0;s0})).length,v=new Array(g),m=new Array(g),p=0;p0;){var N=F.pop(),j=C[N];l(j,function(t,e){return t-e});var V,U=j.length,q=B[N];if(0===q){var k=d[N];V=[k]}for(var p=0;p=0)&&(B[H]=1^q,F.push(H),0===q)){var k=d[H];R(k)||(k.reverse(),V.push(k))}}0===q&&r.push(V)}return r};var n=t("edges-to-adjacency-list"),a=t("planar-dual"),i=t("point-in-big-polygon"),o=t("two-product"),s=t("robust-sum"),l=t("uniq"),c=t("./lib/trim-leaves");function u(t,e){for(var r=new Array(t),n=0;n>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(h(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;mr){for(var f=0;fl||A>c||M=C||o===s)){var u=y[i];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=w&&P.push(f)}var b=x[i],_=b[4*o+0],k=b[4*o+1],E=b[4*o+2],L=b[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(b,o+1),I=.5*a,z=i+1;e(r,n,I,z,_,k||E||L||O),e(r,n+I,I,z,k,E||L||O),e(r+I,n,I,z,E,L||O),e(r+I,n+I,I,z,L,O)}}}(0,0,1,0,0,1),P},d;function E(t,e,r){for(var n=1,a=.5,i=.5,o=.5,s=0;s0&&e[a]===r[0]))return 1;i=t[a-1]}for(var s=1;i;){var l=i.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,i=i.right}else if(c>0)i=i.left;else{if(!(c<0))return 0;s=1,i=i.right}}return s}}(m.slabs,m.coordinates);return 0===i.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(i),y)};var n=t("robust-orientation")[3],a=t("slab-decomposition"),i=t("interval-tree-1d"),o=t("binary-search-bounds");function s(){return!0}function l(t){for(var e={},r=0;r=-t},pointBetween:function(e,r,n){var a=e[1]-r[1],i=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*i+a*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-a>t&&(i-c)*(a-u)/(o-u)+c-n>t&&(s=!s),i=c,o=u}return s}};return e}},{}],477:[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]),a=1;a0})}function u(t,n){var a=t.seg,i=n.seg,o=a.start,s=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var h=e.linesIntersect(o,s,c,u);if(!1===h){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var f=e.pointsSame(o,c),p=e.pointsSame(s,u);if(f&&p)return n;var d=!f&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(f)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===h.alongA&&(-1===h.alongB?l(t,c):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,u)),0===h.alongB&&(-1===h.alongA?l(n,o):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!i.isEmpty();){var f=i.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var p=c(f),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=u(f,d);if(t)return t}return!!g&&u(f,g)}r&&r.tempStatus(f.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x)t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,r&&r.segmentUpdate(x.seg),f.other.remove(),f.remove();if(i.getHead()!==f){r&&r.rewind(f.seg);continue}t?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:a,f.seg.myFill.above=y?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(m=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:m,below:m}),r&&r.status(f.seg,!!d&&d.seg,!!g&&g.seg),f.other.status=p.insert(n.node({ev:f}))}else{var b=f.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(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}h.push(f.seg)}i.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,a,i,o=t[t.length-1],l=0;l=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d):(T=0,p>=0?(A=0,y=d):-p>=h?(A=1,y=h+2*p+d):y=p*(A=-p/h)+d);else if(A<0)A=0,f>=0?(T=0,y=d):-f>=c?(T=1,y=c+2*f+d):y=f*(T=-f/c)+d;else{var M=1/k;y=(T*=M)*(c*T+u*(A*=M)+2*f)+A*(u*T+h*A+2*p)+d}else T<0?(b=h+p)>(x=u+f)?(_=b-x)>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d:(T=0,b<=0?(A=1,y=h+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/h)+d):A<0?(b=c+f)>(x=u+p)?(_=b-x)>=(w=c-2*u+h)?(A=1,T=0,y=h+2*p+d):y=(T=1-(A=_/w))*(c*T+u*A+2*f)+A*(u*T+h*A+2*p)+d:(A=0,b<=0?(T=1,y=c+2*f+d):f>=0?(T=0,y=d):y=f*(T=-f/c)+d):(_=h+p-u-f)<=0?(T=0,A=1,y=h+2*p+d):_>=(w=c-2*u+h)?(T=1,A=0,y=c+2*f+d):y=(T=_/w)*(c*T+u*(A=1-T)+2*f)+A*(u*T+h*A+2*p)+d;var S=1-T-A;for(l=0;l1)for(var r=1;r0){var c=t[r-1];if(0===n(s,c)&&i(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{"cell-orientation":113,"compare-cell":129,"compare-oriented-cell":130}],491:[function(t,e,r){"use strict";var n=t("array-bounds"),a=t("color-normalize"),i=t("update-diff"),o=t("pick-by-alias"),s=t("object-assign"),l=t("flatten-vertex-data"),c=t("to-float32"),u=c.float32,h=c.fract32;e.exports=function(t,e){"function"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,p,d,g,v,m=t._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=t.buffer({usage:"static",type:"float",data:f}),k(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:f.length}),s(b,{update:k,draw:_,destroy:T,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&T(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)})}function w(t){"number"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,c){var u=x[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),i(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 i=0;i 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=a}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:a,miter:e}},v.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold?t.shaders.rect(e):"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach(function(t,h){var d=e.passes[h];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),d||(e.passes[h]=d={id:h,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=i({},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,h80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);g=0!==(g=Math.max(l-n,c-s))?1/g:0}return o(y,x,r,n,s,g),x}function a(t,e,r,n,a){var i,o;if(a===A(t,e,r,n)>0)for(i=e;i=e;i-=n)o=w(i,t[i],t[i+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,a,h,f){if(t){!f&&h&&function(t,e,r,n){var a=t;do{null===a.z&&(a.z=p(a.x,a.y,e,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==t);a.prevZ.nextZ=null,a.prevZ=null,function(t){var e,r,n,a,i,o,s,l,c=1;do{for(r=t,t=null,i=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)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:t=a,a.prevZ=i,i=a;r=n}i.nextZ=null,c*=2}while(o>1)}(a)}(t,n,a,h);for(var d,g,v=t;t.prev!==t.next;)if(d=t.prev,g=t.next,h?l(t,n,a,h):s(t))e.push(d.i/r),e.push(t.i/r),e.push(g.i/r),k(t),t=g.next,v=g.next;else if((t=g)===v){f?1===f?o(t=c(t,e,r),e,r,n,a,h,2):2===f&&u(t,e,r,n,a,h):o(i(t),e,r,n,a,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(m(e,r,n)>=0)return!1;for(var a=t.next.next;a!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,a.x,a.y)&&m(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function l(t,e,r,n){var a=t.prev,i=t,o=t.next;if(m(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,u=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,h=p(s,l,e,r,n),f=p(c,u,e,r,n),d=t.prevZ,v=t.nextZ;d&&d.z>=h&&v&&v.z<=f;){if(d!==t.prev&&d!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,d.x,d.y)&&m(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function c(t,e,r){var n=t;do{var a=n.prev,i=n.next.next;!y(a,i)&&x(a,n,n.next,i)&&b(a,i)&&b(i,a)&&(e.push(a.i/r),e.push(n.i/r),e.push(i.i/r),k(n),k(n.next),n=t=i),n=n.next}while(n!==t);return n}function u(t,e,r,n,a,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=_(l,c);return l=i(l,l.next),u=i(u,u.next),o(l,e,r,n,a,s),void o(u,e,r,n,a,s)}c=c.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var r,n=e,a=t.x,i=t.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&a!==n.x&&g(ir.x)&&b(n,t)&&(r=n,f=l),n=n.next;return r}(t,e)){var r=_(e,t);i(r,r.next)}}function p(t,e,r,n,a){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*a)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var r=t,n=!1,a=(t.x+e.x)/2,i=(t.y+e.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||m(t,e,r)>0!=m(t,e,n)>0&&m(r,n,t)>0!=m(r,n,e)>0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function _(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),a=t.next,i=e.prev;return t.next=e,e.prev=t,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function w(t,e,r,n){var a=new T(t,e,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,n){for(var a=0,i=e,o=r-n;i0&&(n+=t[a-1].length,r.holes.push(n))}return r}},{}],494:[function(t,e,r){arguments[4][319][0].apply(r,arguments)},{"./is-implemented":495,"./polyfill":497,dup:319}],495:[function(t,e,r){arguments[4][320][0].apply(r,arguments)},{dup:320}],496:[function(t,e,r){arguments[4][321][0].apply(r,arguments)},{dup:321}],497:[function(t,e,r){arguments[4][322][0].apply(r,arguments)},{"./is-native-implemented":496,d:152,dup:322,"es5-ext/object/is-value":195,"es5-ext/object/set-prototype-of":201,"es5-ext/object/valid-object":205,"es5-ext/object/valid-value":206,"es5-ext/string/random-uniq":211,"es6-iterator/for-of":213,"es6-iterator/get":214,"es6-symbol":220}],498:[function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){a=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e 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=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(palette,\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) * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),d&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.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},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=l(t,{bounds:h}):n&&n.length&&(e.tree=n),e.tree){var f={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(f):e.elements=s.elements(f)}return a({data:g.float(t),usage:"dynamic"}),i({data:g.fract(t),usage:"dynamic"}),c({data:new Uint8Array(u),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var a=r.activation;if(a.forEach(function(t){return t&&t.destroy&&t.destroy()}),a.length=0,e&&"number"!=typeof e[0]){for(var i=[],o=0,l=Math.min(e.length,r.count);o=0)return i;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===a.length?a[0]:a},y.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 a=.25*(t=t.slice()).length%e;a>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?g=new(h(e.dtype))(m):e.dtype&&(g=e.dtype,Array.isArray(g)&&(g.length=m));for(var y=0;yr||s>p){for(var f=0;fl||A>c||M=E||o===s)){var u=x[i];void 0===s&&(s=u.length);for(var h=o;h=g&&p<=m&&d>=v&&d<=y&&P.push(f)}var _=b[i],w=_[4*o+0],k=_[4*o+1],C=_[4*o+2],L=_[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(_,o+1),I=.5*a,z=i+1;e(r,n,I,z,w,k||C||L||O),e(r,n+I,I,z,k,C||L||O),e(r+I,n,I,z,C,L||O),e(r+I,n+I,I,z,L,O)}}}(0,0,1,0,0,1),P},g;function C(t,e,r){for(var n=1,a=.5,i=.5,o=.5,s=0;s2?(s[0],s[2],n=s[1],a=s[3]):s.length?(n=s[0],a=s[1]):(s.x,n=s.y,s.x+s.width,a=s.y+s.height),l.length>2?(i=l[0],o=l[2],l[1],l[3]):l.length?(i=l[0],o=l[1]):(i=l.x,l.y,o=l.x+l.width,l.y+l.height),[i,n,o,a]}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;nT))&&(s.lower||!(k>>=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=i(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,a,i){for(var o=0;o(a=s)&&(a=n.buffer.byteLength,5123===h?a>>=1:5125===h&&(a>>=2)),n.vertCount=a,a=o,0>o&&(a=4,1===(o=n.buffer.dimension)&&(a=0),2===o&&(a=1),3===o&&(a=4)),n.primType=a}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),a.prototype.bind=function(){this.buffer.bind()};var h=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),h.primType=4,h.vertCount=0|t,h.type=5121;else{var e=null,r=35044,n=-1,a=-1,o=0,f=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&&(a=0|t.count),"type"in t&&(f=u[t.type]),"length"in t?o=0|t.length:(o=a,5123===f||5122===f?o*=2:5125!==f&&5124!==f||(o*=4))),i(h,e,r,n,a,o,f)}else c(),h.primType=4,h.vertCount=0,h.type=5121;return s}var c=r.create(null,34963,!0),h=new a(c._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=h,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(h)},s},createStream:function(t){var e=h.pop();return e||(e=new a(r.create(null,34963,!0,!1)._buffer)),i(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){h.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof a?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,a=(i<<1>>>24)-127,i=i>>13&1023;e[r]=-24>a?n:-14>a?n+(i+1024>>-14-a):15>=a,r.height>>=a,p(r,n[a]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(i.getTotalTextureSize=function(){var t=0;return Object.keys(mt).forEach(function(e){t+=mt[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=a.texInfo;P.call(r);var i=C();return"number"==typeof t?M(i,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(i,t)):M(i,1,1),r.genMipmaps&&(i.mipmask=(i.width<<1)-1),a.mipmask=i.mipmask,c(a,i),a.internalformat=i.internalformat,n.width=i.width,n.height=i.height,D(a),E(i,3553),I(r,3553),R(),L(i),o.profile&&(a.stats.size=k(a.internalformat,a.type,i.width,i.height,r.genMipmaps,!1)),n.format=tt[a.internalformat],n.type=et[a.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=at[r.wrapS],n.wrapT=at[r.wrapT],n}var a=new z(3553);return mt[a.id]=a,i.textureCount++,n(e,r),n.subimage=function(t,e,r,i){e|=0,r|=0,i|=0;var o=m();return c(o,a),o.width=0,o.height=0,p(o,t),o.width=o.width||(a.width>>i)-e,o.height=o.height||(a.height>>i)-r,D(a),d(o,3553,e,r,i),R(),T(o),n},n.resize=function(e,r){var i=0|e,s=0|r||i;if(i===a.width&&s===a.height)return n;n.width=a.width=i,n.height=a.height=s,D(a);for(var l,c=a.channels,u=a.type,h=0;a.mipmask>>h;++h){var f=i>>h,p=s>>h;if(!f||!p)break;l=G.zero.allocType(u,f*p*c),t.texImage2D(3553,h,a.format,f,p,0,a.format,a.type,l),l&&G.zero.freeType(l)}return R(),o.profile&&(a.stats.size=k(a.internalformat,a.type,i,s,!1,!1)),n},n._reglType="texture2d",n._texture=a,o.profile&&(n.stats=a.stats),n.destroy=function(){a.decRef()},n},createCube:function(e,r,n,a,s,l){function h(t,e,r,n,a,i){var s,l=f.texInfo;for(P.call(l),s=0;6>s;++s)g[s]=C();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],a),S(g[5],i);else if(O(l,t),u(f,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],f),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(f,g[0]),f.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,f.internalformat=g[0].internalformat,h.width=g[0].width,h.height=g[0].height,D(f),s=0;6>s;++s)E(g[s],34069+s);for(I(l,34067),R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,l.genMipmaps,!0)),h.format=tt[f.internalformat],h.type=et[f.type],h.mag=rt[l.magFilter],h.min=nt[l.minFilter],h.wrapS=at[l.wrapS],h.wrapT=at[l.wrapT],s=0;6>s;++s)L(g[s]);return h}var f=new z(34067);mt[f.id]=f,i.cubeCount++;var g=Array(6);return h(e,r,n,a,s,l),h.subimage=function(t,e,r,n,a){r|=0,n|=0,a|=0;var i=m();return c(i,f),i.width=0,i.height=0,p(i,e),i.width=i.width||(f.width>>a)-r,i.height=i.height||(f.height>>a)-n,D(f),d(i,34069+t,r,n,a),R(),T(i),h},h.resize=function(e){if((e|=0)!==f.width){h.width=f.width=e,h.height=f.height=e,D(f);for(var r=0;6>r;++r)for(var n=0;f.mipmask>>n;++n)t.texImage2D(34069+r,n,f.format,e>>n,e>>n,0,f.format,f.type,null);return R(),o.profile&&(f.stats.size=k(f.internalformat,f.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=f,o.profile&&(h.stats=f.stats),h.destroy=function(){f.decRef()},h},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);I(e.texInfo,e.target)})}}}function A(t,e,r,n,a,i){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,a=t;return"object"==typeof t&&(a=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=a._reglType)?r=a:"textureCube"===t?r=a:"renderbuffer"===t&&(n=a,e=36161),new o(e,r,n)}function h(t,e,r,i,s){return r?((t=n.create2D({width:t,height:e,format:i,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=a.create({width:t,height:e,format:i}))._renderbuffer.refCount=0,new o(36161,null,t))}function f(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function d(){this.id=k++,T[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,i.framebufferCount--,delete T[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var a=e.colorAttachments;for(n=0;na;++a){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(T).forEach(v)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,X(T).forEach(function(e){e.framebuffer=t.createFramebuffer(),m(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){function a(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function i(t,e){for(var r=0;rt&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return f.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={},f.forEach(function(e){t.deleteProgram(e.program)}),f.length=0,h={},r.shaderCount=0},program:function(t,e,n){var a=h[e];a||(a=h[e]={});var i=a[t];return i||(i=new s(e,t),r.shaderCount++,l(i),a[t]=i,f.push(i)),i},restore:function(){c={},u={};for(var t=0;t"+e+"?"+a+".constant["+e+"]:0;"}).join(""),"}}else{","if(",o,"(",a,".buffer)){",u,"=",s,".createStream(",34962,",",a,".buffer);","}else{",u,"=",s,".getBuffer(",a,".buffer);","}",h,'="type" in ',a,"?",i.glTypes,"[",a,".type]:",u,".dtype;",l.normalized,"=!!",a,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),o}function A(t,e,r,n,a){var o=_(t),s=function(t,e,r){function n(t){if(t in a){var r=a[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:t=!1,"height"in r?o=0|r.height:t=!1,new z(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var a=t.shared.context,i=n;"width"in r||(i=e.def(a,".","framebufferWidth","-",s));var c=o;return"height"in r||(c=e.def(a,".","framebufferHeight","-",l)),[s,l,i,c]})}if(t in i){var c=i[t];return t=F(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,a=e.def(r,".x|0"),i=e.def(r,".y|0");return[a,i,e.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",a,")"),r=e.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",i,")")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new z(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,".","framebufferWidth"),e.def(r,".","framebufferHeight")]}):null}var a=t.static,i=t.dynamic;if(t=n("viewport")){var o=t;t=new z(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,".viewportWidth",r[2]),e.set(n,".viewportHeight",r[3]),r})}return{viewport:t,scissor_box:n("scissor.box")}}(t,o),l=k(t),c=function(t,e){var r=t.static,n=t.dynamic,a={};return nt.forEach(function(t){function e(e,i){if(t in r){var s=e(r[t]);a[o]=R(function(){return s})}else if(t in n){var l=n[t];a[o]=F(l,function(t,e){return i(t,e,t.invoke(e,l))})}}var o=m(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return e(function(t){return t},function(t,e,r){return r});case"depth.func":return e(function(t){return kt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,"[",r,"]")});case"depth.range":return e(function(t){return t},function(t,e,r){return[e.def("+",r,"[0]"),e=e.def("+",r,"[1]")]});case"blend.func":return e(function(t){return[wt["srcRGB"in t?t.srcRGB:t.src],wt["dstRGB"in t?t.dstRGB:t.dst],wt["srcAlpha"in t?t.srcAlpha:t.src],wt["dstAlpha"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('"',t,n,'" in ',r,"?",r,".",t,n,":",r,".",t)}t=t.constants.blendFuncs;var a=n("src","RGB"),i=n("dst","RGB"),o=(a=e.def(t,"[",a,"]"),e.def(t,"[",n("src","Alpha"),"]"));return[a,i=e.def(t,"[",i,"]"),o,t=e.def(t,"[",n("dst","Alpha"),"]")]});case"blend.equation":return e(function(t){return"string"==typeof t?[J[t],J[t]]:"object"==typeof t?[J[t.rgb],J[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,a=e.def(),i=e.def();return(t=t.cond("typeof ",r,'==="string"')).then(a,"=",i,"=",n,"[",r,"];"),t.else(a,"=",n,"[",r,".rgb];",i,"=",n,"[",r,".alpha];"),e(t),[a,i]});case"blend.color":return e(function(t){return i(4,function(e){return+t[e]})},function(t,e,r){return i(4,function(t){return e.def("+",r,"[",t,"]")})});case"stencil.mask":return e(function(t){return 0|t},function(t,e,r){return e.def(r,"|0")});case"stencil.func":return e(function(t){return[kt[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]},function(t,e,r){return[t=e.def('"cmp" in ',r,"?",t.constants.compareFuncs,"[",r,".cmp]",":",7680),e.def(r,".ref|0"),e=e.def('"mask" in ',r,"?",r,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return e(function(e){return["stencil.opBack"===t?1029:1028,Tt[e.fail||"keep"],Tt[e.zfail||"keep"],Tt[e.zpass||"keep"]]},function(e,r,n){function a(t){return r.def('"',t,'" in ',n,"?",i,"[",n,".",t,"]:",7680)}var i=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,a("fail"),a("zfail"),a("zpass")]});case"polygonOffset.offset":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return[e.def(r,".factor|0"),e=e.def(r,".units|0")]});case"cull.face":return e(function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e},function(t,e,r){return e.def(r,'==="front"?',1028,":",1029)});case"lineWidth":return e(function(t){return t},function(t,e,r){return r});case"frontFace":return e(function(t){return At[t]},function(t,e,r){return e.def(r+'==="cw"?2304:2305')});case"colorMask":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return i(4,function(t){return"!!"+r+"["+t+"]"})});case"sample.coverage":return e(function(t){return["value"in t?t.value:1,!!t.invert]},function(t,e,r){return[e.def('"value" in ',r,"?+",r,".value:1"),e=e.def("!!",r,".invert")]})}}),a}(t),u=w(t),h=s.viewport;return h&&(c.viewport=h),(s=s[h=m("scissor.box")])&&(c[h]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,g,v,s],");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(u+".drawElements("+[d,v,m,g+"<<(("+m+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[d,g,v]+");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,h=c.draw,f=n.draw,p=function(){var a=f.elements,i=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(t,i)):a=i.def(h,".","elements"),a&&i("if("+a+")"+u+".bindBuffer(34963,"+a+".buffer.buffer);"),a}(),d=a("primitive"),g=a("offset"),v=function(){var a=f.count,i=e;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(t,i)):a=i.def(h,".","count"),a}();if("number"==typeof v){if(0===v)return}else r("if(",v,"){"),r.exit("}");Q&&(s=a("instances"),l=t.instancing);var m=p+".type",y=f.elements&&D(f.elements);Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),i(),r("}else if(",s,"<0){"),o(),r("}")):i():o()}function q(t,e,r,n,a){return a=(e=b()).proc("body",a),Q&&(e.instancing=a.def(e.shared.extensions,".angle_instanced_arrays")),t(e,a,r,n),e.compile().body}function H(t,e,r,n){L(t,e),N(t,e,r,n.attributes,function(){return!0}),j(t,e,r,n.uniforms,function(){return!0}),V(t,e,e,r)}function G(t,e,r,n){function a(){return!0}t.batchId="a1",L(t,e),N(t,e,r,n.attributes,a),j(t,e,r,n.uniforms,a),V(t,e,e,r)}function Y(t,e,r,n){function a(t){return t.contextDep&&o||t.propDep}function i(t){return!a(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&M(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),C(t,u,r.state,a),r.profile&&a(r.profile)&&B(t,u,r,!1,!0),n?(N(t,c,r,n.attributes,i),N(t,u,r,n.attributes,a),j(t,c,r,n.uniforms,i),j(t,u,r,n.uniforms,a),V(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link(function(e){return q(G,t,r,e,2)}),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function W(t,r){function n(e){var n=r.shader[e];n&&a.set(i.shader,"."+e,n.append(t,a))}var a=t.proc("scope",3);t.batchId="a2";var i=t.shared,o=i.current;M(t,a,r.context),r.framebuffer&&r.framebuffer.append(t,a),I(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,a);v(n)?n.forEach(function(r,n){a.set(t.next[e],"["+n+"]",r)}):a.set(i.next,"."+e,n)}),B(t,a,r,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(e){var n=r.draw[e];n&&a.set(i.draw,"."+e,""+n.append(t,a))}),Object.keys(r.uniforms).forEach(function(n){a.set(i.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,a))}),Object.keys(r.attributes).forEach(function(e){var n=r.attributes[e].append(t,a),i=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){a.set(i,"."+t,n[t])})}),n("vert"),n("frag"),0=--this.refCount&&o(this)},a.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,i=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(i=e.shape)[0],i=0|i[1]):("radius"in e&&(n=i=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(i=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,i="number"==typeof r?0|r:n):e||(n=i=1),n!==c.width||i!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=i,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,i),a.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new i(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,i=0|r||n;return n===c.width&&i===c.height?o:(o.width=c.width=n,o.height=c.height=i,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,i),a.profile&&(c.stats.size=vt[c.format]*c.width*c.height),o)},o._reglType="renderbuffer",o._renderbuffer=c,a.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){X(u).forEach(o)},restore:function(){X(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var xt=[];xt[5121]=1,xt[5126]=4,xt[36193]=2;var bt=["x","y","z","w"],_t="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),wt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},kt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Tt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},At={cw:2304,ccw:2305},Mt=new z(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),$=null;else{$=q.next(e),h();for(var t=Z.length-1;0<=t;--t){var r=Z[t];r&&r(P,null,0)}v.flush(),w&&w.update()}}function r(){!$&&0=Z.length&&n()}}}}function u(){var t=W.viewport,e=W.scissor_box;t[0]=t[1]=e[0]=e[1]=0,P.viewportWidth=P.framebufferWidth=P.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,P.viewportHeight=P.framebufferHeight=P.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function h(){P.tick+=1,P.time=g(),u(),G.procs.poll()}function f(){u(),G.procs.refresh(),w&&w.update()}function g(){return(H()-k)/1e3}if(!(t=a(t)))return null;var v=t.gl,m=v.getContextAttributes();v.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},a=0;ae;++e)tt(j({framebuffer:t.framebuffer.faces[e]},t),l);else tt(t,l);else l(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:F.create,framebuffer:V.create,framebufferCube:V.createCube,attributes:m,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=J;break;case"restore":r=K;break;case"destroy":r=Q}return r.push(e),{cancel:function(){for(var t=0;t=r)return a.substr(0,r);for(;r>a.length&&e>1;)1&e&&(a+=t),e>>=1,t+=t;return a=(a+=t).substr(0,r)}},{}],505:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],506:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,a=e-2;a>=0;--a){var i=r,o=t[a],s=(r=i+o)-i,l=o-s;l&&(t[--n]=r,r=l)}for(var c=0,a=n;a>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(function(t){for(var e=new Array(t),r=0;r>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return u(e,t)}function h(t){if(2===t.length)return[["diff(",u(t[0][0],t[1][1]),",",u(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var o=0;o0&&r.push(","),o===a?r.push("+b[",i,"]"):r.push("+A[",i,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function u(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(i<=0)return o;n=a+i}else{if(!(a<0))return o;if(i>=0)return o;n=-(a+i)}var s=3.3306690738754716e-16*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var a=t[0]-n[0],i=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],h=e[2]-n[2],f=r[2]-n[2],d=i*c,g=o*l,v=o*s,m=a*c,y=a*l,x=i*s,b=u*(d-g)+h*(v-m)+f*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(h)+(Math.abs(y)+Math.abs(x))*Math.abs(f));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;d.length<=s;)d.push(h(d.length));for(var t=[],r=["slow"],n=0;n<=s;++n)t.push("a"+n),r.push("o"+n);var a=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)a.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");a.push("}var s=new Array(arguments.length);for(var i=0;i0&&o>0||i<0&&o<0)return!1;var s=n(r,t,e),l=n(a,t,e);if(s>0&&l>0||s<0&&l<0)return!1;if(0===i&&0===o&&0===s&&0===l)return function(t,e,r,n){for(var a=0;a<2;++a){var i=t[a],o=e[a],s=Math.min(i,o),l=Math.max(i,o),c=r[a],u=n[a],h=Math.min(c,u),f=Math.max(c,u);if(f=n?(a=h,(l+=1)=n?(a=h,(l+=1)0?1:0}},{}],518:[function(t,e,r){"use strict";e.exports=function(t){return a(n(t))};var n=t("boundary-cells"),a=t("reduce-simplicial-complex")},{"boundary-cells":96,"reduce-simplicial-complex":490}],519:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){r=r||0,"undefined"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",a[0],"],c[",a[1],"])")}l.push("]")}l.push(");")}}for(var i=t+1;i>1;--i){i>1,s=i(t[o],e);s<=0?(0===s&&(a=o),r=o+1):s>0&&(n=o-1)}return a}function u(t,e){for(var r=new Array(t.length),a=0,o=r.length;a=t.length||0!==i(t[v],s)););}return r}function h(t,e){if(e<0)return[];for(var r=[],a=(1<>>u&1&&c.push(a[u]);e.push(c)}return s(e)},r.skeleton=h,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,a=2*(t+1),i=t;if(n0;){var r=y(t);if(r>=0){var n=m(r);if(e0){var t=T[0];return v(0,S-1),S-=1,x(0),t}return-1}function w(t,e){var r=T[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((S+=1)-1))}function k(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],g(e)),A[r]>=0&&w(A[r],g(r))}}for(var T=[],A=new Array(i),h=0;h>1;h>=0;--h)x(h);for(;;){var E=_();if(E<0||c[E]>r)break;k(E)}for(var C=[],h=0;h=0&&r>=0&&e!==r){var n=A[e],a=A[r];n!==a&&P.push([n,a])}}),a.unique(a.normalize(P)),{positions:C,edges:P}};var n=t("robust-orientation"),a=t("simplicial-complex")},{"robust-orientation":511,"simplicial-complex":523}],526:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,o,s;if(e[0][0]e[1][0]))return a(e,t);r=e[1],i=e[0]}if(t[0][0]t[1][0]))return-a(t,e);o=t[1],s=t[0]}var l=n(r,i,s),c=n(r,i,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,i),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 i[0]-s[0]};var n=t("robust-orientation");function a(t,e){var r,a,i,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],a=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 h(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),a=-1;if(r&&(a=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,a=u.value):(a=u.value,s=u.key))}var h=this.horizontal[e];if(h.length>0){var f=n.ge(h,t[1],l);if(f=h.length)return a;p=h[f]}}if(p.start)if(s){var d=i(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(a=p.index)}else a=p.index;else p.y!==t[1]&&(a=p.index)}}}return a}},{"./lib/order-segments":526,"binary-search-bounds":92,"functional-red-black-tree":231,"robust-orientation":511}],528:[function(t,e,r){"use strict";var n=t("robust-dot-product"),a=t("robust-sum");function i(t,e){var r=a(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var a=-e/(n-e);a<0?a=0:a>1&&(a=1);for(var i=1-a,o=t.length,s=new Array(o),l=0;l0||a>0&&u<0){var h=o(s,u,l,a);r.push(h),n.push(h.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),a=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=i(t[t.length-1],e),a=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(a,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":508,"robust-sum":516}],529:[function(t,e,r){!function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(r){return function(r,n){var a,i,o,s,l,c,u,h,f,p=1,d=r.length,g="";for(i=0;i=0),s.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,s.width?parseInt(s.width):0);break;case"e":a=s.precision?parseFloat(a).toExponential(s.precision):parseFloat(a).toExponential();break;case"f":a=s.precision?parseFloat(a).toFixed(s.precision):parseFloat(a);break;case"g":a=s.precision?String(Number(a.toPrecision(s.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=s.precision?a.substring(0,s.precision):a;break;case"t":a=String(!!a),a=s.precision?a.substring(0,s.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=s.precision?a.substring(0,s.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=s.precision?a.substring(0,s.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase()}t.json.test(s.type)?g+=a:(!t.number.test(s.type)||h&&!s.sign?f="":(f=h?"+":"-",a=a.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+a).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?f+a+l:"0"===c?f+l+a:l+f+a)}return g}(function(e){if(a[e])return a[e];var r,n=e,i=[],o=0;for(;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}(r),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}var a=Object.create(null);"undefined"!=typeof r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],530:[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 a=n.parse(t,{flat:!0,brackets:r.ignore}),i=a[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=c[c.length-1];var p=t[e];if(i[e]=0&&s[e].push(o[g])}i[e]=d}else{if(n[e]===r[e]){for(var v=[],m=[],y=0,d=l.length-1;d>=0;--d){var x=l[d];if(a[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=h.length,x===e){l.length=d;break}}h.push(v);for(var b=new Array(y),d=0;d c)|0 },"),"generic"===e&&i.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){");for(var c=0;c<1<<(1<128&&c%128==0){h.length>0&&f.push("}}");var p="vExtra"+h.length;i.push("case ",c>>>7,":",p,"(m&0x7f,",l.join(),");break;"),f=["function ",p,"(m,",l.join(),"){switch(m){"],h.push(f)}f.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),v=new Array(r),m=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(A="+"+v[b]+"*c");var M=d[b].length/y*.5,S=.5+m[b]/y*.5;T.push("d"+b+"-"+S+"-"+M+"*("+d[b].join("+")+A+")/("+g[b].join("+")+")")}f.push("a.push([",T.join(),"]);","break;")}i.push("}},"),h.length>0&&f.push("}}");for(var E=[],c=0;c<1<1&&(i=1),i<-1&&(i=-1),a*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,h=t.ry,f=t.xAxisRotation,p=void 0===f?0:f,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===u||0===h)return[];var x=Math.sin(p*a/360),b=Math.cos(p*a/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),h=Math.abs(h);var k=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(h,2);k>1&&(u*=Math.sqrt(k),h*=Math.sqrt(k));var T=function(t,e,r,n,i,o,l,c,u,h,f,p){var d=Math.pow(i,2),g=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===c?-1:1))*i/o*p,b=y*-o/i*f,_=h*x-u*b+(t+r)/2,w=u*x+h*b+(e+n)/2,k=(f-x)/i,T=(p-b)/o,A=(-f-x)/i,M=(-p-b)/o,S=s(1,0,k,T),E=s(k,T,A,M);return 0===c&&E>0&&(E-=a),1===c&&E<0&&(E+=a),[_,w,S,E]}(e,r,l,c,u,h,g,m,x,b,_,w),A=n(T,4),M=A[0],S=A[1],E=A[2],C=A[3],L=Math.abs(C)/(a/4);Math.abs(1-L)<1e-7&&(L=1);var P=Math.max(Math.ceil(L),1);C/=P;for(var O=0;Oe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":61,assert:69,"is-svg-path":425,"normalize-svg-path":535,"parse-svg-path":461}],535:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,h=null,f=0,p=0,d=0,g=t.length;d4?(o=v[v.length-4],s=v[v.length-3]):(o=f,s=p),r.push(v)}return r};var n=t("svg-arc-to-cubic-bezier");function a(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,a,i){return["C",t/3+2/3*r,e/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}},{"svg-arc-to-cubic-bezier":533}],536:[function(t,e,r){"use strict";var n,a=t("svg-path-bounds"),i=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,h;e.shape?(r=e.shape[0],h=e.shape[1]):(r=c.width=e.w||e.width||200,h=c.height=e.h||e.height||200);var f=Math.min(r,h),p=e.stroke||0,d=e.viewbox||e.viewBox||a(t),g=[r/(d[2]-d[0]),h/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,r,h),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*h),u.scale(v,v),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 m=new Path2D(t);u.fill(m),p&&u.stroke(m)}else{var y=i(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*f})}},{"bitmap-sdf":94,"draw-svg-path":169,"is-svg-path":425,"parse-svg-path":461,"svg-path-bounds":534}],537:[function(t,e,r){(function(r){"use strict";e.exports=function t(e,r,a){var a=a||{};var o=i[e];o||(o=i[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),a=0,i=0,o=0;o0&&(h+=.02);for(var p=new Float32Array(u),d=0,g=-.5*h,f=0;f1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=a=i=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),a=o(l,s,t),i=o(l,s,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,l,u),h=!0,f="hsl"),e.hasOwnProperty("a")&&(i=e.a));var p,d,g;return i=C(i),{ok:h,format:e.format||f,r:o(255,s(a.r,0)),g:o(255,s(a.g,0)),b:o(255,s(a.b,0)),a:i}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=a++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,a,i=s(t,e,r),l=o(t,e,r),c=(i+l)/2;if(i==l)n=a=0;else{var u=i-l;switch(a=c>.5?u/(2-i-l):u/(i+l),i){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(c(n));return i}function M(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:a,v:i})),i=(i+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,a=this.toRgb();return e=a.r/255,r=a.g/255,n=a.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=C(t),this._roundA=i(100*this._a)/100,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(this._r,this._g,this._b),e=i(360*t.h),r=i(100*t.s),n=i(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=i(360*t.h),r=i(100*t.s),n=i(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,a){var o=[I(i(t).toString(16)),I(i(e).toString(16)),I(i(r).toString(16)),I(D(n))];if(a&&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:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*L(this._r,255))+"%",g:i(100*L(this._g,255))+"%",b:i(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%)":"rgba("+i(100*L(this._r,255))+"%, "+i(100*L(this._g,255))+"%, "+i(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[f(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 a=c(t);r="#"+p(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]: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(),a=c(e).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(e,r){var n=c(e),a=c(r);return(t.max(n.getLuminance(),a.getLuminance())+.05)/(t.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,a,i=c.readability(t,e);switch(a=!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":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},c.mostReadable=function(t,e,r){var n,a,i,o,s=null,l=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:i,size:o})||!a?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 C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function I(t){return 1==t.length?"0"+t:""+t}function z(t){return t<=1&&(t=100*t+"%"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var 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 V(t){return!!j.CSS_UNIT.exec(t)}"undefined"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],539:[function(t,e,r){"use strict";e.exports=a,e.exports.float32=e.exports.float=a,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=a(t),r=0,n=e.length;rh&&(h=l[0]),l[1]f&&(f=l[1])}function a(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(a);break;case"Point":n(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(n)}}if(!e){var i,o,s=r(t),l=new Array(2),c=1/0,u=c,h=-c,f=-c;for(o in t.arcs.forEach(function(t){for(var e=-1,r=t.length;++eh&&(h=l[0]),l[1]f&&(f=l[1])}),t.objects)a(t.objects[o]);e=t.bbox=[c,u,h,f]}return e},a=function(t,e){for(var r,n=t.length,a=n-e;a<--n;)r=t[a],t[a++]=t[n],t[n]=r};function i(t,e){var r=e.id,n=e.bbox,a=null==e.properties?{}:e.properties,i=o(t,e);return null==r&&null==n?{type:"Feature",properties:a,geometry:i}:null==n?{type:"Feature",id:r,properties:a,geometry:i}:{type:"Feature",id:r,bbox:n,properties:a,geometry:i}}function o(t,e){var n=r(t),i=t.arcs;function o(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],o=0,s=r.length;o1)n=function(t,e,r){var n,a=[],i=[];function o(t){var e=t<0?~t:t;(i[e]||(i[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":e.arcs.forEach(l)}}(e),i.forEach(null==r?function(t){a.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&a.push(t[0].i)}),a}(0,e,r);else for(a=0,n=new Array(i=t.arcs.length);a1)for(var i,o,c=1,u=l(a[0]);cu&&(o=a[0],a[0]=a[c],a[c]=o,u=i);return a})}}var u=function(t,e){for(var r=0,n=t.length;r>>1;t[a]=2))throw new Error("n must be \u22652");if(t.transform)throw new Error("already quantized");var r,a=n(t),i=a[0],o=(a[2]-i)/(e-1)||1,s=a[1],l=(a[3]-s)/(e-1)||1;function c(t){t[0]=Math.round((t[0]-i)/o),t[1]=Math.round((t[1]-s)/l)}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":c(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(c)}}for(r in t.arcs.forEach(function(t){for(var e,r,n,a=1,c=1,u=t.length,h=t[0],f=h[0]=Math.round((h[0]-i)/o),p=h[1]=Math.round((h[1]-s)/l);aMath.max(r,n)?a[2]=1:r>Math.max(e,n)?a[0]=1:a[1]=1;for(var i=0,o=0,l=0;l<3;++l)i+=t[l]*t[l],o+=a[l]*t[l];for(l=0;l<3;++l)a[l]-=o/i*t[l];return s(a,a),a}function f(t,e,r,a,i,o,s,l){this.center=n(r),this.up=n(a),this.right=n(i),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=f.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,a=0,i=0;i<3;++i)a+=e[i]*r[i],n+=e[i]*e[i];var l=Math.sqrt(n),u=0;for(i=0;i<3;++i)r[i]-=e[i]*a/n,u+=r[i]*r[i],e[i]/=l;var h=Math.sqrt(u);for(i=0;i<3;++i)r[i]/=h;var f=this.computedToward;o(f,e,r),s(f,f);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,A=-m*x,M=y,S=this.computedEye,E=this.computedMatrix;for(i=0;i<3;++i){var C=_*r[i]+w*f[i]+k*e[i];E[4*i+1]=T*r[i]+A*f[i]+M*e[i],E[4*i+2]=C,E[4*i+3]=0}var L=E[1],P=E[5],O=E[9],I=E[2],z=E[6],D=E[10],R=P*D-O*z,F=O*I-L*D,B=L*z-P*I,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(i=0;i<3;++i)S[i]=b[i]+E[2+4*i]*p;for(i=0;i<3;++i){u=0;for(var j=0;j<3;++j)u+=E[i+4*j]*S[j];E[12+i]=-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 a=this.computedMatrix;d[0]=a[2],d[1]=a[6],d[2]=a[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)a[4*c]=o[c],a[4*c+1]=s[c],a[4*c+2]=l[c];i(a,a,n,d);for(c=0;c<3;++c)o[c]=a[4*c],s[c]=a[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 a=this.computedMatrix,i=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],s=a[9],l=c(i,o,s);i/=l,o/=l,s/=l;var u=a[0],h=a[4],f=a[8],p=u*i+h*o+f*s,d=c(u-=i*p,h-=o*p,f-=s*p),g=(u/=d)*e+i*r,v=(h/=d)*e+o*r,m=(f/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var i=1;"number"==typeof r&&(i=0|r),(i<0||i>3)&&(i=1);var o=(i+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[i],l=e[i+4],h=e[i+8];if(n){var f=Math.abs(s),p=Math.abs(l),d=Math.abs(h),g=Math.max(f,p,d);f===g?(s=s<0?-1:1,l=h=0):d===g?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var v=c(s,l,h);s/=v,l/=v,h/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*h,k=c(x-=s*w,b-=l*w,_-=h*w),T=l*(_/=k)-h*(b/=k),A=h*(x/=k)-s*_,M=s*b-l*x,S=c(T,A,M);if(T/=S,A/=S,M/=S,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,s,l,h),this.right.jump(t,x,b,_),2===i){var E=e[1],C=e[5],L=e[9],P=E*x+C*b+L*_,O=E*T+C*A+L*M;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,P)}else{var I=e[2],z=e[6],D=e[10],R=I*s+z*l+D*h,F=I*x+z*b+D*_,B=I*T+z*A+D*M;m=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var N=e[2],j=e[6],V=e[10],U=this.computedMatrix;a(U,e);var q=U[15],H=U[12]/q,G=U[13]/q,Y=U[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*W,G-j*W,Y-V*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 a=(n=n||this.computedUp)[0],i=n[1],o=n[2],s=c(a,i,o);if(!(s<1e-6)){a/=s,i/=s,o/=s;var l=e[0]-r[0],h=e[1]-r[1],f=e[2]-r[2],p=c(l,h,f);if(!(p<1e-6)){l/=p,h/=p,f/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=a*g+i*v+o*m,x=c(g-=y*a,v-=y*i,m-=y*o);if(!(x<.01&&(x=c(g=i*f-o*h,v=o*l-a*f,m=a*h-i*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,a,i,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=i*m-o*v,_=o*g-a*m,w=a*v-i*g,k=c(b,_,w),T=a*l+i*h+o*f,A=g*l+v*h+m*f,M=(b/=k)*l+(_/=k)*h+(w/=k)*f,S=Math.asin(u(T)),E=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],P=C[C.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-E),I=Math.abs(L-E),z=Math.abs(L-2*Math.PI-E);O0?r.pop():new ArrayBuffer(t)}function f(t){return new Uint8Array(h(t),0,t)}function p(t){return new Uint16Array(h(2*t),0,t)}function d(t){return new Uint32Array(h(4*t),0,t)}function g(t){return new Int8Array(h(t),0,t)}function v(t){return new Int16Array(h(2*t),0,t)}function m(t){return new Int32Array(h(4*t),0,t)}function y(t){return new Float32Array(h(4*t),0,t)}function x(t){return new Float64Array(h(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(h(t),0,t):f(t)}function _(t){return new DataView(h(t),0,t)}function w(t){t=a.nextPow2(t);var e=a.log2(t),r=c[e];return r.length>0?r.pop():new n(t)}r.free=function(t){if(n.isBuffer(t))c[a.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|a.log2(e);l[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){u(t.buffer)},r.freeArrayBuffer=u,r.freeBuffer=function(t){c[a.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return h(t);switch(e){case"uint8":return f(t);case"uint16":return p(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return y(t);case"double":case"float64":return x(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return _(t);default:return null}return null},r.mallocArrayBuffer=h,r.mallocUint8=f,r.mallocUint16=p,r.mallocUint32=d,r.mallocInt8=g,r.mallocInt16=v,r.mallocInt32=m,r.mallocFloat32=r.mallocFloat=y,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=b,r.mallocDataView=_,r.mallocBuffer=w,r.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,l[t].length=0,c[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":93,buffer:106,dup:171}],547:[function(t,e,r){"use strict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(i=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,i+"px",n.font].filter(function(t){return t}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(t,e,r,n,i,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(t[1+a]):0,l=i>-1?parseInt(r[1+i]):0;s!==l&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",F())),A+=.25*C*(l-s)}if(!0===o.superscripts){var c=t.indexOf(d),h=r.indexOf(d),p=c>-1?parseInt(t[1+c]):0,g=h>-1?parseInt(r[1+h]):0;p!==g&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,g-p),n=n.replace("?px ",F())),A-=.25*C*(g-p)}if(!0===o.bolds){var v=t.indexOf(u)>-1,y=r.indexOf(u)>-1;!v&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),v&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=t.indexOf(f)>-1,b=r.indexOf(f)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w",i="",o=a.length,s=i.length,l=e[0]===d||e[0]===m,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(a,c))&&-1!==(u=r.indexOf(i,c+o))&&!(u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var f=n[h].indexOf(e[0]);-1===f?n[h]+=e:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var p=c+o,g=r.substr(p,u-p).indexOf(a);c=-1!==g?g:u+s}return n}function b(t,e){var r=n(t,128);return e?i(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var a=b(t,n),i=function(t,e,r){for(var n=e.textAlign||"start",a=e.textBaseline||"alphabetic",i=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[i]:a})},has___:{value:x(function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:x(function(n,a){var i,o=y(n);return o?o[r]=a:(i=t.indexOf(n))>=0?e[i]=a:(i=t.length,e[i]=a,t[i]=n),this})},delete___:{value:x(function(n){var a,i,o=y(n);return o?r in o&&delete o[r]:!((a=t.indexOf(n))<0||(i=t.length-1,t[a]=void 0,e[a]=e[i],t[a]=t[i],t.length=i,e.length=i,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,a=void 0,i=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(a||(a=new g),a.set(t,e)),this}:function(t,e){if(i)try{n.set(t,e)}catch(r){a||(a=new g),a.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x(function(t,e){return a?n.has(t)?n.get(t):a.get___(t,e):n.get(t,e)})},has___:{value:x(function(t){return n.has(t)||!!a&&a.has___(t)})},set___:{value:x(e)},delete___:{value:x(function(t){var e=!!n.delete(t);return a&&a.delete___(t)||e})},permitHostObjects___:{value:x(function(t){if(t!==v)throw new Error("bogus call to permitHostObjects___");i=!0})}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&"___"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[c];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,c,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],554:[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":555}],555:[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}},{}],556:[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":554}],557:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":233}],558:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),a=t.month(),i=""+this.toChineseMonth(n,a);return e&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var a=e[e.length-1];r="i"===a||"I"===a}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var a=this.intercalaryMonth(t);if(r&&e!==a||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&e<=a?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 a,o=this._validateYear(t,n.local.invalidyear),s=f[o-f[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(a=i.newDate(l,c,u)).add(4-(a.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-a.toJD();return 1+Math.floor(h/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=h[t-h[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 a=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(a.year()),e=a.month(),r=a.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,a){var i,o,s;if("object"==typeof t)o=t,i=e||{};else{var l="number"==typeof t&&t>=1888&&t<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var c="number"==typeof e&&e>=1&&e<=12;if(!c)throw new Error("Lunar month outside range 1 - 12");var u,p="number"==typeof r&&r>=1&&r<=30;if(!p)throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(u=!1,i=n):(u=!!n,i=a||{}),o={year:t,month:e,day:r,isIntercalary:u}}s=o.day-1;var d,g=h[o.year-h[0]],v=g>>13;d=v?o.month>v?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var m=0;m>9&4095,(x>>5&15)-1,(31&x)+s);return i.year=b.getFullYear(),i.month=1+b.getMonth(),i.day=b.getDate(),i}(t,s,r,o);return i.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=i.fromJD(t),r=function(t,e,r,n){var a,i;if("object"==typeof t)a=t,i=e||{};else{var o="number"==typeof t&&t>=1888&&t<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s="number"==typeof e&&e>=1&&e<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l="number"==typeof r&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:t,month:e,day:r},i=n||{}}var c=f[a.year-f[0]],u=a.year<<9|a.month<<5|a.day;i.year=u>=c?a.year:a.year-1,c=f[i.year-f[0]];var p,d=new Date(c>>9&4095,(c>>5&15)-1,31&c),g=new Date(a.year,a.month-1,a.day);p=Math.round((g-d)/864e5);var v,m=h[i.year-h[0]];for(v=0;v<13;v++){var y=m&1<<12-v?30:29;if(p>13;!x||v=2&&n<=6},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return t=a.year()+(a.year()<0?1:0),e=a.month(),(r=a.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=i},{"../main":572,"object-assign":455}],561:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate);return(t=a.year())<0&&t++,a.day()+30*(a.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,a=e-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":572,"object-assign":455}],562:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)?30:8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t<=0?t+1:t,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+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=i},{"../main":572,"object-assign":455}],563:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),t=t<=0?t+1:t,(r=a.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=i},{"../main":572,"object-assign":455}],564:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate);return t=a.year(),e=a.month(),r=a.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),a=Math.floor((e-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),s=e-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,s)}}),n.calendars.julian=i},{"../main":572,"object-assign":455}],565:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(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}i.prototype=new n.baseCalendar,a(i.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 a=this._validate(t,e,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[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 a=this._validate(t,e,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.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=i},{"../main":572,"object-assign":455}],566:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.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 a=this._validate(t,e,r,n.local.invalidMonth);(t=a.year())<0&&t++;for(var i=a.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=i},{"../main":572,"object-assign":455}],567:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=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+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),a=e.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)++o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,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 a=this._validate(t,e,r,n.local.invalidDate);t=a.year(),e=a.month(),r=a.day();var i=t-(t>=0?474:473),s=474+o(i,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/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),a=2820;if(1029982!==n){var i=Math.floor(n/366),s=o(n,366);a=Math.floor((2134*i+2816*s+2815)/1028522)+i+1}var l=a+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),h=t-this.toJD(l,u,1)+1;return this.newDate(l,u,h)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":572,"object-assign":455}],569:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(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 i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(a.year());return i.weekOfYear(t,a.month(),a.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 a=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(a.year());return i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.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":572,"object-assign":455}],570:[function(t,e,r){var n=t("../main"),a=t("object-assign"),i=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(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 i.leapYear(t)},weekOfYear:function(t,e,r){var a=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(a.year());return i.weekOfYear(t,a.month(),a.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 a=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(a.year());return i.toJD(t,a.month(),a.day())},fromJD:function(t){var e=i.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":572,"object-assign":455}],571:[function(t,e,r){var n=t("../main"),a=t("object-assign");function i(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.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,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var a=this._validate(t,e,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),s=i+1,l=a-12*i,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(t=null!=t.year?t.year:t)>=1276&&t<=1500),a},_validate:function(t,e,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;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":572,"object-assign":455}],572:[function(t,e,r){var n=t("object-assign");function a(){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 i(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(a.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,a){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,a):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="",a=0;r>0;){var i=r%10;n=(0===i?"":t[i]+e[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(i.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 i(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),a=t.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);a=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)i++,o-=e,e=t.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),a];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 a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;e=this._add(t,r*a[0]+i*a[1],a[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(),a="m"===r?e:t.month(),i="d"===r?e:t.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),t.date(n,a,i)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var a=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(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),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new a;c.cdate=i,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":455}],573:[function(t,e,r){var n=t("object-assign"),a=t("./main");n(a.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"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.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 a.local.invalidFormat||a.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,i,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,h=r.monthNamesShort||this.local.monthNamesShort,f=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 a=""+e;if(p(t,n))for(;a.length1},x=function(t,r){var n=y(t,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+i+"}"),s=e.substring(A).match(o);if(!s)throw(a.local.missingNumberAt||a.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,i){for(var o=y(t,i)?n:r,s=0;s-1){p=1,d=g;for(var E=this.daysInMonth(f,p);d>E;E=this.daysInMonth(f,p))p++,d-=E}return h>-1?this.fromJD(h):this.newDate(f,p,d)},determineDate:function(t,e,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return i.parseDate(n,t,a)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.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:i.today().add(t,"d"):i.newDate(t)}})},{"./main":572,"object-assign":455}],574:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":147}],575:[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":574}],576:[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}]},{}],577:[function(t,e,r){"use strict";var n=t("./arrow_paths"),a=t("../../plots/font_attributes"),i=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({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",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.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",i.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:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../../plots/font_attributes":793,"./arrow_paths":576}],578:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach(function(e){var r=a.getFromId(t,e.xref),n=a.getFromId(t,e.yref);e._extremes={},r&&s(e,r),n&&s(e,n)})}function s(t,e){var r,n=e._id,i=n.charAt(0),o=t[i],s=t["a"+i],l=t[i+"ref"],c=t["a"+i+"ref"],u=t["_"+i+"padplus"],h=t["_"+i+"padminus"],f={x:1,y:-1}[i]*t[i+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+f,g=p-f,v=3*t.startarrowsize*t.arrowwidth||0,m=v+f,y=v-f;if(c===l){var x=a.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=a.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,m),ppadminus:Math.max(h,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=a.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,m),ppadminus:Math.max(h,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([i,o],t)}},{"../../lib":719,"../../plots/cartesian/axes":767,"./draw":583}],579:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("../../plot_api/plot_template").arrayEditor;function o(t,e){var r,n,a,i,o,l,c,u=t._fullLayout.annotations,h=[],f=[],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),h={},f=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 H=!1,G=["x","y"],Y=0;Y1)&&(tt===$?((ct=et.r2fraction(e["a"+Q]))<0||ct>1)&&(H=!0):H=!0),W=et._offset+et.r2p(e[Q]),J=.5}else"x"===Q?(Z=e[Q],W=b.l+b.w*Z):(Z=1-e[Q],W=b.t+b.h*Z),J=e.showarrow?.5:Z;if(e.showarrow){lt.head=W;var ut=e["a"+Q];K=nt*V(.5,e.xanchor)-at*V(.5,e.yanchor),tt===$?(lt.tail=et._offset+et.r2p(ut),X=K):(lt.tail=W+ut,X=K+ut),lt.text=lt.tail+K;var ht=x["x"===Q?"width":"height"];if("paper"===$&&(lt.head=o.constrain(lt.head,1,ht-1)),"pixel"===tt){var ft=-Math.max(lt.tail-3,lt.text),pt=Math.min(lt.tail+3,lt.text)-ht;ft>0?(lt.tail+=ft,lt.text+=ft):pt>0&&(lt.tail-=pt,lt.text-=pt)}lt.tail+=st,lt.head+=st}else X=K=it*V(J,ot),lt.text=W+K;lt.text+=st,K+=st,X+=st,e["_"+Q+"padplus"]=it/2+X,e["_"+Q+"padminus"]=it/2-X,e["_"+Q+"size"]=it,e["_"+Q+"shift"]=K}if(H)I.remove();else{var dt=0,gt=0;if("left"!==e.align&&(dt=(w-m)*("center"===e.align?.5:1)),"top"!==e.valign&&(gt=(O-y)*("middle"===e.valign?.5:1)),u)n.select("svg").attr({x:R+dt-1,y:R+gt}).call(c.setClipUrl,B?M:null,t);else{var vt=R+gt-d.top,mt=R+dt-d.left;U.call(h.positionText,mt,vt).call(c.setClipUrl,B?M:null,t)}N.select("rect").call(c.setRect,R,R,w,O),F.call(c.setRect,z/2,z/2,D-z,j-z),I.call(c.setTranslate,Math.round(S.x.text-D/2),Math.round(S.y.text-j/2)),L.attr({transform:"rotate("+E+","+S.x.text+","+S.y.text+")"});var yt,xt=function(r,n){C.selectAll(".annotation-arrow-g").remove();var u=S.x.head,h=S.y.head,f=S.x.tail+r,d=S.y.tail+n,m=S.x.text+r,y=S.y.text+n,x=o.rotationXYMatrix(E,m,y),w=o.apply2DTransform(x),M=o.apply2DTransform2(x),P=+F.attr("width"),O=+F.attr("height"),z=m-.5*P,D=z+P,R=y-.5*O,B=R+O,N=[[z,R,z,B],[z,B,D,B],[D,B,D,R],[D,R,z,R]].map(M);if(!N.reduce(function(t,e){return t^!!o.segmentsIntersect(u,h,u+1e6,h+1e6,e[0],e[1],e[2],e[3])},!1)){N.forEach(function(t){var e=o.segmentsIntersect(f,d,u,h,t[0],t[1],t[2],t[3]);e&&(f=e.x,d=e.y)});var j=e.arrowwidth,V=e.arrowcolor,U=e.arrowside,q=C.append("g").style({opacity:l.opacity(V)}).classed("annotation-arrow-g",!0),H=q.append("path").attr("d","M"+f+","+d+"L"+u+","+h).style("stroke-width",j+"px").call(l.stroke,l.rgb(V));if(g(H,U,e),_.annotationPosition&&H.node().parentNode&&!i){var G=u,Y=h;if(e.standoff){var W=Math.sqrt(Math.pow(u-f,2)+Math.pow(h-d,2));G+=e.standoff*(f-u)/W,Y+=e.standoff*(d-h)/W}var X,Z,J=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-G)+","+(d-Y),transform:"translate("+G+","+Y+")"}).style("stroke-width",j+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:t,prepFn:function(){var t=c.getTranslate(I);X=t.x,Z=t.y,s&&s.autorange&&k(s._name+".autorange",!0),v&&v.autorange&&k(v._name+".autorange",!0)},moveFn:function(t,r){var n=w(X,Z),a=n[0]+t,i=n[1]+r;I.call(c.setTranslate,a,i),T("x",s?s.p2r(s.r2p(e.x)+t):e.x+t/b.w),T("y",v?v.p2r(v.r2p(e.y)+r):e.y-r/b.h),e.axref===e.xref&&T("ax",s.p2r(s.r2p(e.ax)+t)),e.ayref===e.yref&&T("ay",v.p2r(v.r2p(e.ay)+r)),q.attr("transform","translate("+t+","+r+")"),L.attr({transform:"rotate("+E+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",t,A());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&xt(0,0),P)p.init({element:I.node(),gd:t,prepFn:function(){yt=L.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?T("ax",s.p2r(s.r2p(e.ax)+t)):T("ax",e.ax+t),e.ayref===e.yref?T("ay",v.p2r(v.r2p(e.ay)+r)):T("ay",e.ay+r),xt(t,r);else{if(i)return;var a,o;if(s)a=s.p2r(s.r2p(e.x)+t);else{var l=e._xsize/b.w,c=e.x+(e._xshift-e.xshift)/b.w-l/2;a=p.align(c+t/b.w,l,0,1,e.xanchor)}if(v)o=v.p2r(v.r2p(e.y)+r);else{var u=e._ysize/b.h,h=e.y-(e._yshift+e.yshift)/b.h-u/2;o=p.align(h-r/b.h,u,0,1,e.yanchor)}T("x",a),T("y",o),s&&v||(n=p.getCursor(s?.5:a,v?.5:o,e.xanchor,e.yanchor))}L.attr({transform:"translate("+t+","+r+")"+yt}),f(I,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",q(n))},doneFn:function(){f(I),a.call("_guiRelayout",t,A());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,v=e.indexOf("end")>=0,m=h.backoff*p+r.standoff,y=f.backoff*d+r.startstandoff;if("line"===u.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},s={x:+t.attr("x2"),y:+t.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&y&&m+y>Math.sqrt(x*x+b*b))return void P();if(m){if(m*m>x*x+b*b)return void P();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,t.attr({x2:s.x,y2:s.y})}if(y){if(y*y>x*x+b*b)return void P();var k=y*Math.cos(l),T=y*Math.sin(l);o.x-=k,o.y-=T,t.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var A=u.getTotalLength(),M="";if(A1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=a(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":816,"../annotations/draw":583}],590:[function(t,e,r){"use strict";var n=t("../../registry"),a=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 i=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 i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}i.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},i.rgb=function(t){return i.tinyRGB(n(t))},i.opacity=function(t){return t?n(t).getAlpha():0},i.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},i.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var a=n(e||l).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},i.contrast=function(t,e,r){var a=n(t);return 1!==a.getAlpha()&&(a=n(i.combine(t,l))),(a.isDark()?e?a.lighten(e):l:r?a.darken(r):s).toString()},i.stroke=function(t,e){var r=n(e);t.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(t,e){var r=n(e);t.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(t){if(t&&"object"==typeof t){var e,r,n,a,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));a++)n>u&&n0?n>=l:n<=l));a++)n>r[0]&&n1){var Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10));Y*=Z*c.roundUp(X/Z,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(G.tick0=0)}G.dtick=Y}G.domain=[U+N,U+R-N],G.setScale(),t.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var J,K=t.select("."+T.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),Q=t.select("."+T.cbaxis),$=0;function tt(n,a){var i={propContainer:G,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+T.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),d.draw(r,n,u(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+F)*l.w,n=G.title.font.size;t="top"===A?(1-(U+R-N))*l.h+l.t+3+.75*n:(1-(U+N))*l.h+l.t-3-.25*n,tt(G._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var i=t.select("."+T.cbtitle),o=i.select("text"),u=[-e.outlinewidth/2,e.outlinewidth/2],h=i.select(".h"+G._id+"title-math-group").node(),p=15.6;if(o.node()&&(p=parseInt(o.node().style.fontSize,10)*_),h?($=f.bBox(h).height)>p&&(u[1]-=($-p)/2):o.node()&&!o.classed(T.jsPlaceholder)&&($=f.bBox(o.node()).height),$){if($+=5,"top"===A)G.domain[1]-=$/l.h,u[1]*=-1;else{G.domain[0]+=$/l.h;var d=g.lineCount(o);u[1]+=(1-d)*p}i.attr("transform","translate("+u+")"),G.setScale()}}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-G.domain[1]))+")"),Q.attr("transform","translate(0,"+Math.round(-l.t)+")");var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).data(P);m.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),m.exit().remove();var y=M.map(G.c2p).map(Math.round).sort(function(t,e){return t-e});m.each(function(t,i){var o=[0===i?M[0]:(P[i]+P[i-1])/2,i===P.length-1?M[1]:(P[i]+P[i+1])/2].map(G.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[1]);var s=n.select(this).attr({x:j,width:Math.max(I,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(e._fillgradient)f.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=E(t).replace("e-","");s.attr("fill",a(l).toHexString())}});var x=t.select("."+T.cblines).selectAll("path."+T.cbline).data(v.color&&v.width?O:[]);x.enter().append("path").classed(T.cbline,!0),x.exit().remove(),x.each(function(t){n.select(this).attr("d","M"+j+","+(Math.round(G.c2p(t))+v.width/2%1)+"h"+I).call(f.lineGroupStyle,v.width,S(t),v.dash)}),Q.selectAll("g."+G._id+"tick,path").remove();var b=j+I+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),w=s.calcTicks(G),k=s.makeTransFn(G),C=s.getTickSigns(G)[2];return s.drawTicks(r,G,{vals:"inside"===G.ticks?s.clipEnds(G,w):w,layer:Q,path:s.makeTickPath(G,b,C),transFn:k}),s.drawLabels(r,G,{vals:w,layer:Q,transFn:k,labelFns:s.makeLabelFns(G,b)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=G.title.font.size,e=G._offset+G._length/2,a=l.l+(G.position||0)*l.w+("right"===G.side?10+t*(G.showticklabels?1:.5):-10-t*(G.showticklabels?.5:0));tt("h"+G._id+"title",{avoid:{selection:n.select(r).selectAll("g."+G._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:a,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=I+e.outlinewidth/2+f.bBox(Q.node()).width;if((J=K.select("text")).node()&&!J.classed(T.jsPlaceholder)){var a,o=K.select(".h"+G._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(A)?f.bBox(o).width:f.bBox(K.node()).right-j-l.l,n=Math.max(n,a)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=q-H;t.select("."+T.cbbg).attr({x:j-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:H-B,width:Math.max(s,2),height:Math.max(c+2*B,2)}).call(p.fill,e.bgcolor).call(p.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+T.cboutline).attr({x:j,y:H+e.ypad+("top"===A?$:0),width:Math.max(I,2),height:Math.max(c-2*e.ypad-$,2)}).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var u=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform","translate("+(l.l-u)+","+l.t+")");var h={},d=w[e.yanchor],g=k[e.yanchor];"pixels"===e.lenmode?(h.y=e.y,h.t=c*d,h.b=c*g):(h.t=h.b=0,h.yt=e.y+e.len*d,h.yb=e.y-e.len*g);var v=w[e.xanchor],m=k[e.xanchor];if("pixels"===e.thicknessmode)h.x=e.x,h.l=s*v,h.r=s*m;else{var y=s-I;h.l=y*v,h.r=y*m,h.xl=e.x-e.thickness*v,h.xr=e.x+e.thickness*m}i.autoMargin(r,e._id,h)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,a,i,s=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+" translate("+r+","+o+")"),a=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),i=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(a,i,e.xanchor,e.yanchor);h(t,c)},doneFn:function(){if(h(t),void 0!==a&&void 0!==i){var n={};n[e._propPrefix+"x"]=a,n[e._propPrefix+"y"]=i,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)}),e.exit().each(function(e){i.autoMargin(t,e._id)}).remove(),e.order()}}},{"../../constants/alignment":688,"../../lib":719,"../../lib/extend":710,"../../lib/setcursor":739,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"../../plots/plots":828,"../../registry":848,"../color":594,"../colorscale/helpers":605,"../dragelement":612,"../drawing":615,"../titles":681,"./constants":596,d3:164,tinycolor2:538}],599:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":719}],600:[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":595,"./defaults":597,"./draw":598,"./has_colorbar":599}],601:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),a=t("../../lib/regex").counter,i=t("./scales.js").scales;Object.keys(i);function o(t){return"`"+t+"`"}e.exports=function(t,e){t=t||"";var r,s=(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"===s,u="string"==typeof e.colorscaleDflt?i[e.colorscaleDflt]:null,h=e.editTypeOverride||"",f=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(f+(r={z:"z",c:"color"}[s]));var p=s+"auto",d=s+"min",g=s+"max",v=s+"mid",m=(o(f+p),o(f+d),o(f+g),{});m[d]=m[g]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:h||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[d]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},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:a("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":735,"../colorbar/attributes":595,"./scales.js":609}],602:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("./helpers").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?a.nestedProperty(e,c).get():e,h=i(u),f=!1!==h.auto,p=h.min,d=h.max,g=h.mid,v=function(){return a.aggNums(Math.min,null,l)},m=function(){return a.aggNums(Math.max,null,l)};(void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.min(p,v()):v()),void 0===d?d=m():f&&(d=u._colorAx&&n(d)?Math.max(d,m()):m()),f&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}},{"../../lib":719,"./helpers":605,"fast-isnumeric":226}],603:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./helpers").hasColorscale,i=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,a){var o=a.container?n.nestedProperty(t,a.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=i(o),l=s.auto;(l||void 0===s.min)&&r(o,a.min),(l||void 0===s.max)&&r(o,a.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,a++){var i=t[n];r[a]=[1-i[0],i[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}},{}],611:[function(t,e,r){"use strict";var n=t("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,i){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*e),0,2),a[e][t]}},{"../../lib":719}],612:[function(t,e,r){"use strict";var n=t("mouse-event-offset"),a=t("has-hover"),i=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 h(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,f,p,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(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&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,p),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(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)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=u},{"../../lib":719,"../../plots/cartesian/constants":773,"./align":610,"./cursor":611,"./unhover":613,"has-hover":411,"has-passive-events":412,"mouse-event-offset":437}],613:[function(t,e,r){"use strict";var n=t("../../lib/events"),a=t("../../lib/throttle"),i=t("../../lib/dom").getGraphDiv,o=t("../fx/constants"),s=e.exports={};s.wrapped=function(t,e,r){(t=i(t))._fullLayout&&a.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,a=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&a&&t.emit("plotly_unhover",{event:e,points:a}))}},{"../../lib/dom":708,"../../lib/events":709,"../../lib/throttle":744,"../fx/constants":627}],614:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],615:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=t("../../lib/svg_text_utils"),h=t("../../constants/xmlns_namespaces"),f=t("../../constants/alignment").LINE_SPACING,p=t("../../constants/interactions").DESELECTDIM,d=t("../../traces/scatter/subtypes"),g=t("../../traces/scatter/make_bubble_size_func"),v=e.exports={},m=t("../fx/helpers").appendArrayPointValue;v.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},v.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},v.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},v.setRect=function(t,e,r,n,a){t.call(v.setPosition,e,r).call(v.setSize,n,a)},v.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),o=n.c2p(t.y);return!!(a(i)&&a(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",o):e.attr("transform","translate("+i+","+o+")"),!0)},v.translatePoints=function(t,e,r){t.each(function(t){var a=n.select(this);v.translatePoint(t,a,e,r)})},v.hideOutsideRangePoint=function(t,e,r,n,a,i){e.attr("display",r.isPtWithinRange(t,a)&&n.isPtWithinRange(t,i)?null:"none")},v.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each(function(e){var i=e[0].trace,s=i.xcalendar,l=i.ycalendar,c=o.traceIs(i,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each(function(t){v.hideOutsideRangePoint(t,n.select(this),r,a,s,l)})})}},v.crispRound=function(t,e,r){return e&&a(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},v.singleLineStyle=function(t,e,r,n,a){e.style("fill","none");var i=(((t||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(e,n||i.color),v.dashLine(e,l,o)},v.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},o=e||i.width||0,l=a||i.dash||"";n.select(this).call(s.stroke,r||i.color).call(v.dashLine,l,o)})},v.dashLine=function(t,e,r){r=+r||0,e=v.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},v.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},v.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},v.fillGroupStyle=function(t){t.style("stroke-width",0).each(function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)})};var y=t("./symbol_defs");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(y).forEach(function(t){var e=y[t];v.symbolList=v.symbolList.concat([e.n,t,e.n+100,t+"-open"]),v.symbolNames[e.n]=t,v.symbolFuncs[e.n]=e.f,e.needLine&&(v.symbolNeedLines[e.n]=!0),e.noDot?v.symbolNoDot[e.n]=!0:v.symbolList=v.symbolList.concat([e.n+200,t+"-dot",e.n+300,t+"-open-dot"]),e.noFill&&(v.symbolNoFill[e.n]=!0)});var x=v.symbolNames.length,b="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function _(t,e){var r=t%100;return v.symbolFuncs[r](e)+(t>=200?b:"")}v.symbolNumber=function(t){if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=v.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=x||t>=400?0:Math.floor(Math.max(t,0))};var w={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},T=n.format("~.1f"),A={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:w},horizontalreversed:{node:"linearGradient",attrs:w,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};v.gradient=function(t,e,r,a,o,l){for(var u=o.length,h=A[a],f=new Array(u),p=0;p=100,e.attr("d",_(u,l))}var h,f,p,d=!1;if(t.so)p=o.outlierwidth,f=o.outliercolor,h=i.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,f="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(i.color)&&(h=s.defaultLine,d=!0),h="mc"in t?t.mcc=n.markerScale(t.mc):i.color||"rgba(0,0,0,0)",n.selectedColorFn&&(h=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:p)+"px");var m=i.gradient,y=t.mgt;if(y?d=!0:y=m&&m.type,Array.isArray(y)&&(y=y[0],A[y]||(y=0)),y&&"none"!==y){var x=t.mgc;x?d=!0:x=m.color;var b=r.uid;d&&(b+="-"+t.i),v.gradient(e,a,b,y,[[0,x],[1,h]],"fill")}else s.fill(e,h);p&&s.stroke(e,f)}},v.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=v.tryColorscale(r,""),e.lineScale=v.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=d.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,v.makeSelectedPointStyleFns(t)),e},v.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},i=r.marker||{},s=n.marker||{},l=a.opacity,u=i.opacity,h=s.opacity,f=void 0!==u,d=void 0!==h;(c.isArrayOrTypedArray(l)||f||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?f?u:e:d?h:p*e});var g=a.color,v=i.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?v||e:m||e});var y=a.size,x=i.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},v.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,c=i.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,p))},e},v.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push(function(t,e){t.style("opacity",r.selectedOpacityFn(e))}),r.selectedColorFn&&i.push(function(t,e){s.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&i.push(function(t,e){var n=e.mx||a.symbol||0,i=r.selectedSizeFn(e);t.attr("d",_(v.symbolNumber(n),i)),e.mrc2=i}),i.length&&t.each(function(t){for(var e=n.select(this),r=0;r0?r:0}v.textPointStyle=function(t,e,r,a){if(t.size()){var i;if(e.selectedpoints){var o=v.makeSelectedTextStyleFns(e);i=o.selectedTextColorFn}var s=e.texttemplate;a&&(s=!1),t.each(function(t){var a=n.select(this),o=c.extractOption(t,e,s?"txt":"tx",s?"texttemplate":"text");if(o||0===o){if(s){var l={};m(l,e,t.i),o=c.texttemplateString(o,{},r._fullLayout._d3locale,l,t,e._meta||{})}var h=t.tp||e.textposition,f=E(t,e),p=i?i(t):t.tc||e.textfont.color;a.call(v.font,t.tf||e.textfont.family,f,p).text(o).call(u.convertToTspans,r).call(S,h,f,t.mrc)}else a.remove()})}},v.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=v.makeSelectedTextStyleFns(e);t.each(function(t){var a=n.select(this),i=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=E(t,e);s.fill(a,i),S(a,o,l,t.mrc2||t.mrc)})}};var C=.5;function L(t,e,r,a){var i=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(i*i+o*o,C/2),u=Math.pow(s*s+l*l,C/2),h=(u*u*i-c*c*s)*a,f=(u*u*o-c*c*l)*a,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&h/p),2),n.round(e[1]+(p&&f/p),2)],[n.round(e[0]-(d&&h/d),2),n.round(e[1]-(d&&f/d),2)]]}v.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],a=[];for(r=1;r=1e4&&(v.savedBBoxes={},I=0),r&&(v.savedBBoxes[r]=m),I++,c.extendFlat({},m)},v.setClipUrl=function(t,e,r){t.attr("clip-path",D(e,r))},v.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||0,y:+e[1]||0}},v.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+e+", "+r+")").trim(),t[a]("transform",i),i},v.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+e[0]||1,y:+e[1]||1}},v.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",a=t.attr?"attr":"setAttribute",i=t[n]("transform")||"";return e=e||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+e+", "+r+")").trim(),t[a]("transform",i),i};var R=/\s*sc.*/;v.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":" scale("+e+","+r+")";t.each(function(){var t=(this.getAttribute("transform")||"").replace(R,"");t=(t+=n).trim(),this.setAttribute("transform",t)})}};var F=/translate\([^)]*\)\s*$/;v.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(F);t=1===e&&1===r?[]:["translate("+o+","+s+")","scale("+e+","+r+")","translate("+-o+","+-s+")"],l&&t.push(l),a.attr("transform",t.join(" "))}})}},{"../../constants/alignment":688,"../../constants/interactions":694,"../../constants/xmlns_namespaces":696,"../../lib":719,"../../lib/svg_text_utils":743,"../../registry":848,"../../traces/scatter/make_bubble_size_func":1127,"../../traces/scatter/subtypes":1134,"../color":594,"../colorscale":606,"../fx/helpers":629,"./symbol_defs":616,d3:164,"fast-isnumeric":226,tinycolor2:538}],616:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,a="l"+e+",-"+e,i="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+a+i+a+i+o+i+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),a=n.round(-t,2),i=n.round(-.309*t,2);return"M"+e+","+i+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+e+"L-"+a+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),a=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+e+",0L"+r+",-"+a+"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),a=n.round(.951*e,2),i=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"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+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),a=n.round(.76*t,2);return"M-"+a+",0l-"+r+",-"+e+"h"+a+"l"+r+",-"+e+"l"+r+","+e+"h"+a+"l-"+r+","+e+"l"+r+","+e+"h-"+a+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+a+"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),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+a+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),a=n.round(1.6*t,2),i=n.round(4*t,2),o="A "+i+","+i+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+a+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),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+a+"-"+e+","+e+a+e+","+e+a+e+",-"+e+a+"-"+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),a="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+a+"0,"+e+a+e+",0"+a+"0,-"+e+a+"-"+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),a=n.round(.8*t,2);return"M-"+e+","+a+"L0,0M"+e+","+a+"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),a=n.round(.8*t,2);return"M-"+e+",-"+a+"L0,0M"+e+",-"+a+"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),a=n.round(.8*t,2);return"M"+a+","+e+"L0,0M"+a+",-"+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),a=n.round(.8*t,2);return"M-"+a+","+e+"L0,0M-"+a+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0}}},{d3:164}],617:[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"}}}},{}],618:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../registry"),i=t("../../plots/cartesian/axes"),o=t("../../lib"),s=t("./compute_error");function l(t,e,r,a){var l=e["error_"+a]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),h=0;h0;e.each(function(e){var h,f=e[0].trace,p=f.error_x||{},d=f.error_y||{};f.ids&&(h=function(t){return t.id});var g=o.hasMarkers(f)&&f.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,h);if(v.exit().remove(),e.length){p.visible||v.selectAll("path.xerror").remove(),d.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var m=v.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(v,r.layerClipId,t),v.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),a(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),a(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,l,c);if(!g||t.vis){var i,o=e.select("path.yerror");if(d.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var h=d.width;i="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(i+="m-"+h+",0h"+2*h),!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",i)}else o.remove();var f=e.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var v=(p.copy_ystyle?d:p).width;i="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(i+="m0,-"+v+"v"+2*v),!f.size()?f=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(s.duration).ease(s.easing)),f.attr("d",i)}else f.remove()}})}})}},{"../../traces/scatter/subtypes":1134,"../drawing":615,d3:164,"fast-isnumeric":226}],623:[function(t,e,r){"use strict";var n=t("d3"),a=t("../color");e.exports=function(t){t.each(function(t){var e=t[0].trace,r=e.error_y||{},i=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)})}},{"../color":594,d3:164}],624:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("./layout_attributes").hoverlabel,i=t("../../lib/extend").extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":710,"../../plots/font_attributes":793,"./layout_attributes":633}],625:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry");function i(t,e,r,a){a=a||n.identity,Array.isArray(t)&&(e[0][r]=a(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||$<0||$>w[0]._length)return f.unhoverRaw(t,e)}if(e.pointerX=Q+_[0]._offset,e.pointerY=$+w[0]._offset,I="xval"in e?g.flat(l,e.xval):g.p2c(_,Q),z="yval"in e?g.flat(l,e.yval):g.p2c(w,$),!a(I[0])||!a(z[0]))return o.warn("Fx.hover failed",e,t),f.unhoverRaw(t,e)}var rt=1/0;for(R=0;RG&&(X.splice(0,G),rt=X[0].distance),m&&0!==W&&0===X.length){H.distance=W,H.index=!1;var st=B._module.hoverPoints(H,U,q,"closest",u._hoverlayer);if(st&&(st=st.filter(function(t){return t.spikeDistance<=W})),st&&st.length){var lt,ct=st.filter(function(t){return t.xa.showspikes});if(ct.length){var ut=ct[0];a(ut.x0)&&a(ut.y0)&&(lt=dt(ut),(!J.vLinePoint||J.vLinePoint.spikeDistance>lt.spikeDistance)&&(J.vLinePoint=lt))}var ht=st.filter(function(t){return t.ya.showspikes});if(ht.length){var ft=ht[0];a(ft.x0)&&a(ft.y0)&&(lt=dt(ft),(!J.hLinePoint||J.hLinePoint.spikeDistance>lt.spikeDistance)&&(J.hLinePoint=lt))}}}}function pt(t,e){for(var r,n=null,a=1/0,i=0;i1||X.length>1)||"closest"===O&&K&&X.length>1,Ct=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),Lt={hovermode:O,rotateLabels:Et,bgColor:Ct,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},Pt=A(X,Lt,t);if(function(t,e,r){var n,a,i,o,s,l,c,u=0,h=1,f=t.size(),p=new Array(f),d=0;function g(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,i=r.pos+r.dp+r.size-e.pmax,a>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=i;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-=i;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}for(t.each(function(t){var n=t[e],a="x"===n._id.charAt(0),i=n.range;0===d&&i&&i[0]>i[1]!==a&&(h=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?x:1)/2,pmin:0,pmax:a?r.width:r.height}]}),p.sort(function(t,e){return t[0].posref-e[0].posref||h*(e[0].traceIndex-t[0].traceIndex)});!n&&u<=f;){for(u++,n=!0,o=0;o.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=a;for(v.push.apply(v,m),p.splice(o+1,1),c=0,s=v.length-1;s>=0;s--)c+=v[s].dp;for(i=c/v.length,s=v.length-1;s>=0;s--)v[s].dp-=i;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var _=p[o];for(s=_.length-1;s>=0;s--){var w=_[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(Pt,Et?"xa":"ya",u),M(Pt,Et),e.target&&e.target.tagName){var Ot=d.getComponentMethod("annotations","hasClickToShow")(t,Tt);c(n.select(e.target),Ot?"pointer":"")}if(!e.target||i||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=t._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(t,0,kt))return;kt&&t.emit("plotly_unhover",{event:e,points:kt});t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:I,yvals:z})}(t,e,r,i)})},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var a=t.map(function(t){return{color:t.color||h.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,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}}),i=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):i,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||h.background,container:i,outerContainer:o},l=A(a,s,e.gd),c=0,u=0;return l.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 A(t,e,r){var a=r._fullLayout,i=e.hovermode,s=e.rotateLabels,c=e.bgColor,f=e.container,p=e.outerContainer,d=e.commonLabelOpts||{},g=e.fontFamily||v.HOVERFONT,y=e.fontSize||v.HOVERFONTSIZE,x=t[0],b=x.xa,_=x.ya,A="y"===i?"yLabel":"xLabel",M=x[A],S=(String(M)||"").split(" ")[0],E=p.node().getBoundingClientRect(),C=E.top,P=E.width,O=E.height,I=void 0!==M&&x.distance<=e.hoverdistance&&("x"===i||"y"===i);if(I){var z,D,R=!0;for(z=0;z"),void 0!==t.yLabel&&(p+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(p+=(p?"z: ":"")+t.zLabel)):I&&t[i+"Label"]===M?p=t[("x"===i?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(p=t.yLabel):p=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(p+=(p?"
":"")+t.text),void 0!==t.extraText&&(p+=(p?"
":"")+t.extraText),""!==p||t.hovertemplate||(""===f&&e.remove(),p=f);var _=a._d3locale,A=t.hovertemplate||!1,S=t.hovertemplateLabels||t,E=t.eventData[0]||{};A&&(p=(p=o.hovertemplateString(A,S,_,E,t.trace._meta)).replace(T,function(e,r){return f=L(r,t.nameLength),""}));var z=e.select("text.nums").call(u.font,t.fontFamily||g,t.fontSize||y,t.fontColor||b).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),D=e.select("text.name"),R=0,F=0;if(f&&f!==p){D.call(u.font,t.fontFamily||g,t.fontSize||y,x).text(f).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var B=D.node().getBoundingClientRect();R=B.width+2*k,F=B.height+2*k}else D.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:b});var N,j,V=z.node().getBoundingClientRect(),U=t.xa._offset+(t.x0+t.x1)/2,q=t.ya._offset+(t.y0+t.y1)/2,H=Math.abs(t.x1-t.x0),G=Math.abs(t.y1-t.y0),Y=V.width+w+k+R;if(t.ty0=C-V.top,t.bx=V.width+2*k,t.by=Math.max(V.height+2*k,F),t.anchor="start",t.txwidth=V.width,t.tx2width=R,t.offset=0,s)t.pos=U,N=q+G/2+Y<=O,j=q-G/2-Y>=0,"top"!==t.idealAlign&&N||!j?N?(q+=G/2,t.anchor="start"):t.anchor="middle":(q-=G/2,t.anchor="end");else if(t.pos=q,N=U+H/2+Y<=P,j=U-H/2-Y>=0,"left"!==t.idealAlign&&N||!j)if(N)U+=H/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=U+W-P,Z=U-W;X>0&&(U-=X),Z<0&&(U+=-Z)}else U-=H/2,t.anchor="end";z.attr("text-anchor",t.anchor),R&&D.attr("text-anchor",t.anchor),e.attr("transform","translate("+U+","+q+")"+(s?"rotate("+m+")":""))}),N}function M(t,e){t.each(function(t){var r=n.select(this);if(t.del)return r.remove();var a=r.select("text.nums"),i=t.anchor,o="end"===i?-1:1,s={start:1,end:-1,middle:0}[i],c=s*(w+k),h=c+s*(t.txwidth+k),f=0,p=t.offset;"middle"===i&&(c-=t.tx2width/2,h+=t.txwidth/2+k),e&&(p*=-_,f=t.offset*b),r.select("path").attr("d","middle"===i?"M-"+(t.bx/2+t.tx2width/2)+","+(p-t.by/2)+"h"+t.bx+"v"+t.by+"h-"+t.bx+"Z":"M0,0L"+(o*w+f)+","+(w+p)+"v"+(t.by/2-w)+"h"+o*t.bx+"v-"+t.by+"H"+(o*w+f)+"V"+(p-w)+"Z");var d=c+f,g=p+t.ty0-t.by/2+k,v=t.textAlign||"auto";"auto"!==v&&("left"===v&&"start"!==i?(a.attr("text-anchor","start"),d="middle"===i?-t.bx/2-t.tx2width/2+k:-t.bx-k):"right"===v&&"end"!==i&&(a.attr("text-anchor","end"),d="middle"===i?t.bx/2-t.tx2width/2-k:t.bx+k)),a.call(l.positionText,d,g),t.tx2width&&(r.select("text.name").call(l.positionText,h+s*k+f,p+t.ty0-t.by/2+k),r.select("rect").call(u.setRect,h+(s-1)*t.tx2width/2+f,p-t.by/2-1,t.tx2width,t.by+2))})}function S(t,e){var r=t.index,n=t.trace||{},i=t.cd[0],s=t.cd[r]||{};function l(t){return t||a(t)&&0===t}var c=Array.isArray(r)?function(t,e){var a=o.castOption(i,r,t);return l(a)?a:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var a=c(r,n);l(a)&&(t[e]=a)}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:p.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:p.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=p.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+p.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var f=p.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+f+" / -"+p.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+f,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function E(t,e,r){var n,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,f=!!e.hLinePoint,d=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),d||f){var g=h.combine(s.plot_bgcolor,s.paper_bgcolor);if(f){var v,m,y=e.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(v=c.pointerX,m=c.pointerY):(v=n._offset+y.x,m=a._offset+y.y);var x,b,_=i.readability(y.color,g)<1.5?h.contrast(g):y.color,w=a.spikemode,k=a.spikethickness,T=a.spikecolor||_,A=p.getPxPosition(t,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var M=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),S=Math.max(S,a.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k,stroke:T,"stroke-dasharray":u.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":k+2,stroke:g}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==a.side?k:-k),cy:m,r:k,fill:T}).classed("spikeline",!0)}if(d){var E,C,L=e.vLinePoint;n=L&&L.xa,a=L&&L.ya,"cursor"===n.spikesnap?(E=c.pointerX,C=c.pointerY):(E=n._offset+L.x,C=a._offset+L.y);var P,O,I=i.readability(L.color,g)<1.5?h.contrast(g):L.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||I,F=p.getPxPosition(t,n);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(P=F,O=C),-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,O=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D,stroke:R,"stroke-dasharray":u.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D+2,stroke:g}).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 C(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function L(t,e){return l.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":719,"../../lib/events":709,"../../lib/override_cursor":730,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../registry":848,"../color":594,"../dragelement":612,"../drawing":615,"./constants":627,"./helpers":629,d3:164,"fast-isnumeric":226,tinycolor2:538}],631:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r,a){r("hoverlabel.bgcolor",(a=a||{}).bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},{"../../lib":719}],632:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=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 a.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return a.castOption(t,r,"hoverinfo",function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:l.hover,unhover:i.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=a.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:t("./click")}},{"../../lib":719,"../dragelement":612,"./attributes":624,"./calc":625,"./click":626,"./constants":627,"./defaults":628,"./helpers":629,"./hover":630,"./layout_attributes":633,"./layout_defaults":634,"./layout_global_defaults":635,d3:164}],633:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../plots/font_attributes")({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","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1],editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:20,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,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":793,"./constants":627}],634:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}var o,s=i("clickmode");"select"===i("dragmode")&&i("selectdirection"),e._has("cartesian")?s.indexOf("select")>-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){f||p||d||"independent"===T("pattern")&&(f=!0),v._hasSubplotGrid=f;var x,b,_="top to bottom"===T("roworder"),w=f?.2:.1,k=f?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:u("x",T,w,x,y),y:u("y",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,a,i,o,s,l,u,f=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(d){var x=f.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==g||c.uirevision){var v,m,y,x=i.newContainer(e,"legend");if(b("uirevision",e.uirevision),!1!==g)b("bgcolor",e.paper_bgcolor),b("bordercolor"),b("borderwidth"),a.coerceFont(b,"font",e.font),"h"===b("orientation")?(v=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(m=1.1,y="bottom"):(m=-.1,y="top")):(v=1.02,m=1,y="auto"),b("traceorder",f),l.isGrouped(e.legend)&&b("tracegroupgap"),b("itemsizing"),b("itemclick"),b("itemdoubleclick"),b("x",v),b("xanchor"),b("y",m),b("yanchor",y),b("valign"),a.noneOrAll(c,x,["x","y"])}function b(t,e){return a.coerce(c,x,o,t,e)}}},{"../../lib":719,"../../plot_api/plot_template":757,"../../plots/layout_attributes":819,"../../registry":848,"./attributes":642,"./helpers":648}],645:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),h=t("../../lib/svg_text_utils"),f=t("./handle_click"),p=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,v=d.FROM_TL,m=d.FROM_BR,y=t("./get_legend_data"),x=t("./style"),b=t("./helpers");function _(t,e,r,n,a){var i=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(i._group&&(l.group=i._group),o.traceIs(i,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l))if(1===n)e._clickTimeout=setTimeout(function(){f(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)&&f(r,t,n)}}function w(t,e){var r=t.data()[0][0],n=e._fullLayout,i=n.legend,s=r.trace,l=o.traceIs(s,"pie-like"),u=s.index,f=e._context.edits.legendText&&!l,d=i._maxNameLength,v=l?r.label:s.name;s._meta&&(v=a.templateString(v,s._meta));var m=a.ensureSingle(t,"text","legendtext");function y(r){h.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,a,i=t.select("g[class*=math-group]"),o=i.node(),s=e._fullLayout.legend.font.size*g;if(o){var l=c.bBox(o);n=l.height,a=l.width,c.setTranslate(i,0,n/4)}else{var u=t.select(".legendtext"),f=h.lineCount(u),d=u.node();n=s*f,a=d?c.bBox(d).width:0;var v=s*(.3+(1-f)/2);h.positionText(u,p.textGap,v)}r.lineHeight=s,r.height=Math.max(n,16)+3,r.width=a}(t,e)})}m.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,n.legend.font).text(f?k(v,d):v),h.positionText(m,p.textGap,0),f?m.call(h.makeEditable,{gd:e,text:v}).call(y).on("edit",function(t){this.text(k(t,d)).call(y);var n=r.trace._fullInput||{},i={};if(o.hasTransform(n,"groupby")){var s=o.getTransformIndices(n,"groupby"),l=s[s.length-1],c=a.keyedContainer(n,"transforms["+l+"].styles","target","value.name");c.set(r.trace._group,t),i=c.constructUpdate()}else i.name=t;return o.call("_guiRestyle",e,i,u)}):y(m)}function k(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 T(t,e){var r,i=e._context.doubleClickDelay,o=1,s=a.ensureSingle(t,"rect","legendtoggle",function(t){t.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")});s.on("mousedown",function(){(r=(new Date).getTime())-e._legendMouseDownTimei&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})}function A(t){return a.isRightAnchor(t)?"right":a.isCenterAnchor(t)?"center":"left"}function M(t){return a.isBottomAnchor(t)?"bottom":a.isMiddleAnchor(t)?"middle":"top"}e.exports=function(t){var e=t._fullLayout,r="legend"+e._uid;if(e._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var s=e.legend,h=e.showlegend&&y(t.calcdata,s),f=e.hiddenlabels||[];if(!e.showlegend||!h.length)return e._infolayer.selectAll(".legend").remove(),e._topdefs.select("#"+r).remove(),i.autoMargin(t,"legend");var d=a.ensureSingle(e._infolayer,"g","legend",function(t){t.attr("pointer-events","all")}),g=a.ensureSingleById(e._topdefs,"clipPath",r,function(t){t.append("rect")}),k=a.ensureSingle(d,"rect","bg",function(t){t.attr("shape-rendering","crispEdges")});k.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var S=a.ensureSingle(d,"g","scrollbox"),E=a.ensureSingle(d,"rect","scrollbar",function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)}),C=S.selectAll("g.groups").data(h);C.enter().append("g").attr("class","groups"),C.exit().remove();var L=C.selectAll("g.traces").data(a.identity);L.enter().append("g").attr("class","traces"),L.exit().remove(),L.style("opacity",function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==f.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){n.select(this).call(w,t)}).call(x,t).each(function(){n.select(this).call(T,t)}),a.syncOrAsync([i.previousPromises,function(){return function(t,e,r){var a=t._fullLayout,i=a.legend,o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,h=2*u,f=p.textGap,d=p.itemGap,g=2*(u+d),v=M(i),m=i.y<0||0===i.y&&"top"===v,y=i.y>1||1===i.y&&"bottom"===v;i._maxHeight=Math.max(m||y?a.height/2:o.h,30);var x=0;if(i._width=0,i._height=0,s)r.each(function(t){var e=t[0].height;c.setTranslate(this,u,d+u+i._height+e/2),i._height+=e,i._width=Math.max(i._width,t[0].width)}),x=f+i._width,i._width+=d+f+h,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 _=A(i),w=i.x<0||0===i.x&&"right"===_,k=i.x>1||1===i.x&&"left"===_,T=y||m,S=a.width/2;i._maxWidth=Math.max(w?T&&"left"===_?o.l+o.w:S:k?T&&"right"===_?o.r+o.w:S:o.w,2*f);var E=0,C=0;r.each(function(t){var e=t[0].width+f;E=Math.max(E,e),C+=e}),x=null;var L=0;if(l){var P=0,O=0,I=0;e.each(function(){var t=0,e=0;n.select(this).selectAll("g.traces").each(function(r){var n=r[0].height;c.setTranslate(this,0,d+u+n/2+e),e+=n,t=Math.max(t,f+r[0].width)}),P=Math.max(P,e);var r=t+d;r+u+O>i._maxWidth&&(L=Math.max(L,O),O=0,I+=P+i.tracegroupgap,P=e),c.setTranslate(this,O,I),O+=r}),i._width=Math.max(L,O)+u,i._height=I+P+g}else{var z=r.size(),D=C+h+(z-1)*di._maxWidth&&(L=Math.max(L,N),F=0,B+=R,i._height+=R,R=0),c.setTranslate(this,u+F,d+u+e/2+B),N=F+r+d,F+=n,R=Math.max(R,e)}),D?(i._width=F+h,i._height=R+g):(i._width=Math.max(L,N)+h,i._height+=R+g)}}i._width=Math.ceil(i._width),i._height=Math.ceil(i._height),i._effHeight=Math.min(i._height,i._maxHeight);var j=t._context.edits,V=j.legendText||j.legendPosition;r.each(function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=V?f:x||f+t[0].width;s||(a+=d/2),c.setRect(e,0,-r/2,a,r)})}(t,C,L)},function(){if(!function(t){var e=t._fullLayout.legend,r=A(e),n=M(e);return i.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._effHeight*m[n],t:e._effHeight*v[n]})}(t)){var u,h,f,y,x=e._size,b=s.borderwidth,w=x.l+x.w*s.x-v[A(s)]*s._width,T=x.t+x.h*(1-s.y)-v[M(s)]*s._effHeight;if(e.margin.autoexpand){var C=w,L=T;w=a.constrain(w,0,e.width-s._width),T=a.constrain(T,0,e.height-s._effHeight),w!==C&&a.log("Constrain legend.x to make legend fit inside graph"),T!==L&&a.log("Constrain legend.y to make legend fit inside graph")}if(c.setTranslate(d,w,T),E.on(".drag",null),d.on("wheel",null),s._height<=s._maxHeight||t._context.staticPlot)k.attr({width:s._width-b,height:s._effHeight-b,x:b/2,y:b/2}),c.setTranslate(S,0,0),g.select("rect").attr({width:s._width-2*b,height:s._effHeight-2*b,x:b,y:b}),c.setClipUrl(S,r,t),c.setRect(E,0,0,0,0),delete s._scrollY;else{var P,O,I,z=Math.max(p.scrollBarMinHeight,s._effHeight*s._effHeight/s._height),D=s._effHeight-z-2*p.scrollBarMargin,R=s._height-s._effHeight,F=D/R,B=Math.min(s._scrollY||0,R);k.attr({width:s._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:s._effHeight-b,x:b/2,y:b/2}),g.select("rect").attr({width:s._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:s._effHeight-2*b,x:b,y:b+B}),c.setClipUrl(S,r,t),V(B,z,F),d.on("wheel",function(){V(B=a.constrain(s._scrollY+n.event.deltaY/D*R,0,R),z,F),0!==B&&B!==R&&n.event.preventDefault()});var N=n.behavior.drag().on("dragstart",function(){var t=n.event.sourceEvent;P="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,I=B}).on("drag",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(O="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,V(B=function(t,e,r){var n=(r-e)/F+t;return a.constrain(n,0,R)}(I,P,O),z,F))});E.call(N);var j=n.behavior.drag().on("dragstart",function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(P=t.changedTouches[0].clientY,I=B)}).on("drag",function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(O=t.changedTouches[0].clientY,V(B=function(t,e,r){var n=(e-r)/F+t;return a.constrain(n,0,R)}(I,P,O),z,F))});S.call(j)}if(t._context.edits.legendPosition)d.classed("cursor-move",!0),l.init({element:d.node(),gd:t,prepFn:function(){var t=c.getTranslate(d);f=t.x,y=t.y},moveFn:function(t,e){var r=f+t,n=y+e;c.setTranslate(d,r,n),u=l.align(r,0,x.l,x.l+x.w,s.xanchor),h=l.align(n,0,x.t+x.h,x.t,s.yanchor)},doneFn:function(){void 0!==u&&void 0!==h&&o.call("_guiRelayout",t,{"legend.x":u,"legend.y":h})},clickFn:function(r,n){var a=e._infolayer.selectAll("g.traces").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});a.size()>0&&_(t,d,a,r,n)}})}function V(e,r,n){s._scrollY=t._fullLayout.legend._scrollY=e,c.setTranslate(S,0,-e),c.setRect(E,s._width,p.scrollBarMargin+e*n,p.scrollBarWidth,r),g.select("rect").attr("y",b+e)}}],t)}}},{"../../constants/alignment":688,"../../lib":719,"../../lib/events":709,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":848,"../color":594,"../dragelement":612,"../drawing":615,"./constants":643,"./get_legend_data":646,"./handle_click":647,"./helpers":648,"./style":650,d3:164}],646:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("./helpers");e.exports=function(t,e){var r,i,o={},s=[],l=!1,c={},u=0,h=0;function f(t,r){if(""!==t&&a.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;a=e.width}return v?n:Math.min(a,r)}function y(t,e,r){var i=t[0].trace,o=i.marker||{},l=o.line||{},c=r?i.type===r&&i.visible:a.traceIs(i,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each(function(t){var e=n.select(this),r=t[0],a=m(r.mlw,o.line,g,p);e.style("stroke-width",a+"px").call(s.fill,r.mc||o.color),a&&s.stroke(e,r.mlc||l.color)})}function x(t,e,r){var o=t[0],s=o.trace,l=r?s.type===r&&s.visible:a.traceIs(s,r),h=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(h.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),h.exit().remove(),h.size()){var f=(s.marker||{}).line,d=m(u(f.width,o.pts),f,g,p),v=i.minExtend(s,{marker:{line:{width:d}}});v.marker.line.color=f.color;var y=i.minExtend(o,{trace:v});c(h,y,v)}}t.each(function(t){var e=n.select(this),a=i.ensureSingle(e,"g","layers");a.style("opacity",t[0].trace.opacity);var o=r.valign,s=t[0].lineHeight,l=t[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));a.attr("transform","translate(0,"+c+")")}else a.attr("transform",null);a.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var u=a.selectAll("g.legendsymbols").data([t]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)}).each(function(t){var e=t[0].trace,r=[];"waterfall"===e.type&&e.visible&&(r=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 a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(r);a.enter().append("path").classed("legendwaterfall",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),a.exit().remove(),a.each(function(t){var r=n.select(this),a=e[t[0]].marker,i=m(void 0,a.line,g,p);r.attr("d",t[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)})}).each(function(t){y(t,this,"funnel")}).each(function(t){y(t,this)}).each(function(t){var r=t[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.traceIs(r,"box-violin")&&r.visible?[t]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),l.exit().remove(),l.each(function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=m(void 0,r.line,g,p);t.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(t,r.line.color)}else{var c=i.minExtend(r,{marker:{size:v?h:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,e)}})}).each(function(t){x(t,this,"funnelarea")}).each(function(t){x(t,this,"pie")}).each(function(t){var r,a,s=t[0],c=s.trace,u=c.visible&&c.fill&&"none"!==c.fill,h=l.hasLines(c),p=c.contours,g=!1,v=!1;if(p){var y=p.coloring;"lines"===y?g=!0:h="none"===y||"heatmap"===y||p.showlines,"constraint"===p.type?u="="!==p._operation:"fill"!==y&&"heatmap"!==y||(v=!0)}var x=l.hasMarkers(c)||l.hasText(c),b=u||v,_=h||g,w=x||!b?"M5,0":_?"M5,-2":"M5,-3",k=n.select(this),T=k.select(".legendfill").selectAll("path").data(u||v?[t]:[]);if(T.enter().append("path").classed("js-fill",!0),T.exit().remove(),T.attr("d",w+"h30v6h-30z").call(u?o.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+c.uid;o.gradient(t,e,r,"horizontalreversed",c.colorscale,"fill")}}),h||g){var A=m(void 0,c.line,d,f);a=i.minExtend(c,{line:{width:A}}),r=[i.minExtend(s,{trace:a})]}var M=k.select(".legendlines").selectAll("path").data(h||g?[r]:[]);M.enter().append("path").classed("js-line",!0),M.exit().remove(),M.attr("d",w+(g?"l30,0.0001":"h30")).call(h?o.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+c.uid;o.lineGroupStyle(t),o.gradient(t,e,r,"horizontalreversed",c.colorscale,"stroke")}})}).each(function(t){var r,a,s=t[0],c=s.trace,u=l.hasMarkers(c),d=l.hasText(c),g=l.hasLines(c);function m(t,e,r,n){var a=i.nestedProperty(c,t).get(),o=i.isArrayOrTypedArray(a)&&e?e(a):a;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function y(t){return t[0]}if(u||d||g){var x={},b={};if(u){x.mc=m("marker.color",y),x.mx=m("marker.symbol",y),x.mo=m("marker.opacity",i.mean,[.2,1]),x.mlc=m("marker.line.color",y),x.mlw=m("marker.line.width",i.mean,[0,5],p),b.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _=m("marker.size",i.mean,[2,16],h);x.ms=_,b.marker.size=_}g&&(b.line={width:m("line.width",y,[0,10],f)}),d&&(x.tx="Aa",x.tp=m("textposition",y),x.ts=10,x.tc=m("textfont.color",y),x.tf=m("textfont.family",y)),r=[i.minExtend(s,x)],(a=i.minExtend(c,b)).selectedpoints=null}var w=n.select(this).select("g.legendpoints"),k=w.selectAll("path.scatterpts").data(u?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),k.exit().remove(),k.call(o.pointStyle,a,e),u&&(r[0].mrc=3);var T=w.selectAll("g.pointtext").data(d?r:[]);T.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),T.exit().remove(),T.selectAll("text").call(o.textPointStyle,a,e,!0)}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data("candlestick"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],o=m(void 0,i.line,g,p);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data("ohlc"===e.type&&e.visible?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var a=n.select(this),i=e[r?"increasing":"decreasing"],l=m(void 0,i.line,g,p);a.style("fill","none").call(o.dashLine,i.line.dash,l),l&&s.stroke(a,i.line.color)})})}},{"../../lib":719,"../../registry":848,"../../traces/pie/helpers":1090,"../../traces/pie/style_one":1096,"../../traces/scatter/subtypes":1134,"../color":594,"../drawing":615,d3:164}],651:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../plots/plots"),i=t("../../plots/cartesian/axis_ids"),o=t("../../lib"),s=t("../../fonts/ploticon"),l=o._,c=e.exports={};function u(t,e){var r,a,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=i.list(t,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(a=0;a1?(A=["toggleHover"],M=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],M=["resetGeo"]):h?(A=["hoverClosest3d"],M=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(A=["toggleHover"],M=["resetViewMapbox"]):g?A=["hoverClosestGl2d"]:p?A=["hoverClosestPie"]:x?(A=["hoverClosestCartesian","hoverCompareCartesian"],M=["resetViewSankey"]):A=["toggleHover"];u&&(A=["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}),a=0,i=0;i0?f+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,a){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,h,f=1/0,p=-1/0,d=n.match(i.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=h)));return p>=f?[f,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;o10?t/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:D?q(r.xanchor)+r.x0:q(r.x0),cy:R?H(r.yanchor)-r.y0:H(r.y0),r:i}).style(a).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:D?q(r.xanchor)+r.x1:q(r.x1),cy:R?H(r.yanchor)-r.y1:H(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():e,X={element:W.node(),gd:t,prepFn:function(n){D&&(_=q(r.xanchor));R&&(w=H(r.yanchor));"path"===r.type?P=r.path:(m=D?r.x0:q(r.x0),y=R?r.y0:H(r.y0),x=D?r.x1:q(r.x1),b=R?r.y1:H(r.y1));mb?(k=y,S="y0",T=b,E="y1"):(k=b,S="y1",T=y,E="y0");Z(n),Q(p,r),function(t,e,r){var n=e.xref,a=e.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),c="";"paper"===n||o.autorange||(c+=n);"paper"===a||l.autorange||(c+=a);s.setClipUrl(t,c?"clip"+r._fullLayout._uid+c:null,r)}(e,r,t),X.moveFn="move"===O?J:K},doneFn:function(){u(e),$(p),d(e,t,r),n.call("_guiRelayout",t,N.getUpdateObj())},clickFn:function(){$(p)}};function Z(t){if(F)O="path"===t.target.tagName?"move":"start-point"===t.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=X.element.getBoundingClientRect(),n=r.right-r.left,a=r.bottom-r.top,i=t.clientX-r.left,o=t.clientY-r.top,s=!B&&n>I&&a>z&&!t.shiftKey?c.getCursor(i/n,1-o/a):"move";u(e,s),O=s.split("-")[0]}}function J(n,a){if("path"===r.type){var i=function(t){return t},o=i,s=i;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&"date"===V.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+a)):(s=function(t){return Y(H(t)+a)},U&&"date"===U.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else D?j("xanchor",r.xanchor=G(_+n)):(j("x0",r.x0=G(m+n)),j("x1",r.x1=G(x+n))),R?j("yanchor",r.yanchor=Y(w+a)):(j("y0",r.y0=Y(y+a)),j("y1",r.y1=Y(b+a)));e.attr("d",g(t,r)),Q(p,r)}function K(n,a){if(B){var i=function(t){return t},o=i,s=i;D?j("xanchor",r.xanchor=G(_+n)):(o=function(t){return G(q(t)+n)},V&&"date"===V.type&&(o=f.encodeDate(o))),R?j("yanchor",r.yanchor=Y(w+a)):(s=function(t){return Y(H(t)+a)},U&&"date"===U.type&&(s=f.encodeDate(s))),j("path",r.path=v(P,o,s))}else if(F){if("resize-over-start-point"===O){var l=m+n,c=R?y-a:y+a;j("x0",r.x0=D?l:G(l)),j("y0",r.y0=R?c:Y(c))}else if("resize-over-end-point"===O){var u=x+n,h=R?b-a:b+a;j("x1",r.x1=D?u:G(u)),j("y1",r.y1=R?h:Y(h))}}else{var d=~O.indexOf("n")?k+a:k,N=~O.indexOf("s")?T+a:T,W=~O.indexOf("w")?A+n:A,X=~O.indexOf("e")?M+n:M;~O.indexOf("n")&&R&&(d=k-a),~O.indexOf("s")&&R&&(N=T-a),(!R&&N-d>z||R&&d-N>z)&&(j(S,r[S]=R?d:Y(d)),j(E,r[E]=R?N:Y(N))),X-W>I&&(j(C,r[C]=D?W:G(W)),j(L,r[L]=D?X:G(X)))}e.attr("d",g(t,r)),Q(p,r)}function Q(t,e){(D||R)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=q(D?e.xanchor:a.midRange(r?[e.x0,e.x1]:f.extractPathCoords(e.path,h.paramIsX))),o=H(R?e.yanchor:a.midRange(r?[e.y0,e.y1]:f.extractPathCoords(e.path,h.paramIsY)));if(i=f.roundPositionForSharpStrokeRendering(i,1),o=f.roundPositionForSharpStrokeRendering(o,1),D&&R){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(D){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function $(t){t.selectAll(".visual-cue").remove()}c.init(X),W.node().onmousemove=Z}(t,x,r,e,p)}}function d(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function g(t,e){var r,n,o,s,l,c,u,p,d=e.type,g=i.getFromId(t,e.xref),v=i.getFromId(t,e.yref),m=t._fullLayout._size;if(g?(r=f.shapePositionToRange(g),n=function(t){return g._offset+g.r2p(r(t,!0))}):n=function(t){return m.l+m.w*t},v?(o=f.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return m.t+m.h*(1-t)},"path"===d)return g&&"date"===g.type&&(n=f.decodeDate(n)),v&&"date"===v.type&&(s=f.decodeDate(s)),function(t,e,r){var n=t.path,i=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(h.segmentRE,function(t){var n=0,c=t.charAt(0),u=h.paramIsX[c],f=h.paramIsY[c],p=h.numParams[c],d=t.substr(1).replace(h.paramRE,function(t){return u[n]?t="pixel"===i?e(s)+Number(t):e(t):f[n]&&(t="pixel"===o?r(l)-Number(t):r(t)),++n>p&&(t="X"),t});return n>p&&(d=d.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+t)),c+d})}(e,n,s);if("pixel"===e.xsizemode){var y=n(e.xanchor);l=y+e.x0,c=y+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var x=s(e.yanchor);u=x-e.y0,p=x-e.y1}else u=s(e.y0),p=s(e.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+p;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+p+"H"+l+"Z";var b=(l+c)/2,_=(u+p)/2,w=Math.abs(b-l),k=Math.abs(_-u),T="A"+w+","+k,A=b+w+","+_;return"M"+A+T+" 0 1,1 "+(b+","+(_-k))+T+" 0 0,1 "+A+"Z"}function v(t,e,r){return t.replace(h.segmentRE,function(t){var n=0,a=t.charAt(0),i=h.paramIsX[a],o=h.paramIsY[a],s=h.numParams[a];return a+t.substr(1).replace(h.paramRE,function(t){return n>=s?t:(i[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}e.exports={draw:function(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+e._dims.currentValueTotalHeight+")")}}function S(t,e){var r=t._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,a=s.ensureSingle(t,"rect",u.railTouchRectClass,function(n){n.call(T,e,t,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function L(t,e){var r=e._dims,n=r.inputAreaLength-2*u.railInset,a=s.ensureSingle(t,"rect",u.railRectClass);a.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,e.bordercolor).call(i.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(a,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[u.name],n=[],a=0;a0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),a.autoMargin(t,g(e))}if(i.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),i.exit().each(function(){n.select(this).selectAll("g."+u.groupClassName).each(s)}).remove(),0!==r.length){var l=i.selectAll("g."+u.groupClassName).data(r,v);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||f<0){var g={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[y.side];e.attr("transform","translate("+g+")")}}}I.call(z),P&&(M?I.on(".opacity",null):(k=0,T=!0,I.text(v).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)})),I.call(u.makeEditable,{gd:t}).on("edit",function(e){void 0!==m?o.call("_guiRestyle",t,g,e,m):o.call("_guiRelayout",t,g,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(z)}).on("input",function(t){this.text(t||" ").call(u.positionText,x.x,x.y)}));return I.classed("js-placeholder",T),_}};var f=/ [XY][0-9]* /},{"../../constants/interactions":694,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/plots":828,"../../registry":848,"../color":594,"../drawing":615,d3:164,"fast-isnumeric":226}],682:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../color/attributes"),i=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/font_attributes":793,"../../plots/pad_attributes":827,"../color/attributes":593}],683:[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"}}},{}],684:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/array_container_defaults"),i=t("./attributes"),o=t("./constants").name,s=i.buttons;function l(t,e,r){function o(r,a){return n.coerce(t,e,i,r,a)}o("visible",a(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,a){return n.coerce(t,e,s,r,a)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("label"),r("execute"))}e.exports=function(t,e){a(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":719,"../../plots/array_container_defaults":763,"./attributes":682,"./constants":683}],685:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/plots"),i=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,h=t("./constants"),f=t("./scrollbox");function p(t){return t._index}function d(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function g(t,e,r,n,a,i,o,s){e.active=o,c(t.layout,h.name,e).applyUpdate("active",o),"buttons"===e.type?m(t,n,null,null,e):"dropdown"===e.type&&(a.attr(h.menuIndexAttrName,"-1"),v(t,n,a,i,e),s||m(t,n,a,i,e))}function v(t,e,r,n,a){var i=s.ensureSingle(e,"g",h.headerClassName,function(t){t.style("pointer-events","all")}),l=a._dims,c=a.active,u=a.buttons[c]||h.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};i.call(y,a,u,t).call(M,a,f,p),s.ensureSingle(e,"text",h.headerArrowClassName,function(t){t.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(h.arrowSymbol[a.direction])}).attr({x:l.headerWidth-h.arrowOffsetX+a.pad.l,y:l.headerHeight/2+h.textOffsetY+a.pad.t}),i.on("click",function(){r.call(S,String(d(r,a)?-1:a._index)),m(t,e,r,n,a)}),i.on("mouseover",function(){i.call(w)}),i.on("mouseout",function(){i.call(k,a)}),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,i,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,v=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?v=m.headerHeight+h.gapButtonHeader:d=m.headerWidth+h.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(v=-h.gapButtonHeader+h.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},T={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||(g(t,o,0,e,r,i,l),s.execute&&a.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(k,o),u.call(_,o)})}),u.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,i&&(u.size()?function(t,e,r,n,a,i){var o,s,l,c=a.direction,u="up"===c||"down"===c,f=a._dims,p=a.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(i)}).remove(),0!==r.length){var l=o.selectAll("g."+h.headerGroupClassName).data(r,p);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",h.dropdownButtonGroupClassName,function(t){t.style("pointer-events","all")}),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=v+m;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),T?(this.hbar=C.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 L=m>k,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=d+g,z=v;I+P>l&&(I=l-P);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:z,width:P,height:O}),this._vbarYMin=z+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?h+P+.5:h+.5,N=f-.5,j=T?p+M+.5:p+.5,V=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",R).append("rect"),T||L?(this._clipRect=V.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(i.setClipUrl,R,this.gd),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||L){var U=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(U);var q=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.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,a=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=e+this._vbarYMin,s=i+this._vbarTranslateMax;e=(o.constrain(n.event.y,i,s)-i)/(s-i)*(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(i.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 a=t/r;this.hbar.call(i.setTranslate,t+a*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(i.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":719,"../color":594,"../drawing":615,d3:164}],688:[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"}}},{}],689:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},{}],690:[function(t,e,r){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format"}},{}],691:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],692:[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]}},{}],693:[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"}},{}],694:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],695:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],696:[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}},{}],697:[function(t,e,r){"use strict";r.version="1.50.1",t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),a=r.register=n.register,i=t("./plot_api"),o=Object.keys(i),s=0;splotly-logomark"}}},{}],700:[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}},{}],701:[function(t,e,r){"use strict";var n=t("./mod"),a=n.mod,i=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 i(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=a(n,s))&&(n+=s);var i=a(t,s),o=i+s;return i>=r&&i<=n||o>=r&&o<=n}function h(t,e,r,n,a,i,c){a=a||0,i=i||0;var u,h,f,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+a,i-t*Math.sin(e)]}g?(u=0,h=o,f=s):r=a&&t<=i);var a,i},pathArc:function(t,e,r,n,a){return h(null,t,e,r,n,a,0)},pathSector:function(t,e,r,n,a){return h(null,t,e,r,n,a,1)},pathAnnulus:function(t,e,r,n,a,i){return h(t,e,r,n,a,i,1)}}},{"./mod":726}],702:[function(t,e,r){"use strict";var n=Array.isArray,a="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i="undefined"==typeof DataView?function(){}:DataView;function o(t){return a.isView(t)&&!(t instanceof i)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,a=0;aa.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,a){t%1||!n(t)||void 0!==a.min&&ta.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var a="number"==typeof t;!0!==n.strict&&a?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){a(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every(function(t){return a(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(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var a=n.regex||c(r);"string"==typeof t&&a.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if("string"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var a=t.split("+"),i=0;i=n&&t<=a?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(e),m=t.charAt(0);!c||"G"!==m&&"g"!==m||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),k=t.match(w?x:y);if(!k)return u;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var P=v.getComponentMethod("calendars","getCal")(e);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),L=P.newDate(T,P.toMonthIndex(T,A,O),M)}else L=P.newDate(T,Number(A),M)}catch(t){return u}return L?(L.toJD()-g)*h+S*f+E*p+C*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var I=new Date(Date.UTC(2e3,A,M,S,E));return I.setUTCFullYear(T),I.getUTCMonth()!==A?u:I.getUTCDate()!==M?u:I.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var k=90*h,T=3*f,A=5*p;function M(t,e,r,n,a){if((e||r||n||a)&&(t+=" "+w(e,2)+":"+w(r,2),(n||a)&&(t+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;t+="."+w(a,i)}return t}r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=a))return u;e||(e=0);var i,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/h)+g,E=Math.floor(l(t,h));try{i=v.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){i=m("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=e=n+h&&t<=a-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(i.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var S=/%\d?f/g;function E(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 a=new Date(Math.floor(e+.05));if(_(n))try{t=v.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(a)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,a,i){if(a=_(a)&&a,!e)if("y"===r)e=i.year;else if("m"===r)e=i.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,h),n=w(Math.floor(r/f),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var a=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(t,r)+"\n"+E(i.dayMonthYear,t,n,a);e=i.dayMonth+"\n"+i.year}return E(e,t,n,a)};var L=3*h;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var a=Math.round(t/h)+g,i=v.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return e%12?i.add(o,e,"m"):i.add(o,e/12,"y"),(o.toJD()-g)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,a=0,i=0,s=0,l=0,c=_(e)&&v.getComponentMethod("calendars","getCal")(e),u=0;u0&&(r.push(a),a=[])}return a.length>0&&r.push(a),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+h*g}}function l(t,e,r,n,a){var i=n*t+a*e;if(i<0)return n*n+a*a;if(i>r){var o=n-t,s=a-e;return o*o+s*s}var l=n*e-a*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,a,i,o,c){if(s(t,e,r,n,a,i,o,c))return 0;var u=r-t,h=n-e,f=o-a,p=c-i,d=u*u+h*h,g=f*f+p*p,v=Math.min(l(u,h,d,a-t,i-e),l(u,h,d,o-t,c-e),l(f,p,g,t-a,e-i),l(f,p,g,r-a,n-i));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===a&&s===i||(n={},a=t,i=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)),h=t.getPointAtLength(o(r,e)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=f,f},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(t,e,r){var n,a,i=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),h=u;function f(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(a=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var a,i,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,h=0,f=0,p=s;h0?p=a:f=a,h++}return i}},{"./mod":726}],716:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("tinycolor2"),i=t("color-normalize"),o=t("../components/colorscale"),s=t("../components/color/attributes").defaultLine,l=t("./array").isArrayOrTypedArray,c=i(s),u=1;function h(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=i(t);return e.length?e:c}function p(t){return n(t)?t:u}e.exports={formatColor:function(t,e,r){var n,a,s,d,g,v=t.color,m=l(v),y=l(e),x=o.extractOpts(t),b=[];if(n=void 0!==x.colorscale?o.makeColorScaleFuncFromTrace(t):f,a=m?function(t,e){return void 0===t[e]?c:i(n(t[e]))}:f,s=y?function(t,e){return void 0===t[e]?u:p(t[e])}:p,m||y)for(var _=0;_o?s:a(t)?Number(t):s:s},l.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(a(t)&&t>=0&&t%1==0)},l.noop=t("./noop"),l.identity=t("./identity"),l.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},l.simpleMap=function(t,e,r,n){for(var a=t.length,i=new Array(a),o=0;o=Math.pow(2,r)?a>10?(l.warn("randstr failed uniqueness"),c):t(e,r,n,(a||0)+1):c},l.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},l.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,a,i,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(a-=s*Math.floor(a/s)),a<0?a=-1-a:a>=o&&(a=s-1-a),i+=t[a]*c[n];u[r]=i}return u},l.syncOrAsync=function(t,e,r){var n;function a(){return l.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(a).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,a=!1,i=!0;for(n=0;n0?e:0})},l.fillArray=function(t,e,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(t))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var C=/^\w*$/;l.templateString=function(t,e){var r={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,n){return C.test(n)?e[n]||"":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||"")})};var L={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return I.apply(L,arguments)};var P={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return I.apply(P,arguments)};var O=/^[:|\|]/;function I(t,e,r){var a=this,i=arguments;e||(e={});var o={};return t.replace(l.TEMPLATE_STRING_REGEX,function(t,s,c){var u,h,f,p;for(f=3;f=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(a=10*a+s-48),!l||!c){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var z=2e9;l.seedPseudoRandom=function(){z=2e9},l.pseudoRandom=function(){var t=z;return z=(69069*z+1)%4294967296,Math.abs(z-t)<429496729?l.pseudoRandom():z/4294967296},l.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},a=l.extractOption(t,e,"htx","hovertext");if(l.isValidTextValue(a))return n(a);var i=l.extractOption(t,e,"tx","text");return l.isValidTextValue(i)?n(i):void 0},l.isValidTextValue=function(t){return t||0===t},l.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;n2)return c[e]=2|c[e],f.set(t,null);if(h){for(o=e;o1){for(var t=["LOG:"],e=0;e0){for(var t=["WARN:"],e=0;e0){for(var t=["ERROR:"],e=0;ee/2?t-Math.round(t/e)*e:t}}},{}],727:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./array").isArrayOrTypedArray;e.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";for(var r,i,o,l=0,c=e.split(".");l/g),o=0;oi||c===a||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===a||li||c===a||cs)return!1;var u,h,f,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(u=1;uMath.max(h,v)||c>Math.max(f,m)))if(cu||Math.abs(n(o,f))>a)return!0;return!1},i.filter=function(t,e){var r=[t[0]],n=0,a=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{"../constants/numerical":695,"./matrix":725}],732:[function(t,e,r){(function(r){"use strict";var n=t("./show_no_webgl_msg"),a=t("regl");e.exports=function(t,e){var i=t._fullLayout,o=!0;return i._glcanvas.each(function(n){if(!n.regl&&(!n.pick||i._has("parcoords"))){try{n.regl=a({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}o&&this.addEventListener("webglcontextlost",function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})},!1)}}),o||n({container:i._glcontainer.node()}),o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":740,regl:503}],733:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;na.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function c(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var i,u,h=0,f=e.length,p=0,d=f>1?(e[f-1]-e[0])/(f-1):1;for(u=d>=0?r?o:s:r?c:l,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);h90&&a.log("Long binary search..."),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e=t.slice();e.sort(r.sorterAsc);for(var n=e.length-1,a=e[n]-e[0]||1,i=a/(n||1)/1e4,o=[e[0]],s=0;se[s]+i&&(a=Math.min(a,e[s+1]-e[s]),o.push(e[s+1]));return{vals:o,minDiff:a}},r.roundUp=function(t,e,r){for(var n,a=0,i=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(e)||(e=!1),a(i[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":702,"fast-isnumeric":226}],742:[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":121}],743:[function(t,e,r){"use strict";var n=t("d3"),a=t("../lib"),i=t("../constants/xmlns_namespaces"),o=t("../constants/alignment").LINE_SPACING;function s(t,e){return t.node().getBoundingClientRect()[e]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,M){var S=t.text(),C=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(e&&e._promises||[]).push(new Promise(function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),i={fontSize:r};!function(t,e,r){var i,o,s,l;MathJax.Hub.Queue(function(){return o=a.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"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},function(){var r="math-output-"+a.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())a.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"!==i)return MathJax.Hub.setRenderer(i)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})}(C[2],i,function(n,a,i){L.selectAll("svg."+P).remove(),L.selectAll("g."+P+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return O(),void e();var l=L.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(o.node()),a&&a.node()&&o.node().insertBefore(a.node().cloneNode(!0),o.node().firstChild),o.attr({class:P,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=t.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var h=s(u,"width"),f=s(u,"height"),p=+t.attr("x")-h*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],d=-(r||s(t,"height"))/4;"y"===P[0]?(l.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+") translate("+[-h/2,d-f/2]+")"}),o.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===P[0]?o.attr({x:t.attr("x"),y:d-f/2}):"a"===P[0]&&0!==P.indexOf("atitle")?o.attr({x:0,y:d}):o.attr({x:p,y:+t.attr("y")+d-f/2}),M&&M.call(t,l),e(l)})})):O(),t}function O(){L.empty()||(P=t.attr("class")+"-math",L.select("svg."+P).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(v," ");var r,s=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(i.svg,"tspan");n.select(e).attr({class:"line",dy:c*o+"em"}),t.appendChild(e),r=e;var a=l;if(l=[{node:e}],a.length>1)for(var s=1;s doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else a.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var L=e.split(m),P=0;P|>|>)/g;var h={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"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},d="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=r.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;r.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\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&&E(n)}var A=/(^|;)\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"],a="...".length,i=t.split(m),o=[],s="",l=0,c=0;ca?o.push(u.substr(0,d-a)+"..."):o.push(u.substr(0,d));break}s=""}}return o.join("")};var M={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,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)):M[e])||t})}function C(t,e,r){var n,a,i,o=r.horizontalAlign,s=r.verticalAlign||"top",l=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},i="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:i()-c.left+"px","z-index":1e3}),this}}r.convertEntities=E,r.lineCount=function(t){return t.selectAll("tspan.line").size()||1},r.positionText=function(t,e,r){return t.each(function(){var t=n.select(this);function a(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var i=a("x",e),o=a("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:i,y:o})})},r.makeEditable=function(t,e){var r=e.gd,a=e.delegate,i=n.dispatch("edit","input","cancel"),o=a||t;if(t.style({"pointer-events":a?"none":"all"}),1!==t.size())throw new Error("boo");function s(){!function(){var a=n.select(r).select(".svg-container"),o=a.append("div"),s=t.node().style,c=parseFloat(s.fontSize||12),u=e.text;void 0===u&&(u=t.attr("data-unformatted"));o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":s.fontFamily||"Arial","font-size":c,color:e.fill||s.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(u).call(C(t,a,e)).on("blur",function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,a=n.select(this).attr("class");(e=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(t,o)}).on("focus",function(){var t=this;r._editing=!0,n.select(document).on("mouseup",function(){if(n.event.target===t)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),i.cancel.call(t,this.textContent)):(i.input.call(t,this.textContent),n.select(this).call(C(t,a,e)))}).on("keydown",function(){13===n.event.which&&this.blur()}).call(l)}(),t.style({opacity:0});var a,s=o.attr("class");(a=s?"."+s.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(a).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,i,"on")}},{"../constants/alignment":688,"../constants/xmlns_namespaces":696,"../lib":719,d3:164}],744:[function(t,e,r){"use strict";var n={};function a(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var i=n[t],o=Date.now();if(!i){for(var s in n)n[s].tsi.ts+e?l():i.timer=setTimeout(function(){l(),i.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)a(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],745:[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":226}],746:[function(t,e,r){"use strict";var n=e.exports={},a=t("../plots/geo/constants").locationmodeToLayer,i=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=a[t.locationmode],n=e.objects[r];return i(e,n).features}},{"../plots/geo/constants":795,"topojson-client":541}],747:[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"}}},{}],748:[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"}}},{}],749:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,a=n.layoutArrayContainers,i=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 i=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.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&&i.warn("Full array edits are incompatible with other edits",h);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",h,y),!0;e.set(y)}return!g&&(f(v,m),p(t),!0)}var x,b,_,w,k,T,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(m,h).get(),P=[],O=-1,I=C.length;for(x=0;xC.length-(A?0:1))i.warn("index out of range",h,_);else if(void 0!==T)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",h,_),c(T)?P.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):i.warn("Unrecognized full object edit value",h,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(P[x],1),L&&L.splice(P[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(f(v,m),d!==a){var z;if(-1===O)z=S;else{for(I=Math.max(C.length,I),z=[],x=0;x=O);x++)z.push(_);for(x=O;x=t.data.length||a<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(a,n+1)>-1||a>=0&&e.indexOf(-t.data.length+a)>-1||a<0&&e.indexOf(t.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),z(t,e,"currentIndices"),"undefined"==typeof r||Array.isArray(r)||(r=[r]),"undefined"!=typeof r&&z(t,r,"newIndices"),"undefined"!=typeof r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(t,e,r,n,i){!function(t,e,r,n){var a=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if("undefined"==typeof r)throw new Error("indices must be an integer or array of integers");for(var i in z(t,r,"indices"),e){if(!Array.isArray(e[i])||e[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==e[i].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 i,l,c,u,h,f=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=I(r,t.data.length-1),e)for(var g=0;g-1?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 H(t,e,r){if(t=o.getGraphDiv(t),k.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(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 a=J(t,n),i=a.flags;i.calc&&(t.calcdata=void 0);var s=[f.previousPromises];i.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(G(t,i,a)||f.supplyDefaults(t),i.legend&&s.push(T.doLegend),i.layoutstyle&&s.push(T.layoutStyles),i.axrange&&Y(s,a.rangesAltered),i.ticks&&s.push(T.doTicksRelayout),i.modebar&&s.push(T.doModeBar),i.camera&&s.push(T.doCamera),i.colorbars&&s.push(T.doColorBars),s.push(C)),s.push(f.rehover,f.redrag),c.add(t,H,[t,a.undoit],H,[t,a.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then(function(){return t.emit("plotly_relayout",a.eventData),t})}function G(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var a in e)if("axrange"!==a&&e[a])return!1;for(var i in r.rangesAltered){var o=d.id2name(i),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==i){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function Y(t,e){var r=e?function(t){var r=[],n=!0;for(var a in e){var i=d.getFromId(t,a);if(r.push(a),i._matchGroup)for(var o in i._matchGroup)e[o]||r.push(o);i.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function J(t,e){var r,n,a,i=t.layout,l=t._fullLayout,c=l._guiEditing,f=j(l._preGUI,c),p=Object.keys(e),g=d.list(t),v=o.extendDeepAll({},e),m={};for(q(e),p=Object.keys(e),n=0;n0&&"string"!=typeof I.parts[D];)D--;var R=I.parts[D],F=I.parts[D-1]+"."+R,B=I.parts.slice(0,D).join("."),V=s(t.layout,B).get(),U=s(l,B).get(),H=I.get();if(void 0!==z){T[O]=z,S[O]="reverse"===R?z:N(H);var G=h.getLayoutValObject(l,I.parts);if(G&&G.impliedEdits&&null!==z)for(var Y in G.impliedEdits)E(o.relativeAttr(O,Y),G.impliedEdits[Y]);if(-1!==["width","height"].indexOf(O))if(z){E("autosize",null);var J="height"===O?"width":"height";E(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",z?null:l.width),E("height",z?null:l.height);else if(F.match(W))P(F),s(l,B+"._inputRange").set(null);else if(F.match(X)){P(F),s(l,B+"._inputRange").set(null);var Q=s(l,B).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(Z)&&s(l,B+"._inputDomain").set(null);if("type"===R){var $=V,tt="linear"===U.type&&"log"===z,et="log"===U.type&&"linear"===z;if(tt||et){if($&&$.range)if(U.autorange)tt&&($.range=$.range[1]>$.range[0]?[1,2]:[2,1]);else{var rt=$.range[0],nt=$.range[1];tt?(rt<=0&&nt<=0&&E(B+".autorange",!0),rt<=0?rt=nt/1e6:nt<=0&&(nt=rt/1e6),E(B+".range[0]",Math.log(rt)/Math.LN10),E(B+".range[1]",Math.log(nt)/Math.LN10)):(E(B+".range[0]",Math.pow(10,rt)),E(B+".range[1]",Math.pow(10,nt)))}else E(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,U,z,E),u.getComponentMethod("images","convertCoords")(t,U,z,E)}else E(B+".autorange",!0),E(B+".range",null);s(l,B+"._inputRange").set(null)}else if(R.match(M)){var at=s(l,O).get(),it=(z||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,at,it,E),u.getComponentMethod("images","convertCoords")(t,at,it,E)}var ot=w.containerArrayMatch(O);if(ot){r=ot.array,n=ot.index;var st=ot.property,lt=G||{editType:"calc"};""!==n&&""===st&&(w.isAddVal(z)?S[O]=null:w.isRemoveVal(z)?S[O]=(s(i,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,lt),m[r]||(m[r]={});var ct=m[r][n];ct||(ct=m[r][n]={}),ct[st]=z,delete e[O]}else"reverse"===R?(V.range?V.range.reverse():(E(B+".autorange",!0),V.range=[1,0]),U.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===z||"select"===z)&&"lasso"!==H&&"select"!==H?_.plot=!0:l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,I.set(z))}}for(r in m){w.applyContainerArrayChanges(t,f(i,r),m[r],_,f)||(_.plot=!0)}var ut=l._axisConstraintGroups||[];for(C in L)for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function at(t,e){for(var r=0;r=a.length?a[0]:a[t]:a}function l(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}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(i,u){function h(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,k.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then(function(){e.onComplete&&e.onComplete()}),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&h()};e()}var d,g,v=0;function m(t){return Array.isArray(a)?v>=a.length?t.transitionOpts=a[v]:t.transitionOpts=a[0]:t.transitionOpts=a,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&TT)&&A.push(g);y=A}}y.length>0?function(e){if(0!==e.length){for(var a=0;a=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(u[g]||d[g]||{}).name,m=e[n].name,y=u[v]||d[v];v&&m&&"number"==typeof m&&y&&Se.index?-1:t.index=0;n--){if("number"==typeof(a=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+t._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=e[r],i.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:a[n]});var l=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,i];return c&&c.add(t,l,h,u,p),f.modifyFrames(t,i)},r.addTraces=function t(e,n,a){e=o.getGraphDiv(e);var i,s,l=[],u=r.deleteTraces,h=t,f=[e,l],p=[e,n];for(function(t,e,r){var n,a;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!k(o))return!1;t=i[a][o]}else t=i[a]}else t=i}}return t}function k(t){return t===Math.round(t)&&t>=0}function T(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?"data_array"===t.valType?(t.role="data",n[e+"src"]={valType:"string",editType:"none"}):!0===t.arrayOk&&(n[e+"src"]={valType:"string",editType:"none"}):g(t)&&(t.role="object")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[b];if(!n)return;delete t[b],r[e]={items:{}},r[e].items[n]=t,r[e].role="object"})}(t),function(t){!function t(e){for(var r in e)if(g(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n=l.length)return!1;a=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)a=u[o];else{var h=t._module;if(h||(h=(n.modules[t.type||i.type.dflt]||{})._module),!h)return!1;if(!(a=(r=h.attributes)&&r[o])){var f=h.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return w(a,e,s)},r.getLayoutValObject=function(t,e){return w(function(t,e){var r,a,i,s,l=t._basePlotModules;if(l){var c;for(r=0;r=a&&(r._input||{})._templateitemname;s&&(o=a);var l,c=e+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][i]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function f(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:f,applyUpdate:function(e,r){e&&h(e,r);var a=f();for(var i in a)n.nestedProperty(t,i).set(a[i])}}}},{"../lib":719,"../plots/attributes":764}],758:[function(t,e,r){"use strict";var n=t("d3"),a=t("../registry"),i=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),h=t("../components/modebar"),f=t("../plots/cartesian/axes"),p=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,v=d.clean,m=t("../plots/cartesian/autorange").doAutoRange,y="start",x="middle",b="end";function _(t,e,r){for(var n=0;n=t[1]||a[1]<=t[0])&&(i[0]e[0]))return!0}return!1}function w(t){var e,a,s,u,d,g,v=t._fullLayout,m=v._size,y=m.p,x=f.list(t,"",!0);if(v._paperdiv.style({width:t._context.responsive&&v.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":v.width+"px",height:t._context.responsive&&v.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":v.height+"px"}).selectAll(".main-svg").call(c.setSize,v.width,v.height),t._context.setBackground(t,v.paper_bgcolor),r.drawMainTitle(t),h.manage(t),!v._has("cartesian"))return i.previousPromises(t);function b(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-y-n:e._offset+e._length+y+n:m.t+m.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+y+n:e._offset-y-n:m.l+m.w*(t.position||0)+n%1}for(e=0;ek?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var i=e[n],o=p(e,n,r);a(i)?(Array.isArray(e)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),t(i,o)):Array.isArray(i)&&d(i)&&t(i,o)}}({data:v,layout:f},""),u.length)return u.map(g)}},{"../lib":719,"../plots/attributes":764,"../plots/plots":828,"./plot_config":755,"./plot_schema":756,"./plot_template":757}],760:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./plot_api"),i=t("../lib"),o=t("../snapshot/helpers"),s=t("../snapshot/tosvg"),l=t("../snapshot/svgtoimg"),c={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(t,e){var r,u,h,f;function p(t){return!(t in e)||i.validate(e[t],c[t])}if(e=e||{},i.isPlainObject(t)?(r=t.data||[],u=t.layout||{},h=t.config||{},f={}):(t=i.getGraphDiv(t),r=i.extendDeep([],t.data),u=i.extendDeep({},t.layout),h=t._context,f=t._fullLayout||{}),!p("width")&&null!==e.width||!p("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!p("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var d={};function g(t,r){return i.coerce(e,d,c,t,r)}var v=g("format"),m=g("width"),y=g("height"),x=g("scale"),b=g("setBackground"),_=g("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=i.extendFlat({},u);m?k.width=m:null===e.width&&n(f.width)&&(k.width=f.width),y?k.height=y:null===e.height&&n(f.height)&&(k.height=f.height);var T=i.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=o.getRedrawFunc(w);function M(){return new Promise(function(t){setTimeout(t,o.getDelay(w._fullLayout))})}function S(){return new Promise(function(t,e){var r=s(w,v,x),n=w._fullLayout.width,c=w._fullLayout.height;if(a.purge(w),document.body.removeChild(w),"svg"===v)return t(_?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=i.randstr(),l({format:v,width:n,height:c,scale:x,canvas:u,svg:r,promise:!0}).then(t).catch(e)})}return new Promise(function(t,e){a.plot(w,r,k,T).then(A).then(M).then(S).then(function(e){t(function(t){return _?t.replace(o.IMAGE_URL_PREFIX,""):t}(e))}).catch(function(t){e(t)})})}},{"../lib":719,"../snapshot/helpers":852,"../snapshot/svgtoimg":854,"../snapshot/tosvg":856,"./plot_api":754,"fast-isnumeric":226}],761:[function(t,e,r){"use strict";var n=t("../lib"),a=t("../plots/plots"),i=t("./plot_schema"),o=t("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,a,i,o){o=o||[];for(var h=Object.keys(t),f=0;fx.length&&a.push(p("unused",i,m.concat(x.length)));var T,A,M,S,E,C=x.length,L=Array.isArray(k);if(L&&(C=Math.min(C,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&a.push(p("unused",i,m.concat(A,x[A].length)));var P=x[A].length;for(T=0;T<(L?Math.min(P,k[A].length):P);T++)M=L?k[A][T]:k,S=y[A][T],E=x[A][T],n.validate(S,M)?E!==S&&E!==+S&&a.push(p("dynamic",i,m.concat(A,T),S,E)):a.push(p("value",i,m.concat(A,T),S))}else a.push(p("array",i,m.concat(A),y[A]));else for(A=0;A1&&f.push(p("object","layout"))),a.supplyDefaults(d);for(var g=d._fullData,v=r.length,m=0;m0&&((b=A-o(v)-o(m))>M?_/b>S&&(y=v,x=m,S=_/b):_/A>S&&(y={val:v.val,pad:0},x={val:m.val,pad:0},S=_/A));if(f===p){var E=f-1,C=f+1;if(k)if(0===f)i=[0,1];else{var L=(f>0?h:u).reduce(function(t,e){return Math.max(t,o(e))},0),P=f/(1-Math.min(.5,L/A));i=f>0?[0,P]:[P,0]}else i=T?[Math.max(0,E),Math.max(1,C)]:[E,C]}else k?(y.val>=0&&(y={val:0,pad:0}),x.val<=0&&(x={val:0,pad:0})):T&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),x.val<=0&&(x={val:1,pad:0})),S=(x.val-y.val)/(A-o(y)-o(x)),i=[y.val-S*o(y),x.val+S*o(x)];return d&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function l(t){var e=t._length/20;return"domain"===t.constrain&&t._inputDomain&&(e*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(t){return t.pad+(t.extrapad?e:0)}}function c(t,e){var r,n,a,i=e._id,o=t._fullData,s=t._fullLayout,l=[],c=[];function f(t,e){for(r=0;r=r&&(c.extrapad||!o)){s=!1;break}a(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=i&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function p(t){return n(t)&&Math.abs(t)=e}e.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(t,e){if(e.setScale(),e.autorange){e.range=s(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var r=e._input,n={};n[e._attr+".range"]=e.range,n[e._attr+".autorange"]=e.autorange,o.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,n),r.range=e.range.slice(),r.autorange=e.autorange}var i=e._anchorAxis;if(i&&i.rangeslider){var l=i.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=s(t,e)),i._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={});t._m||t.setScale();var a,o,s,l,c,f,d,g,v,m=[],y=[],x=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,k=!1;function T(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=T((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),M=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(g=1/0,v=-1/0,w)for(a=0;a0&&(g=o),o>v&&o-i&&(g=o),o>v&&o=P;a--)L(a);return{min:m,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":695,"../../lib":719,"../../registry":848,"fast-isnumeric":226}],767:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../components/titles"),u=t("../../components/color"),h=t("../../components/drawing"),f=t("./layout_attributes"),p=t("./clean_ticks"),d=t("../../constants/numerical"),g=d.ONEAVGYEAR,v=d.ONEAVGMONTH,m=d.ONEDAY,y=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=d.MINUS_SIGN,w=d.BADNUM,k=t("../../constants/alignment").MID_SHIFT,T=t("../../constants/alignment").LINE_SPACING,A=t("../../constants/alignment").OPPOSITE_SIDE,M=e.exports={};M.setConvert=t("./set_convert");var S=t("./axis_autotype"),E=t("./axis_ids");M.id2name=E.id2name,M.name2id=E.name2id,M.cleanId=E.cleanId,M.list=E.list,M.listIds=E.listIds,M.getFromId=E.getFromId,M.getFromTrace=E.getFromTrace;var C=t("./autorange");M.getAutoRange=C.getAutoRange,M.findExtremes=C.findExtremes,M.coerceRef=function(t,e,r,n,a,i){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=l[0]||i),i||(i=a),u[c]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(t,e,u,c)},M.coercePosition=function(t,e,r,n,a,i){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(a,i);else{var c=M.getFromId(e,n);l=r(a,i=c.fraction2r(i)),o=c.cleanPos}t[a]=o(l)},M.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:M.getFromId(e,r).cleanPos)(t)},M.redrawComponents=function(t,e){e=e||M.listIds(t);var r=t._fullLayout;function n(n,a,i,s){for(var l=o.getComponentMethod(n,a),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},M.saveRangeInitial=function(t,e){for(var r=M.list(t,"",!0),n=!1,a=0;a.3*f||u(n)||u(i))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?t=M.tickIncrement(t,"M6","reverse")+1.5*m:i.exactMonths>.8?t=M.tickIncrement(t,"M1","reverse")+15.5*m:t-=m/2;var l=M.tickIncrement(t,r);if(l<=n)return l}return t}(x,t,y,c,i)),v=x,0;v<=u;)v=M.tickIncrement(v,y,!1,i),0;return{start:e.c2r(x,0,i),end:e.c2r(v,0,i),size:y,_dataSpan:u-c}},M.prepTicks=function(t){var e=s.simpleMap(t.range,t.r2l);if("auto"===t.tickmode||!t.dtick){var r,n=t.nticks;n||("category"===t.type||"multicategory"===t.type?(r=t.tickfont?1.2*(t.tickfont.size||12):15,n=t._length/r):(r="y"===t._id.charAt(0)?40:80,n=s.constrain(t._length/r,4,9)+1),"radialaxis"===t._name&&(n*=2)),"array"===t.tickmode&&(n*=100),M.autoTicks(t,Math.abs(e[1]-e[0])/n),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),V(t)},M.calcTicks=function(t){M.prepTicks(t);var e=s.simpleMap(t.range,t.r2l);if("array"===t.tickmode)return function(t){var e=t.tickvals,r=t.ticktext,n=new Array(e.length),a=s.simpleMap(t.range,t.r2l),i=1.0001*a[0]-1e-4*a[1],o=1.0001*a[1]-1e-4*a[0],l=Math.min(i,o),c=Math.max(i,o),u=0;Array.isArray(r)||(r=[]);var h="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var f=0;fl&&p=n:h<=n)&&!(o.length>u||h===c);h=M.tickIncrement(h,t.dtick,i,t.calendar)){c=h;var f=!1;l&&h!==(0|h)&&(f=!0),o.push({minor:f,value:h})}rt(t)&&360===Math.abs(e[1]-e[0])&&o.pop(),t._tmax=(o[o.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;for(var p=new Array(o.length),d=0;d10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=m&&i<=10||e>=15*m)t._tickround="d";else if(e>=x&&i<=16||e>=y)t._tickround="M";else if(e>=b&&i<=19||e>=x)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,o)-20,t._tickround<0&&(t._tickround=4)}}else if(a(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);a(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(H(t.exponentformat)&&!G(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function U(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}}M.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar);var i=2*e;i>g?(e/=g,r=n(10),t.dtick="M"+12*j(e,r,I)):i>v?(e/=v,t.dtick="M"+j(e,1,z)):i>m?(t.dtick=j(e,m,R),t.tick0=s.dateTick0(t.calendar,!0)):i>y?t.dtick=j(e,y,z):i>x?t.dtick=j(e,x,D):i>b?t.dtick=j(e,b,D):(r=n(10),t.dtick=j(e,r,I))}else if("log"===t.type){t.tick0=0;var o=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),t.dtick="L"+j(e,r,I)}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))):rt(t)?(t.tick0=0,r=1,t.dtick=j(e,r,N)):(t.tick0=0,r=n(10),t.dtick=j(e,r,I));if(0===t.dtick&&(t.dtick=1),!a(t.dtick)&&"string"!=typeof t.dtick){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}},M.tickIncrement=function(t,e,r,i){var o=r?-1:1;if(a(e))return t+o*e;var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,i);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?B:F,h=t+.01*o,f=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)},M.tickFirst=function(t){var e=t.r2l||Number,r=s.simpleMap(t.range,e),i=r[1]"+l,t._prevDateHead=l));e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,i){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);"never"===i&&(i="");n&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)e.text=Y(Math.pow(10,l),t,i,n);else if(a(o)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),f=Math.abs(h),p=t.exponentformat;"power"===p||H(p)&&G(h)?(e.text=0===h?1:1===h?"10":"10"+(h>1?"":_)+f+"",e.fontSize*=1.25):("e"===p||"E"===p)&&f>2?e.text="1"+p+(h>0?"+":_)+f:(e.text=Y(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),a=t._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?e.text=o+" - "+i:(e.text=i,e.text2=o)}(t,o,r):rt(t)?function(t,e,r,n,a){if("radians"!==t.thetaunit||r)e.text=Y(e.x,t,a,n);else{var i=e.x/180;if(0===i)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,a=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)e.text=Y(s.deg2rad(e.x),t,a,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=_+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,a){"never"===a?a="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(a="hide");e.text=Y(e.x,t,a,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 v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},M.hoverLabelText=function(t,e,r){if(r!==w&&r!==e)return M.hoverLabelText(t,e)+" - "+M.hoverLabelText(t,r);var n="log"===t.type&&e<=0,a=M.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":_+a:a};var q=["f","p","n","\u03bc","m","","k","M","G","T"];function H(t){return"SI"===t||"B"===t}function G(t){return t>14||t<-15}function Y(t,e,r,n){var i=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=M.getTickFormat(e),h=e.separatethousands;if(n){var f={exponentformat:l,dtick:"none"===e.showexponent?e.dtick:a(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};V(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,_);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"
":"B"===l&&9===c?t+="B":H(l)&&(t+=q[c/3+5]));return i?_+t:t}function W(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function X(t,e){var r=t.l2p(e);return r>1&&r=0,i=u(t,e[1])<=0;return(r||a)&&(n||i)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(a)))){r=n;break}break;case"log":for(e=0;e0?r.bottom-h:0,f)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var d=[0,1];if("x"===g){if("b"===c?n[c]=e._depth:(n[c]=e._depth=Math.max(r.width>0?h-r.top:0,f),d.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var y=e._offset-r.left;y>0&&(n.xl=0,n.l=y)}}else if("l"===c?n[c]=e._depth=Math.max(r.height>0?h-r.left:0,f):(n[c]=e._depth=Math.max(r.height>0?r.right-h:0,f),d.reverse()),r.height>0){var x=r.bottom-(e._offset+e._length);x>0&&(n.yb=0,n.b=x);var b=e._offset-r.top;b>0&&(n.yt=1,n.t=b)}if(n[v]="free"===e.anchor?e.position:e._anchorAxis.domain[d[0]],e.title.text!==p._dfltTitle[g]){var _=(e.title.text.match(l.BR_TAG_ALL)||[]).length;n[c]+=_?e.title.font.size*(_+1)*T:e.title.font.size}e.mirror&&"free"!==e.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(a[u]+=f),!0===e.mirror||"ticks"===e.mirror?a[v]=e._anchorAxis.domain[d[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(a[v]=[e._counterDomainMin,e._counterDomainMax][d[1]]))}rt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),i.autoMargin(t,J(e),n),i.autoMargin(t,K(e),a),i.autoMargin(t,Q(e),s)}),r.skipTitle||rt&&"bottom"===e.side||$.push(function(){return function(t,e){var r,n=t._fullLayout,a=e._id,i=a.charAt(0),o=e.title.font.size;if("multicategory"===e.type)r=e._depth;else{r=10+1.5*o+(e.linewidth?e.linewidth-1:0)}var s,l,u,f,p=M.getPxPosition(t,e);"x"===i?(l=e._offset+e._length/2,u="top"===e.side?-r-o*(e.showticklabels?1:0):r+o*(e.showticklabels?1.5:.5),u+=p):(u=e._offset+e._length/2,l="right"===e.side?r+o*(e.showticklabels?1:.5):-r-o*(e.showticklabels?.5:0),l+=p,s={rotate:"-90",offset:0});if("multicategory"!==e.type){var d=e._selections[e._id+"tick"];if(f={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var g=h.getTranslate(d.node().parentNode);f.offsetLeft=g.x,f.offsetTop=g.y}}return c.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[i],avoid:f,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(t,e)}),s.syncOrAsync($)}},M.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],n=t.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==t.ticks==("x"===e)&&(a=a.map(function(t){return-t})),a},M.makeTransFn=function(t){var e=t._id.charAt(0),r=t._offset;return"x"===e?function(e){return"translate("+(r+t.l2p(e.x))+",0)"}:function(e){return"translate(0,"+(r+t.l2p(e.x))+")"}},M.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var a=t._id.charAt(0),i=(t.linewidth||1)/2;return"x"===a?"M0,"+(e+i*r)+"v"+n*r:"M"+(e+i*r)+",0h"+n*r},M.makeLabelFns=function(t,e,r){var n=t._id.charAt(0),i="boundaries"!==t.tickson&&"outside"===t.ticks,o=0,l=0;if(i&&(o+=t.ticklen),r&&"outside"===t.ticks){var c=s.deg2rad(r);o=t.ticklen*Math.cos(c)+1,l=t.ticklen*Math.sin(c)}t.showticklabels&&(i||t.showline)&&(o+=.2*t.tickfont.size);var u,h,f,p,d={labelStandoff:o+=(t.linewidth||1)/2,labelShift:l};return"x"===n?(p="bottom"===t.side?1:-1,u=l*p,h=e+o*p,f="bottom"===t.side?1:-.2,d.xFn=function(t){return t.dx+u},d.yFn=function(t){return t.dy+h+t.fontSize*f},d.anchorFn=function(t,e){return a(e)&&0!==e&&180!==e?e*p<0?"end":"start":"middle"},d.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side?-n:0}):"y"===n&&(p="right"===t.side?1:-1,u=o,h=-l*p,f=90===Math.abs(t.tickangle)?.5:0,d.xFn=function(t){return t.dx+e+(u+t.fontSize*f)*p},d.yFn=function(t){return t.dy+h+t.fontSize*k},d.anchorFn=function(e,r){return a(r)&&90===Math.abs(r)?"middle":"right"===t.side?"start":"end"},d.heightFn=function(e,r,n){return(r*="left"===t.side?1:-1)<-30?-n:r<30?-.5*n:0}),d},M.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",a=r.layer.selectAll("path."+n).data(e.ticks?r.vals:[],W);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,e.tickcolor).style("stroke-width",h.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},M.drawGrid=function(t,e,r){r=r||{};var n=e._id+"grid",a=r.vals,i=r.counterAxis;if(!1===e.showgrid)a=[];else if(i&&M.shouldShowZeroLine(t,e,i))for(var o="array"===e.tickmode,s=0;s1)for(n=1;n2*o}(t,e)?"date":function(t){for(var e=Math.max(1,(t.length-1)/1e3),r=0,n=0,o={},s=0;s2*r}(t)?"category":function(t){if(!t)return!1;for(var e=0;en?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n0;o&&(a="array");var s,l=r("categoryorder",a);"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,a,i=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nl*x)||k)for(r=0;rI&&RP&&(P=R);p/=(P-L)/(2*O),L=c.l2r(L),P=c.l2r(P),c.range=c._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function z(t,e,r,n,a){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function D(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+e+", "+r+")").attr("d","M0,0Z")}function R(t,e,r,n,a,i){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),F(t,e,a,i)}function F(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 B(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(t){S&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),S=!1)}function j(t){return"lasso"===t||"select"===t}function V(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,M)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function U(t,e,r,n){for(var a,i,o,l,c=!1,u={},h={},f=0;f-1&&w(a,t,X,Z,e.id,St),i.indexOf("event")>-1&&h.click(t,a,e.id);else if(1===r&&pt){var s=S?G:F,c="s"===S||"w"===E?0:1,u=s._name+".range["+c+"]",f=function(t,e){var r,a=t.range[e],i=Math.abs(a-t.range[1-e]);return"date"===t.type?a:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,a))):(r=Math.floor(Math.log(Math.abs(a))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,n.format("."+String(r)+"g")(a))}(s,c),p="left",d="middle";if(s.fixedrange)return;S?(d="n"===S?"top":"bottom","right"===s.side&&(p="right")):"e"===E&&(p="right"),t._context.showAxisRangeEntryBoxes&&n.select(vt).call(l.makeEditable,{gd:t,immediate:!0,background:t._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:d}).on("edit",function(e){var r=s.d2r(e);void 0!==r&&o.call("_guiRelayout",t,u,r)})}}function Lt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(Q,e+mt)),a=Math.max(0,Math.min($,r+yt)),i=Math.abs(n-mt),o=Math.abs(a-yt);function s(){kt="",xt.r=xt.l,xt.t=xt.b,At.attr("d","M0,0Z")}if(xt.l=Math.min(mt,n),xt.r=Math.max(mt,n),xt.t=Math.min(yt,a),xt.b=Math.max(yt,a),tt.isSubplotConstrained)i>M||o>M?(kt="xy",i/Q>o/$?(o=i*$/Q,yt>a?xt.t=yt-o:xt.b=yt+o):(i=o*Q/$,mt>n?xt.l=mt-i:xt.r=mt+i),At.attr("d",V(xt))):s();else if(et.isSubplotConstrained)if(i>M||o>M){kt="xy";var l=Math.min(xt.l/Q,($-xt.b)/$),c=Math.max(xt.r/Q,($-xt.t)/$);xt.l=l*Q,xt.r=c*Q,xt.b=(1-l)*$,xt.t=(1-c)*$,At.attr("d",V(xt))}else s();else!nt||og[1]-1/4096&&(e.domain=s),a.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":719,"fast-isnumeric":226}],783:[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 a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*r;t.range=t._input.range=[t.l2r(i+(a[0]-i)*e),t.l2r(i+(a[1]-i)*e)]}},{"../../constants/alignment":688}],784:[function(t,e,r){"use strict";var n=t("polybooljs"),a=t("../../registry"),i=t("../../components/color"),o=t("../../components/fx"),s=t("../../lib"),l=t("../../lib/polygon"),c=t("../../lib/throttle"),u=t("../../components/fx/helpers").makeEventData,h=t("./axis_ids").getFromId,f=t("../../lib/clear_gl_canvases"),p=t("../../plot_api/subroutines").redrawReglTraces,d=t("./constants"),g=d.MINSELECT,v=l.filter,m=l.tester;function y(t){return t._id}function x(t,e,r,n,a,i,o){var s,l,c,u,h,f,p,d,g,v=e._hoverdata,m=e._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){k(t,e,i);var x=function(t,e){var r,n,a=t[0],i=-1,o=[];for(n=0;n0?function(t,e){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(a=0;a1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(s)&&(f=S(x))){for(o&&o.remove(),g=0;g0?"M"+a.join("M")+"Z":"M0,0Z",e.attr("d",n)}function S(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,a=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(a)>-1}function E(t,e,r){var n,i,o,s;for(n=0;n-1&&x(e,S,a.xaxes,a.yaxes,a.subplot,a,G),"event"===r&&S.emit("plotly_selected",void 0);o.click(S,e)}).catch(s.error)},a.doneFn=function(){W.remove(),c.done(X).then(function(){c.clear(X),a.gd.emit("plotly_selected",_),p&&a.selectionDefs&&(p.subtract=H,a.selectionDefs.push(p),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,f)),a.doneFnCompleted&&a.doneFnCompleted(Z)}).catch(s.error)}},clearSelect:L,selectOnClick:x}},{"../../components/color":594,"../../components/fx":632,"../../components/fx/helpers":629,"../../lib":719,"../../lib/clear_gl_canvases":704,"../../lib/polygon":731,"../../lib/throttle":744,"../../plot_api/subroutines":758,"../../registry":848,"./axis_ids":770,"./constants":773,polybooljs:474}],785:[function(t,e,r){"use strict";var n=t("d3"),a=t("fast-isnumeric"),i=t("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,c=i.ensureNumber,u=i.isArrayOrTypedArray,h=t("../../constants/numerical"),f=h.FP_SAFE,p=h.BADNUM,d=h.LOG_CLIP,g=t("./constants"),v=t("./axis_ids");function m(t){return Math.pow(10,t)}function y(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",h=r.charAt(0);function x(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],a=t.range[1];return.5*(n+a-2*d*Math.abs(n-a))}return p}function b(e,r,n){var o=l(e,n||t.calendar);if(o===p){if(!a(e))return p;e=+e;var s=Math.floor(10*i.mod(e+.05,1)),c=Math.round(e-s/10);o=l(new Date(c))+s/10}return o}function _(e,r,n){return s(e,r,n||t.calendar)}function w(e){return t._categories[Math.round(e)]}function k(e){if(y(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 p}function T(e){if(t._categoriesMap)return t._categoriesMap[e]}function A(t){var e=T(t);return void 0!==e?e:a(t)?+t:void 0}function M(e){return a(e)?n.round(t._b+t._m*e,2):p}function S(e){return(e-t._b)/t._m}t.c2l="log"===t.type?x:c,t.l2c="log"===t.type?m:c,t.l2p=M,t.p2l=S,t.c2p="log"===t.type?function(t,e){return M(x(t,e))}:M,t.p2c="log"===t.type?function(t){return m(S(t))}:S,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=c,t.d2p=t.r2p=function(e){return t.l2p(o(e))},t.p2d=t.p2r=S,t.cleanPos=c):"log"===t.type?(t.d2r=t.d2l=function(t,e){return x(o(t),e)},t.r2d=t.r2c=function(t){return m(o(t))},t.d2c=t.r2l=o,t.c2d=t.l2r=c,t.c2r=x,t.l2d=m,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return m(S(t))},t.r2p=function(e){return t.l2p(o(e))},t.p2r=S,t.cleanPos=c):"date"===t.type?(t.d2r=t.r2d=i.identity,t.d2c=t.r2c=t.d2l=t.r2l=b,t.c2d=t.c2r=t.l2d=t.l2r=_,t.d2p=t.r2p=function(e,r,n){return t.l2p(b(e,0,n))},t.p2d=t.p2r=function(t,e,r){return _(S(t),e,r)},t.cleanPos=function(e){return i.cleanDate(e,p,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=k,t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:c(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=w,t.d2r=t.d2l_noadd=A,t.r2c=function(e){var r=A(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=T,t.l2r=t.c2r=c,t.r2l=A,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return w(S(t))},t.r2p=t.d2p,t.p2r=S,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:c(t)},t.setupMultiCategory=function(n){var a,o,s=t._traceIndices,l=e._axisMatchGroups;if(l&&l.length&&0===t._categories.length)for(a=0;af&&(s[n]=f),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else i.nestedProperty(t,e).set(o)},t.setScale=function(r){var n=e._size;if(t.overlaying){var a=v.getFromId({_fullLayout:e},t.overlaying);t.domain=a.domain}var i=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(i);var s=t.r2l(t[i][0],o),l=t.r2l(t[i][1],o);if("y"===h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.makeCalcdata=function(e,r){var n,a,o,s,l=t.type,c="date"===l&&e[r+"calendar"];if(r in e){if(n=e[r],s=e._length||i.minRowLength(n),i.isTypedArray(n)&&("linear"===l||"log"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}if("multicategory"===l)return function(t,e){for(var r=new Array(e),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 v(e,r){var n=e.plotinfo,a=n.xaxis,l=n.yaxis,c=a._length,u=l._length,h=!!e.xr1,f=!!e.yr1,p=[];if(h){var d=i.simpleMap(e.xr0,a.r2l),g=i.simpleMap(e.xr1,a.r2l),v=d[1]-d[0],m=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*m/v),a.range[0]=a.l2r(d[0]*(1-r)+r*g[0]),a.range[1]=a.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(f){var y=i.simpleMap(e.yr0,l.r2l),x=i.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]=a.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,a,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[a._id,l._id]);var w=h?c/p[2]:1,k=f?u/p[3]:1,T=h?p[0]:0,A=f?p[1]:0,M=h?p[0]/p[2]*c:0,S=f?p[1]/p[3]*u:0,E=a._offset-M,C=l._offset-S;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},{"../../components/drawing":615,"../../lib":719,"../../registry":848,"./axes":767,d3:164}],790:[function(t,e,r){"use strict";var n=t("../../registry").traceIs,a=t("./axis_autotype");function i(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=i(t),a=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return a&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}e.exports=function(t,e,r,s){"-"===r("type",(s.splomStash||{}).type)&&(!function(t,e){if("-"!==t.type)return;var r=t._id,s=r.charAt(0);-1!==r.indexOf("scene")&&(r=s);var l=function(t,e,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[e])return a;if((a[r+"axis"]||r)===e){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(e,r,s);if(!l)return;if("histogram"===l.type&&s==={v:"y",h:"x"}[l.orientation||"v"])return void(t.type="linear");var c,u=s+"calendar",h=l[u],f={noMultiCategory:!n(l,"cartesian")||n(l,"noMultiCategory")};if(o(l,s)){var p=i(l),d=[];for(c=0;c0?".":"")+i;a.isPlainObject(o)?l(o,e,s,n+1):e(s,i,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){i(t,c,s.cache),s.check=function(){if(l){var e=i(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"],h=0;ha*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],a=t[1][1]-t[0][1],i=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),i&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),a/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(a-s*(o[1][1]+o[0][1]))/2;return i&&r.clipExtent(i),r.scale(150*s).translate([l,c])},r.precision(g.precision),a&&r.clipAngle(a-g.clipPad);return r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var h=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],f=e.lonaxis,p=e.lataxis,d=function(t,e){var r=g.clipPad,n=t[0]+r,a=t[1]-r,i=e[0]+r,o=e[1]-r;n>0&&a<0&&(a+=360);var s=(a-n)/4;return{type:"Polygon",coordinates:[[[n,i],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[a,o],[a,i],[a-s,i],[a-2*s,i],[a-3*s,i],[n,i]]]}}(f.range,p.range);u.fitExtent(h,d);var v=this.bounds=u.getBounds(d),m=this.fitScale=u.scale(),y=u.translate();if(!isFinite(v[0][0])||!isFinite(v[0][1])||!isFinite(v[1][0])||!isFinite(v[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=["projection.rotation","center","lonaxis.range","lataxis.range"],_="Invalid geo settings, relayout'ing to default view.",w={},k=0;k-1&&p(n.event,i,[r.xaxis],[r.yaxis],r.id,g),c.indexOf("event")>-1&&l.click(i,n.event))})}function v(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},x.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,a="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",a),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(s.setClipUrl,a,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"},u.setConvert(t.mockAxis,r)},x.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale}:t._isClipped?this.viewInitial={"projection.scale":r.scale,"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:this.viewInitial={"center.lon":e.lon,"center.lat":e.lat,"projection.scale":r.scale,"projection.rotation.lon":n.lon}},x.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function a(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",a).attr("transform",n)}},{"../../components/color":594,"../../components/dragelement":612,"../../components/drawing":615,"../../components/fx":632,"../../lib":719,"../../lib/topojson_utils":746,"../../registry":848,"../cartesian/axes":767,"../cartesian/select":784,"../plots":828,"./constants":795,"./projections":800,"./zoom":801,d3:164,"topojson-client":541}],797:[function(t,e,r){"use strict";var n=t("../../plots/get_data").getSubplotCalcData,a=t("../../lib").counterRegex,i=t("./geo"),o="geo",s=a(o),l={};l[o]={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,a=e._subplots[o],s=0;s0&&w<0&&(w+=360);var k,T,A,M=(_+w)/2;if(!c){var S=u?s.projRotate:[M,0,0];k=r("projection.rotation.lon",S[0]),r("projection.rotation.lat",S[1]),r("projection.rotation.roll",S[2]),r("showcoastlines",!u)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean")&&r("oceancolor")}(c?(T=-96.6,A=38.7):(T=u?M:k,A=(b[0]+b[1])/2),r("center.lon",T),r("center.lat",A),h)&&r("projection.parallels",s.projParallels||[0,60]);r("projection.scale"),r("showland")&&r("landcolor"),r("showlakes")&&r("lakecolor"),r("showrivers")&&(r("rivercolor"),r("riverwidth")),r("showcountries",u&&"usa"!==i)&&(r("countrycolor"),r("countrywidth")),("usa"===i||"north america"===i&&50===n)&&(r("showsubunits",!0),r("subunitcolor"),r("subunitwidth")),u||r("showframe",!0)&&(r("framecolor"),r("framewidth")),r("bgcolor")}e.exports=function(t,e,r){n(t,e,r,{type:"geo",attributes:i,handleDefaults:s,partition:"y"})}},{"../subplot_defaults":842,"./constants":795,"./layout_attributes":798}],800:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map(function(t){return r(t,n)})};if(!c.hasOwnProperty(e.type))return null;var a=c[e.type];return t.geo.stream(e,n(a)),a.result()}t.geo.project=function(t,e){var a=e.stream;if(!a)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,a)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map(function(t){return e(t,r)})}}},a=[],i=[],o={point:function(t,e){a.push([t,e])},result:function(){var t=a.length?a.length<2?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a}:null;return a=[],t}},s={lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){a.length&&(i.push(a),a=[])},result:function(){var t=i.length?i.length<2?{type:"LineString",coordinates:i[0]}:{type:"MultiLineString",coordinates:i}:null;return i=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){a.push([t,e])},lineEnd:function(){var t=a.length;if(t){do{a.push(a[0].slice())}while(++t<4);i.push(a),a=[]}},polygonEnd:u,result:function(){if(!i.length)return null;var t=[],e=[];return i.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++rn^p>n&&r<(f-c)*(n-u)/(p-u)+c&&(a=!a)}return a}(t[0],r))return t.push(e),!0})||t.push([e])}),i=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var h=1e-6,f=h*h,p=Math.PI,d=p/2,g=(Math.sqrt(p),p/180),v=180/p;function m(t){return t>1?d:t<-1?-d:Math.asin(t)}function y(t){return t>1?0:t<-1?p:Math.acos(t)}var x=t.geo.projection,b=t.geo.projectionMutator;function _(t,e){var r=(2+d)*Math.sin(e);e/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>h;n++){var i=Math.cos(e);e-=a=(e+Math.sin(e)*(i+2)-r)/(2*i*(1+i))}return[2/Math.sqrt(p*(4+p))*t*(1+Math.cos(e)),2*Math.sqrt(p/(4+p))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-p,0],[0,d],[p,0]]],[[[-p,0],[0,-d],[p,0]]]];function a(t,r){for(var a=r<0?-1:1,i=n[+(r<0)],o=0,s=i.length-1;oi[o][2][0];++o);var l=e(t-i[o][1][0],r);return l[0]+=e(i[o][1][0],a*r>a*i[o][0][1]?i[o][0][1]:r)[0],l}e.invert&&(a.invert=function(t,i){for(var o=r[+(i<0)],s=n[+(i<0)],c=0,u=o.length;c=0;--a){var o=n[1][a],l=180*o[0][0]/p,c=180*o[0][1]/p,u=180*o[1][1]/p,h=180*o[2][0]/p,f=180*o[2][1]/p;r.push(s([[h-e,f-e],[h-e,u+e],[l+e,u+e],[l+e,c-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),l)},a},i.lobes=function(t){return arguments.length?(n=t.map(function(t){return t.map(function(t){return[[t[0][0]*p/180,t[0][1]*p/180],[t[1][0]*p/180,t[1][1]*p/180],[t[2][0]*p/180,t[2][1]*p/180]]})}),r=n.map(function(t){return t.map(function(t){var r,n=e(t[0][0],t[0][1])[0],a=e(t[2][0],t[2][1])[0],i=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return i>o&&(r=i,i=o,o=r),[[n,i],[a,o]]})}),i):n.map(function(t){return t.map(function(t){return[[180*t[0][0]/p,180*t[0][1]/p],[180*t[1][0]/p,180*t[1][1]/p],[180*t[2][0]/p,180*t[2][1]/p]]})})},i},_.invert=function(t,e){var r=.5*e*Math.sqrt((4+p)/p),n=m(r),a=Math.cos(n);return[t/(2/Math.sqrt(p*(4+p))*(1+a)),m((n+r*(a+2))/(2+d))]},(t.geo.eckert4=function(){return x(_)}).raw=_;var w=t.geo.azimuthalEqualArea.raw;function k(t,e){if(arguments.length<2&&(e=t),1===e)return w;if(e===1/0)return T;function r(r,n){var a=w(r/e,n);return a[0]*=t,a}return r.invert=function(r,n){var a=w.invert(r/t,n);return a[0]*=e,a},r}function T(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function A(t,e){return[3*t/(2*p)*Math.sqrt(p*p/3-e*e),e]}function M(t,e){return[t,1.25*Math.log(Math.tan(p/4+.4*e))]}function S(t){return function(e){var r,n=t*Math.sin(e),a=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>h&&--a>0);return e/2}}T.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=b(k),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=k,A.invert=function(t,e){return[2/3*p*t/Math.sqrt(p*p/3-e*e),e]},(t.geo.kavrayskiy7=function(){return x(A)}).raw=A,M.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*p]},(t.geo.miller=function(){return x(M)}).raw=M,S(p);var E=function(t,e,r){var n=S(r);function a(r,a){return[t*r*Math.cos(a=n(a)),e*Math.sin(a)]}return a.invert=function(n,a){var i=m(a/e);return[n/(t*Math.cos(i)),m((2*i+Math.sin(2*i))/r)]},a}(Math.SQRT2/d,Math.SQRT2,p);function C(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return x(E)}).raw=E,C.invert=function(t,e){var r,n=e,a=25;do{var i=n*n,o=i*i;n-=r=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Math.abs(r)>h&&--a>0);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return x(C)}).raw=C;var L=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function P(t,e){var r,n=Math.min(18,36*Math.abs(e)/p),a=Math.floor(n),i=n-a,o=(r=L[a])[0],s=r[1],l=(r=L[++a])[0],c=r[1],u=(r=L[Math.min(19,++a)])[0],h=r[1];return[t*(l+i*(u-o)/2+i*i*(u-2*l+o)/2),(e>0?d:-d)*(c+i*(h-s)/2+i*i*(h-2*c+s)/2)]}function O(t,e){return[t*Math.cos(e),e]}function I(t,e){var r,n=Math.cos(e),a=(r=y(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*a,Math.sin(e)*a]}function z(t,e){var r=I(t,e);return[(r[0]+t/d)/2,(r[1]+e)/2]}L.forEach(function(t){t[1]*=1.0144}),P.invert=function(t,e){var r=e/d,n=90*r,a=Math.min(18,Math.abs(n/5)),i=Math.max(0,Math.floor(a));do{var o=L[i][1],s=L[i+1][1],l=L[Math.min(19,i+2)][1],c=l-o,u=l-2*s+o,h=2*(Math.abs(r)-s)/c,p=u/c,m=h*(1-p*h*(1-2*p*h));if(m>=0||1===i){n=(e>=0?5:-5)*(m+a);var y,x=50;do{m=(a=Math.min(18,Math.abs(n)/5))-(i=Math.floor(a)),o=L[i][1],s=L[i+1][1],l=L[Math.min(19,i+2)][1],n-=(y=(e>=0?d:-d)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*v}while(Math.abs(y)>f&&--x>0);break}}while(--i>=0);var b=L[i][0],_=L[i+1][0],w=L[Math.min(19,i+2)][0];return[t/(_+m*(w-b)/2+m*m*(w-2*_+b)/2),n*g]},(t.geo.robinson=function(){return x(P)}).raw=P,O.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return x(O)}).raw=O,I.invert=function(t,e){if(!(t*t+4*e*e>p*p+h)){var r=t,n=e,a=25;do{var i,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),f=Math.sin(2*n),d=c*c,g=u*u,v=s*s,m=1-g*l*l,x=m?y(u*l)*Math.sqrt(i=1/m):i=0,b=2*x*u*s-t,_=x*c-e,w=i*(g*v+x*u*l*d),k=i*(.5*o*f-2*x*c*s),T=.25*i*(f*s-x*c*g*o),A=i*(d*l+x*v*u),M=k*T-A*w;if(!M)break;var S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--a>0);return[r,n]}},(t.geo.aitoff=function(){return x(I)}).raw=I,z.invert=function(t,e){var r=t,n=e,a=25;do{var i,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,f=Math.sin(r),p=Math.cos(r/2),g=Math.sin(r/2),v=g*g,m=1-u*p*p,x=m?y(o*p)*Math.sqrt(i=1/m):i=0,b=.5*(2*x*o*g+r/d)-t,_=.5*(x*s+n)-e,w=.5*i*(u*v+x*o*p*c)+.5/d,k=i*(f*l/4-x*s*g),T=.125*i*(l*g-x*s*u*f),A=.5*i*(c*p+x*v*o)+.5,M=k*T-A*w,S=(_*k-b*A)/M,E=(b*T-_*w)/M;r-=S,n-=E}while((Math.abs(S)>h||Math.abs(E)>h)&&--a>0);return[r,n]},(t.geo.winkel3=function(){return x(z)}).raw=z}},{}],801:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=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 h(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],h={},f={};function p(t,e){h[n+"."+t]=a.nestedProperty(l,t).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=a.nestedProperty(u,t);r.get()!==e&&(r.set(e),a.nestedProperty(l,t).set(e),f[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),o.emit("plotly_relayout",f)}function f(t,e){var r=u(0,e);function a(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),h(t,e,a)}),r}function p(t,e){var r,a,i,o,s,f,p,d,g,v=u(0,e),m=2;function y(t){return e.invert(t)}function x(r){var n=e.rotate(),a=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",a[0]),r("center.lat",a[1])}return v.on("zoomstart",function(){n.select(this).style(l),r=n.mouse(this),a=e.rotate(),i=e.translate(),o=a,s=y(r)}).on("zoom",function(){if(f=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>m||Math.abs(n[1]-t[1])>m}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([i[0],n.event.translate[1]]),s?y(f)&&(d=y(f),p=[o[0]+(d[0]-s[0]),a[1],a[2]],e.rotate(p),o=p):s=y(r=f),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&&h(t,e,x)}),v}function d(t,e){var r,a={r:e.rotate(),k:e.scale()},i=u(0,e),f=function(t){var e=0,r=arguments.length,a=[];for(;++ed?(i=(h>0?90:-90)-p,a=0):(i=Math.asin(h/d)*s-p,a=Math.sqrt(d*d-h*h));var g=180-i-2*p,m=(Math.atan2(f,u)-Math.atan2(c,a))*s,x=(Math.atan2(f,u)-Math.atan2(c,-a))*s,b=v(r[0],r[1],i,m),_=v(r[0],r[1],g,x);return b<=_?[i,m,r[2]]:[g,x,r[2]]}(k,r,E);isFinite(T[0])&&isFinite(T[1])&&isFinite(T[2])||(T=E),e.rotate(T),E=T}}else r=g(e,M=b);f.of(this,arguments)({type:"zoom"})}),A=f.of(this,arguments),p++||A({type:"zoomstart"})}).on("zoomend",function(){var r;n.select(this).style(c),d.call(i,"zoom",null),r=f.of(this,arguments),--p||r({type:"zoomend"}),h(t,e,m)}).on("zoom.redraw",function(){t.render();var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),n.rebind(i,f,"on")}function g(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function v(t,e,r,n){var a=m(r-t),i=m(n-e);return Math.sqrt(a*a+i*i)}function m(t){return(t%360+540)%360-180}function y(t,e,r){var n=r*o,a=t.slice(),i=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return a[i]=t[i]*l-t[s]*c,a[s]=t[s]*l+t[i]*c,a}function x(t,e){for(var r=0,n=0,a=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(i)*_*(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)/_*(i>=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?(i=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],i||s?(i&&(v(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=a),Math.abs(c.dragStart[0]-n).999&&(v="turntable"):v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var a=e._basePlotModules.length>1;o(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!a)return n.validate(t[e],l[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":594,"../../../lib":719,"../../../registry":848,"../../get_data":802,"../../subplot_defaults":842,"./axis_defaults":810,"./layout_attributes":813}],813:[function(t,e,r){"use strict";var n=t("./axis_attributes"),a=t("../../domain").attributes,i=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:i(s(0,0,1),{}),center:i(s(0,0,0),{}),eye:i(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({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":719,"../../../lib/extend":710,"../../domain":792,"./axis_attributes":809}],814:[function(t,e,r){"use strict";var n=t("../../../lib/str2rgbarray"),a=["xaxis","yaxis","zaxis"];function i(){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]}i.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[a[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 i;return e.merge(t),e}},{"../../../lib/str2rgbarray":742}],815:[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[i[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 h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||a.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var p=n.calcTicks(u),d=0;d/g," "));l[c]=p,u.tickmode=h}}e.ticks=l;for(var c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(var 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],a=new Array(n.length),i=0;i")):"isosurface"===e.type||"volume"===e.type?(w.valueLabel=h.tickText(t.mockAxis,t.mockAxis.d2l(p.traceCoordinate[3]),"hover").text,M.push("value: "+w.valueLabel),p.textLabel&&M.push(p.textLabel),x=M.join("
")):x=p.textLabel;var S={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:_};f.appendArrayPointValue(S,b,_),e._module.eventData&&(S=b._module.eventData(S,p,b,{},_));var E={points:[S]};t.fullSceneLayout.hovermode&&f.loneHover({trace:b,x:(.5+.5*m[0]/m[3])*i,y:(.5-.5*m[1]/m[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:x,name:c.name,color:f.castHoverOption(b,_,"bgcolor")||c.color,borderColor:f.castHoverOption(b,_,"bordercolor"),fontFamily:f.castHoverOption(b,_,"font.family"),fontSize:f.castHoverOption(b,_,"font.size"),fontColor:f.castHoverOption(b,_,"font.color"),nameLength:f.castHoverOption(b,_,"namelength"),textAlign:f.castHoverOption(b,_,"align"),hovertemplate:u.castOption(b,_,"hovertemplate"),hovertemplateLabels:u.extendFlat({},S,w),eventData:[S]},{container:n,gd:r}),p.buttons&&p.distance<5?r.emit("plotly_click",E):r.emit("plotly_hover",E),s=E}else f.loneUnhover(n),r.emit("plotly_unhover",s);t.drawAnnotations(t)}.bind(null,t),t.traces={},t.make4thDimension(),!0}function b(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e,e[this.id]),this.spikeOptions=m(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),x(this,this.pixelRatio)}var _=b.prototype;_.initializeGLCamera=function(){var t=this.fullSceneLayout.camera,e="orthographic"===t.projection.type;this.camera=i(this.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:e,zoomMin:.01,zoomMax:100,mode:"orbit"})},_.recoverContext=function(){var t=this,e=this.glplot.gl,r=this.glplot.canvas,n=this.glplot.camera,a=this.glplot.pixelRatio;this.glplot.dispose(),requestAnimationFrame(function i(){e.isContextLost()?requestAnimationFrame(i):x(t,n,a,r)?t.plot.apply(t,t.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")})};var w=["xaxis","yaxis","zaxis"];function k(t,e,r){for(var n=t.fullSceneLayout,a=0;a<3;a++){var i=w[a],o=i.charAt(0),s=n[i],l=e[o],c=e[o+"calendar"],h=e["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var f,p=0;p<(h||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][i])g[0][i]=-1,g[1][i]=1;else{var E=g[1][i]-g[0][i];g[0][i]-=E/32,g[1][i]+=E/32}if("reversed"===s.autorange){var C=g[0][i];g[0][i]=g[1][i],g[1][i]=C}}else{var L=s.range;g[0][i]=s.r2l(L[0]),g[1][i]=s.r2l(L[1])}g[0][i]===g[1][i]&&(g[0][i]-=1,g[1][i]+=1),v[i]=g[1][i]-g[0][i],this.glplot.bounds[0][i]=g[0][i]*f[i],this.glplot.bounds[1][i]=g[1][i]*f[i]}var P=[1,1,1];for(i=0;i<3;++i){var O=m[l=(s=c[w[i]]).type];P[i]=Math.pow(O.acc,1/O.count)/f[i]}var I;if("auto"===c.aspectmode)I=Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1];else if("cube"===c.aspectmode)I=[1,1,1];else if("data"===c.aspectmode)I=P;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var z=c.aspectratio;I=[z.x,z.y,z.z]}c.aspectratio.x=u.aspectratio.x=I[0],c.aspectratio.y=u.aspectratio.y=I[1],c.aspectratio.z=u.aspectratio.z=I[2],this.glplot.aspect=I;var D=c.domain||null,R=e._size||null;if(D&&R){var F=this.container.style;F.position="absolute",F.left=R.l+D.x[0]*R.w+"px",F.top=R.t+(1-D.y[1])*R.h+"px",F.width=R.w*(D.x[1]-D.x[0])+"px",F.height=R.h*(D.y[1]-D.y[0])+"px"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),T(this.glplot.camera)},_.setCamera=function(t){var e;this.glplot.camera.lookAt.apply(this,[[(e=t).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]);var r="orthographic"===t.projection.type;if(r!==this.glplot.camera._ortho){this.glplot.redraw();var n=this.glplot.pixelRatio,a=this.glplot.clearColor;this.glplot.gl.clearColor(a[0],a[1],a[2],a[3]),this.glplot.gl.clear(this.glplot.gl.DEPTH_BUFFER_BIT|this.glplot.gl.COLOR_BUFFER_BIT),this.glplot.dispose(),x(this,n),this.glplot.camera._ortho=r}},_.saveCamera=function(t){var e=this.fullLayout,r=this.getCamera(),n=u.nestedProperty(t,this.id+".camera"),a=n.get(),i=!1;function o(t,e,r,n){var a=["up","center","eye"],i=["x","y","z"];return e[a[r]]&&t[a[r]][i[n]]===e[a[r]][i[n]]}if(void 0===a)i=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!o(r,a,s,l)){i=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(i=!0)}if(i){var h={};h[this.id+".camera"]=a,c.call("_storeDirectGUIEdit",t,e._preGUI,h),n.set(r),u.nestedProperty(e,this.id+".camera").set(r)}return i},_.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,a=n._fullLayout,i=this.fullSceneLayout.camera,o=i.up.x,s=i.up.y,l=i.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var h=this.id+".camera.up",f={x:0,y:0,z:1},p={};p[h]=f;var d=n.layout;c.call("_storeDirectGUIEdit",d,a._preGUI,p),i.up=f,u.nestedProperty(d,h).set(f)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},_.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,a=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);e.readPixels(0,0,r,a,e.RGBA,e.UNSIGNED_BYTE,i);for(var o=0,s=a-1;o\xa9 OpenStreetMap
',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:'\xa9 CARTO',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:'\xa9 CARTO',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',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, under CC BY SA.',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}]}},a=Object.keys(n);e.exports={requiredVersion:"1.3.2",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:a,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.3.2."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.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\')'}}},{}],821:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r=t.split(" "),a=r[0],i=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(a){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(i){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":719}],822:[function(t,e,r){"use strict";var n=t("mapbox-gl"),a=t("../../lib"),i=t("../../plots/get_data").getSubplotCalcData,o=t("../../constants/xmlns_namespaces"),s=t("d3"),l=t("../../components/drawing"),c=t("../../lib/svg_text_utils"),u=t("./mapbox"),h=r.constants=t("./constants");function f(t){return"string"==typeof t&&(-1!==h.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://"))}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=a.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox;if(n.version!==h.requiredVersion)throw new Error(h.wrongVersionErrorMsg);var s=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],i=[],o=!1,s=!1,l=0;l1&&a.warn(h.multipleTokensErrorMsg),n[0]):(i.length&&a.log(["Listed mapbox access token(s)",i.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,o);n.accessToken=s;for(var l=0;lx/2){var b=g.split("|").join("
");m.text(b).attr("data-unformatted",b).call(c.convertToTspans,t),y=l.bBox(m.node())}m.attr("transform","translate(-3, "+(8-y.height)+")"),v.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var _=1;y.width+6>x&&(_=x/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];v.attr("transform","translate("+w[0]+","+w[1]+") scale("+_+")")}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function c(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})}return{layout:e,paint:r}}s.update=function(t){this.visible?this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=l(t)},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.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,l(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=t.sourceattribution);return a}(t);e.addSource(this.idSource,r)}},s.updateLayer=function(t){var e,r=this.subplot,n=c(t),a=this.subplot.belowLookup["layout-"+this.index];if("traces"===a)for(var o=r.getMapLayers(),s=0;s1)for(r=0;r-1&&h(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),a.indexOf("event")>-1&&i.click(n,e.originalEvent)}}},g.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,i=t.dragmode;a="select"===i?function(t,r){(t.range={})[e.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(l)};var s=e.dragOptions;e.dragOptions=o.extendDeep(s||{},{element:e.div,gd:n,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),"select"===i||"lasso"===i?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){u(t,r,n,e.dragOptions,i)},c.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 l(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},g.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])},g.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?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){m.sendDataToCloud(t)});else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(t,o),s.text(o.text()&&u.text()?" - ":"")}},m.sendDataToCloud=function(t){t.emit("plotly_beforeexport");var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL,r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=m.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function w(t,e){var r=t._context.locale,n=!1,a={};function o(t){for(var r=!0,i=0;i1&&O.length>1){for(i.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&O.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has("cartesian"),s._hasGeo=s._has("geo"),s._hasGL3D=s._has("gl3d"),s._hasGL2D=s._has("gl2d"),s._hasTernary=s._has("ternary"),s._hasPie=s._has("pie"),m.linkSubplots(h,s,u,a),m.cleanPlot(h,s,u,a),a._zoomlayer&&!t._dragging&&a._zoomlayer.selectAll(".select-outline").remove(),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var a=0;a0){var h=1-2*s;n=Math.round(h*n),i=Math.round(h*i)}}var f=m.layoutAttributes.width.min,p=m.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}),m.sanitizeMargins(r)},m.supplyLayoutModuleDefaults=function(t,e,r,n){var a,o,s,c=i.componentsRegistry,u=e._basePlotModules,h=i.subplotsRegistry.cartesian;for(a in c)(s=c[a]).includeBasePlot&&s.includeBasePlot(t,e);for(var f in u.length||u.push(h),e._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(t,e),h.finalizeSubplots(t,e)),e._subplots)e._subplots[f].sort(l.subplotSort);for(o=0;o.5*n.width&&(l.log("Margin push",e,"is too big in x, dropping"),r.l=r.r=0),r.b+r.t>.5*n.height&&(l.log("Margin push",e,"is too big in y, dropping"),r.b=r.t=0);var c=void 0!==r.xl?r.xl:r.x,u=void 0!==r.xr?r.xr:r.x,h=void 0!==r.yt?r.yt:r.y,f=void 0!==r.yb?r.yb:r.y;a[e]={l:{val:c,size:r.l+o},r:{val:u,size:r.r+o},b:{val:f,size:r.b+o},t:{val:h,size:r.t+o}},i[e]=1}else delete a[e],delete i[e];if(!n._replotting)return m.doAutoMargin(t)}},m.doAutoMargin=function(t){var e=t._fullLayout;e._size||(e._size={}),M(e);var r=e._size,n=e.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,h=n.b,f=e.width,p=e.height,d=e._pushmargin,g=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in d)g[v]||delete d[v];for(var y in d.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:h}},d){var x=d[y].l||{},b=d[y].b||{},_=x.val,w=x.size,k=b.val,T=b.size;for(var A in d){if(a(w)&&d[A].r){var S=d[A].r.val,E=d[A].r.size;if(S>_){var C=(w*S+(E-f)*_)/(S-_),L=(E*(1-_)+(w-f)*(1-S))/(S-_);C>=0&&L>=0&&f-(C+L)>0&&C+L>s+c&&(s=C,c=L)}}if(a(T)&&d[A].t){var P=d[A].t.val,O=d[A].t.size;if(P>k){var I=(T*P+(O-p)*k)/(P-k),z=(O*(1-k)+(T-p)*(1-P))/(P-k);I>=0&&z>=0&&p-(z+I)>0&&I+z>h+u&&(h=I,u=z)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(h),r.p=Math.round(n.pad),r.w=Math.round(f)-r.l-r.r,r.h=Math.round(p)-r.t-r.b,!e._replotting&&m.didMarginChange(o,r)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var D=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return i.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var o=0,s=0;function l(){return o++,function(){var e;s++,n||s!==o||(e=a,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return i.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(e)))}}r.runFn(l),setTimeout(l())})}],o=l.syncOrAsync(a,t);return o&&o.then||(o=Promise.resolve()),o.then(function(){return t})}m.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},m.graphJson=function(t,e,r,n,a){(a&&e&&!t._fullData||a&&!e&&!t._fullLayout)&&m.supplyDefaults(t);var i=a?t._fullData:t.data,o=a?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function c(t){if("function"==typeof t)return null;if(l.isPlainObject(t)){var e,n,a={};for(e in t)if("function"!=typeof t[e]&&-1===["_","["].indexOf(e.charAt(0))){if("keepdata"===r){if("src"===e.substr(e.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(t.stream))continue}else if("keepall"!==r&&"string"==typeof(n=t[e+"src"])&&n.indexOf(":")>0)continue;a[e]=c(t[e])}return a}return Array.isArray(t)?t.map(c):l.isTypedArray(t)?l.simpleMap(t,l.identity):l.isJSDate(t)?l.ms2DateTimeLocal(+t):t}var u={data:(i||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};return e||(u.layout=c(o)),t.framework&&t.framework.isPolar&&(u=t.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},m.modifyFrames=function(t,e){var r,n,a,i=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(i=n.calc(t,r))}Array.isArray(i)&&i[0]||(i=[{x:u,y:u}]),i[0].t||(i[0].t={}),i[0].trace=r,d[e]=i}}for(L(c,f),a=0;a1e-10?t:0}function f(t,e,r){e=e||0,r=r||0;for(var n=t.length,a=new Array(n),i=0;i0?r:1/0}),a=n.mod(r+1,e.length);return[e[r],e[a]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var a=-e*r,i=e*e+1,o=2*(e*a-r),s=a*a+r*r-t*t,l=Math.sqrt(o*o-4*i*s),c=(-o+l)/(2*i),u=(-o-l)/(2*i);return[[c,e*c+a+n],[u,e*u+a+n]]},clampTiny:h,pathPolygon:function(t,e,r,n,a,i){return"M"+f(u(t,e,r,n),a,i).join("L")},pathPolygonAnnulus:function(t,e,r,n,a,i,o){var s,l;t=0?f.angularAxis.domain:n.extent(k),E=Math.abs(k[1]-k[0]);A&&!T&&(E=0);var C=S.slice();M&&T&&(C[1]+=E);var L=f.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),f.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var P=f.angularAxis.ticksStep||(C[1]-C[0])/(L*(f.minorTicks+1));w&&(P=Math.max(Math.round(P),1)),C[2]||(C[2]=P);var O=n.range.apply(this,C);if(O=O.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=M?E:0,"undefined"==typeof(t=n.select(this).select("svg.chart-root"))||t.empty()){var I=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),z=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(z)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var D,R=t.select(".chart-group"),F={fill:"none",stroke:f.tickColor},B={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(t,e){return" "+t+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){D=t.select(".legend-group").attr({transform:"translate("+[x,f.margin.top]+")"}).style({display:"block"});var N=p.map(function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend="undefined"==typeof t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r});o.Legend().config({data:p.map(function(t,e){return t.name||"Element"+e}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:f.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(f.width-j.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,x=Math.max(10,x),_=[f.margin.left+x,f.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else D=t.select(".legend-group").style({display:"none"});t.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var V=[(f.width-(f.margin.left+f.margin.right+2*x+(j?j.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*x))/2];if(V[0]=Math.max(0,V[0]),V[1]=Math.max(0,V[1]),t.select(".outer-group").attr("transform","translate("+V+")"),f.title&&f.title.text){var U=t.select("g.title-group text").style(B).text(f.title.text),q=U.node().getBBox();U.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var Y=t.select("circle.background-circle").attr({r:x}).style({fill:f.backgroundColor,stroke:f.stroke});function W(t,e){return s(t)%360+f.orientation}if(f.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+f.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text(function(t,e){return this.textContent+f.radialAxis.ticksSuffix}).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(O),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+W(t)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",function(t,e){return e%(f.minorTicks+1)==0}).classed("minor",function(t,e){return!(e%(f.minorTicks+1)==0)}).style(F),J.selectAll(".minor").style({stroke:f.minorTickColor}),Z.select("line.grid-line").attr({x1:f.tickLength?x-f.tickLength:0,x2:x}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+f.labelOffset,dy:i+"em",transform:function(t,e){var r=W(t),n=x+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-r+" "+n+" 0)":"radial"==a?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(t,e){return e%(f.minorTicks+1)!=0?"":w?w[t]+f.angularAxis.ticksSuffix:t+f.angularAxis.ticksSuffix}).style(B);f.angularAxis.rewriteTicks&&K.text(function(t,e){return e%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,e)});var Q=n.max(R.selectAll(".angular-tick text")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));D.attr({transform:"translate("+[x+Q,f.margin.top]+")"});var $=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(p);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),p[0]||$){var et=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=f.orientation,n.direction=f.direction,n.index=e,et.push({data:t,geometryConfig:n})});var rt=n.nest().key(function(t,e){return"undefined"!=typeof t.data.groupId||"unstacked"}).entries(et),nt=[];rt.forEach(function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map(function(t,e){return[t]})):nt.push(t.values)}),nt.forEach(function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map(function(t,e){return a(o[r].defaultConfig(),t)});o[r]().config(n)()})}var at,it,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!T){var ht=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",function(t,e){var r=o.util.getMousePos(Y).angle;ht.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-f.orientation)%360;at=s.invert(n);var a=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(at)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.angular-guide",function(t,e){ot.select("line").style({opacity:0})})}var ft=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",function(t,e){var n=o.util.getMousePos(Y).radius;ft.attr({r:n}).style({opacity:.5}),it=r.invert(o.util.getMousePos(Y).radius);var a=o.util.convertToCartesian(n,f.radialAxis.orientation);ct.text(o.util.round(it)).move([a[0]+_[0],a[1]+_[1]])}).on("mouseout.radial-guide",function(t,e){ft.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()}),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(e,r){var a=n.select(this),i=this.style.fill,s="black",l=this.style.opacity||1;if(a.attr({"data-opacity":l}),i&&"none"!==i){a.attr({"data-fill":i}),s=n.hsl(i).darker().toString(),a.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};T&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,h=this.getBoundingClientRect(),f=t.node().getBoundingClientRect(),p=[h.left+h.width/2-V[0]-f.left,h.top+h.height/2-V[1]-f.top];ut.config({color:s}).text(u),ut.move(p)}else i=this.style.stroke||"black",a.attr({"data-stroke":i}),s=n.hsl(i).darker().toString(),a.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()}).on("mouseout.tooltip",function(t,e){ut.hide();var r=n.select(this),a=r.attr("data-fill");a?r.style({fill:a,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})})})}(c),this},f.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach(function(t,e){l.data[e]||(l.data[e]={}),a(l.data[e],o.Axis.defaultConfig().data[0]),a(l.data[e],t)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,e.layout),this},f.getLiveConfig=function(){return u},f.getinputConfig=function(){return c},f.radialScale=function(t){return r},f.angularScale=function(t){return s},f.svg=function(){return t},n.rebind(f,h,"on"),f},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map(function(e,r){var n=e*Math.PI/180;return[e,t(n)]})},o.util.dataFromEquation=function(t,e,r){var a=e||6,i=[],o=[];n.range(0,360+a,a).forEach(function(e,r){var n=e*Math.PI/180,a=t(n);i.push(e),o.push(a)});var s={t:i,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if("undefined"==typeof t)return null;var r=[].concat(t);return n.range(e).map(function(t,e){return r[e]||r[0]})},o.util.fillArrays=function(t,e,r){return e.forEach(function(e,n){t[e]=o.util.ensureArray(t[e],r)}),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map(function(t,e){return n.sum(t)})},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter(function(t,e,r){return r.indexOf(t)==e})},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],a=e[1],i={};return i.x=r,i.y=a,i.pos=e,i.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,i.radius=Math.sqrt(r*r+a*a),i},o.util.duplicatesCount=function(t){for(var e,r={},n={},a=0,i=t.length;a0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,a,i)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,a,i)},"stroke-width":function(t,e){return d["stroke-width"](r,a,i)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,a,i)},opacity:function(t,e){return d.opacity(r,a,i)},display:function(t,e){return d.display(r,a,i)}})}};var h=e.angularScale.range(),f=Math.abs(h[1]-h[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle(function(t){return-f/2}).endAngle(function(t){return f/2}).innerRadius(function(t){return e.radialScale(l+(t[2]||0))}).outerRadius(function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])});c.arc=function(t,r,a){n.select(this).attr({class:"mark arc",d:p,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,a){return r[t[a].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return"undefined"==typeof t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var v=g.selectAll("path.mark").data(function(t,e){return t});v.enter().append("path").attr({class:"mark"}),v.style(d).each(c[e.geometryType]),v.exit().remove(),g.exit().remove()})}return i.config=function(e){return arguments.length?(e.forEach(function(e,r){t[r]||(t[r]={}),a(t[r],o.PolyChart.defaultConfig()),a(t[r],e)}),this):t},i.getColorScale=function(){},n.rebind(i,e,"on"),i},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,i=t.data.map(function(t,r){return[].concat(t).map(function(t,n){var i=a({},e.elements[r]);return i.name=t,i.color=[].concat(e.elements[r].color)[n],i})}),o=n.merge(i);o=o.filter(function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||"undefined"==typeof e.elements[r].visibleInLegend)}),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map(function(t,e){return t.color}),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,h=u?e.height:c*o.length,f=s.classed("legend-group",!0).selectAll("svg").data([0]),p=f.enter().append("svg").attr({width:300,height:h+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),v=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,h]);if(u){var m=f.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),f.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=f.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,v(e)+c/2]+")"},d:function(t,e){var r,a,i,o=t.symbol;return i=3*(a=c),"line"===(r=o)?"M"+[[-a/2,-a/12],[a/2,-a/12],[a/2,a/12],[-a/2,a/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(i)():n.svg.symbol().type("square").size(i)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(v).orient("right"),b=f.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text(function(t,e){return o[e].name}),r}return r.config=function(e){return arguments.length?(a(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=i.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),c};return c.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",h=a||"";e.style({fill:u,"font-size":i.fontSize+"px"}).text(h);var f=i.padding,p=e.node().getBBox(),d={fill:i.color,stroke:s,"stroke-width":"2px"},g=p.width+2*f+l,v=p.height+2*f;return r.attr({d:"M"+[[l,-v/2],[l,-v/4],[i.hasTick?0:l,0],[l,v/4],[l,v/2],[g,v/2],[g,-v/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-v/2+2*f]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return a(i,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map(function(t,r){var n=a({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n}),!e&&t.layout&&"stack"===t.layout.barmode)){var i=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=i.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=a({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(t,r){o.util.translator.apply(null,t.concat(e))}),e?("undefined"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&"undefined"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&"undefined"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&"undefined"!=typeof s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{"../../../constants/alignment":688,"../../../lib":719,d3:164}],838:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../../lib"),i=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=a.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,a,i,u,h=new s;function f(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,a||(a=o.Axis()),i=o.adapter.plotly().convert(e),a.config(i).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return f.isPolar=!0,f.svg=function(){return a.svg()},f.getConfig=function(){return e},f.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},f.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},f.setUndoPoint=function(){var t,n,a=this,i=o.util.cloneJson(e);t=i,n=r,h.add({undo:function(){n&&a(n)},redo:function(){a(t)}}),r=o.util.cloneJson(i)},f.undo=function(){h.undo()},f.redo=function(){h.redo()},f},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),a=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:e,_paperdiv:r,_paper:a};t._fullLayout=l(o,t.layout)}},{"../../../components/color":594,"../../../lib":719,"./micropolar":837,"./undo_manager":839,d3:164}],839:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function a(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n?this:(e.splice(r+1,e.length-r),e.push(t),r=e.length-1,this)},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(a(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(a(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&f<=0?0:Math.max(u,f);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&h>=0?0:Math.min(c,h);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&f>=0?0:Math.min(u,f);n=l>=360?1:c<=0&&h<=0?0:Math.max(c,h);return[e,r,n,a]}(f),x=y[2]-y[0],b=y[3]-y[1],_=h/u,w=Math.abs(b/x);_>w?(p=u,m=(h-(d=u*w))/n.h/2,g=[o[0],o[1]],v=[c[0]+m,c[1]-m]):(d=h,m=(u-(p=h/w))/n.w/2,g=[o[0]+m,o[1]-m],v=[c[0],c[1]]),this.xLength2=p,this.yLength2=d,this.xDomain2=g,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*g[0],T=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=p/x,M=this.innerRadius=e.hole*A,S=this.cx=k-A*y[0],L=this.cy=T+A*y[3],P=this.cxx=S-k,O=this.cyy=L-T;this.radialAxis=this.mockAxis(t,e,a,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[a.side],domain:[M/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,i,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var I=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",I).attr("transform",R(P,O)),r.frontplot.attr("transform",R(k,T)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",I).attr("transform",R(S,L)).call(s.fill,e.bgcolor)},O.mockAxis=function(t,e,r,n){var a=o.extendFlat({},r,n);return f(a,e,t),a},O.mockCartesianAxis=function(t,e,r){var n=this,a=r._id,i=o.extendFlat({type:"linear"},r);h(i,t);var s={x:[0,2],y:[1,3]};return i.setRange=function(){var t=n.sectorBBox,r=s[a],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);i.range=[t[r[0]]*l,t[r[1]]*l]},i.isPtWithinRange="x"===a?function(t){return n.isPtInside(t)}:function(){return!0},i.setRange(),i.setScale(),i},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,a=e.radialaxis;n.setScale(),p(r,n);var i=n.range;a.range=i.slice(),a._input.range=i.slice(),n._rl=[n.r2l(i[0],null,"gregorian"),n.r2l(i[1],null,"gregorian")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.radialaxis,p=E(e.sector[0],360),d=r.radialAxis,g=l90&&p<=270&&(d.tickangle=180);var v=function(t){return"translate("+(d.l2p(t.x)+l)+",0)"},m=I(f);if(r.radialTickLayout!==m&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),g){d.setScale();var y=u.calcTicks(d),x=u.clipEnds(d,y),b=u.getTickSigns(d)[2];u.drawTicks(n,d,{vals:y,layer:a["radial-axis"],path:u.makeTickPath(d,0,b),transFn:v,crisp:!1}),u.drawGrid(n,d,{vals:x,layer:a["radial-grid"],path:function(t){return r.pathArc(d.r2p(t.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,d,{vals:y,layer:a["radial-axis"],transFn:v,labelFns:u.makeLabelFns(d,0)})}var _=r.radialAxisAngle=r.vangles?L(z(C(f.angle),r.vangles)):f.angle,w=R(c,h),k=w+F(-_);D(a["radial-axis"],g&&(f.showticklabels||f.ticks),{transform:k}),D(a["radial-grid"],g&&f.showgrid,{transform:w}),D(a["radial-line"].select("line"),g&&f.showline,{x1:l,y1:0,x2:i,y2:0,transform:k}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,a=this.radius,i=this.cx,o=this.cy,s=e.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,h=C(u),f=Math.cos(h),p=Math.sin(h),d=0;if(s.title){var g=l.bBox(this.layers["radial-axis"].node()).height,v=s.title.font.size;d="counterclockwise"===s.side?-g-.4*v:g+.8*v}this.layers["radial-axis-title"]=m.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:S(n,"Click to enter radial axis title"),attributes:{x:i+a/2*f+d*p,y:o-a/2*p+d*f,"text-anchor":"middle"},transform:{rotate:-u}})},O.updateAngularAxis=function(t,e){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,h=r.cy,f=e.angularaxis,p=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",f.rotation),p.setGeometry(),p.setScale();var d=function(t){return p.t2g(t.x)};"linear"===p.type&&"radians"===p.thetaunit&&(p.tick0=L(p.tick0),p.dtick=L(p.dtick));var g=function(t){return R(c+i*Math.cos(t),h-i*Math.sin(t))},v=u.makeLabelFns(p,0).labelStandoff,m={xFn:function(t){var e=d(t);return Math.cos(e)*v},yFn:function(t){var e=d(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(v+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*T)},anchorFn:function(t){var e=d(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=d(t);return-.5*(1+Math.sin(n))*r}},y=I(f);r.angularTickLayout!==y&&(a["angular-axis"].selectAll("."+p._id+"tick").remove(),r.angularTickLayout=y);var x,b=u.calcTicks(p);if("linear"===e.gridshape?(x=b.map(d),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===p.type&&(b=b.filter(function(t){return o.isAngleInsideSector(d(t),r.sectorInRad)})),p.visible){var _="inside"===p.ticks?-1:1,w=(p.linewidth||1)/2;u.drawTicks(n,p,{vals:b,layer:a["angular-axis"],path:"M"+_*w+",0h"+_*p.ticklen,transFn:function(t){var e=d(t);return g(e)+F(-L(e))},crisp:!1}),u.drawGrid(n,p,{vals:b,layer:a["angular-grid"],path:function(t){var e=d(t),r=Math.cos(e),n=Math.sin(e);return"M"+[c+l*r,h-l*n]+"L"+[c+i*r,h-i*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,p,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return g(d(t))},labelFns:m})}D(a["angular-line"].select("path"),f.showline,{d:r.pathSubplot(),transform:R(c,h)}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e=this,r=e.gd,o=e.layers,s=t._zoomlayer,l=A.MINZOOM,c=A.OFFEDGE,u=e.radius,h=e.innerRadius,f=e.cx,p=e.cy,m=e.cxx,_=e.cyy,w=e.sectorInRad,k=e.vangles,T=e.radialAxis,S=M.clampTiny,E=M.findXYatLength,C=M.findEnclosingVertexAngles,L=A.cornerHalfWidth,P=A.cornerLen/2,O=d.makeDragger(o,"path","maindrag","crosshair");n.select(O).attr("d",e.pathSubplot()).attr("transform",R(f,p));var I,z,D,F,B,N,j,V,U,q={element:O,gd:r,subplot:e.id,plotinfo:{id:e.id,xaxis:e.xaxis,yaxis:e.yaxis},xaxes:[e.xaxis],yaxes:[e.yaxis]};function H(t,e){return Math.sqrt(t*t+e*e)}function G(t,e){return H(t-m,e-_)}function Y(t,e){return Math.atan2(_-e,t-m)}function W(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function X(t,r){if(0===t)return e.pathSector(2*L);var n=P/t,a=r-n,i=r+n,o=Math.max(0,Math.min(t,u)),s=o-L,l=o+L;return"M"+W(s,a)+"A"+[s,s]+" 0,0,0 "+W(s,i)+"L"+W(l,i)+"A"+[l,l]+" 0,0,1 "+W(l,a)+"Z"}function Z(t,r,n){if(0===t)return e.pathSector(2*L);var a,i,o=W(t,r),s=W(t,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,h=-1/u,f=E(L,u,l,c);a=E(P,h,f[0][0],f[0][1]),i=E(P,h,f[1][0],f[1][1])}else{var p,d;c?(p=P,d=L):(p=L,d=P),a=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return"M"+a.join("L")+"L"+i.reverse().join("L")+"Z"}function J(t,e){return e=Math.max(Math.min(e,u),h),tl?(t-1&&1===t&&x(n,r,[e.xaxis],[e.yaxis],e.id,q),a.indexOf("event")>-1&&v.click(r,n,e.id)}q.prepFn=function(t,n,i){var o=r._fullLayout.dragmode,l=O.getBoundingClientRect();if(I=n-l.left,z=i-l.top,k){var c=M.findPolygonOffset(u,w[0],w[1],k);I+=m+c[0],z+=_+c[1]}switch(o){case"zoom":q.moveFn=k?tt:Q,q.clickFn=nt,q.doneFn=et,function(){D=null,F=null,B=e.pathSubplot(),N=!1;var t=r._fullLayout[e.id];j=a(t.bgcolor).getLuminance(),(V=d.makeZoombox(s,j,f,p,B)).attr("fill-rule","evenodd"),U=d.makeCorners(s,f,p),b(r)}();break;case"select":case"lasso":y(t,n,i,q,o)}},O.onmousemove=function(t){v.hover(r,t,e.id),r._fullLayout._lasthover=O,r._fullLayout._hoversubplot=e.id},O.onmouseout=function(t){r._dragging||g.unhover(r,t)},g.init(q)},O.updateRadialDrag=function(t,e,r){var a=this,s=a.gd,l=a.layers,c=a.radius,u=a.innerRadius,h=a.cx,f=a.cy,p=a.radialAxis,v=A.radialDragBoxSize,m=v/2;if(p.visible){var y,x,_,T=C(a.radialAxisAngle),M=p._rl,S=M[0],E=M[1],P=M[r],O=.75*(M[1]-M[0])/(1-e.hole)/c;r?(y=h+(c+m)*Math.cos(T),x=f-(c+m)*Math.sin(T),_="radialdrag"):(y=h+(u-m)*Math.cos(T),x=f-(u-m)*Math.sin(T),_="radialdrag-inner");var I,B,N,j=d.makeRectDragger(l,_,"crosshair",-m,-m,v,v),V={element:j,gd:s};D(n.select(j),p.visible&&u0==(r?N>S:Nn?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*i},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 a=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?i(t):t}(a(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,a){var i,o,s=e[a],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(i=new Array(l),o=0;o0){for(var n=[],a=0;a=u&&(p.min=0,g.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,n){var a=h[e._name];function o(r,n){return i.coerce(t,e,a,r,n)}o("uirevision",n.uirevision),e.type="linear";var f=o("color"),p=f!==a.color.dflt?f:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,v=o("title.text",g);e._hovertitle=v===g?v:d,i.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:p}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:p}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:f,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}e.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:h,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":594,"../../lib":719,"../../plot_api/plot_template":757,"../cartesian/line_grid_defaults":781,"../cartesian/tick_label_defaults":786,"../cartesian/tick_mark_defaults":787,"../cartesian/tick_value_defaults":788,"../subplot_defaults":842,"./layout_attributes":845}],847:[function(t,e,r){"use strict";var n=t("d3"),a=t("tinycolor2"),i=t("../../registry"),o=t("../../lib"),s=o._,l=t("../../components/color"),c=t("../../components/drawing"),u=t("../cartesian/set_convert"),h=t("../../lib/extend").extendFlat,f=t("../plots"),p=t("../cartesian/axes"),d=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/titles"),m=t("../cartesian/select").prepSelect,y=t("../cartesian/select").selectOnClick,x=t("../cartesian/select").clearSelect,b=t("../cartesian/constants");function _(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=_;var w=_.prototype;w.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},w.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var a=0;ak*x?a=(i=x)*k:i=(a=y)/k,o=v*a/y,s=m*i/x,r=e.l+e.w*d-a/2,n=e.t+e.h*(1-g)-i/2,f.x0=r,f.y0=n,f.w=a,f.h=i,f.sum=b,f.xaxis={type:"linear",range:[_+2*T-b,b-_-2*w],domain:[d-o/2,d+o/2],_id:"x"},u(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(t){return t.a>=f.aaxis.range[0]&&t.a<=f.aaxis.range[1]&&t.b>=f.baxis.range[1]&&t.b<=f.baxis.range[0]&&t.c>=f.caxis.range[1]&&t.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[_,b-w-T],domain:[g-s/2,g+s/2],_id:"y"},u(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var A=f.yaxis.domain[0],M=f.aaxis=h({},t.aaxis,{range:[_,b-w-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(M,f.graphDiv._fullLayout),M.setScale();var S=f.baxis=h({},t.baxis,{range:[b-_-T,w],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});u(S,f.graphDiv._fullLayout),S.setScale();var E=f.caxis=h({},t.caxis,{range:[b-_-w,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*k],anchor:"free",position:0,_id:"y",_length:a});u(E,f.graphDiv._fullLayout),E.setScale();var C="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";f.clipDef.select("path").attr("d",C),f.layers.plotbg.select("path").attr("d",C);var L="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";f.clipDefRelative.select("path").attr("d",L);var P="translate("+r+","+n+")";f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),f.clipDefRelative.select("path").attr("transform",null);var O="translate("+(r-S._offset)+","+(n+i)+")";f.layers.baxis.attr("transform",O),f.layers.bgrid.attr("transform",O);var I="translate("+(r+a/2)+","+n+")rotate(30)translate(0,"+-M._offset+")";f.layers.aaxis.attr("transform",I),f.layers.agrid.attr("transform",I);var z="translate("+(r+a/2)+","+n+")rotate(-30)translate(0,"+-E._offset+")";f.layers.caxis.attr("transform",z),f.layers.cgrid.attr("transform",z),f.drawAxes(!0),f.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",E.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(l.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),c.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},w.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,a=this.aaxis,i=this.baxis,o=this.caxis;if(this.drawAx(a),this.drawAx(i),this.drawAx(o),t){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),c=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=v.draw(e,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=v.draw(e,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(e,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*i.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=v.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(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"}})}},w.drawAx=function(t){var e,r=this.graphDiv,n=t._name,a=n.charAt(0),i=t._id,s=this.layers[n],l=a+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll("."+i+"tick").remove(),this[l]=c),t.setScale();var u=p.calcTicks(t),h=p.clipEnds(t,u),f=p.makeTransFn(t),d=p.getTickSigns(t)[2],g=o.deg2rad(30),v=d*(t.linewidth||1)/2,m=d*t.ticklen,y=this.w,x=this.h,b="b"===a?"M0,"+v+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+v+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[a];p.drawTicks(r,t,{vals:"inside"===t.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),p.drawGrid(r,t,{vals:h,layer:this.layers[a+"grid"],path:_,transFn:f,crisp:!1}),p.drawLabels(r,t,{vals:u,layer:s,transFn:f,labelFns:p.makeLabelFns(t,0,30)})};var T=b.MINZOOM/2+.87,A="m-0.87,.5h"+T+"v3h-"+(T+5.2)+"l"+(T/2+2.6)+",-"+(.87*T+4.5)+"l2.6,1.5l-"+T/2+","+.87*T+"Z",M="m0.87,.5h-"+T+"v3h"+(T+5.2)+"l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-2.6,1.5l"+T/2+","+.87*T+"Z",S="m0,1l"+T/2+","+.87*T+"l2.6,-1.5l-"+(T/2+2.6)+",-"+(.87*T+4.5)+"l-"+(T/2+2.6)+","+(.87*T+4.5)+"l2.6,1.5l"+T/2+",-"+.87*T+"Z",E="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",C=!0;function L(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var t,e,r,n,u,h,f,p,v,_,w=this,T=w.layers.plotbg.select("path").node(),P=w.graphDiv,O=P._fullLayout._zoomlayer,I={element:T,gd:P,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(i,o,s){I.xaxes=[w.xaxis],I.yaxes=[w.yaxis];var c=P._fullLayout.dragmode;I.minDrag="lasso"===c?1:void 0,"zoom"===c?(I.moveFn=N,I.clickFn=D,I.doneFn=j,function(i,o,s){var c=T.getBoundingClientRect();t=o-c.left,e=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,h=a(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),f="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",p=!1,v=O.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",f),_=O.append("path").attr("class","zoombox-corners").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),x(P)}(0,o,s)):"pan"===c?(I.moveFn=V,I.clickFn=D,I.doneFn=U,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,x(P)):"select"!==c&&"lasso"!==c||m(i,o,s,I,c)}};function z(t){var e={};return e[w.id+".aaxis.min"]=t.a,e[w.id+".baxis.min"]=t.b,e[w.id+".caxis.min"]=t.c,e}function D(t,e){var r=P._fullLayout.clickmode;L(P),2===t&&(P.emit("plotly_doubleclick",null),i.call("_guiRelayout",P,z({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&y(e,P,[w.xaxis],[w.yaxis],w.id,I),r.indexOf("event")>-1&&g.click(P,e,w.id)}function R(t,e){return 1-e/w.h}function F(t,e){return 1-(t+(w.h-e)/Math.sqrt(3))/w.w}function B(t,e){return(t-(w.h-e)/Math.sqrt(3))/w.w}function N(a,i){var o=t+a,s=e+i,l=Math.max(0,Math.min(1,R(0,e),R(0,s))),c=Math.max(0,Math.min(1,F(t,e),F(o,s))),d=Math.max(0,Math.min(1,B(t,e),B(o,s))),g=(l/2+d)*w.w,m=(1-l/2-c)*w.w,y=(g+m)/2,x=m-g,T=(1-l)*w.h,C=T-x/k;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),p=!0),P.emit("plotly_relayouting",z(u))}function j(){L(P),u!==r&&(i.call("_guiRelayout",P,z(u)),C&&P.data&&P._context.showTips&&(o.notifier(s(P,"Double-click to zoom back out"),"long"),C=!1))}function V(t,e){var n=t/w.xaxis._m,a=e/w.yaxis._m,i=[(u={a:r.a-a,b:r.b+(n+a)/2,c:r.c-(n-a)/2}).a,u.b,u.c].sort(),o=i.indexOf(u.a),s=i.indexOf(u.b),l=i.indexOf(u.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),u={a:i[o],b:i[s],c:i[l]},e=(r.a-u.a)*w.yaxis._m,t=(r.c-u.c-r.b+u.b)*w.xaxis._m);var h="translate("+(w.x0+t)+","+(w.y0+e)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var f="translate("+-t+","+-e+")";w.clipDefRelative.select("path").attr("transform",f),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),P.emit("plotly_relayouting",z(u))}function U(){i.call("_guiRelayout",P,z(u))}T.onmousemove=function(t){g.hover(P,t,w.id),P._fullLayout._lasthover=T,P._fullLayout._hoversubplot=w.id},T.onmouseout=function(t){P._dragging||d.unhover(P,t)},d.init(I)}},{"../../components/color":594,"../../components/dragelement":612,"../../components/drawing":615,"../../components/fx":632,"../../components/titles":681,"../../lib":719,"../../lib/extend":710,"../../registry":848,"../cartesian/axes":767,"../cartesian/constants":773,"../cartesian/select":784,"../cartesian/set_convert":785,"../plots":828,d3:164,tinycolor2:538}],848:[function(t,e,r){"use strict";var n=t("./lib/loggers"),a=t("./lib/noop"),i=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"),h=l.extendFlat,f=l.extendDeepAll;function p(t){var e=t.name,a=t.categories,i=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 a in m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(a,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(h[p[r]].title={text:""});for(r=0;rpath, .legendlines>path, .cbfill").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,"TOBESTRIPPED"))}),"pdf"!==e&&"eps"!==e||f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(s.xmlns,"xmlns",s.svg),f.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(f.attr("width",r*d),f.attr("height",r*g),f.attr("viewBox","0 0 "+d+" "+g));var _=(new window.XMLSerializer).serializeToString(f.node());return _=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()});return e.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":594,"../components/drawing":615,"../constants/xmlns_namespaces":696,"../lib":719,d3:164}],857:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r0&&h.s>0||(c=!1)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:!c,padded:!0})}}function m(t){for(var e=t.traces,r=0;rh+c||!n(u))}for(var p=0;p0&&_.s>0||(m=!1)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:!m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,a=t._fullLayout,i=t._fullData,s=t.calcdata,l=[],c=[],h=0;hi))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return a(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}function T(t){return"auto"===t?0:t}function A(t,e,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,c=i.anchor||0,u=a.width,h=a.height,f=Math.abs(e-t),p=Math.abs(n-r),d=f>2*y&&p>2*y?y:0;f-=2*d,p-=2*d;var g=!1;if(!("auto"===l)||u<=f&&h<=p||!(u>f||h>p)||(u>p||h>f)&&u2*y?y:0:f>2*y?y:0;var d=1;l&&(d=s?Math.min(1,p/h):Math.min(1,f/u));var g=T(c);o+=.5*(d*(s?h:u)*Math.abs(Math.sin(Math.PI/180*g))+d*(s?u:h)*Math.abs(Math.cos(Math.PI/180*g)));var v=(t+e)/2,m=(r+n)/2;return s?v=e-o*_(e,t):m=n+o*_(r,n),{textX:(a.left+a.right)/2,textY:(a.top+a.bottom)/2,targetX:v,targetY:m,scale:d,rotate:g}}e.exports={plot:function(t,e,r,p,d,x){var T=e.xaxis,S=e.yaxis,E=t._fullLayout;d||(d={mode:E.barmode,norm:E.barmode,gap:E.bargap,groupgap:E.bargroupgap});var C=i.makeTraceGroups(p,r,"trace bars").each(function(r){var c=n.select(this),p=r[0].trace,E="waterfall"===p.type,C="funnel"===p.type,L="bar"===p.type||C,P=0;E&&p.connector.visible&&"between"===p.connector.mode&&(P=p.connector.line.width/2);var O="h"===p.orientation,I=i.ensureSingle(c,"g","points"),z=b(p),D=I.selectAll("g.point").data(i.identity,z);D.enter().append("g").classed("point",!0),D.exit().remove(),D.each(function(c,b){var E,C,I=n.select(this),z=function(t,e,r,n){var a=[],i=[],o=n?e:r,s=n?r:e;return a[0]=o.c2p(t.s0,!0),i[0]=s.c2p(t.p0,!0),a[1]=o.c2p(t.s1,!0),i[1]=s.c2p(t.p1,!0),n?[a,i]:[i,a]}(c,T,S,O),D=z[0][0],R=z[0][1],F=z[1][0],B=z[1][1],N=!(D!==R&&F!==B&&a(D)&&a(R)&&a(F)&&a(B));if(N&&L&&f.getLineWidth(p,c)&&(O?R-D==0:B-F==0)&&(N=!1),c.isBlank=N,N&&O&&(R=D),N&&!O&&(B=F),P&&!N&&(O?(D-=_(D,R)*P,R+=_(D,R)*P):(F-=_(F,B)*P,B+=_(F,B)*P)),"waterfall"===p.type){if(!N){var j=p[c.dir].marker;E=j.line.width,C=j.color}}else E=f.getLineWidth(p,c),C=c.mc||p.marker.color;var V=n.round(E/2%1,2);function U(t){return 0===d.gap&&0===d.groupgap?n.round(Math.round(t)-V,2):t}if(!t._context.staticPlot){var q=s.opacity(C)<1||E>.01?U:function(t,e){return Math.abs(t-e)>=2?U(t):t>e?Math.ceil(t):Math.floor(t)};D=q(D,R),R=q(R,D),F=q(F,B),B=q(B,F)}var H=w(i.ensureSingle(I,"path"),d,x);if(H.style("vector-effect","non-scaling-stroke").attr("d","M"+D+","+F+"V"+B+"H"+R+"V"+F+"Z").call(l.setClipUrl,e.layerClipId,t),k(d)){var G=l.makePointStyleFns(p);l.singlePointStyle(c,H,p,G,t)}!function(t,e,r,n,a,s,c,p,d,x,b){var _,k=e.xaxis,T=e.yaxis,S=t._fullLayout;function E(e,r,n){var a=i.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t);return a}var C=n[0].trace,L="h"===C.orientation,P=function(t,e,r,n,a){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,a){var o=e[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l="h"===o.orientation,c="waterfall"===o.type,h="funnel"===o.type;function f(t){var e=l?n:a;return u(e,+t,!0).text}var p,d=e[r],g={};g.label=d.p,g.labelLabel=(p=d.p,u(l?a:n,p,!0).text);var v=i.castOption(o,d.i,"text");(0===v||v)&&(g.text=v),g.value=d.s,g.valueLabel=f(d.s);var y={};m(y,o,d.i),c&&(g.delta=+d.rawS||d.s,g.deltaLabel=f(g.delta),g.final=d.v,g.finalLabel=f(g.final),g.initial=g.final-g.delta,g.initialLabel=f(g.initial)),h&&(g.value=d.s,g.valueLabel=f(g.value),g.percentInitial=d.begR,g.percentInitialLabel=i.formatPercent(d.begR),g.percentPrevious=d.difR,g.percentPreviousLabel=i.formatPercent(d.difR),g.percentTotal=d.sumR,g.percenTotalLabel=i.formatPercent(d.sumR));var x=i.castOption(o,d.i,"customdata");return x&&(g.customdata=x),i.texttemplateString(s,g,t._d3locale,y,g,o._meta||{})}(t,e,r,n,a):s.textinfo?function(t,e,r,n){var a=t[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function c(t){var e=o?r:n;return u(e,+t,!0).text}var h,f,p=a.textinfo,d=t[e],g=p.split("+"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m("label")&&v.push((f=t[e].p,u(o?n:r,f,!0).text)),m("text")&&(0===(h=i.castOption(a,d.i,"text"))||h)&&v.push(h),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m("initial")&&v.push(c(b)),m("delta")&&v.push(c(y)),m("final")&&v.push(c(x))}if(l){m("value")&&v.push(c(d.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(h=i.formatPercent(d.begR),w&&(h+=" of initial"),v.push(h)),m("percent previous")&&(h=i.formatPercent(d.difR),w&&(h+=" of previous"),v.push(h)),m("percent total")&&(h=i.formatPercent(d.sumR),w&&(h+=" of total"),v.push(h))}return v.join("
")}(e,r,n,a):f.getValue(s.text,r),f.coerceString(g,o)}(S,n,a,k,T);_=function(t,e){var r=f.getValue(t.textposition,e);return f.coerceEnumerated(v,r)}(C,a);var O="stack"===x.mode||"relative"===x.mode,I=n[a],z=!O||I._outmost;if(P&&"none"!==_&&(!I.isBlank&&s!==c&&p!==d||"auto"!==_&&"inside"!==_)){var D=S.font,R=h.getBarColor(n[a],C),F=h.getInsideTextFont(C,a,D,R),B=h.getOutsideTextFont(C,a,D),N=r.datum();L?"log"===k.type&&N.s0<=0&&(s=k.range[0]0&&q>0,Z=U<=Y&&q<=W,J=U<=W&&q<=Y,K=L?Y>=U*(W/q):W>=q*(Y/U);X&&(Z||J||K)?_="inside":(_="outside",j.remove(),j=null)}else _="inside";if(!j){var Q=(j=E(r,P,"outside"===_?B:F)).attr("transform");if(j.attr("transform",""),V=l.bBox(j.node()),U=V.width,q=V.height,j.attr("transform",Q),U<=0||q<=0)return void j.remove()}"outside"===_?(G="both"===C.constraintext||"outside"===C.constraintext,H=i.getTextTransform(M(s,c,p,d,V,{isHorizontal:L,constrained:G,angle:C.textangle}))):(G="both"===C.constraintext||"inside"===C.constraintext,H=i.getTextTransform(A(s,c,p,d,V,{isHorizontal:L,constrained:G,angle:C.textangle,anchor:C.insidetextanchor}))),w(j,x,b).attr("transform",H)}else r.select("text").remove()}(t,e,I,r,b,D,R,F,B,d,x),e.layerClipId&&l.hideOutsideRangePoint(c,I.select("text"),T,S,p.xcalendar,p.ycalendar)});var R=!1===p.cliponaxis;l.setClipUrl(c,R?null:e.layerClipId,t)});c.getComponentMethod("errorbars","plot")(t,C,e,d)},toMoveInsideBar:A,toMoveOutsideBar:M}},{"../../components/color":594,"../../components/drawing":615,"../../components/fx/helpers":629,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../registry":848,"./attributes":858,"./constants":860,"./helpers":863,"./style":871,d3:164,"fast-isnumeric":226}],869:[function(t,e,r){"use strict";function n(t,e,r,n,a){var i=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 a?[(i+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(i+o)/2,l]}e.exports=function(t,e){var r,a=t.cd,i=t.xaxis,o=t.yaxis,s=a[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===a.bargap&&0===a.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(e){p(n.select(this),e[0].trace,t)}),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:d,styleOnSelect:function(t,e,r){var a=e[0].trace;a.selectedpoints?function(t,e,r){i.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each(function(t){var a,s=n.select(this);if(t.selected){a=o.extendFlat({},g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(a.color=l),i.font(s,a)}else i.selectedTextStyle(s,e)})}(t.selectAll("text"),e,r)}(r,a,t):(p(r,a,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:y,getBarColor:b}},{"../../components/color":594,"../../components/drawing":615,"../../lib":719,"../../registry":848,"./attributes":858,"./helpers":863,d3:164}],872:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),a(t,"marker")&&i(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(t,"marker.line")&&i(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":594,"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605}],873:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../lib/extend").extendFlat,i=t("../scatterpolar/attributes"),o=t("../bar/attributes");e.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:a({},o.base,{}),offset:a({},o.offset,{}),width:a({},o.width,{}),text:a({},o.text,{}),hovertext:a({},o.hovertext,{}),marker:o.marker,hoverinfo:i.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{"../../lib/extend":710,"../../plots/template_attributes":843,"../bar/attributes":858,"../scatterpolar/attributes":1178}],874:[function(t,e,r){"use strict";var n=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/calc"),i=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"),h=c.makeCalcdata(e,"theta"),f=e._length,p=new Array(f),d=u,g=h,v=0;vf.range[1]&&(x+=Math.PI);if(n.getClosest(c,function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=a.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,h,t),t.hovertemplate=u.hovertemplate,t.color=i(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":632,"../../lib":719,"../../plots/polar/helpers":830,"../bar/hover":864,"../scatterpolar/hover":1181}],877:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":831,"../bar/select":869,"../bar/style":871,"../scatter/marker_colorbar":1128,"./attributes":873,"./calc":874,"./defaults":875,"./hover":876,"./layout_attributes":878,"./layout_defaults":879,"./plot":880}],878:[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"}}},{}],879:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i,o={};function s(r,o){return n.coerce(t[i]||{},e[i],a,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var h=s.findEnclosingVertexAngles(c,t.vangles)[0],f=s.findEnclosingVertexAngles(u,t.vangles)[1],p=[h,(c+u)/2,f];return s.pathPolygonAnnulus(n,a,c,u,p,e,r)};return function(t,n,a,o){return i.pathAnnulus(t,n,a,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");i.makeTraceGroups(p,r,"trace bars").each(function(){var r=n.select(this),s=i.ensureSingle(r,"g","points").selectAll("g.point").data(i.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=h.c2g(t.p0),d=t.thetag1=h.c2g(t.p1);if(a(o)&&a(s)&&a(p)&&a(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),c.c2p(g*Math.sin(v))],e=f(o,s,p,d)}else e="M0,0Z";i.ensureSingle(r,"path").attr("d",e)}),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)})}},{"../../components/drawing":615,"../../lib":719,"../../plots/polar/helpers":830,d3:164,"fast-isnumeric":226}],881:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../bar/attributes"),i=t("../../components/color/attributes"),o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},name:{valType:"string",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers",editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1,editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},c.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},c.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,offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":593,"../../lib/extend":710,"../../plots/template_attributes":843,"../bar/attributes":858,"../scatter/attributes":1111}],882:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=a._,o=t("../../plots/cartesian/axes");function s(t,e,r){var n={text:"tx",hovertext:"htx"};for(var a in n)Array.isArray(e[a])&&(t[n[a]]=e[a][r])}function l(t,e){return t.v-e.v}function c(t){return t.v}e.exports=function(t,e){var r,u,h,f,p,d=t._fullLayout,g=o.getFromId(t,e.xaxis||"x"),v=o.getFromId(t,e.yaxis||"y"),m=[],y="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(u=g,h="x",f=v,p="y"):(u=v,h="y",f=g,p="x");var x,b=u.makeCalcdata(e,h),_=function(t,e,r,i,o){if(e in t)return r.makeCalcdata(t,e);var s;s=e+"0"in t?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||a.isDateTime(t.name)&&"date"===r.type)?t.name:o;var l="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]);return i.map(function(){return l})}(e,p,f,b,d[y]),w=a.distinctVals(_),k=w.vals,T=w.minDiff/2,A=function(t,e){for(var r=t.length,n=new Array(r+1),a=0;a=0&&Cx.uf};for(r=0;r0){var O=S[r].sort(l),I=O.map(c),z=I.length;(x={}).pos=k[r],x.pts=O,x[p]=x.pos,x[h]=x.pts.map(function(t){return t.v}),x.min=I[0],x.max=I[z-1],x.mean=a.mean(I,z),x.sd=a.stdev(I,z,x.mean),x.q1=a.interp(I,.25),x.med=a.interp(I,.5),x.q3=a.interp(I,.75),x.lf=Math.min(x.q1,I[Math.min(a.findBin(2.5*x.q1-1.5*x.q3,I,!0)+1,z-1)]),x.uf=Math.max(x.q3,I[Math.max(a.findBin(2.5*x.q3-1.5*x.q1,I),0)]),x.lo=4*x.q1-3*x.q3,x.uo=4*x.q3-3*x.q1;var D=1.57*(x.q3-x.q1)/Math.sqrt(z);x.ln=x.med-D,x.un=x.med+D,x.pts2=O.filter(P),m.push(x)}!function(t,e){if(a.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(m[0].t={num:d[y],dPos:T,posLetter:p,valLetter:h,labels:{med:i(t,"median:"),min:i(t,"min:"),q1:i(t,"q1:"),q3:i(t,"q3:"),max:i(t,"max:"),mean:"sd"===e.boxmean?i(t,"mean \xb1 \u03c3:"):i(t,"mean:"),lf:i(t,"lower fence:"),uf:i(t,"upper fence:")}},d[y]++,m):[{t:{empty:!0}}]}},{"../../lib":719,"../../plots/cartesian/axes":767,"fast-isnumeric":226}],883:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib"),i=t("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,h=e._fullLayout,f=o._id,p=f.charAt(0),d=[],g=0;for(s=0;s1,b=1-h[t+"gap"],_=1-h[t+"groupgap"];for(s=0;s0){var H=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;H+G>=0&&((W=U*(H+G))>M?(q=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var X=0;H-G<=0&&((X=-U*(H-G))>S?(q=!0,V=Y,N=X):X>F&&(V=Y,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(c.length);for(l=0;lt.lo&&(_.so=!0)}return i});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(i.translatePoints,l,c)}function u(t,e,r,i){var o,s,l=e.pos,c=e.val,u=i.bPos,h=i.bPosPxOffset||0,f=r.boxmean||(r.meanline||{}).visible;Array.isArray(i.bdPos)?(o=i.bdPos[0],s=i.bdPos[1]):(o=i.bdPos,s=i.bdPos);var p=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?a.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(t){var e=l.c2p(t.pos+u,!0)+h,a=l.c2p(t.pos+u-o,!0)+h,i=l.c2p(t.pos+u+s,!0)+h,p=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),g=c.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+p+","+a+"V"+i+("sd"===f?"m0,0L"+d+","+e+"L"+p+","+a+"L"+g+","+e+"Z":"")):n.select(this).attr("d","M"+a+","+p+"H"+i+("sd"===f?"m0,0L"+e+","+d+"L"+a+","+p+"L"+e+","+g+"Z":""))})}e.exports={plot:function(t,e,r,i){var o=e.xaxis,s=e.yaxis;a.makeTraceGroups(i,r,"trace boxes").each(function(t){var e,r,a=n.select(this),i=t[0],h=i.t,f=i.trace;h.wdPos=h.bdPos*f.whiskerwidth,!0!==f.visible||h.empty?a.remove():("h"===f.orientation?(e=s,r=o):(e=o,r=s),l(a,{pos:e,val:r},f,h),c(a,{x:o,y:s},f,h),u(a,{pos:e,val:r},f,h))})},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{"../../components/drawing":615,"../../lib":719,d3:164}],891:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,a=t.cd,i=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;var a=1/0;var i=-1/0;var o=e.length;for(var s=0;s0?Math.floor:Math.ceil,O=C>0?Math.ceil:Math.floor,I=C>0?Math.min:Math.max,z=C>0?Math.max:Math.min,D=P(S+L),R=O(E-L),F=[[h=M(S)]];for(i=D;i*C=0;a--)i[u-a]=t[h][a],o[u-a]=e[h][a];for(s.push({x:i,y:o,bicubic:l}),a=h,i=[],o=[];a>=0;a--)i[h-a]=t[a][0],o[h-a]=e[a][0];return s.push({x:i,y:o,bicubic:c}),s}},{}],905:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e,r){var i,o,s,l,c,u,h,f,p,d,g,v,m,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,C=M.length,L=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var a,i,o,s,l,c,u,h,p,d,g,v,m=[],y=[],x={};if("b"===e)for(i=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,i))),s=i-o,x.length=P,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,i)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},a=0;a0&&(p=t.dxydi([],a-1,o,0,s),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],a-1,o,1,s),m.push(h[0]-d[0]/3),y.push(h[1]-d[1]/3)),m.push(h[0]),y.push(h[1]),l=h;else for(a=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,a))),u=a-c,x.length=L,x.crossLength=P,x.xy=function(e){return t.evalxy([],a,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},i=0;i0&&(g=t.dxydj([],c,i-1,u,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],c,i-1,u,1),m.push(h[0]-v[0]/3),y.push(h[1]-v[1]/3)),m.push(h[0]),y.push(h[1]),l=h;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=f,x.x=m,x.y=y,x.smoothing=A.smoothing,x}function z(n){var a,i,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=T.length,"b"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),h.xy=function(e){return t.evalxy([],e,n)},h.dxy=function(e,r){return t.dxydi([],e,o,r,l)},a=0;ax.length-1||_.push(a(z(o),{color:b.gridcolor,width:b.gridwidth}));for(f=u;fx.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],i=0;ix[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(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],h=c[1],f=u;f<=h;f++)p=b.tick0+b.dtick*f,_.push(a(I(p),{color:b.gridcolor,width:b.gridwidth}));for(f=u-1;fx[x.length-1]||w.push(a(I(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&k.push(a(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(a(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":710,"../../plots/cartesian/axes":767}],906:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),a=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,i,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],a=0;a90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],920:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=t("../../constants/alignment");function h(t,e,r,a,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 a=r,s=a.x,l=a.y,c=i([],s,t.c2p),u=i([],l,e.c2p),h="M"+o(c,u,a.smoothing);n.select(this).attr("d",h).style("stroke-width",a.width).style("stroke",a.color).style("fill","none")}),u.exit().remove()}function f(t,e,r,i,o,c,u,h){var f=c.selectAll("text."+h).data(u);f.enter().append("text").classed(h,!0);var p=0,d={};return f.each(function(o,c){var u;if("auto"===o.axis.tickangle)u=s(i,e,r,o.xy,o.dxy);else{var h=(o.axis.tickangle+180)*Math.PI/180;u=s(i,e,r,o.xy,[Math.cos(h),Math.sin(h)])}c||(d={angle:u.angle,flip:u.flip});var f=(o.endAnchor?-1:1)*u.flip,g=n.select(this).attr({"text-anchor":f>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(l.convertToTspans,t),v=a.bBox(this);g.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*f+","+.3*v.height+")"),p=Math.max(p,v.width+o.axis.labelpadding)}),f.exit().remove(),d.maxExtent=p,d}e.exports=function(t,e,r,a){var l=e.xaxis,u=e.yaxis,p=t._fullLayout._clips;c.makeTraceGroups(a,r,"trace").each(function(e){var r=n.select(this),a=e[0],d=a.trace,v=d.aaxis,m=d.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),h(l,u,x,v,"a",v._gridlines),h(l,u,x,m,"b",m._gridlines),h(l,u,y,v,"a",v._minorgridlines),h(l,u,y,m,"b",m._minorgridlines),h(l,u,b,v,"a-boundary",v._boundarylines),h(l,u,b,m,"b-boundary",m._boundarylines);var w=f(t,l,u,d,a,_,v._labels,"a-label"),k=f(t,l,u,d,a,_,m._labels,"b-label");!function(t,e,r,n,a,i,o,l){var u,h,f,p,d=c.aggNums(Math.min,null,r.a),v=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+v),h=m,f=r.ab2xy(u,h,!0),p=r.dxyda_rough(u,h),void 0===o.angle&&c.extendFlat(o,s(r,a,i,f,r.dxydb_rough(u,h)));g(t,e,r,n,f,p,r.aaxis,a,i,o,"a-title"),u=d,h=.5*(m+y),f=r.ab2xy(u,h,!0),p=r.dxydb_rough(u,h),void 0===l.angle&&c.extendFlat(l,s(r,a,i,f,r.dxyda_rough(u,h)));g(t,e,r,n,f,p,r.baxis,a,i,l,"b-title")}(t,_,d,a,l,u,w,k),function(t,e,r,n,a){var s,l,u,h,f=r.select("#"+t._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var p=c.ensureSingle(f,"path","carpetboundary"),d=e.clipsegments,g=[];for(h=0;h90&&v<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,t),m&&(x=(-l.lineCount(y)+d)*p*i-x),y.attr("transform","translate("+e.p[0]+","+e.p[1]+") rotate("+e.angle+") translate(0,"+x+")").classed("user-select-none",!0).attr("text-anchor","middle").call(a.font,u.title.font)}),y.exit().remove()}},{"../../components/drawing":615,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"./makepath":917,"./map_1d_array":918,"./orient_text":919,d3:164}],921:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/search").findBin,i=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,h=t.aaxis,f=t.baxis,p=e[0],d=e[c-1],g=r[0],v=r[u-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||ev},t.setScale=function(){var e=t._x,r=t._y,n=i(t._xctrl,t._yctrl,e,r,h.smoothing,f.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,h.smoothing,f.smoothing),t.dxydi=s([t._xctrl,t._yctrl],h.smoothing,f.smoothing),t.dxydj=l([t._xctrl,t._yctrl],h.smoothing,f.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(a(t,e),c-2)),n=e[r],i=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(i-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(a(t,r),u-2)),n=r[e],i=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(i-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,a,i){if(!i&&(ne[c-1]|ar[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(a),l=t.evalxy([],o,s);if(i){var h,f,p,d,g=0,v=0,m=[];ne[c-1]?(h=c-2,f=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):f=o-(h=Math.max(0,Math.min(c-2,Math.floor(o)))),ar[u-1]?(p=u-2,d=1,v=(a-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(m,h,p,f,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,h,p,f,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,a){var i=t.dxydi(null,e,r,n,a),o=t.dadi(e,n);return[i[0]/o,i[1]/o]},t.dxydb=function(e,r,n,a){var i=t.dxydj(null,e,r,n,a),o=t.dbdj(r,a);return[i[0]/o,i[1]/o]},t.dxyda_rough=function(e,r,n){var a=m*(n||.1),i=t.ab2xy(e+a,r,!0),o=t.ab2xy(e-a,r,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dxydb_rough=function(e,r,n){var a=y*(n||.1),i=t.ab2xy(e,r+a,!0),o=t.ab2xy(e,r-a,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":738,"./compute_control_points":909,"./constants":910,"./create_i_derivative_evaluator":911,"./create_j_derivative_evaluator":912,"./create_spline_evaluator":913}],922:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var a,i,o,s=[],l=[],c=t[0].length,u=t.length;function h(e,r){var n,a=0,i=0;return e>0&&void 0!==(n=t[r][e-1])&&(i++,a+=n),e0&&void 0!==(n=t[r-1][e])&&(i++,a+=n),r0&&i0&&a1e-5);return n.log("Smoother converged to",T,"after",A,"iterations"),t}},{"../../lib":719}],923:[function(t,e,r){"use strict";var n=t("../../lib").isArray1D;e.exports=function(t,e,r){var a=r("x"),i=a&&a.length,o=r("y"),s=o&&o.length;if(!i&&!s)return!1;if(e._cheater=!a,i&&!n(a)||s&&!n(o))e._length=null;else{var l=i?a.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":719}],924:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../scattergeo/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../plots/attributes"),s=t("../../components/color/attributes").defaultLine,l=t("../../lib/extend").extendFlat,c=a.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},text:l({},a.text,{}),hovertext:l({},a.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:a.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:a.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n()},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":593,"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../scattergeo/attributes":1150}],925:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../constants/numerical").BADNUM,i=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 h=0;h")}(t,h,o,f.mockAxis),[t]}},{"../../lib":719,"../../plots/cartesian/axes":767,"./attributes":924}],929:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),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"],meta:{}}},{"../../plots/geo":797,"../heatmap/colorbar":1003,"./attributes":924,"./calc":925,"./defaults":926,"./event_data":927,"./hover":928,"./plot":930,"./select":931,"./style":932}],930:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../lib/polygon"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("./style").style;function c(t,e){for(var r=t[0].trace,n=t.length,a=o(r,e),i=0;i0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===l||"FJI"===l?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),a=0;ae?r[n++]=[t[a][0]+360,t[a][1]]:a===e?(r[n++]=t[a],r[n++]=[t[a][0],-90]):r[n++]=t[a];var o=i.tester(r);o.pts.pop(),c.push(o)}:function(t){c.push(i.tester(t))},o.type){case"MultiPolygon":for(r=0;ro&&(o=c,e=l)}else e=r;return i.default(e).geometry.coordinates}(s),e.fIn=t,e.fOut=s,m.push(s)}else o.log(["Location with id",e.loc,"does not have a valid GeoJSON geometry,","choroplethmapbox traces only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete v[t.id]}switch(o.isArrayOrTypedArray(k.opacity)&&(x=function(t){var e=t.mo;return n(e)?+o.constrain(e,0,1):0}),o.isArrayOrTypedArray(T.color)&&(b=function(t){return t.mlc}),o.isArrayOrTypedArray(T.width)&&(_=function(t){return t.mlw}),d.type){case"FeatureCollection":var M=d.features;for(g=0;g=0;n--){var a=r[n].id;if("string"==typeof a&&0===a.indexOf("water"))for(var i=n+1;i=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,a=new o(t,r.uid),i=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(i,{type:"geojson",data:s.geojson}),a._addLayers(s,l),e[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":820,"./convert":934}],938:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach(function(t){l[t]=i[t]}),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,e.exports=l},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../mesh3d/attributes":1052}],939:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,a=e.v,i=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,a.length,i.length),s=-1/0,l=1/0,c=0;co.level||o.starts.length&&i===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&&f===u)&&(n.prefixBoundary=!0);break;case"][":h=Math.min(p[0],p[1]),f=Math.max(p[0],p[1]),hc&&(n.prefixBoundary=!0)}}}},{}],946:[function(t,e,r){"use strict";var n=t("../../components/colorscale").extractOpts,a=t("./make_color_map"),i=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=a(e,{isColorbar:!0});if("heatmap"===c){var h=n(e);r._fillgradient=e.colorscale,r._zrange=[h.min,h.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:i(o),size:l}}}},{"../../components/colorscale":606,"./end_plus":954,"./make_color_map":959}],947:[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}}},{}],948:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("./label_defaults"),i=t("../../components/color"),o=i.addOpacity,s=i.opacity,l=t("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,i,l,h){var f,p,d,g=e.contours,v=r("contours.operation");(g._operation=c[v],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===v?f=g.showlines=!0:(f=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),f)&&(p=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash"));r("line.smoothing"),a(r,i,p,h)}},{"../../components/color":594,"../../constants/filter_ops":691,"./label_defaults":958,"fast-isnumeric":226}],949:[function(t,e,r){"use strict";var n=t("../../constants/filter_ops"),a=t("fast-isnumeric");function i(t,e){var r,i=Array.isArray(e);function o(t){return a(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(i?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=i?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=i?e.map(o):[o(e)]),r}function o(t){return function(e){e=i(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=i(t,e),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":691,"fast-isnumeric":226}],950:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],951:[function(t,e,r){"use strict";var n=t("../../lib");function a(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,i,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."),i=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":719,"./constraint_mapping":949,"./end_plus":954}],954:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],955:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./constants");function i(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(t)?i=1:-1!==a.LEFTSTART.indexOf(t)?n=1:-1!==a.TOPSTART.indexOf(t)?i=-1:n=-1;return[n,i]}(h,r,e),p=[s(t,e,[-f[0],-f[1]])],d=t.z.length,g=t.z[0].length,v=e.slice(),m=f.slice();for(c=0;c<1e4;c++){if(h>20?(h=a.CHOOSESADDLE[h][(f[0]||f[1])<0?0:1],t.crossings[u]=a.SADDLEREMAINDER[h]):delete t.crossings[u],!(f=a.NEWDELTA[h])){n.log("Found bad marching index:",h,e,t.level);break}p.push(s(t,e,f)),e[0]+=f[0],e[1]+=f[1],u=e.join(","),i(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=f[0]&&(e[0]<0||e[0]>g-2)||f[1]&&(e[1]<0||e[1]>d-2);if(e[0]===v[0]&&e[1]===v[1]&&f[0]===m[0]&&f[1]===m[1]||r&&y)break;h=t.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,A,M,S,E,C,L,P,O,I,z=i(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]=C.concat(p,E));break}U||(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,i,o,s,l,c,u,h,f=t[0].z,p=f.length,d=f[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):a.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;h+="L"+n}if(s===t.edgepaths.length){a.log("unclosed perimeter path");break}f=s,(d=-1===p.indexOf(f))&&(f=p[0],h+="Z")}for(f=0;fn.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(h)+Math.cos(c)*o);if(f<1||p<1)return 1/0;var d=m.EDGECOST*(1/(f-1)+1/(p-1));d+=m.ANGLECOST*c*c;for(var g=s-u,v=l-h,y=s+u,x=l+h,b=0;b2*m.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=m.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var a=e.width/2,i=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),h=a*u,f=i*c,p=a*c,d=-i*u,g=[[o-h-f,s-p-d],[o+h-f,s+p-d],[o+h+f,s+p+d],[o-h+f,s-p+d]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(g)},r.drawLabels=function(t,e,r,i,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,a=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:a,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+a+")"}).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={}),a.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,h=r.end,f=t._input.contours;if(u>h&&(r.start=f.start=h,h=r.end=f.end=u,u=r.start),!(r.size>0))c=u===h?1:i(u,h,t.ncontours).dtick,f.size=r.size=c}}},{"../../lib":719,"../../plots/cartesian/axes":767}],963:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=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,i=r.contours,s=r.line,l=i.size||1,c=i.start,u="constraint"===i.type,h=!u&&"lines"===i.coloring,f=!u&&"fill"===i.coloring,p=h||f?o(r):null;e.selectAll("g.contourlevel").each(function(t){n.select(this).selectAll("path").call(a.lineGroupStyle,s.width,h?p(t.level):s.color,s.dash)});var d=i.labelfont;if(e.selectAll("g.contourlabels text").each(function(t){a.font(n.select(this),{family:d.family,size:d.size,color:d.color||(h?p(t.level):s.color)})}),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(f){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))}}),i(t)}},{"../../components/drawing":615,"../heatmap/style":1012,"./make_color_map":959,d3:164}],964:[function(t,e,r){"use strict";var n=t("../../components/colorscale/defaults"),a=t("./label_defaults");e.exports=function(t,e,r,i,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,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,c,o)}},{"../../components/colorscale/defaults":604,"./label_defaults":958}],965:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),a=t("../contour/attributes"),i=t("../../components/colorscale/attributes"),o=t("../../lib/extend").extendFlat,s=a.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:a.fillcolor,autocontour:a.autocontour,ncontours:a.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:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../contour/attributes":943,"../heatmap/attributes":1e3}],966:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),a=t("../../lib"),i=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"),h=t("../carpet/lookup_carpetid"),f=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=h(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var 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,h,f,p,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,a.isArray1D(e.z)&&i(e,m,y,"a","b",["z"]);r=e._a=e._a||e.a,f=e._b=e._b||e.b,r=r?m.makeCalcdata(e,"_a"):[],f=f?y.makeCalcdata(e,"_b"):[],u=e.a0||0,h=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=a.maxRowLength(g),b="scaled"===e.xtype?"":r,_=c(e,b,u,h,x,m),w="scaled"===e.ytype?"":f,k=c(e,w,p,d,g.length,y),T={a:_,b:k,z:g};"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"});return[T]}(t,e);return f(e,e._z),g}}},{"../../components/colorscale/calc":602,"../../lib":719,"../carpet/lookup_carpetid":916,"../contour/set_contours":962,"../heatmap/clean_2d_array":1002,"../heatmap/convert_column_xyz":1004,"../heatmap/find_empties":1006,"../heatmap/interp2d":1009,"../heatmap/make_bound_array":1010,"./defaults":967}],967:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../heatmap/xyz_defaults"),i=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,a){return n.coerce(t,e,i,r,a)}if(u("carpet"),t.a&&t.b){if(!a(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,i,r)}),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{"../../lib":719,"../contour/constraint_defaults":948,"../contour/contours_defaults":950,"../contour/style_defaults":964,"../heatmap/xyz_defaults":1014,"./attributes":965}],968:[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"],meta:{}}},{"../../plots/cartesian":778,"../contour/colorbar":946,"../contour/style":963,"./attributes":965,"./calc":966,"./defaults":967,"./plot":969}],969:[function(t,e,r){"use strict";var n=t("d3"),a=t("../carpet/map_1d_array"),i=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"),h=t("../contour/constants"),f=t("../contour/convert_to_constraints"),p=t("../contour/empty_pathinfo"),d=t("../contour/close_boundaries"),g=t("../carpet/lookup_carpetid"),v=t("../carpet/axis_aligned_line");function m(t,e,r){var n=t.getPointAtLength(e),a=t.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/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),k=r[0],T=k.trace,A=T._carpetTrace=g(t,T),M=t.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var S=k.a,E=k.b,C=T.contours,L=p(C,e,k),P="constraint"===C.type,O=C._operation,I=P?"="===O?"lines":"fill":C.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(L);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(L,D,R);var F,B,N,j,V=L;"constraint"===C.type&&(V=f(L,O)),function(t,e){var r,n,a,i,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=a([],F.x,_.c2p),N=a([],F.y,w.c2p),B.reverse(),N.reverse(),U.push(i(B,N,F.bicubic));var q="M"+U.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,h,f,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(f=0;f=0&&(f=C,d=g):Math.abs(h[1]-f[1])=0&&(f=C,d=g):s.log("endpt to newendpt is not vert. or horz.",h,f,C)}if(d>=0)break;y+=S(h,f),h=f}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(h,f)+"Z",h=null)}for(u=0;uv&&(n.max=v);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*h.LABELMIN)))for(var a=Math.min(Math.ceil(n.len/O),h.LABELMAX),i=0;i0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u<_.length;u++)k.push(_[u][0],_[u][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return a.extendFlat(c.heatmap.paint,{"heatmap-weight":d?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}},{"../../components/color":594,"../../components/colorscale":606,"../../constants/numerical":695,"../../lib":719,"../../lib/geojson_utils":714,"fast-isnumeric":226}],973:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/colorscale/defaults"),i=t("./attributes");e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}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"),a(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":604,"../../lib":719,"./attributes":970}],974:[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}},{}],975:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axes"),i=t("../scattermapbox/hover");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 h=s.subplot.mockAxis;s.z=u.z,s.zLabel=a.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(t.hovertemplate)return;var a=(e.hi||t.hoverinfo).split("+"),i=-1!==a.indexOf("all"),o=-1!==a.indexOf("lon"),s=-1!==a.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}i||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==a.indexOf("text"))&&n.fillText(e,t,c);return c.join("
")}(c,u,l[0].t.labels),[s]}}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scattermapbox/hover":1174}],976:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),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,a=new i(t,r.uid),o=a.sourceId,s=n(e),l=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}},{"../../plots/mapbox/constants":820,"./convert":972}],978:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.color=function(t,e){var r=t.marker,a=e.mc||r.color,i=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(a))return a;if(n(i)&&o)return i}(c,h),[s]}}},{"../../components/color":594,"../../lib":719,"../bar/hover":864}],986:[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":778,"../bar/select":869,"./attributes":979,"./calc":980,"./cross_trace_calc":982,"./defaults":983,"./event_data":984,"./hover":985,"./layout_attributes":987,"./layout_defaults":988,"./plot":989,"./style":990}],987:[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"}}},{}],988:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s path").each(function(t){if(!t.isBlank){var e=l.marker;n.select(this).call(i.fill,t.mc||e.color).call(i.stroke,t.mlc||e.line.color).call(a.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".regions").each(function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,l.connector.fillcolor)}),r.selectAll(".lines").each(function(){var t=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":594,"../../components/drawing":615,"../../constants/interactions":694,"../bar/style":871,d3:164}],991:[function(t,e,r){"use strict";var n=t("../pie/attributes"),a=t("../../plots/attributes"),i=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({},a.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:i({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":710,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/template_attributes":843,"../pie/attributes":1085}],992:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="funnelarea",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":828}],993:[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":1087}],994:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText;e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,a,r,i)}var c,u=l("values"),h=n.isArrayOrTypedArray(u),f=l("labels");if(Array.isArray(f)?(c=f.length,h&&(c=Math.min(c,u.length))):h&&(c=u.length,l("label0"),l("dlabel")),c){e._length=c,l("marker.line.width")&&l("marker.line.color",s.paper_bgcolor),l("marker.colors"),l("scalegroup");var p,d=l("text"),g=l("texttemplate");if(g||(p=l("textinfo",Array.isArray(d)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),g||p&&"none"!==p){var v=l("textposition");o(t,e,s,l,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(e,s,l),l("title.text")&&(l("title.position"),n.coerceFont(l,"title.font",s.font)),l("aspectratio"),l("baseratio")}else e.visible=!1}},{"../../lib":719,"../../plots/domain":792,"../bar/defaults":862,"./attributes":991}],995:[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":1096,"./attributes":991,"./base_plot":992,"./calc":993,"./defaults":994,"./layout_attributes":996,"./layout_defaults":997,"./plot":998,"./style":999}],996:[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":1092}],997:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},{"../../lib":719,"./layout_attributes":996}],998:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/drawing"),i=t("../../lib"),o=t("../../lib/svg_text_utils"),s=t("../bar/plot").toMoveInsideBar,l=t("../pie/helpers"),c=t("../pie/plot"),u=c.attachFxHandlers,h=c.determineInsideTextFont,f=c.layoutAreas,p=c.prerenderTitles,d=c.positionTitleOutside;function g(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;p(e,t),f(e,r._size),i.makeTraceGroups(r._funnelarealayer,e,"trace").each(function(e){var f=n.select(this),p=e[0],v=p.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o=Math.pow(a,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 h,f,p=[];for(p.push(u()),h=t.length-1;h>-1;h--)if(!(f=t[h]).hidden){var d=f.v/l;c+=d,p.push(u())}var g=1/0,v=-1/0;for(h=0;h-1;h--)if(!(f=t[h]).hidden){var A=p[T+=1][0],M=p[T][1];f.TL=[-A,M],f.TR=[A,M],f.BL=w,f.BR=k,f.pxmid=(S=f.TR,E=f.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=f.TL,k=f.TR}var S,E}(e),f.each(function(){var f=n.select(this).selectAll("g.slice").data(e);f.enter().append("g").classed("slice",!0),f.exit().remove(),f.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=v.index;var f=p.cx,d=p.cy,m=n.select(this),y=m.selectAll("path.surface").data([r]);y.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),m.call(u,t,e);var x="M"+(f+r.TR[0])+","+(d+r.TR[1])+g(r.TR,r.BR)+g(r.BR,r.BL)+g(r.BL,r.TL)+"Z";y.attr("d",x),c.formatSliceLabel(t,r,p);var b=l.castOption(v.textposition,r.pts),_=m.selectAll("g.slicetext").data(r.text&&"none"!==b?[0]:[]);_.enter().append("g").classed("slicetext",!0),_.exit().remove(),_.each(function(){var e=i.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,h(v,r,t._fullLayout.font)).call(o.convertToTspans,t);var l,c,u,p=a.bBox(e.node()),g=Math.min(r.BL[1],r.BR[1]),m=Math.max(r.TL[1],r.TR[1]);c=Math.max(r.TL[0],r.BL[0]),u=Math.min(r.TR[0],r.BR[0]),l=i.getTextTransform(s(c,u,g,m,p,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})),e.attr("transform","translate("+f+","+d+")"+l)})}});var m=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);m.enter().append("g").classed("titletext",!0),m.exit().remove(),m.each(function(){var e=i.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),s=v.title.text;v._meta&&(s=i.templateString(s,v._meta)),e.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,v.title.font).call(o.convertToTspans,t);var l=d(p,r._size);e.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")})})})}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../bar/plot":868,"../pie/helpers":1090,"../pie/plot":1094,d3:164}],999:[function(t,e,r){"use strict";var n=t("d3"),a=t("../pie/style_one");e.exports=function(t){t._fullLayout._funnelarealayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(a,t,e)})})}},{"../pie/style_one":1096,d3:164}],1000:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../../components/colorscale/attributes"),o=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},n.x,{impliedEdits:{xtype:"array"}}),x0:o({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},n.y,{impliedEdits:{ytype:"array"}}),y0:o({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},n.dy,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},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"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:a()},{transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":601,"../../constants/docs":690,"../../lib/extend":710,"../../plots/template_attributes":843,"../scatter/attributes":1111}],1001:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../histogram2d/calc"),s=t("../../components/colorscale/calc"),l=t("./convert_column_xyz"),c=t("./clean_2d_array"),u=t("./interp2d"),h=t("./find_empties"),f=t("./make_bound_array");e.exports=function(t,e){var r,p,d,g,v,m,y,x,b,_=i.getFromId(t,e.xaxis||"x"),w=i.getFromId(t,e.yaxis||"y"),k=n.traceIs(e,"contour"),T=n.traceIs(e,"histogram"),A=n.traceIs(e,"gl2d"),M=k?"best":e.zsmooth;if(_._minDtick=0,w._minDtick=0,T)r=(b=o(t,e)).x,p=b.x0,d=b.dx,g=b.y,v=b.y0,m=b.dy,y=b.z;else{var S=e.z;a.isArray1D(S)?(l(e,_,w,"x","y",["z"]),r=e._x,g=e._y,S=e._z):(r=e._x=e.x?_.makeCalcdata(e,"x"):[],g=e._y=e.y?w.makeCalcdata(e,"y"):[]),p=e.x0,d=e.dx,v=e.y0,m=e.dy,y=c(S,e,_,w),(k||e.connectgaps)&&(e._emptypoints=h(y),u(y,e._emptypoints))}function E(t){M=e._input.zsmooth=e.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+t)}if("fast"===M)if("log"===_.type||"log"===w.type)E("log axis found");else if(!T){if(r.length){var C=(r[r.length-1]-r[0])/(r.length-1),L=Math.abs(C/100);for(x=0;xL){E("x scale is not linear");break}}if(g.length&&"fast"===M){var P=(g[g.length-1]-g[0])/(g.length-1),O=Math.abs(P/100);for(x=0;xO){E("y scale is not linear");break}}}var I=a.maxRowLength(y),z="scaled"===e.xtype?"":r,D=f(e,z,p,d,I,_),R="scaled"===e.ytype?"":g,F=f(e,R,v,m,y.length,w);A||(e._extremes[_._id]=i.findExtremes(_,D),e._extremes[w._id]=i.findExtremes(w,F));var B={x:D,y:F,z:y,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(z&&z.length===D.length-1&&(B.xCenter=z),R&&R.length===F.length-1&&(B.yCenter=R),T&&(B.xRanges=b.xRanges,B.yRanges=b.yRanges,B.pts=b.pts),k||s(t,e,{vals:y,cLetter:"z"}),k&&e.contours&&"heatmap"===e.contours.coloring){var N={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};B.xfill=f(N,z,p,d,I,_),B.yfill=f(N,R,v,m,y.length,w)}return[B]}},{"../../components/colorscale/calc":602,"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":848,"../histogram2d/calc":1032,"./clean_2d_array":1002,"./convert_column_xyz":1004,"./find_empties":1006,"./interp2d":1009,"./make_bound_array":1010}],1002:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib"),i=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,h,f;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,h=0;h=0;o--)(s=((h[[(r=(i=f[o])[0])-1,a=i[1]]]||g)[2]+(h[[r+1,a]]||g)[2]+(h[[r,a-1]]||g)[2]+(h[[r,a+1]]||g)[2])/20)&&(l[i]=[r,a,s],f.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(i in l)h[i]=l[i],u.push(l[i])}return u.sort(function(t,e){return e[2]-t[2]})}},{"../../lib":719}],1007:[function(t,e,r){"use strict";var n=t("../../components/fx"),a=t("../../lib"),i=t("../../plots/cartesian/axes"),o=t("../../components/colorscale").extractOpts;e.exports=function(t,e,r,s,l,c){var u,h,f,p,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,A=y,M=x;if(!1!==t.index){try{f=Math.round(t.index[1]),p=Math.round(t.index[0])}catch(e){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(f<0||f>=b[0].length||p<0||p>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(c){var S;for(A=[2*y[0]-y[1]],S=1;Sg&&(m=Math.max(m,Math.abs(t[i][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,a=1;for(o(t,e),r=0;r.01;r++)a=o(t,e,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),t}},{"../../lib":719}],1010:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib").isArrayOrTypedArray;e.exports=function(t,e,r,i,o,s){var l,c,u,h=[],f=n.traceIs(t,"contour"),p=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(a(e)&&e.length>1&&!p&&"category"!==s.type){var g=e.length;if(!(g<=o))return f?e.slice(0,o):e.slice(0,o+1);if(f||d)h=e.slice(0,o);else if(1===o)h=[e[0]-.5,e[0]+.5];else{for(h=[1.5*e[0]-.5*e[1]],u=1;u0;)f=p.c2p(k[y]),y--;for(f0;)m=d.c2p(T[y]),y--;if(m0&&(i=!0);for(var l=0;li){var o=i-r[t];return r[t]=i,o}}return 0},max:function(t,e,r,a){var i=a[e];if(n(i)){if(i=Number(i),!n(r[t]))return r[t]=i,i;if(r[t]c?t>o?t>1.1*a?a:t>1.1*i?i:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,i,s){if(n&&t>o){var l=d(e,i,s),c=d(r,i,s),u=t===a?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,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(t,e,r,n,i){var s,l,c=-1.1*e,f=-.1*e,p=t-f,d=r[0],g=r[1],v=Math.min(h(d+f,d+p,n,i),h(g+f,g+p,n,i)),m=Math.min(h(d+c,d+f,n,i),h(g+c,g+f,n,i));if(v>m&&mo){var y=s===a?1:6,x=s===a?"M12":"M1";return function(e,r){var o=n.c2d(e,a,i),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,i);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||a.nestedProperty(e,m+".start").set(z.start)}var V=b.end,U=r.r2l(I.end),q=void 0!==U;if((b.endFound||q)&&U!==r.r2l(V)){var H=q?U:a.aggNums(Math.max,null,d);z.end=r.l2r(H),q||a.nestedProperty(e,m+".start").set(z.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[m]=a.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,i,p,d,g=[],v=[],m=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=f(t,e,m,y),k=w[0],T=w[1],A="string"==typeof k.size,M=[],S=A?M:k,E=[],C=[],L=[],P=0,O=e.histnorm,I=e.histfunc,z=-1!==O.indexOf("density");_.enabled&&z&&(O=O.replace(/ ?density$/,""),z=!1);var D,R="max"===I||"min"===I?null:0,F=l.count,B=c[O],N=!1,j=function(t){return m.r2c(t,0,b)};for(a.isArrayOrTypedArray(e[x])&&"count"!==I&&(D=e[x],N="avg"===I,F=l[I]),r=j(k.start),p=j(k.end)+(r-o.tickIncrement(r,k.size,!1,b))/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())}}(v,_.direction,_.currentbin);var X=Math.min(g.length,v.length),Z=[],J=0,K=X-1;for(r=0;r=J;r--)if(v[r]){K=r;break}for(r=J;r<=K;r++)if(n(g[r])&&n(v[r])){var Q={p:g[r],s:v[r],b:0};_.enabled||(Q.pts=L[r],q?Q.ph0=Q.ph1=L[r].length?T[L[r][0]]:g[r]:(Q.ph0=V(M[r]),Q.ph1=V(M[r+1],!0))),Z.push(Q)}return 1===Z.length&&(Z[0].width1=o.tickIncrement(Z[0].p,k.size,!1,b)-Z[0].p),s(Z,e),a.isArrayOrTypedArray(e.selectedpoints)&&a.tagSelected(Z,e,Y),Z},calcAllAutoBins:f}},{"../../lib":719,"../../plots/cartesian/axes":767,"../../registry":848,"../bar/arrays_to_calcdata":857,"./average":1019,"./bin_functions":1021,"./bin_label_vals":1022,"./norm_functions":1030,"fast-isnumeric":226}],1024:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1025:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../plots/cartesian/axis_ids"),i=t("../../registry").traceIs,o=t("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=a.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,h,f,p,d,g,v,m=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 k(t,r,i){var o=t.uid+"__"+i;r||(r=o);var s=function(t,r){return a.getFromTrace({_fullLayout:e},t,r).type}(t,i),l=t[i+"calendar"],c=m[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(i)):(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&&(m[r]={traces:[t],dirs:[i],axType:s,calendar:t[i+"calendar"]||""}),t["_"+i+"bingroup"]=r}for(d=0;dS&&k.splice(S,k.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],L=[],P="string"==typeof w.size,O="string"==typeof A.size,I=[],z=[],D=P?I:w,R=O?z:A,F=0,B=[],N=[],j=e.histnorm,V=e.histfunc,U=-1!==j.indexOf("density"),q="max"===V||"min"===V?null:0,H=i.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"!==V&&(Y="avg"===V,H=i[V]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-a.tickIncrement(K,J,!1,m))/1e6;for(r=K;r=0&&p=0&&d0}function x(t){t.each(function(t){d.stroke(n.select(this),t.line.color)}).each(function(t){d.fill(n.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function b(t,e,r){var n=t._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return a.coerce(i,o,p,t,e)}return h(i,o,l,s,n),f(i,o,l,s),o}function _(t,e){return"translate("+t+","+e+")"}function w(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(t,e,r,a){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(i);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(c.convertToTspans,a).call(s.font,e),s.bBox(o.node())}function T(t,e,r,n,i,o){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=a.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,h){var f,p=t._fullLayout;y(r)&&h&&(f=h()),a.makeTraceGroups(p._indicatorlayer,e,"trace").each(function(e){var h,A,M,S,E,C=e[0].trace,L=n.select(this),P=C._hasGauge,O=C._isAngular,I=C._isBullet,z=C.domain,D={w:p._size.w*(z.x[1]-z.x[0]),h:p._size.h*(z.y[1]-z.y[0]),l:p._size.l+p._size.w*z.x[0],r:p._size.r+p._size.w*(1-z.x[1]),t:p._size.t+p._size.h*(1-z.y[1]),b:p._size.b+p._size.h*z.y[0]},R=D.l+D.w/2,F=D.t+D.h/2,B=Math.min(D.w/2,D.h),N=l.innerRadius*B,j=C.align||"center";if(A=F,P){if(O&&(h=R,A=F+B/2,M=function(t){return e=t,r=.9*N,n=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),[r/n,e,r];var e,r,n}),I){var V=l.bulletPadding,U=1-l.bulletNumberDomainSize+V;h=D.l+(U+(1-U)*v[j])*D.w,M=function(t){return w(t,(l.bulletNumberDomainSize-V)*D.w,D.h)}}}else h=D.l+v[j]*D.w,M=function(t){return w(t,D.w,D.h)};!function(t,e,r,i){var o,l,h,f=r[0].trace,p=i.numbersX,x=i.numbersY,w=f.align||"center",A=g[w],M=i.transitionOpts,S=i.onComplete,E=a.ensureSingle(e,"g","numbers"),C=[];f._hasNumber&&C.push("number");f._hasDelta&&(C.push("delta"),"left"===f.delta.position&&C.reverse());var L=E.selectAll("text").data(C);function P(e,r,n,a){if(!e.match("s")||n>=0==a>=0||r(n).slice(-1).match(m)||r(a).slice(-1).match(m))return r;var i=e.slice().replace("s","f").replace(/\d+/,function(t){return parseInt(t)-1}),o=b(t,{tickformat:i});return function(t){return Math.abs(t)<1?u.tickText(o,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",function(){return A}).attr("class",function(t){return t}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var O,I=f.mode+f.align;f._hasDelta&&(O=function(){var e=b(t,{tickformat:f.delta.valueformat},f._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=function(t){var e=f.delta.relative?t.relativeDelta:t.delta;return e},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?f.delta.increasing.symbol:f.delta.decreasing.symbol)+e(t)},h=function(t){return t.delta>=0?f.delta.increasing.color:f.delta.decreasing.color};void 0===f._deltaLastValue&&(f._deltaLastValue=i(r[0]));var p=E.select("text.delta");function g(){p.text(o(i(r[0]),a)).call(d.fill,h(r[0])).call(c.convertToTspans,t)}p.call(s.font,f.delta.font).call(d.fill,h({delta:f._deltaLastValue})),y(M)?p.transition().duration(M.duration).ease(M.easing).tween("text",function(){var t=n.select(this),e=i(r[0]),s=f._deltaLastValue,l=P(f.delta.valueformat,a,s,e),c=n.interpolateNumber(s,e);return f._deltaLastValue=e,function(e){t.text(o(c(e),l)),t.call(d.fill,h({delta:c(e)}))}}).each("end",function(){g(),S&&S()}).each("interrupt",function(){g(),S&&S()}):g();return l=k(o(i(r[0]),a),f.delta.font,A,t),p}(),I+=f.delta.position+f.delta.font.size+f.delta.font.family+f.delta.valueformat,I+=f.delta.increasing.symbol+f.delta.decreasing.symbol,h=l);f._hasNumber&&(!function(){var e=b(t,{tickformat:f.number.valueformat},f._range);e.setScale(),u.prepTicks(e);var a=function(t){return u.tickText(e,t).text},i=f.number.suffix,l=f.number.prefix,h=E.select("text.number");function p(){var e="number"==typeof r[0].y?l+a(r[0].y)+i:"-";h.text(e).call(s.font,f.number.font).call(c.convertToTspans,t)}y(M)?h.transition().duration(M.duration).ease(M.easing).each("end",function(){p(),S&&S()}).each("interrupt",function(){p(),S&&S()}).attrTween("text",function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);f._lastValue=r[0].y;var o=P(f.number.valueformat,a,r[0].lastY,r[0].y);return function(r){t.text(l+o(e(r))+i)}}):p();o=k(l+a(r[0].y)+i,f.number.font,A,t)}(),I+=f.number.font.size+f.number.font.family+f.number.valueformat+f.number.suffix+f.number.prefix,h=o);if(f._hasDelta&&f._hasNumber){var z,D,R=[(o.left+o.right)/2,(o.top+o.bottom)/2],F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=.75*f.delta.font.size;"left"===f.delta.position&&(z=T(f,"deltaPos",0,-1*(o.width*v[f.align]+l.width*(1-v[f.align])+B),I,Math.min),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:l.left+z,right:o.right,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"right"===f.delta.position&&(z=T(f,"deltaPos",0,o.width*(1-v[f.align])+l.width*v[f.align]+B,I,Math.max),D=R[1]-F[1],h={width:o.width+l.width+B,height:Math.max(o.height,l.height),left:o.left,right:l.right+z,top:Math.min(o.top,l.top+D),bottom:Math.max(o.bottom,l.bottom+D)}),"bottom"===f.delta.position&&(z=null,D=l.height,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height,bottom:o.bottom+l.height}),"top"===f.delta.position&&(z=null,D=o.top,h={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height-l.height,bottom:o.bottom}),O.attr({dx:z,dy:D})}(f._hasNumber||f._hasDelta)&&E.attr("transform",function(){var t=i.numbersScaler(h);I+=t[2];var e,r=T(f,"numbersScale",1,t[0],I,Math.min);f._scaleNumbers||(r=1),e=f._isAngular?x-r*h.bottom:x-r*(h.top+h.bottom)/2,f._numbersTop=r*h.top+e;var n=h[w];"center"===w&&(n=(h.left+h.right)/2);var a=p-r*n;return _(a=T(f,"numbersTranslate",0,a,I,Math.max),e)+" scale("+r+")"})}(t,L,e,{numbersX:h,numbersY:A,numbersScaler:M,transitionOpts:r,onComplete:f}),P&&(S={range:C.gauge.axis.range,color:C.gauge.bgcolor,line:{color:C.gauge.bordercolor,width:0},thickness:1},E={range:C.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:C.gauge.bordercolor,width:C.gauge.borderwidth},thickness:1});var q=L.selectAll("g.angular").data(O?e:[]);q.exit().remove();var H=L.selectAll("g.angularaxis").data(O?e:[]);H.exit().remove(),O&&function(t,e,r,a){var s,l,c,h,f=r[0].trace,p=a.size,d=a.radius,g=a.innerRadius,v=a.gaugeBg,m=a.gaugeOutline,w=[p.l+p.w/2,p.t+p.h/2+d/2],k=a.gauge,T=a.layer,A=a.transitionOpts,M=a.onComplete,S=Math.PI/2;function E(t){var e=f.gauge.axis.range[0],r=f.gauge.axis.range[1],n=(t-e)/(r-e)*Math.PI-S;return n<-S?-S:n>S?S:n}function C(t){return n.svg.arc().innerRadius((g+d)/2-t/2*(d-g)).outerRadius((g+d)/2+t/2*(d-g)).startAngle(-S)}function L(t){t.attr("d",function(t){return C(t.thickness).startAngle(E(t.range[0])).endAngle(E(t.range[1]))()})}k.enter().append("g").classed("angular",!0),k.attr("transform",_(w[0],w[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),(s=b(t,f.gauge.axis)).type="linear",s.range=f.gauge.axis.range,s._id="xangularaxis",s.setScale();var P=function(t){return(s.range[0]-t.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},O={},I=u.makeLabelFns(s,0).labelStandoff;O.xFn=function(t){var e=P(t);return Math.cos(e)*I},O.yFn=function(t){var e=P(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(I+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*o)},O.anchorFn=function(t){var e=P(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},O.heightFn=function(t,e,r){var n=P(t);return-.5*(1+Math.sin(n))*r};var z=function(t){return _(w[0]+d*Math.cos(t),w[1]-d*Math.sin(t))};c=function(t){return z(P(t))};if(l=u.calcTicks(s),h=u.getTickSigns(s)[2],s.visible){h="inside"===s.ticks?-1:1;var D=(s.linewidth||1)/2;u.drawTicks(t,s,{vals:l,layer:T,path:"M"+h*D+",0h"+h*s.ticklen,transFn:function(t){var e=P(t);return z(e)+"rotate("+-i(e)+")"}}),u.drawLabels(t,s,{vals:l,layer:T,transFn:c,labelFns:O})}var R=[v].concat(f.gauge.steps),F=k.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(x),F.exit().remove();var B=C(f.gauge.bar.thickness),N=k.selectAll("g.value-arc").data([f.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j=N.select("path");y(A)?(j.transition().duration(A.duration).ease(A.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()}).attrTween("d",(V=B,U=E(r[0].lastY),q=E(r[0].y),function(){var t=n.interpolate(U,q);return function(e){return V.endAngle(t(e))()}})),f._lastValue=r[0].y):j.attr("d","number"==typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var V,U,q;j.call(x),N.exit().remove(),R=[];var H=f.gauge.threshold.value;H&&R.push({range:[H,H],color:f.gauge.threshold.color,line:{color:f.gauge.threshold.line.color,width:f.gauge.threshold.line.width},thickness:f.gauge.threshold.thickness});var G=k.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(x),G.exit().remove();var Y=k.selectAll("g.gauge-outline").data([m]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(L).call(x),Y.exit().remove()}(t,0,e,{radius:B,innerRadius:N,gauge:q,layer:H,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var G=L.selectAll("g.bullet").data(I?e:[]);G.exit().remove();var Y=L.selectAll("g.bulletaxis").data(I?e:[]);Y.exit().remove(),I&&function(t,e,r,n){var a,i,o,s,c,h=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,_=h.domain,w=n.transitionOpts,k=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform","translate("+m.l+", "+m.t+")"),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var T=m.h,A=h.gauge.bar.thickness*T,M=_.x[0],S=_.x[0]+(_.x[1]-_.x[0])*(h._hasNumber||h._hasDelta?1-l.bulletNumberDomainSize:1);(a=b(t,h.gauge.axis))._id="xbulletaxis",a.domain=[M,S],a.setScale(),i=u.calcTicks(a),o=u.makeTransFn(a),s=u.getTickSigns(a)[2],c=m.t+m.h,a.visible&&(u.drawTicks(t,a,{vals:"inside"===a.ticks?u.clipEnds(a,i):i,layer:p,path:u.makeTickPath(a,c,s),transFn:o}),u.drawLabels(t,a,{vals:i,layer:p,transFn:o,labelFns:u.makeLabelFns(a,c)}));function E(t){t.attr("width",function(t){return Math.max(0,a.c2p(t.range[1])-a.c2p(t.range[0]))}).attr("x",function(t){return a.c2p(t.range[0])}).attr("y",function(t){return.5*(1-t.thickness)*T}).attr("height",function(t){return t.thickness*T})}var C=[g].concat(h.gauge.steps),L=f.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(x),L.exit().remove();var P=f.selectAll("g.value-bullet").data([h.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",A).attr("y",(T-A)/2).call(x),y(w)?P.select("rect").transition().duration(w.duration).ease(w.easing).each("end",function(){k&&k()}).each("interrupt",function(){k&&k()}).attr("width",Math.max(0,a.c2p(Math.min(h.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,a.c2p(Math.min(h.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var O=r.filter(function(){return h.gauge.threshold.value}),I=f.selectAll("g.threshold-bullet").data(O);I.enter().append("g").classed("threshold-bullet",!0).append("line"),I.select("line").attr("x1",a.c2p(h.gauge.threshold.value)).attr("x2",a.c2p(h.gauge.threshold.value)).attr("y1",(1-h.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-h.gauge.threshold.thickness)/2)*T).call(d.stroke,h.gauge.threshold.line.color).style("stroke-width",h.gauge.threshold.line.width),I.exit().remove();var z=f.selectAll("g.gauge-outline").data([v]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(E).call(x),z.exit().remove()}(t,0,e,{gauge:G,layer:Y,size:D,gaugeBg:S,gaugeOutline:E,transitionOpts:r,onComplete:f});var W=L.selectAll("text.title").data(e);W.exit().remove(),W.enter().append("text").classed("title",!0),W.attr("text-anchor",function(){return I?g.right:g[C.title.align]}).text(C.title.text).call(s.font,C.title.font).call(c.convertToTspans,t),W.attr("transform",function(){var t,e=D.l+D.w*v[C.title.align],r=l.titlePadding,n=s.bBox(W.node());if(P){if(O)if(C.gauge.axis.visible)t=s.bBox(H.node()).top-r-n.bottom;else t=D.t+D.h/2-B/2-n.bottom-r;I&&(t=A-(n.top+n.bottom)/2,e=D.l-l.bulletPadding*D.w)}else t=C._numbersTop-r-n.bottom;return _(e,t)})})}},{"../../components/color":594,"../../components/drawing":615,"../../constants/alignment":688,"../../lib":719,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"../../plots/cartesian/axis_defaults":769,"../../plots/cartesian/layout_attributes":779,"../../plots/cartesian/position_defaults":782,"./constants":1043,d3:164}],1047:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;var c=e.exports=l(s({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()},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764,"../../plots/template_attributes":843,"../mesh3d/attributes":1052}],1048:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length);for(var r=1/0,a=-1/0,i=e.value.length,o=0;o0;r--){var n=Math.min(e[r],e[r-1]),a=Math.max(e[r],e[r-1]);if(a>n&&n-1}function D(t,e){return null===t?e:t}function R(e,r,n){C();var a,i,o,s=[r],l=[n];if(k>=1)s=[r],l=[n];else if(k>0){var c=function(t,e){var r=t[0],n=t[1],a=t[2],i=function(t,e,r){for(var n=[],a=0;a-1?n[p]:E(d,g,v);f[p]=y>-1?y:P(d,g,v,D(e,m))}a=f[0],i=f[1],o=f[2],t._i.push(a),t._j.push(i),t._k.push(o),++h}}function F(t,e,r,n){var a=t[3];an&&(a=n);for(var i=(t[3]-a)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-i)*t[s]+i*e[s];return o}function B(t,e,r){return t>=e&&t<=r}function N(t){var e=.001*(S-M);return t>=M-e&&t<=S+e}function j(e){for(var r=[],n=0;n<4;n++){var a=e[n];r.push([t.x[a],t.y[a],t.z[a],t.value[a]])}return r}var V=3;function U(t,e,r,n,a,i){i||(i=1),r=[-1,-1,-1];var o=!1,s=[B(e[0][3],n,a),B(e[1][3],n,a),B(e[2][3],n,a)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return N(e[0][3])&&N(e[1][3])&&N(e[2][3])?(R(t,e,r),!0):iMath.abs(k-A)?[T,k]:[k,A];$(e,E[0],E[1])}}var C=[[Math.min(M,A),Math.max(M,A)],[Math.min(T,S),Math.max(T,S)]];["x","y","z"].forEach(function(e){for(var r=[],n=0;n0&&(c.push(x.id),"x"===e?h.push([x.distRatio,0,0]):"y"===e?h.push([0,x.distRatio,0]):h.push([0,0,x.distRatio]))}else l=nt(1,"x"===e?g-1:"y"===e?v-1:m-1);c.length>0&&(r[a]="x"===e?tt(null,c,i,o,h,r[a]):"y"===e?et(null,c,i,o,h,r[a]):rt(null,c,i,o,h,r[a]),a++),l.length>0&&(r[a]="x"===e?Z(null,l,i,o,r[a]):"y"===e?J(null,l,i,o,r[a]):K(null,l,i,o,r[a]),a++)}var b=t.caps[e];b.show&&b.fill&&(I(b.fill),r[a]="x"===e?Z(null,[0,g-1],i,o,r[a]):"y"===e?J(null,[0,v-1],i,o,r[a]):K(null,[0,m-1],i,o,r[a]),a++)}}),0===h&&L(),t._x=x,t._y=b,t._z=_,t._intensity=w,t._Xs=f,t._Ys=p,t._Zs=d}(),t}f.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._x[e],n=this.data._y[e],a=this.data._z[e],i=this.data._Ys.length,o=this.data._Zs.length,s=u(r,this.data._Xs).id,l=u(n,this.data._Ys).id,c=u(a,this.data._Zs).id,h=t.index=c+o*l+o*i*s;t.traceCoordinate=[this.data._x[h],this.data._y[h],this.data._z[h],this.data.value[h]];var f=this.data.hovertext||this.data.text;return Array.isArray(f)&&void 0!==f[h]?t.textLabel=f[h]:f&&(t.textLabel=f),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}this.data=p(t);var a={positions:l(n(r.xaxis,t._x,e.dataScale[0],t.xcalendar),n(r.yaxis,t._y,e.dataScale[1],t.ycalendar),n(r.zaxis,t._z,e.dataScale[2],t.zcalendar)),cells:l(t._i,t._j,t._k),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:o(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},c=s(t);a.vertexIntensity=t._intensity,a.vertexIntensityBounds=[c.min,c.max],a.colormap=i(t),this.mesh.update(a)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports={findNearestOnAxis:u,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,a=n({gl:r}),i=new h(t,a,e.uid);return a._trace=i,i.update(e),t.glplot.add(a),i}}},{"../../components/colorscale":606,"../../lib":719,"../../lib/gl_format_color":716,"../../lib/str2rgbarray":742,"../../plots/gl3d/zip3":818,"gl-mesh3d":281}],1050:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("../../components/colorscale/defaults");function s(t,e,r,n,i){var s=i("isomin"),l=i("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=i("x"),u=i("y"),h=i("z"),f=i("value");c&&c.length&&u&&u.length&&h&&h.length&&f&&f.length?(a.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach(function(t){var e="caps."+t;i(e+".show")&&i(e+".fill");var r="slices."+t;i(r+".show")&&(i(r+".fill"),i(r+".locations"))}),i("spaceframe.show")&&i("spaceframe.fill"),i("surface.show")&&(i("surface.count"),i("surface.fill"),i("surface.pattern")),i("contour.show")&&(i("contour.color"),i("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){i(t)}),o(t,e,n,i,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,a){s(t,e,0,a,function(r,a){return n.coerce(t,e,i,r,a)})},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":604,"../../lib":719,"../../registry":848,"./attributes":1047}],1051:[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"],meta:{}}},{"../../plots/gl3d":807,"./attributes":1047,"./calc":1048,"./convert":1049,"./defaults":1050}],1052:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},i.contours.x.show,{}),color:i.contours.x.color,width:i.contours.x.width,editType:"calc"},lightposition:{x:s({},i.lightposition.x,{dflt:1e5}),y:s({},i.lightposition.y,{dflt:1e5}),z:s({},i.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},i.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"})})},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../surface/attributes":1225}],1053:[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":602}],1054:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),a=t("delaunay-triangulate"),i=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function h(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,h=t.x.length,f=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||!v(t.i,h)||!v(t.j,h)||!v(t.k,h))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(f):t.alphahull>0?i(t.alphahull,f):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],i=e.length,o=0;ov):g=k>b,v=k;var T=l(b,_,w,k);T.pos=x,T.yc=(b+k)/2,T.i=y,T.dir=g?"increasing":"decreasing",T.x=T.pos,T.y=[w,_],p&&(T.tx=e.text[y]),d&&(T.htx=e.hovertext[y]),m.push(T)}else m.push({pos:x,empty:!0})}return e._extremes[s._id]=i.findExtremes(s,n.concat(h,u),{padded:!0}),m.length&&(m[0].t={labels:{open:a(t,"open:")+" ",high:a(t,"high:")+" ",low:a(t,"low:")+" ",close:a(t,"close:")+" "}}),m}e.exports={calc:function(t,e){var r=i.getFromId(t,e.xaxis),a=i.getFromId(t,e.yaxis),o=function(t,e,r){var a=r._minDiff;if(!a){var i,o=t._fullData,s=[];for(a=1/0,i=0;i"+c.labels[x]+n.hoverLabelText(s,b):((y=a.extendFlat({},f)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",h.push(y),v[b]=y)}return h}function f(t,e,r,a){var i=t.cd,o=t.ya,l=i[0].trace,h=i[0].t,f=u(t,e,r,a);if(!f)return[];var p=i[f.index],d=f.index=p.i,g=p.dir;function v(t){return h.labels[t]+n.hoverLabelText(o,l[t][d])}var m=p.hi||l.hoverinfo,y=m.split("+"),x="all"===m,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[v("open"),v("high"),v("low"),v("close")+" "+c[g]]:[];return _&&s(p,l,w),f.extraText=w.join("
"),f.y0=f.y1=o.c2p(p.yc,!0),[f]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?h(t,e,r,n):f(t,e,r,n)},hoverSplit:h,hoverOnPoints:f}},{"../../components/color":594,"../../components/fx":632,"../../constants/delta.js":689,"../../lib":719,"../../plots/cartesian/axes":767}],1061:[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":778,"./attributes":1057,"./calc":1058,"./defaults":1059,"./hover":1060,"./plot":1063,"./select":1064,"./style":1065}],1062:[function(t,e,r){"use strict";var n=t("../../registry"),a=t("../../lib");e.exports=function(t,e,r,i){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"],i),s&&l&&c&&u){var h=Math.min(s.length,l.length,c.length,u.length);return o&&(h=Math.min(h,a.minRowLength(o))),e._length=h,h}}},{"../../lib":719,"../../registry":848}],1063:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib");e.exports=function(t,e,r,i){var o=e.xaxis,s=e.yaxis;a.makeTraceGroups(i,r,"trace ohlc").each(function(t){var e=n.select(this),r=t[0],i=r.t;if(!0!==r.trace.visible||i.empty)e.remove();else{var l=i.tickLen,c=e.selectAll("path").data(a.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",function(t){if(t.empty)return"M0,0Z";var e=o.c2p(t.pos,!0),r=o.c2p(t.pos-l,!0),n=o.c2p(t.pos+l,!0);return"M"+r+","+s.c2p(t.o,!0)+"H"+e+"M"+e+","+s.c2p(t.h,!0)+"V"+s.c2p(t.l,!0)+"M"+n+","+s.c2p(t.c,!0)+"H"+e})}})}},{"../../lib":719,d3:164}],1064:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n=t.cd,a=t.xaxis,i=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,h){function f(r,a){return n.coerce(t,e,l,r,a)}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(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,h,f);o(e,h,f),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,"values",d),f("hoveron"),f("hovertemplate"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var g={family:h.font.family,size:Math.round(h.font.size),color:h.font.color};n.coerceFont(f,"labelfont",g);var v={family:h.font.family,size:Math.round(h.font.size/1.2),color:h.font.color};n.coerceFont(f,"tickfont",v)}},{"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/domain":792,"../parcoords/merge_length":1082,"./attributes":1066}],1070:[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":1066,"./base_plot":1067,"./calc":1068,"./defaults":1069,"./plot":1072}],1071:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plot_api/plot_api"),i=t("../../components/fx"),o=t("../../lib"),s=t("../../components/drawing"),l=t("tinycolor2"),c=t("../../lib/svg_text_utils");function u(t,e,r,a){var i=t.map(function(t,e,r){var n,a=r[0],i=e.margin||{l:80,r:80,t:100,b:80},o=a.trace,s=o.domain,l=e.width,c=e.height,u=Math.floor(l*(s.x[1]-s.x[0])),h=Math.floor(c*(s.y[1]-s.y[0])),f=s.x[0]*l+i.l,p=e.height-s.y[1]*e.height+i.t,d=o.line.shape;n="all"===o.hoverinfo?["count","probability"]:(o.hoverinfo||"").split("+");var g={trace:o,key:o.uid,model:a,x:f,y:p,width:u,height:h,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:i,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};a.dimensions&&(F(g),R(g));return g}.bind(0,e,r)),l=a.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(i,h),v=u.enter().append("g").attr("class","trace parcats");u.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"}),v.append("g").attr("class","paths");var m=u.select("g.paths").selectAll("path.path").data(function(t){return t.paths},h);m.attr("fill",function(t){return t.model.color});var b=m.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(t){return t.model.color}).attr("fill-opacity",0);x(b),m.attr("d",function(t){return t.svgD}),b.empty()||m.sort(p),m.exit().remove(),m.on("mouseover",d).on("mouseout",g).on("click",y),v.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data(function(t){return t.dimensions},h);k.enter().append("g").attr("class","dimension"),k.attr("transform",function(t){return"translate("+t.x+", 0)"}),k.exit().remove();var T=k.selectAll("g.category").data(function(t){return t.categories},h),A=T.enter().append("g").attr("class","category");T.attr("transform",function(t){return"translate(0, "+t.y+")"}),A.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),_(A);var M=T.selectAll("rect.bandrect").data(function(t){return t.bands},h);M.each(function(){o.raiseToTop(this)}),M.attr("fill",function(t){return t.color});var O=M.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(t){return t.color}).attr("fill-opacity",0);M.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"}),w(O),M.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var I=e._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",function(t){return f(t)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",I+" -1px 1px 2px, "+I+" 1px 1px 2px, "+I+" 1px -1px 2px, "+I+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",function(t){return f(t)?t.width+5:-5}).attr("y",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(t){s.font(n.select(this),t.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),e)}),A.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(t){return t.width/2}).attr("y",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){s.font(n.select(this),t.parcatsViewModel.labelfont)}),T.selectAll("rect.bandrect").on("mouseover",S).on("mouseout",E),T.exit().remove(),k.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on("dragstart",C).on("drag",L).on("dragend",P)),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 h(t){return t.key}function f(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function p(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),C=n.mouse(h)[0];i.loneHover({trace:f,x:_-d.left+g.left,y:w-d.top+g.top,text:E,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:C<_?"right":"left",hovertemplate:(f.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:f._input,fullData:f,count:T,probability:A}]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:h})}}}function g(t){if(!t.parcatsViewModel.dragDimension&&(x(n.select(this)),i.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(p),-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var e=v(t),r=m(t);t.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:e,event:n.event,constraints:r})}}function v(t){for(var e=[],r=O(t.parcatsViewModel),n=0;n1&&c.displayInd===l.dimensions.length-1?(r=o.left,a="left"):(r=o.left+o.width,a="right");var f=s.model.count,p=s.model.categoryLabel,d=f/s.parcatsViewModel.model.count,g={countLabel:f,categoryLabel:p,probabilityLabel:d.toFixed(3)},v=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&v.push(["Count:",g.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&v.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var m=v.join("
");return{trace:u,x:r-t.left,y:h-t.top,text:m,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:u.hovertemplate,hovertemplateLabels:g,eventData:[{data:u._input,fullData:u,count:f,category:p,probability:d}]}}function S(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,a=r._fullLayout,s=a._paperdiv.node().getBoundingClientRect(),c=t.parcatsViewModel.hoveron;if("color"===c?(!function(t){var e=n.select(t).datum(),r=k(e);b(r),r.each(function(){o.raiseToTop(this)}),n.select(t.parentNode).selectAll("rect.bandrect").filter(function(t){return t.color===e.color}).each(function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),A(this,"plotly_hover",n.event)):(!function(t){n.select(t.parentNode).selectAll("rect.bandrect").each(function(t){var e=k(t);b(e),e.each(function(){o.raiseToTop(this)})}),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),T(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===c?e=M(s,this):"color"===c?e=function(t,e){var r,a,i=e.getBoundingClientRect(),o=n.select(e).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],h=c.trace,f=i.y+i.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=i.left,a="left"):(r=i.left+i.width,a="right");var p=s.model.categoryLabel,d=o.parcatsViewModel.model.count,g=0;o.categoryViewModel.bands.forEach(function(t){t.color===o.color&&(g+=t.count)});var v=s.model.count,m=0;c.pathSelection.each(function(t){t.model.color===o.color&&(m+=t.model.count)});var y=g/d,x=g/m,b=g/v,_={countLabel:d,categoryLabel:p,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color \u2229 "+p+"): "+_.probabilityLabel),w.push("P("+p+" | color): "+x.toFixed(3)),w.push("P(color | "+p+"): "+b.toFixed(3)));var k=w.join("
"),T=l.mostReadable(o.color,["black","white"]);return{trace:h,x:r-t.left,y:f-t.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:T,fontSize:10,idealAlign:a,hovertemplate:h.hovertemplate,hovertemplateLabels:_,eventData:[{data:h._input,fullData:h,category:p,count:d,probability:y,categorycount:v,colorcount:m,bandcolorcount:g}]}}(s,this):"dimension"===c&&(e=function(t,e){var r=[];return n.select(e.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){r.push(M(t,this))}),r}(s,this)),e&&i.loneHover(e,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r})}}function E(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(x(e.pathSelection),_(e.dimensionSelection.selectAll("g.category")),w(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),i.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(p),-1===e.hoverinfoItems.indexOf("skip"))){"color"===t.parcatsViewModel.hoveron?A(this,"plotly_unhover",n.event):T(this,"plotly_unhover",n.event)}}function C(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each(function(e){var r=n.mouse(this)[0],a=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=a&&a<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each(function(e){e.yh.y+h.height/2&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){i.model.dragX=n.event.x;var f=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[a];void 0!==f&&i.model.dragXp.x&&(i.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=i.model.displayInd}F(t.parcatsViewModel),R(t.parcatsViewModel),z(t.parcatsViewModel),I(t.parcatsViewModel)}}function P(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=O(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 a=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+a+"].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}),h=c.map(function(t){return t.categoryLabel});e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[h],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?A(t.potentialClickBand,"plotly_click",n.event.sourceEvent):T(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,F(t.parcatsViewModel),R(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each(function(){z(t.parcatsViewModel,!0),I(t.parcatsViewModel,!0)}).each("end",function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function O(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+a)+" "+l[s]+","+(e[s]+a)+" "+(t[s]+r[s])+","+(e[s]+a),u+="l-"+r[s]+",0 ";return u+="Z"}function R(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),a=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),i=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 h(t){var e=t.categoryInds.map(function(t,e){return a[e][t]});return o.map(function(t){return e[t]})}c.sort(function(e,r){var n=h(e),a=h(r);return"backward"===t.sortpaths&&(n.reverse(),a.reverse()),n.push(e.valueInds[0]),a.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),a.unshift(r.rawColor)),na?1:0});for(var f=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*(m.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*a;var i,o,s,l,c,u=[],h=t.model.maxCats,f=e.categories.length,p=e.count,d=t.height-8*(h-1),g=8*(h-f)/2,v=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(v.sort(function(t,e){return t.displayInd-e.displayInd}),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:i,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+i+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){u(r,t,n,e)}},{"../../components/drawing":615,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"../../plot_api/plot_api":754,d3:164,tinycolor2:538}],1072:[function(t,e,r){"use strict";var n=t("./parcats");e.exports=function(t,e,r,a){var i=t._fullLayout,o=i._paper,s=i._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,a)}},{"./parcats":1071}],1073:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),a=t("../../plots/cartesian/layout_attributes"),i=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:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},a.tickvals,{editType:"plot"}),ticktext:s({},a.ticktext,{editType:"plot"}),tickformat:s({},a.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:"number",editType:"plot"},{valType:"number",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":601,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/layout_attributes":779,"../../plots/domain":792,"../../plots/font_attributes":793}],1074:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=n.bar.snapRatio;function c(t,e){return t*(1-l)+e*l}var u=n.bar.snapClose;function h(t,e){return t*(1-u)+e*u}function f(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 a=t?-1:1,i=0,o=e.length-1;if(a<0){var s=i;i=o,o=s}for(var l=e[i],u=l,f=i;a*fe){f=r;break}}if(i=u,isNaN(i)&&(i=isNaN(h)||isNaN(f)?isNaN(h)?f:h:e-c[h][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[i],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 _(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(e.unitToPaddedPx.invert):i.newExtent=[i.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(e),x(t.parentNode)}function w(t,e){var r=b(e,e.height-a.mouse(t)[1]-2*n.verticalPadding),i="crosshair";r.clickableOrdinalRange?i="pointer":r.region&&(i=r.region+"-resize"),a.select(document.body).style("cursor",i)}function k(t){t.on("mousemove",function(t){a.event.preventDefault(),t.parent.inBrushDrag||w(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||m()}).call(a.behavior.drag().on("dragstart",function(t){!function(t,e){a.event.sourceEvent.stopPropagation();var r=e.height-a.mouse(t)[1]-2*n.verticalPadding,i=e.unitToPaddedPx.invert(r),o=e.brush,s=b(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]:i,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)}).on("drag",function(t){_(this,t)}).on("dragend",function(t){!function(t,e){var r=e.brush,n=r.filter,i=r.svgBrush;i._dragging||(w(t,e),_(t,e),e.brush.svgBrush.wasDragged=!1),i._dragging=!1,a.event.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,e.parent.inBrushDrag=!1,m(),!i.wasDragged)return i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&e.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,0===i.extent.length&&A(r)):A(r),i.brushCallback(e),x(t.parentNode),void i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(c?[i.newExtent]:[]),i.extent.length||A(r),i.brushCallback(e),c?x(t.parentNode,s):(s(),x(t.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)}))}function T(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function M(t){for(var e,r=t.slice(),n=[],a=r.shift();a;){for(e=a.slice();(a=r.shift())&&a[0]<=e[1];)e[1]=Math.max(e[1],a[1]);n.push(e)}return n}e.exports={makeBrush:function(t,e,r,n,a,i){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map(function(t){return t.slice().sort(s)}).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=M(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=a,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:i}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,i);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(p).call(d).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),e.call(k).attr("height",function(t){return t.height-n.verticalPadding});var r=t.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",function(t){return t.height}).call(y);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(y)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?M(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[f(0,r,t[0],[]),f(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":719,"../../lib/gup":717,"./constants":1077,d3:164}],1075:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../plots/get_data").getModuleCalcData,i=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=a(t.calcdata,"parcoords")[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var a=n._has&&n._has("parcoords"),i=e._has&&e._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter(function(t,e){return e===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":696,"../../plots/get_data":802,"./plot":1084,d3:164}],1076:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale"),i=t("../../lib/gup").wrap;e.exports=function(t,e){var r,o;return a.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=a.extractOpts(e.line).colorscale,a.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rh&&(n.log("parcoords traces support up to "+h+" dimensions at the moment"),d.splice(h));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),v=function(t,e,r,o,s){var l=s("line.color",r);if(a(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(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),f(e,g,"values",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",m),n.coerceFont(u,"tickfont",m),n.coerceFont(u,"rangefont",m),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605,"../../lib":719,"../../plots/array_container_defaults":763,"../../plots/cartesian/axes":767,"../../plots/domain":792,"./attributes":1073,"./axisbrush":1074,"./constants":1077,"./merge_length":1082}],1079:[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":719}],1080:[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":1073,"./base_plot":1075,"./calc":1076,"./defaults":1078,"./plot":1084}],1081:[function(t,e,r){"use strict";var n=t("glslify"),a=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 sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\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(mask,\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"]),i=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=1e-6,c=2048,u=new Uint8Array(4),h=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function p(t,e,r,n,a){var i=t._gl;i.enable(i.SCISSOR_TEST),i.scissor(e,r,n,a),t.clear({color:[0,0,0,0],depth:1})}function d(t,e,r,n,a,i){var o=i.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:u})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,a-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],p(t,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),r.clearOnly||(i.count=2*c,i.offset=2*l*n,e(i),l*n+c>>8*e)%256/255}function v(t,e,r){for(var n=new Array(8*e),a=0,i=0;ih&&(h=t[a].dim1.canvasX,o=a);0===s&&p(T,0,0,r.canvasWidth,r.canvasHeight);var f=function(t){var e,r,n,a=[[],[]];for(n=0;n<64;n++){var i=!t&&na._length&&(A=A.slice(0,a._length));var M,S=a.tickvals;function E(t,e){return{val:t,text:M[e]}}function C(t,e){return t.val-e.val}if(Array.isArray(S)&&S.length){M=a.ticktext,Array.isArray(M)&&M.length?M.length>S.length?M=M.slice(0,S.length):S.length>M.length&&(S=S.slice(0,M.length)):M=S.map(n.format(a.tickformat));for(var L=1;L=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:h};h!==z&&(u?a.hover(f):a.unhover&&a.unhover(f),z=h)}}),I.style("opacity",function(t){return t.pick?0:1}),u.style("background","rgba(255, 255, 255, 0)");var D=u.selectAll("."+g.cn.parcoords).data(O,h);D.exit().remove(),D.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),D.attr("transform",function(t){return"translate("+t.model.translateX+","+t.model.translateY+")"});var R=D.selectAll("."+g.cn.parcoordsControlView).data(f,h);R.enter().append("g").classed(g.cn.parcoordsControlView,!0),R.attr("transform",function(t){return"translate("+t.model.pad.l+","+t.model.pad.t+")"});var F=R.selectAll("."+g.cn.yAxis).data(function(t){return t.dimensions},h);F.enter().append("g").classed(g.cn.yAxis,!0),R.each(function(t){S(F,t)}),I.each(function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=m(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)}}),F.attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),F.call(n.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;P.linePickActive(!1),t.x=Math.max(-g.overdrag,Math.min(t.model.width+g.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,F.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}),S(F,e),F.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return"translate("+t.xScale(t.xIndex)+", 0)"}),n.select(this).attr("transform","translate("+t.x+", 0)"),F.each(function(r,n,a){a===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(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,S(F,e),n.select(this).attr("transform",function(t){return"translate("+t.x+", 0)"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!w(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),P.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),F.exit().remove();var B=F.selectAll("."+g.cn.axisOverlays).data(f,h);B.enter().append("g").classed(g.cn.axisOverlays,!0),B.selectAll("."+g.cn.axis).remove();var N=B.selectAll("."+g.cn.axis).data(f,h);N.enter().append("g").classed(g.cn.axis,!0),N.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,a=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?a:null).tickFormat(function(e){return d.isOrdinal(t)?e:E(t.model.dimensions[t.visibleIndex],e)}).scale(r)),l.font(N.selectAll("text"),t.model.tickFont)}),N.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),N.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var j=B.selectAll("."+g.cn.axisHeading).data(f,h);j.enter().append("g").classed(g.cn.axisHeading,!0);var V=j.selectAll("."+g.cn.axisTitle).data(f,h);V.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),V.text(function(t){return t.label}).each(function(e){var r=n.select(this);l.font(r,e.model.labelFont),s.convertToTspans(r,t)}).attr("transform",function(t){var e=M(t.model.labelAngle,t.model.labelSide),r=g.axisTitleOffset;return(e.dir>0?"":"translate(0,"+(2*r+t.model.height)+")")+"rotate("+e.degrees+")translate("+-r*e.dx+","+-r*e.dy+")"}).attr("text-anchor",function(t){var e=M(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 U=B.selectAll("."+g.cn.axisExtent).data(f,h);U.enter().append("g").classed(g.cn.axisExtent,!0);var q=U.selectAll("."+g.cn.axisExtentTop).data(f,h);q.enter().append("g").classed(g.cn.axisExtentTop,!0),q.attr("transform","translate(0,"+-g.axisExtentOffset+")");var H=q.selectAll("."+g.cn.axisExtentTopText).data(f,h);H.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(A),H.text(function(t){return C(t,!0)}).each(function(t){l.font(n.select(this),t.model.rangeFont)});var G=U.selectAll("."+g.cn.axisExtentBottom).data(f,h);G.enter().append("g").classed(g.cn.axisExtentBottom,!0),G.attr("transform",function(t){return"translate(0,"+(t.model.height+g.axisExtentOffset)+")"});var Y=G.selectAll("."+g.cn.axisExtentBottomText).data(f,h);Y.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(A),Y.text(function(t){return C(t,!1)}).each(function(t){l.font(n.select(this),t.model.rangeFont)}),v.ensureAxisBrush(B)}},{"../../components/colorscale":606,"../../components/drawing":615,"../../lib":719,"../../lib/gup":717,"../../lib/svg_text_utils":743,"../../plots/cartesian/axes":767,"./axisbrush":1074,"./constants":1077,"./helpers":1079,"./lines":1081,"color-rgba":123,d3:164}],1084:[function(t,e,r){"use strict";var n=t("./parcoords"),a=t("../../lib/prepare_regl"),i=t("./helpers").isVisible;function o(t,e,r){var n=e.indexOf(r),a=t.indexOf(n);return-1===a&&(a+=e.length),a}e.exports=function(t,e){var r=t._fullLayout;if(a(t)){var s={},l={},c={},u={},h=r._size;e.forEach(function(e,r){var n=e[0].trace;c[r]=n.index;var a=u[r]=n._fullInput.index;s[r]=t.data[a].dimensions,l[r]=t.data[a].dimensions.slice()});n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,a){var i=l[e][n],o=a.map(function(t){return t.slice()}),s="dimensions["+n+"].constraintrange",h=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===h[s]){var f=i.constraintrange;h[s]=f||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),i.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete i.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(i));s[e].sort(n),l[e].filter(function(t){return!i(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":732,"./helpers":1079,"./parcoords":1083}],1085:[function(t,e,r){"use strict";var n=t("../../plots/attributes"),a=t("../../plots/domain").attributes,i=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=i({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,{}),insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),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:a({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":593,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793,"../../plots/template_attributes":843}],1086:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="pie",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":828}],1087:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../../lib").isArrayOrTypedArray,i=t("tinycolor2"),o=t("../../components/color"),s={};function l(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=o.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function c(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r"),name:f.hovertemplate||-1!==p.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:c.castOption(b.bgcolor,t.pts)||t.color,borderColor:c.castOption(b.bordercolor,t.pts),fontFamily:c.castOption(_.family,t.pts),fontSize:c.castOption(_.size,t.pts),fontColor:c.castOption(_.color,t.pts),nameLength:c.castOption(b.namelength,t.pts),textAlign:c.castOption(b.align,t.pts),hovertemplate:c.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[u(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[u(t,f)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,i=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[u(s,i)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,i=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[u(t,i)],a.click(e,n.event))})}function p(t,e,r){var n=c.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=c.castOption(t._input.textfont.color,e.pts));var a=c.castOption(t.insidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,o=c.castOption(t.insidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n||i.contrast(e.color),family:a,size:o}}function d(t,e){for(var r,n,a=0;a=1)return c;var u=a+1/(2*Math.tan(i)),h=l*Math.min(1/(Math.sqrt(u*u+.5)+u),o/(Math.sqrt(a*a+o/2)+a)),f={scale:2*h/t.height,rCenter:Math.cos(h/l)-h*a/l,rotate:(180/Math.PI*e.midangle+720)%180-90},p=1/a,d=p+1/(2*Math.tan(i)),g=l*Math.min(1/(Math.sqrt(d*d+.5)+d),o/(Math.sqrt(p*p+o/2)+p)),v={scale:2*g/t.width,rCenter:Math.cos(g/l)-g/a/l,rotate:(180/Math.PI*e.midangle+810)%180-90},m=v.scale>f.scale?v:f;return c.scale<1&&m.scale>c.scale?m:c}function v(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function m(t,e){var r=e.pxmid[0],n=e.pxmid[1],a=t.width/2,i=t.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function y(t,e){var r,n,a,i=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=b(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*t.r,s.ty-=t.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),h=e.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(h+=u,o.x-=(1+a)*u,s.tx+=t.titleBox.width/2):-1!==i.title.position.indexOf("center")?h*=2:-1!==i.title.position.indexOf("right")&&(h+=u,o.x+=(1+a)*u,s.tx-=t.titleBox.width/2),r=h/t.titleBox.width,n=x(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function x(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 b(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 _(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/a.aspectratio):(u=r.r,c=u*a.aspectratio),c*=(1+a.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(i){var x=s.castOption(a,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:c.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:c.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:s.castOption(a,t.i,"customdata")}}(e),_=c.getFirstFilled(a.text,e.pts);(h(_)||""===_)&&(b.text=_),e.text=s.texttemplateString(x,b,t._fullLayout._d3locale,b,a._meta||{})}else e.text=""}}e.exports={plot:function(t,e){var r=t._fullLayout;d(e,t),_(e,r._size);var a=s.makeTraceGroups(r._pielayer,e,"trace").each(function(e){var a=n.select(this),u=e[0],h=u.trace;!function(t){var e,r,n,a=t[0],i=a.trace,o=i.rotation*Math.PI/180,s=2*Math.PI/a.vTotal,l="px0",c="px1";if("counterclockwise"===i.direction){for(e=0;ea.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-i.hole,r.rInscribed=v(r,a))}(e),a.attr("stroke-linejoin","round"),a.each(function(){var a=n.select(this).selectAll("g.slice").data(e);a.enter().append("g").classed("slice",!0),a.exit().remove();var d=[[[],[]],[[],[]]],v=!1;a.each(function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=h.index,d[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var a=u.cx,i=u.cy,y=n.select(this),x=y.selectAll("path.surface").data([r]);if(x.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),y.call(f,t,e),h.pull){var b=+c.castOption(h.pull,r.pts)||0;b>0&&(a+=b*r.pxmid[0],i+=b*r.pxmid[1])}r.cxFinal=a,r.cyFinal=i;var _=h.hole;if(r.v===u.vTotal){var k="M"+(a+r.px0[0])+","+(i+r.px0[1])+E(r.px0,r.pxmid,!0,1)+E(r.pxmid,r.px0,!0,1)+"Z";_?x.attr("d","M"+(a+_*r.px0[0])+","+(i+_*r.px0[1])+E(r.px0,r.pxmid,!1,_)+E(r.pxmid,r.px0,!1,_)+"Z"+k):x.attr("d",k)}else{var T=E(r.px0,r.px1,!0,1);if(_){var A=1-_;x.attr("d","M"+(a+_*r.px1[0])+","+(i+_*r.px1[1])+E(r.px1,r.px0,!1,_)+"l"+A*r.px0[0]+","+A*r.px0[1]+T+"Z")}else x.attr("d","M"+a+","+i+"l"+r.px0[0]+","+r.px0[1]+T+"Z")}w(t,r,u);var M=c.castOption(h.textposition,r.pts),S=y.selectAll("g.slicetext").data(r.text&&"none"!==M?[0]:[]);S.enter().append("g").classed("slicetext",!0),S.exit().remove(),S.each(function(){var e=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)});e.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,"outside"===M?function(t,e,r){var n=c.castOption(t.outsidetextfont.color,e.pts)||c.castOption(t.textfont.color,e.pts)||r.color,a=c.castOption(t.outsidetextfont.family,e.pts)||c.castOption(t.textfont.family,e.pts)||r.family,i=c.castOption(t.outsidetextfont.size,e.pts)||c.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:a,size:i}}(h,r,t._fullLayout.font):p(h,r,t._fullLayout.font)).call(l.convertToTspans,t);var f,d=o.bBox(e.node());"outside"===M?f=m(d,r):(f=g(d,r,u),"auto"===M&&f.scale<1&&(e.call(o.font,h.outsidetextfont),h.outsidetextfont.family===h.insidetextfont.family&&h.outsidetextfont.size===h.insidetextfont.size||(d=o.bBox(e.node())),f=m(d,r)));var y=a+r.pxmid[0]*f.rCenter+(f.x||0),x=i+r.pxmid[1]*f.rCenter+(f.y||0);f.outside&&(r.yLabelMin=x-d.height/2,r.yLabelMid=x,r.yLabelMax=x+d.height/2,r.labelExtraX=0,r.labelExtraY=0,v=!0),e.attr("transform","translate("+y+","+x+")"+(f.scale<1?"scale("+f.scale+")":"")+(f.rotate?"rotate("+f.rotate+")":"")+"translate("+-(d.left+d.right)/2+","+-(d.top+d.bottom)/2+")")})}function E(t,e,n,a){var i=a*(e[0]-t[0]),o=a*(e[1]-t[1]);return"a"+a*u.r+","+a*u.r+" 0 "+r.largeArc+(n?" 1 ":" 0 ")+i+","+o}});var x=n.select(this).selectAll("g.titletext").data(h.title.text?[0]:[]);x.enter().append("g").classed("titletext",!0),x.exit().remove(),x.each(function(){var e,a=s.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),i=h.title.text;h._meta&&(i=s.templateString(i,h._meta)),a.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,h.title.font).call(l.convertToTspans,t),e="middle center"===h.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}}(u):y(u,r._size),a.attr("transform","translate("+e.x+","+e.y+")"+(e.scale<1?"scale("+e.scale+")":"")+"translate("+e.tx+","+e.ty+")")}),v&&function(t,e){var r,n,a,i,o,s,l,u,h,f,p,d,g;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var a,u,h,p,d,g,v=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?t.yLabelMin:t.yLabelMax,y=n?t.yLabelMax:t.yLabelMin,x=t.cyFinal+o(t.px0[1],t.px1[1]),b=v-m;if(b*l>0&&(t.labelExtraY=b),Array.isArray(e.pull))for(u=0;u=(c.castOption(e.pull,h.pts)||0)||((t.pxmid[1]-h.pxmid[1])*l>0?(p=h.cyFinal+o(h.px0[1],h.px1[1]),(b=p-m-t.labelExtraY)*l>0&&(t.labelExtraY+=b)):(y+t.labelExtraY-x)*l>0&&(a=3*s*Math.abs(u-f.indexOf(t)),d=h.cxFinal+i(h.px0[0],h.px1[0]),(g=d+a-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=g)))}for(n=0;n<2;n++)for(a=n?v:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(a),h=t[1-n][r],f=h.concat(u),d=[],p=0;pMath.abs(f)?c+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(o+t.labelExtraX+u):c+="l"+t.labelExtraX+","+h+"v"+(f-h)+"h"+u}else c+="V"+(t.yLabelMid+t.labelExtraY)+"h"+u;s.ensureSingle(r,"path","textline").call(i.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:c,fill:"none"})}else r.select("path.textline").remove()})}(a,h)})});setTimeout(function(){a.selectAll("tspan").each(function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)},formatSliceLabel:w,transformInsideText:g,determineInsideTextFont:p,positionTitleOutside:y,prerenderTitles:d,layoutAreas:_,attachFxHandlers:f}},{"../../components/color":594,"../../components/drawing":615,"../../components/fx":632,"../../lib":719,"../../lib/svg_text_utils":743,"./event_data":1089,"./helpers":1090,d3:164}],1095:[function(t,e,r){"use strict";var n=t("d3"),a=t("./style_one");e.exports=function(t){t._fullLayout._pielayer.selectAll(".trace").each(function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each(function(t){n.select(this).call(a,t,e)})})}},{"./style_one":1096,d3:164}],1096:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("./helpers").castOption;e.exports=function(t,e,r){var i=r.marker.line,o=a(i.color,e.pts)||n.defaultLine,s=a(i.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},{"../../components/color":594,"./helpers":1090}],1097:[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":1111}],1098:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),a=t("../../lib/str2rgbarray"),i=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,h=this.pickXYData=t.xy,f=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(h){if(n=h,e=h.length>>>1,f)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=a(t.marker.color),v=a(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=i(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=i(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":742,"../../plots/cartesian/autorange":766,"../scatter/get_trace_color":1120,"gl-pointcloud2d":293}],1099:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes");e.exports=function(t,e,r){function i(r,i){return n.coerce(t,e,a,r,i)}i("x"),i("y"),i("xbounds"),i("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),i("text"),i("marker.color",r),i("marker.opacity"),i("marker.blend"),i("marker.sizemin"),i("marker.sizemax"),i("marker.border.color",r),i("marker.border.arearatio"),e._length=null}},{"../../lib":719,"./attributes":1097}],1100:[function(t,e,r){"use strict";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":805,"../scatter3d/calc":1138,"./attributes":1097,"./convert":1098,"./defaults":1099}],1101:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),a=t("../../plots/attributes"),i=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,h=t("../../lib/extend").extendFlat,f=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK;(e.exports=f({hoverinfo:h({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),node:{label:{valType:"data_array",dflt:[]},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},line:{color:{valType:"color",dflt:i.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},line:{color:{valType:"color",dflt:i.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":593,"../../components/colorscale/attributes":601,"../../components/fx/attributes":624,"../../constants/docs":690,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plot_api/plot_template":757,"../../plots/attributes":764,"../../plots/domain":792,"../../plots/font_attributes":793,"../../plots/template_attributes":843}],1102:[function(t,e,r){"use strict";var n=t("../../plot_api/edit_types").overrideAll,a=t("../../plots/get_data").getModuleCalcData,i=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"),h=t("../../registry");function f(t,e){var r=t._fullData[e],n=t._fullLayout,a=n.dragmode,i="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if("pan"!==a&&"zoom"!==a){s(o,i);var f={_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:f,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[f],yaxes:[p],doneFnCompleted:function(r){var n,a=t._fullData[e],i=a.node.groups.slice(),o=[];function s(t){for(var e=a._sankey.graph.nodes,r=0;rm&&(m=i.source[e]),i.target[e]>m&&(m=i.target[e]);var y,x=m+1;t.node._count=x;var b=t.node.groups,_={};for(e=0;e0&&s(S,x)&&s(E,x)&&(!_.hasOwnProperty(S)||!_.hasOwnProperty(E)||_[S]!==_[E])){_.hasOwnProperty(E)&&(E=_[E]),_.hasOwnProperty(S)&&(S=_[S]),E=+E,h[S=+S]=h[E]=!0;var C="";i.label&&i.label[e]&&(C=i.label[e]);var L=null;C&&f.hasOwnProperty(C)&&(L=f[C]),c.push({pointNumber:e,label:C,color:u?i.color[e]:i.color,concentrationscale:L,source:S,target:E,value:+M}),A.source.push(S),A.target.push(E)}}var P=x+b.length,O=o(r.color),I=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:z,color:O?r.color[e]:r.color})}var D=!1;return function(t,e,r){for(var i=a.init2dArray(t,0),o=0;o1})}(P,A.source,A.target)&&(D=!0),{circular:D,links:c,nodes:I,groups:b,groupLookup:_}}e.exports=function(t,e){var r=c(e);return i({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":606,"../../lib":719,"../../lib/gup":717,"strongly-connected-components":531}],1104:[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",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1105:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=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 h(t,e){function r(r,i){return n.coerce(t,e,a.link.colorscales,r,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(t,e,r,f){function p(r,i){return n.coerce(t,e,a,r,i)}var d=n.extendDeep(f.hoverlabel,t.hoverlabel),g=t.node,v=c.newContainer(e,"node");function m(t,e){return n.coerce(g,v,a.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,v,m,d),m("hovertemplate");var y=f.colorway;m("color",v.label.map(function(t,e){return i.addOpacity(function(t){return y[t%y.length]}(e),.8)}));var x=t.link||{},b=c.newContainer(e,"link");function _(t,e){return n.coerce(x,b,a.link,t,e)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,k=o(f.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(k,b.value.length)),u(x,b,{name:"colorscales",handleItemDefaults:h}),s(e,f,p),p("orientation"),p("valueformat"),p("valuesuffix"),v.x.length&&v.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},f.font)),e._length=null}},{"../../components/color":594,"../../components/fx/hoverlabel_defaults":631,"../../lib":719,"../../plot_api/plot_template":757,"../../plots/array_container_defaults":763,"../../plots/domain":792,"./attributes":1101,tinycolor2:538}],1106:[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":1101,"./base_plot":1102,"./calc":1103,"./defaults":1105,"./plot":1107,"./select.js":1109}],1107:[function(t,e,r){"use strict";var n=t("d3"),a=t("./render"),i=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function h(t,e){return t.filter(function(t){return t.key===e.traceId})}function f(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function p(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function m(t,e,r){e&&r&&h(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",function(t){if(!t.link.concentrationscale)return.4}),a&&h(e,t).selectAll("."+l.sankeyLink).filter(function(t){return t.link.label===a}).style("fill-opacity",function(t){if(!t.link.concentrationscale)return.4}),r&&h(e,t).selectAll("."+l.sankeyNode).filter(g(t)).call(v)}function x(t,e,r,n){var a=n.datum().link.label;n.style("fill-opacity",function(t){return t.tinyColorAlpha}),a&&h(e,t).selectAll("."+l.sankeyLink).filter(function(t){return t.link.label===a}).style("fill-opacity",function(t){return t.tinyColorAlpha}),r&&h(e,t).selectAll(l.sankeyNode).filter(g(t)).call(m)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,h=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.color,1),borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:n.event.x"),color:b(o,"bgcolor")||a.tinyColorHue,borderColor:b(o,"bordercolor"),fontFamily:b(o,"font.family"),fontSize:b(o,"font.size"),fontColor:b(o,"font.color"),nameLength:b(o,"namelength"),textAlign:b(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[a.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});f(y,.85),p(y)}}},unhover:function(e,a,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,a,o),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,t.emit("plotly_unhover",{event:n.event,points:[a.node]})),i.loneUnhover(r._hoverlayer.node()))},select:function(e,r,a){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(m,r,a),i.click(t,{target:!0})}}})}},{"../../components/color":594,"../../components/fx":632,"../../lib":719,"./constants":1104,"./render":1108,d3:164}],1108:[function(t,e,r){"use strict";var n=t("./constants"),a=t("d3"),i=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),h=t("../../lib"),f=t("../../lib/gup"),p=f.keyFun,d=f.repeat,g=f.unwrap,v=t("d3-interpolate").interpolateNumber,m=t("../../registry");function y(){var t=.5;return function(e){if(e.link.circular)return r=e.link,n=r.width/2,a=r.circularPathData,"top"===r.circularLinkType?"M "+a.targetX+" "+(a.targetY+n)+" L"+a.rightInnerExtent+" "+(a.targetY+n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 1 "+(a.rightFullExtent-n)+" "+(a.targetY-a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY-a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.leftInnerExtent+" "+(a.sourceY-n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 0 "+(a.leftFullExtent-n)+" "+(a.sourceY-a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 0 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY-a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.targetY-n)+"L"+a.targetX+" "+(a.targetY-n)+"Z":"M "+a.targetX+" "+(a.targetY-n)+" L"+a.rightInnerExtent+" "+(a.targetY-n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n)+" "+(a.targetY+a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.leftInnerExtent+" "+(a.sourceY+n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY+a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.targetY+n)+"L"+a.targetX+" "+(a.targetY+n)+"Z";var r,n,a,i=e.link.source.x1,o=e.link.target.x0,s=v(i,o),l=s(t),c=s(1-t),u=e.link.y0-e.link.width/2,h=e.link.y0+e.link.width/2,f=e.link.y1-e.link.width/2,p=e.link.y1+e.link.width/2;return"M"+i+","+u+"C"+l+","+u+" "+c+","+f+" "+o+","+f+"L"+o+","+p+"C"+c+","+p+" "+l+","+h+" "+i+","+h+"Z"}}function x(t){t.attr("transform",function(t){return"translate("+t.node.x0.toFixed(3)+", "+t.node.y0.toFixed(3)+")"})}function b(t){t.call(x)}function _(t,e){t.call(b),e.attr("d",y())}function w(t){t.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function k(t){return t.link.width>1||t.linkLineWidth>0}function T(t){return"translate("+t.translateX+","+t.translateY+")"+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function A(t){return"translate("+(t.horizontal?0:t.labelY)+" "+(t.horizontal?t.labelY:0)+")"}function M(t){return a.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function S(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function E(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function C(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function L(t){return t.horizontal&&t.left?"100%":"0%"}function P(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 O(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,z(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,a){!function(t){for(var e=0;e0&&a.forceLayouts[e].alpha(0)}}(0,e,i,r)).stop()}(0,o,a),function(t,e,r,a,i){window.requestAnimationFrame(function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var c=r.node.originalX;r.node.x0=c-r.visibleWidth/2,r.node.x1=c+r.visibleWidth/2,I(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),z(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),_(t.filter(D(r)),e))}}).on("dragend",function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e=a||(r=a-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),a=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}),a=[],i=-1,o=-1/0;for(_=0;_o+d&&(i+=1,e=s.x0),o=s.x0,a[i]||(a[i]=[]),a[i].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return a}(y=T.nodes)),a.update(T)}return{circular:b,key:r,trace:s,guid:h.randstr(),horizontal:f,width:v,height:m,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?m:v,dragPerpendicular:f?v:m,arrangement:s.arrangement,sankey:a,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,u)),_=e.selectAll("."+n.cn.sankey).data(b,p);_.exit().remove(),_.enter().append("g").classed(n.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",T),_.each(function(e,r){t._fullData[r]._sankey=e;var n="bgsankey-"+e.trace.uid+"-"+r;h.ensureSingle(t._fullLayout._draggers,"rect",n),t._fullData[r]._bgRect=a.select("."+n),t._fullData[r]._bgRect.style("pointer-events","all").attr("width",e.width).attr("height",e.height).attr("x",e.translateX).attr("y",e.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),_.transition().ease(n.ease).duration(n.duration).attr("transform",T);var I=_.selectAll("."+n.cn.sankeyLinks).data(d,p);I.enter().append("g").classed(n.cn.sankeyLinks,!0).style("fill","none");var z=I.selectAll("."+n.cn.sankeyLink).data(function(t){return t.graph.links.filter(function(t){return t.value}).map(function(t,e,r){var n=i(e.color),a=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:a,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:y,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}.bind(null,t))},p);z.enter().append("path").classed(n.cn.sankeyLink,!0).call(P,_,f.linkEvents),z.style("stroke",function(t){return k(t)?o.tinyRGB(i(t.linkLineColor)):t.tinyColorHue}).style("stroke-opacity",function(t){return k(t)?o.opacity(t.linkLineColor):t.tinyColorAlpha}).style("fill",function(t){return t.tinyColorHue}).style("fill-opacity",function(t){return t.tinyColorAlpha}).style("stroke-width",function(t){return k(t)?t.linkLineWidth:1}).attr("d",y()),z.style("opacity",function(){return t._context.staticPlot||v||m?1:0}).transition().ease(n.ease).duration(n.duration).style("opacity",1),z.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var D=_.selectAll("."+n.cn.sankeyNodeSet).data(d,p);D.enter().append("g").classed(n.cn.sankeyNodeSet,!0),D.style("cursor",function(t){switch(t.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=D.selectAll("."+n.cn.sankeyNode).data(function(t){var e=t.graph.nodes;return function(t){var e,r=[];for(e=0;e5?t.node.label:""}).attr("text-anchor",function(t){return t.horizontal&&t.left?"end":"start"}),U.transition().ease(n.ease).duration(n.duration).attr("startOffset",L).style("fill",C)}},{"../../components/color":594,"../../components/drawing":615,"../../lib":719,"../../lib/gup":717,"../../registry":848,"./constants":1104,"@plotly/d3-sankey":55,"@plotly/d3-sankey-circular":54,d3:164,"d3-force":157,"d3-interpolate":159,tinycolor2:538}],1109:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,a=n._sankey.graph.nodes,i=0;is&&A[v].gap;)v--;for(y=A[v].s,d=A.length-1;d>v;d--)A[d].s=y;for(;sM[u]&&u=0;a--){var i=t[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],1118:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./stack_defaults"),u=t("./marker_defaults"),h=t("./line_defaults"),f=t("./line_shape_defaults"),p=t("./text_defaults"),d=t("./fillcolor_defaults");e.exports=function(t,e,r,g){function v(r,a){return n.coerce(t,e,i,r,a)}var m=l(t,e,g,v);if(m||(e.visible=!1),e.visible){var y=c(t,e,g,v),x=!y&&mG!=(F=O[L][1])>=G&&(z=O[L-1][0],D=O[L][0],F-R&&(I=z+(D-z)*(G-R)/(F-R),V=Math.min(V,I),U=Math.max(U,I)));V=Math.max(V,0),U=Math.min(U,f._length);var Y=s.defaultLine;return s.opacity(h.fillcolor)?Y=h.fillcolor:s.opacity((h.line||{}).color)&&(Y=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:V,x1:U,y0:G,y1:G,color:Y,hovertemplate:!1}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{"../../components/color":594,"../../components/fx":632,"../../lib":719,"../../registry":848,"./get_trace_color":1120}],1122:[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"),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":778,"./arrays_to_calcdata":1110,"./attributes":1111,"./calc":1112,"./cross_trace_calc":1116,"./cross_trace_defaults":1117,"./defaults":1118,"./hover":1121,"./marker_colorbar":1128,"./plot":1130,"./select":1131,"./style":1133,"./subtypes":1134}],1123:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s("line.color",r),a(t,"line"))?i(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":604,"../../components/colorscale/helpers":605,"../../lib":719}],1124:[function(t,e,r){"use strict";var n=t("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,s=i-.5,l=t("../../lib"),c=l.segmentsIntersect,u=l.constrain,h=t("./constants");e.exports=function(t,e){var r,n,i,f,p,d,g,v,m,y,x,b,_,w,k,T,A,M,S=e.xaxis,E=e.yaxis,C="log"===S.type,L="log"===E.type,P=S._length,O=E._length,I=e.connectGaps,z=e.baseTolerance,D=e.shape,R="linear"===D,F=e.fill&&"none"!==e.fill,B=[],N=h.minTolerance,j=t.length,V=new Array(j),U=0;function q(e){var r=t[e];if(!r)return!1;var n=S.c2p(r.x),i=E.c2p(r.y);if(n===a){if(C&&(n=S.c2p(r.x,!0)),n===a)return!1;L&&i===a&&(n*=Math.abs(S._m*O*(S._m>0?o:s)/(E._m*P*(E._m>0?o:s)))),n*=1e3}if(i===a){if(L&&(i=E.c2p(r.y,!0)),i===a)return!1;i*=1e3}return[n,i]}function H(t,e,r,n){var a=r-t,i=n-e,o=.5-t,s=.5-e,l=a*a+i*i,c=a*o+i*s;if(c>0&&crt||t[1]at)return[u(t[0],et,rt),u(t[1],nt,at)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===at)||void 0)}function lt(t,e,r){return function(n,a){var i=ot(n),o=ot(a),s=[];if(i&&o&&st(i,o))return s;i&&s.push(i),o&&s.push(o);var c=2*l.constrain((n[t]+a[t])/2,e,r)-((i||n)[t]+(o||a)[t]);c&&((i&&o?c>0==i[t]>o[t]?i:o:i||o)[t]+=c);return s}}function ct(t){var e=t[0],r=t[1],n=e===V[U-1][0],a=r===V[U-1][1];if(!n||!a)if(U>1){var i=e===V[U-2][0],o=r===V[U-2][1];n&&(e===et||e===rt)&&i?o?U--:V[U-1]=t:a&&(r===nt||r===at)&&o?i?U--:V[U-1]=t:V[U++]=t}else V[U++]=t}function ut(t){V[U-1][0]!==t[0]&&V[U-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ht(t){if(A=t[0]/P,M=t[1]/O,W=t[0]rt?rt:0,X=t[1]at?at:0,W||X){if(U)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),V[U++]=e[1])}else Q=$(V[U-1],t)[0],V[U++]=Q;else V[U++]=[W||t[0],X||t[1]];var r=V[U-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,i=(a=t)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?et:rt,at]:[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]),V[U++]=t;var n,a,i,o}for("linear"===D||"spline"===D?$=function(t,e){for(var r=[],n=0,a=0;a<4;a++){var i=it[a],o=c(t[0],t[1],e[0],e[1],i[0],i[1],i[2],i[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,ft))break;i=d,(_=m[0]*v[0]+m[1]*v[1])>x?(x=_,f=d,g=!1):_=t.length||!d)break;ht(d),n=d}}else ht(f)}K&&ct([Z||K[0],J||K[1]]),B.push(V.slice(0,U))}return B}},{"../../constants/numerical":695,"../../lib":719,"./constants":1115}],1125:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1126:[function(t,e,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var a,i,o,s,l,c={},u=!1,h=-1,f=0,p=-1;for(i=0;i=0?l=p:(l=p=f,f++),l0?Math.max(e,a):0}}},{"fast-isnumeric":226}],1128:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1129:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/helpers").hasColorscale,i=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),h=(t.line||{}).color;(c=c||{},h&&(r=h),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",r),a(t,"marker")&&i(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",h&&!Array.isArray(h)&&e.marker.color!==h?h:u?n.background:n.defaultLine),a(t,"marker.line")&&i(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":594,"../../components/colorscale/defaults":604,"../../components/colorscale/helpers":605,"./subtypes":1134}],1130:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../registry"),i=t("../../lib"),o=i.ensureSingle,s=i.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),h=t("./link_traces"),f=t("../../lib/polygon").tester;function p(t,e,r,h,p,d,g){var v;!function(t,e,r,a,o){var s=r.xaxis,l=r.yaxis,u=n.extent(i.simpleMap(s.range,s.r2c)),h=n.extent(i.simpleMap(l.range,l.r2c)),f=a[0].trace;if(!c.hasMarkers(f))return;var p=f.marker.maxdisplayed;if(0===p)return;var d=a.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=h[0]&&t.y<=h[1]}),g=Math.ceil(d.length/p),v=0;o.forEach(function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=h[0].trace,w=_.line,k=n.select(d),T=o(k,"g","errorbars"),A=o(k,"g","lines"),M=o(k,"g","points"),S=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(t,T,r,g),!0===_.visible){var E,C;y(k).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var P,O,I="",z=[],D=_._prevtrace;D&&(I=D._prevRevpath||"",C=D._nextFill,z=D._polygons);var R,F,B,N,j,V,U,q="",H="",G=[],Y=i.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(h),-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(h,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),U=_._polygons=new Array(G.length),v=0;v1){var r=n.select(this);if(r.datum(h),t)y(r.style("opacity",0).attr("d",P).call(l.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",P),l.singleLineStyle(h,a)}}}}}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(h),N&&V&&(L?("y"===L?N[1]=V[1]=b.c2p(0,!0):"x"===L&&(N[0]=V[0]=x.c2p(0,!0)),y(E).attr("d","M"+V+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(E).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&I?("tonext"===_.fill?y(C).attr("d",q+"Z"+I+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+I.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(z)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=U):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(h),S.datum(h),function(e,a,i){var o,u=i[0].trace,h=c.hasMarkers(u),f=c.hasText(u),p=tt(u),d=et,g=et;if(h||f){var v=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?v=w?K:J:_&&!w&&(v=Q),h&&(d=v),f&&(g=v)}var k,T=(o=e.selectAll("path.point").data(d,p)).enter().append("path").classed("point",!0);m&&T.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),h&&(k=l.makePointStyleFns(u)),o.each(function(e){var a=n.select(this),i=y(a);l.translatePoint(e,i,x,b)?(l.singlePointStyle(e,i,u,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,i,x,b,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):i.remove()}),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(g,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each(function(t){var e=n.select(this),a=y(e.select("text"));l.translatePoint(t,a,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,h);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,a,i,c){var u,f,d=!i,g=!!i&&i.duration>0,v=h(t,e,r);((u=a.selectAll("g.trace").data(v,function(t){return t[0].trace.uid})).enter().append("g").attr("class",function(t){return"trace scatter trace"+t[0].trace.uid}).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each(function(e){var a=o(n.select(this),"g","fills");l.setClipUrl(a,r.layerClipId,t);var i=e[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each(function(t){i[t]=null}).remove(),u.order().each(function(t){i[t]=o(n.select(this),"path","js-fill")})})}(t,u,e),g)?(c&&(f=c()),n.transition().duration(i.duration).ease(i.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()}).each(function(){a.selectAll("g.trace").each(function(r,n){p(t,n,e,r,v,this,i)})})):u.each(function(r,n){p(t,n,e,r,v,this,i)});d&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":615,"../../lib":719,"../../lib/polygon":731,"../../registry":848,"./line_points":1124,"./link_traces":1126,"./subtypes":1134,d3:164}],1131:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,a,i,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r0){var f=a.c2l(u);a._lowerLogErrorBound||(a._lowerLogErrorBound=f),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,f)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[a(t.x,t.error_x,e[0],r.xaxis),a(t.y,t.error_y,e[1],r.yaxis),a(t.z,t.error_z,e[2],r.zaxis)],i=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function x(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function b(t,e){return e(4*t)}function _(t){return p[t]}function w(t,e,r,n,a){var i=null;if(l.isArrayOrTypedArray(t)){i=[];for(var o=0;o=0){var g=function(t,e,r){var n,a=(r+1)%3,i=(r+2)%3,o=[],l=[];for(n=0;n=0&&h("surfacecolor",f||p);for(var d=["x","y","z"],g=0;g<3;++g){var v="projection."+d[g];h(v+".show")&&(h(v+".opacity"),h(v+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,f||p||r,{axis:"z"}),m(t,e,f||p||r,{axis:"y",inherit:"z"}),m(t,e,f||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":719,"../../registry":848,"../scatter/line_defaults":1123,"../scatter/marker_defaults":1129,"../scatter/subtypes":1134,"../scatter/text_defaults":1135,"./attributes":1137}],1142:[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":693,"../../plots/gl3d":807,"./attributes":1137,"./calc":1138,"./convert":1140,"./defaults":1141}],1143:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../plots/attributes"),i=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,h=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:h.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({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:i()}},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../scatter/attributes":1111}],1144:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=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,h,f=e._length,p=new Array(f),d=!1;for(c=0;c")}return o}function k(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,_.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":719,"../scatter/hover":1121}],1148:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":778,"../scatter/marker_colorbar":1128,"../scatter/select":1131,"../scatter/style":1133,"./attributes":1143,"./calc":1144,"./defaults":1145,"./event_data":1146,"./hover":1147,"./plot":1149}],1149:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../plots/cartesian/axes"),i=t("../../components/drawing");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,h={xaxis:a.getFromId(t,u.xaxis||"x"),yaxis:a.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,h,r,o),s=0;s")}(u,v,t,c[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/get_trace_color":1120,"./attributes":1150}],1155:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./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":797,"../scatter/marker_colorbar":1128,"../scatter/style":1133,"./attributes":1150,"./calc":1151,"./defaults":1152,"./event_data":1153,"./hover":1154,"./plot":1156,"./select":1157,"./style":1158}],1156:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../constants/numerical").BADNUM,o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../lib/geo_location_utils").locationToFeature,l=t("../../lib/geojson_utils"),c=t("../scatter/subtypes"),u=t("./style");function h(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),a=r.locationmode,l=0;l=g,k=2*_,T={},A=y.makeCalcdata(e,"x"),M=x.makeCalcdata(e,"y"),S=new Array(k);for(r=0;r<_;r++)o=A[r],s=M[r],S[2*r]=o===d?NaN:o,S[2*r+1]=s===d?NaN:s;if("log"===y.type)for(r=0;r1&&a.extendFlat(s.line,f.linePositions(t,r,n));if(s.errorX||s.errorY){var l=f.errorBarPositions(t,r,n,i,o);s.errorX&&a.extendFlat(s.errorX,l.x),s.errorY&&a.extendFlat(s.errorY,l.y)}s.text&&(a.extendFlat(s.text,{positions:n},f.textPosition(t,r,s.text,s.marker)),a.extendFlat(s.textSel,{positions:n},f.textPosition(t,r,s.text,s.markerSel)),a.extendFlat(s.textUnsel,{positions:n},f.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,S,A,M),P=p(t,b);return u(m,e),w?L.marker&&(C=2*(L.marker.sizeAvg||Math.max(L.marker.size,3))):C=l(e,_),c(t,e,y,x,A,M,C),L.errorX&&v(e,y,L.errorX),L.errorY&&v(e,x,L.errorY),L.fill&&!P.fill2d&&(P.fill2d=!0),L.marker&&!P.scatter2d&&(P.scatter2d=!0),L.line&&!P.line2d&&(P.line2d=!0),!L.errorX&&!L.errorY||P.error2d||(P.error2d=!0),L.text&&!P.glText&&(P.glText=!0),L.marker&&(L.marker.snap=T.tree||g),P.lineOptions.push(L.line),P.errorXOptions.push(L.errorX),P.errorYOptions.push(L.errorY),P.fillOptions.push(L.fill),P.markerOptions.push(L.marker),P.markerSelectedOptions.push(L.markerSel),P.markerUnselectedOptions.push(L.markerUnsel),P.textOptions.push(L.text),P.textSelectedOptions.push(L.textSel),P.textUnselectedOptions.push(L.textUnsel),P.selectBatch.push([]),P.unselectBatch.push([]),T._scene=P,T.index=P.count,T.x=A,T.y=M,T.positions=S,P.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":695,"../../lib":719,"../../plots/cartesian/autorange":766,"../../plots/cartesian/axis_ids":770,"../scatter/calc":1112,"../scatter/colorscale_calc":1114,"./constants":1161,"./convert":1162,"./scene_update":1168,"point-cluster":470}],1161:[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]}}},{}],1162:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("svg-path-sdf"),i=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,h=t("../scatter/subtypes"),f=t("../scatter/make_bubble_size_func"),p=t("./constants"),d=t("../../constants/interactions").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t("../../components/fx/helpers").appendArrayPointValue;function m(t,e){var r,a=t._length,i=t.textfont,o=t.textposition,l=Array.isArray(o)?o:[o],c=i.color,u=i.size,h=i.family,f={},p=t.texttemplate;if(p){f.text=[];var d=Array.isArray(p),g=d?Math.min(p.length,a):a,m=d?function(t){return p[t]}:function(){return p},y=e._fullLayout._d3locale;for(r=0;rp.TOO_MANY_POINTS?"rect":h.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var f=n[0],d=n[1];for(a=0;a1?l[a]:l[0]:l,d=Array.isArray(c)?c.length>1?c[a]:c[0]:c,v=g[p],m=g[d],y=u?u/.8+1:0,x=-m*y-.5*m;o.offset[a]=[v*y/f,x/f]}}return o}}},{"../../components/drawing":615,"../../components/fx/helpers":629,"../../constants/interactions":694,"../../lib":719,"../../lib/gl_format_color":716,"../../plots/cartesian/axis_ids":770,"../../registry":848,"../scatter/make_bubble_size_func":1127,"../scatter/subtypes":1134,"./constants":1161,"color-normalize":121,"fast-isnumeric":226,"svg-path-sdf":536}],1163:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../registry"),i=t("./attributes"),o=t("../scatter/constants"),s=t("../scatter/subtypes"),l=t("../scatter/xy_defaults"),c=t("../scatter/marker_defaults"),u=t("../scatter/line_defaults"),h=t("../scatter/fillcolor_defaults"),f=t("../scatter/text_defaults");e.exports=function(t,e,r,p){function d(r,a){return n.coerce(t,e,i,r,a)}var g=!!t.marker&&/-open/.test(t.marker.symbol),v=s.isBubble(t),m=l(t,e,p,d);if(m){var y=m-1;c--)s=x[a[c]],l=b[a[c]],u=m.c2p(s)-_,h=y.c2p(l)-w,(f=Math.sqrt(u*u+h*h))g.glText.length){var b=y-g.glText.length;for(f=0;fr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),g.line2d.update(g.lineOptions)),g.error2d){var w=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(w)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=s.repeat(null,y),g.fill2d&&(g.fillOptions=g.fillOptions.map(function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var a,i,o=n[0],s=o.trace,l=o.t,c=g.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(g.fillOrder[e]=u);var h,f,p=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;hh&&isNaN(d[f+1]);)f-=2;0!==d[h+1]&&(p=[d[h],0]),p=p.concat(d.slice(h,f+2)),0!==d[f+1]&&(p=p.concat([d[f],0]))}else if("tozerox"===s.fill){for(h=0;hh&&isNaN(d[f]);)f-=2;0!==d[h]&&(p=[0,d[h+1]]),p=p.concat(d.slice(h,f+2)),0!==d[f]&&(p=p.concat([0,d[f+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],a=0,i=0;i-1;for(f=0;f=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=a.modHalf(e[0],360),i=e[1],o=f.project([n,i]),l=o.x-u.c2p([d,i]),c=o.y-h.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)},t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[a.modHalf(v[0],360)+p,v[1]],y=u.c2p(m),x=h.c2p(m),b=g.mrc||1;return t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b,t.color=i(c,g),t.extraText=function(t,e,r){if(t.hovertemplate)return;var n=(e.hi||t.hoverinfo).split("+"),a=-1!==n.indexOf("all"),i=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}a||i&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):i?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(a||-1!==n.indexOf("text"))&&o(e,t,c);return c.join("
")}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":632,"../../constants/numerical":695,"../../lib":719,"../scatter/get_trace_color":1120}],1175:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),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":822,"../scatter/marker_colorbar":1128,"../scattergeo/calc":1151,"./attributes":1170,"./defaults":1172,"./event_data":1173,"./hover":1174,"./plot":1176,"./select":1177}],1176:[function(t,e,r){"use strict";var n=t("./convert"),a=t("../../plots/mapbox/constants").traceLayerPrefix,i=["fill","line","circle","symbol"];function o(t,e){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:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+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,a,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup["trace-"+this.uid];if(c!==this.below){for(e=i.length-1;e>=0;e--)r=i[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=i[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,a=new o(t,r.uid),s=n(t.gd,e),l=a.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,a){var i=n(t,e,r,a);if(i&&!1!==i[0].index){var s=i[0];if(void 0===s.index)return i;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,o(c,u,l,s),s.hovertemplate=u.hovertemplate,i}},makeHoverPointText:o}},{"../../lib":719,"../../plots/cartesian/axes":767,"../scatter/hover":1121}],1182:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":831,"../scatter/marker_colorbar":1128,"../scatter/select":1131,"../scatter/style":1133,"./attributes":1178,"./calc":1179,"./defaults":1180,"./hover":1181,"./plot":1183}],1183:[function(t,e,r){"use strict";var n=t("../scatter/plot"),a=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){for(var i=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&&!f.fill2d&&(f.fill2d=!0),y.marker&&!f.scatter2d&&(f.scatter2d=!0),y.line&&!f.line2d&&(f.line2d=!0),y.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(y.line),f.fillOptions.push(y.fill),f.markerOptions.push(y.marker),f.markerSelectedOptions.push(y.markerSel),f.markerUnselectedOptions.push(y.markerUnsel),f.textOptions.push(y.text),f.textSelectedOptions.push(y.textSel),f.textUnselectedOptions.push(y.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=f,d.index=f.count,f.count++}}),i(t,e,r)}}},{"../../lib":719,"../scattergl/constants":1161,"../scattergl/convert":1162,"../scattergl/plot":1167,"../scattergl/scene_update":1168,"fast-isnumeric":226,"point-cluster":470}],1190:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../plots/template_attributes").texttemplateAttrs,i=t("../scatter/attributes"),o=t("../../plots/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../components/drawing/attributes").dash,c=t("../../lib/extend").extendFlat,u=i.marker,h=i.line,f=u.line;e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},i.hovertext,{}),line:{color:h.color,width:h.width,dash:l,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":601,"../../components/drawing/attributes":614,"../../lib/extend":710,"../../plots/attributes":764,"../../plots/template_attributes":843,"../scatter/attributes":1111}],1191:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),a=t("../scatter/colorscale_calc"),i=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,h,f,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r"),s.hovertemplate=d.hovertemplate,o}function y(t,e){v.push(t._hovertitle+": "+e)}}},{"../../plots/cartesian/axes":767,"../scatter/hover":1121}],1195:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),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":844,"../scatter/marker_colorbar":1128,"../scatter/select":1131,"../scatter/style":1133,"./attributes":1190,"./calc":1191,"./defaults":1192,"./event_data":1193,"./hover":1194,"./plot":1196}],1196:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e,r){var a=e.plotContainer;a.select(".scatterlayer").selectAll("*").remove();var i={xaxis:e.xaxis,yaxis:e.yaxis,plot:a,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select("g.scatterlayer");n(t,i,r,o)}},{"../scatter/plot":1130}],1197:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,h=u.line,f=c(a("marker.line",{editTypeOverride:"calc"}),{width:c({},h.width,{editType:"calc"}),editType:"calc"}),p=c(a("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:f,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:l("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:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:i(),marker:p,xaxes:d("x"),yaxes:d("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:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plot_api/plot_template":757,"../../plots/cartesian/constants":773,"../../plots/template_attributes":843,"../scatter/attributes":1111,"../scattergl/attributes":1159}],1198:[function(t,e,r){"use strict";var n=t("regl-line2d"),a=t("../../registry"),i=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine,u="splom";function h(t,e,r){for(var n=r.matrixOptions.data.length,a=e._visibleDims,i=r.viewOpts.ranges=new Array(n),o=0;of?2*(b.sizeAvg||Math.max(b.size,3)):i(e,x),p=0;pi&&l?r._splomSubplots[S]=1:a-1,A=!0;if("lasso"===y||"select"===y||!!f.selectedpoints||T){var M=f._length;if(f.selectedpoints){d.selectBatch=f.selectedpoints;var S=f.selectedpoints,E={};for(s=0;s2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function d(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function g(t,e){var r=t.fullSceneLayout,a=t.dataScale,u=e._len,h={};function g(t,e){var n=r[e],o=a[c[e]];return i.simpleMap(t,function(t){return n.d2l(t)*o})}h.vectors=l(g(e.u,"xaxis"),g(e.v,"yaxis"),g(e.w,"zaxis"),u);var v=f(e.x.slice(0,u)),m=f(e.y.slice(0,u)),y=f(e.z.slice(0,u));if(v.length*m.length*y.length>u)return{positions:[],cells:[]};var x=g(v,"xaxis"),b=g(m,"yaxis"),_=g(y,"zaxis");h.meshgrid=[x,b,_];var w=e._slen;if(w)h.startingPositions=l(g(e.starts.x.slice(0,w),"xaxis"),g(e.starts.y.slice(0,w),"yaxis"),g(e.starts.z.slice(0,w),"zaxis"));else{for(var k=b[0],T=p(x),A=p(_),M=new Array(T.length*A.length),S=0,E=0;E=0};v?(r=Math.min(g.length,y.length),l=function(t){return T(g[t])&&A(t)},u=function(t){return String(g[t])}):(r=Math.min(m.length,y.length),l=function(t){return T(m[t])&&A(t)},u=function(t){return String(m[t])}),b&&(r=Math.min(r,x.length));for(var M=0;M1){for(var L=i.randstr(),P=0;P<_.length;P++)""===_[P].pid&&(_[P].pid=L);_.unshift({hasMultipleRoots:!0,id:L,pid:"",label:""})}}else{var O,I=[];for(O in w)k[O]||I.push(O);if(1!==I.length)return i.warn("Multiple implied roots, cannot build "+e.type+" hierarchy.");O=I[0],_.unshift({hasImpliedRoot:!0,id:O,pid:"",label:O})}try{p=n.stratify().id(function(t){return t.id}).parentId(function(t){return t.pid})(_)}catch(t){return i.warn("Failed to build "+e.type+" hierarchy. Error: "+t.message)}var z=n.hierarchy(p),D=!1;if(b)switch(e.branchvalues){case"remainder":z.sum(function(t){return t.data.v});break;case"total":z.each(function(t){var e=t.data.data,r=e.v;if(t.children){var n=t.children.reduce(function(t,e){return t+e.data.data.v},0);if((e.hasImpliedRoot||e.hasMultipleRoots)&&(r=n),r"),name:T||I("name")?l.name:void 0,color:k("hoverlabel.bgcolor")||y.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:T,hovertemplateLabels:L,eventData:[h(a,l,f.eventDataKeys)]};v&&(R.x0=S-a.rInscribed*a.rpx1,R.x1=S+a.rInscribed*a.rpx1,R.idealAlign=a.pxmid[0]<0?"left":"right"),m&&(R.x=S,R.idealAlign=S<0?"left":"right"),o.loneHover(R,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}),d._hasHoverLabel=!0}if(m){var F=t.select("path.surface");f.styleOne(F,a,l,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:[h(a,l,f.eventDataKeys)],event:n.event})}}),t.on("mouseout",function(e){var a=r._fullLayout,i=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[h(s,i,f.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),d._hasHoverLabel=!1),m){var l=t.select("path.surface");f.styleOne(l,s,i,{hovered:!1})}}),t.on("click",function(t){var e=r._fullLayout,i=r._fullData[d.index];if(!1===l.triggerHandler(r,"plotly_"+d.type+"click",{points:[h(t,i,f.eventDataKeys)],event:n.event})||v&&(c.isHierarchyRoot(t)||c.isLeaf(t)))e.hovermode&&(r._hoverdata=[h(t,i,f.eventDataKeys)],o.click(r,n.event));else if(!r._dragging&&!r._transitioning){a.call("_storeDirectGUIEdit",i,e._tracePreGUI[i.uid],{level:i.level});var s=c.getPtId(t),u=c.isEntry(t)?c.findEntryWithChild(g,s):c.findEntryWithLevel(g,s),p={data:[{level:c.getPtId(u)}],traces:[d.index]},m={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),a.call("animate",r,p,m)}})}},{"../../components/fx":632,"../../components/fx/helpers":629,"../../lib":719,"../../lib/events":709,"../../registry":848,"../pie/helpers":1090,"./helpers":1219,d3:164}],1219:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("../../components/color"),i=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 a=t.children||[],i=0;i0)},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 a=e?[n.data[e]]:[n];return r.listPath(n,e).concat(a)},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":594,"../../lib":719,"../../lib/setcursor":739,"../pie/helpers":1090}],1220:[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":1128,"./attributes":1213,"./base_plot":1214,"./calc":1215,"./defaults":1217,"./layout_attributes":1221,"./layout_defaults":1222,"./plot":1223,"./style":1224}],1221:[function(t,e,r){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1222:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},{"../../lib":719,"./layout_attributes":1221}],1223:[function(t,e,r){"use strict";var n=t("d3"),a=t("d3-hierarchy"),i=t("../../components/drawing"),o=t("../../lib"),s=t("../../lib/svg_text_utils"),l=t("../pie/plot").transformInsideText,c=t("./style").styleOne,u=t("./fx"),h=t("./constants"),f=t("./helpers");function p(t,e,p,d){var g=t._fullLayout,v=f.hasTransition(d),m=n.select(p).selectAll("g.slice"),y=e[0],x=y.trace,b=y.hierarchy,_=f.findEntryWithLevel(b,x.level),w=f.getMaxDepth(x),k=g._size,T=x.domain,A=k.w*(T.x[1]-T.x[0]),M=k.h*(T.y[1]-T.y[0]),S=.5*Math.min(A,M),E=y.cx=k.l+k.w*(T.x[1]+T.x[0])/2,C=y.cy=k.t+k.h*(1-T.y[0])-M/2;if(!_)return m.remove();var L=null,P={};v&&m.each(function(t){P[f.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!L&&f.isEntry(t)&&(L=t)});var O=function(t){return a.partition().size([2*Math.PI,t.height+1])(t)}(_).descendants(),I=_.height+1,z=0,D=w;y.hasMultipleRoots&&f.isHierarchyRoot(_)&&(O=O.slice(1),I-=1,z=1,D+=1),O=O.filter(function(t){return t.y1<=D});var R=Math.min(I,w),F=function(t){return(t-z)/R*S},B=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},N=function(t){return o.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,E,C)},j=function(t){return E+t.pxmid[0]*t.transform.rCenter+(t.transform.x||0)},V=function(t){return C+t.pxmid[1]*t.transform.rCenter+(t.transform.y||0)};(m=m.data(O,f.getPtId)).enter().append("g").classed("slice",!0),v?m.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=f.getPtId(t),a=P[r],i=P[f.getPtId(_)];if(i){var o=t.x1>i.x1?2*Math.PI:0;e=t.rpx1U?2*Math.PI:0;e={x0:i,x1:i}}else e={rpx0:S,rpx1:S},o.extendFlat(e,G(t));else e={rpx0:0,rpx1:0};else e={x0:0,x1:0};return n.interpolate(e,a)}(t);return function(t){return N(e(t))}}):d.attr("d",N),p.call(u,_,t,e,{eventDataKeys:h.eventDataKeys,transitionTime:h.CLICK_TRANSITION_TIME,transitionEasing:h.CLICK_TRANSITION_EASING}).call(f.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),d.call(c,a,x);var m=o.ensureSingle(p,"g","slicetext"),b=o.ensureSingle(m,"text","",function(t){t.attr("data-notex",1)});b.text(r.formatSliceLabel(a,_,x,e,g)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,f.determineTextFont(x,a,g.font)).call(s.convertToTspans,t);var w=i.bBox(b.node());a.transform=l(w,a,y),a.translateX=j(a),a.translateY=V(a);var k=function(t,e){return"translate("+t.translateX+","+t.translateY+")"+(t.transform.scale<1?"scale("+t.transform.scale+")":"")+(t.transform.rotate?"rotate("+t.transform.rotate+")":"")+"translate("+-(e.left+e.right)/2+","+-(e.top+e.bottom)/2+")"};v?b.transition().attrTween("transform",function(t){var e=function(t){var e,r=P[f.getPtId(t)],a=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{scale:0,rotate:a.rotate,rCenter:a.rCenter,x:a.x,y:a.y}},L)if(t.parent)if(U){var i=t.x1>U?2*Math.PI:0;e.x0=e.x1=i}else o.extendFlat(e,G(t));else e.x0=e.x1=0;else e.x0=e.x1=0;var s=n.interpolate(e.rpx1,t.rpx1),l=n.interpolate(e.x0,t.x0),c=n.interpolate(e.x1,t.x1),u=n.interpolate(e.transform.scale,a.scale),h=n.interpolate(e.transform.rotate,a.rotate),p=0===a.rCenter?3:0===e.transform.rCenter?1/3:1,d=n.interpolate(e.transform.rCenter,a.rCenter);return function(t){var e=s(t),r=l(t),n=c(t),i=function(t){return d(Math.pow(t,p))}(t),o={pxmid:B(e,(r+n)/2),transform:{rCenter:i,x:a.x,y:a.y}},f={rpx1:s(t),translateX:j(o),translateY:V(o),transform:{scale:u(t),rotate:h(t),rCenter:i}};return f}}(t);return function(t){return k(e(t),w)}}):b.attr("transform",k(a,w))})}r.plot=function(t,e,r,a){var i,o,s=t._fullLayout._sunburstlayer,l=!r,c=f.hasTransition(r);((i=s.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"),i.order(),c)?(a&&(o=a()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){s.selectAll("g.trace").each(function(e){p(t,e,this,r)})})):i.each(function(e){p(t,e,this,r)});l&&i.exit().remove()},r.formatSliceLabel=function(t,e,r,n,a){var i=r.texttemplate,s=r.textinfo;if(!(i||s&&"none"!==s))return"";var l=a.separators,c=n[0],u=t.data.data,h=c.hierarchy,p=f.isHierarchyRoot(t),d=f.getParent(h,t),g=f.getValue(t);if(!i){var v,m=s.split("+"),y=function(t){return-1!==m.indexOf(t)},x=[];if(y("label")&&u.label&&x.push(u.label),u.hasOwnProperty("v")&&y("value")&&x.push(f.formatValue(u.v,l)),!p){y("current path")&&x.push(f.getPath(t.data));var b=0;y("percent parent")&&b++,y("percent entry")&&b++,y("percent root")&&b++;var _=b>1;if(b){var w,k=function(t){v=f.formatPercent(w,l),_&&(v+=" of "+t),x.push(v)};y("percent parent")&&!p&&(w=g/f.getValue(d),k("parent")),y("percent entry")&&(w=g/f.getValue(e),k("entry")),y("percent root")&&(w=g/f.getValue(h),k("root"))}}return y("text")&&(v=o.castOption(r,u.i,"text"),o.isValidTextValue(v)&&x.push(v)),x.join("
")}var T=o.castOption(r,u.i,"texttemplate");if(!T)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=f.formatValue(u.v,l)),A.currentPath=f.getPath(t.data),p||(A.percentParent=g/f.getValue(d),A.percentParentLabel=f.formatPercent(A.percentParent,l),A.parent=f.getPtLabel(d)),A.percentEntry=g/f.getValue(e),A.percentEntryLabel=f.formatPercent(A.percentEntry,l),A.entry=f.getPtLabel(e),A.percentRoot=g/f.getValue(h),A.percentRootLabel=f.formatPercent(A.percentRoot,l),A.root=f.getPtLabel(h),u.hasOwnProperty("color")&&(A.color=u.color);var M=o.castOption(r,u.i,"text");return(o.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=o.castOption(r,u.i,"customdata"),o.texttemplateString(T,A,a._d3locale,A,r._meta||{})}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../pie/plot":1094,"./constants":1216,"./fx":1218,"./helpers":1219,"./style":1224,d3:164,"d3-hierarchy":158}],1224:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib");function o(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=i.castOption(r,s,"marker.line.color")||a.defaultLine,c=i.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(a.fill,n.color).call(a.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){t._fullLayout._sunburstlayer.selectAll(".trace").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(o,t,r)})})},styleOne:o}},{"../../components/color":594,"../../lib":719,d3:164}],1225:[function(t,e,r){"use strict";var n=t("../../components/color"),a=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},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 u=e.exports=l(s({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:i(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})},hoverinfo:s({},o.hoverinfo)}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":594,"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plot_api/edit_types":750,"../../plots/attributes":764,"../../plots/template_attributes":843}],1226:[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":602}],1227:[function(t,e,r){"use strict";var n=t("gl-surface3d"),a=t("ndarray"),i=t("ndarray-homography"),o=t("ndarray-fill"),s=t("../../lib").isArrayOrTypedArray,l=t("../../lib/gl_format_color").parseColorScale,c=t("../../lib/str2rgbarray"),u=t("../../components/colorscale").extractOpts,h=t("../heatmap/interp2d"),f=t("../heatmap/find_empties");function p(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 d=p.prototype;d.getXat=function(t,e,r,n){var a=s(this.data.x)?s(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?a:n.d2l(a,0,r)},d.getYat=function(t,e,r,n){var a=s(this.data.y)?s(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?a:n.d2l(a,0,r)},d.getZat=function(t,e,r,n){var a=this.data.z[e][t];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[e][t]),void 0===r?a:n.d2l(a,0,r)},d.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),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,a],t.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],t.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=t.dataCoordinate[i];null!=o&&(t.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[a]&&void 0!==s[a][n]?t.textLabel=s[a][n]:t.textLabel=s||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var g=[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 v(t,e){if(t0){r=g[n];break}return r}function x(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),a=1,i=0;iw;)r--,r/=y(r),++r<_&&(r=w);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),c=1+n+1,u=1+o+1,h=a(new Float32Array(c*u),[c,u]),f=0;f0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(a[t]=!0,e=this.contourStart[t];ei&&(this.minValues[e]=i),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"}}},{}],1234:[function(t,e,r){"use strict";var n=t("./constants"),a=t("../../lib/extend").extendFlat,i=t("fast-isnumeric");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=i,s=c+1,i=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var g=d.concat(p(r).map(function(){return c((d[0]||[""]).length)})),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],b=r.length?r[0].map(function(){return e.cells.height}):[],_=x.reduce(s,0),w=f(b,y-_+n.uplift),k=h(f(x,_),[]),T=h(w,k),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 i(n)?Number(n):1}),E=S.reduce(s,0);S=S.map(function(t){return t/E*m});var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:M,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:a({},e.cells,{values:r}),headerCells:a({},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 L.columns.forEach(function(t){t.calcdata=L,t.x=u(t)}),L}},{"../../lib/extend":710,"./constants":1233,"fast-isnumeric":226}],1235:[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":710}],1236:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=t("../../plots/domain").defaults;e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}i(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,a=r.slice(0,n),i=a.slice().sort(function(t,e){return t-e}),o=a.map(function(t){return i.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 h,f,p=u?"":_(t.calcdata.cells.prefix,e,r)||"",d=u?"":_(t.calcdata.cells.suffix,e,r)||"",g=u?null:_(t.calcdata.cells.format,e,r)||null,v=p+(g?a.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(h=b(v)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===h?b(v):h),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(" "===n.wrapSplitCharacter?v.replace(/a&&n.push(i),a+=l}return n}(a,l,s);1===c.length&&(c[0]===a.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each(function(t,e){t.page=c[e],t.scrollY=l}),e.attr("transform",function(t){return"translate(0 "+(I(t.rowBlocks,t.page)-t.scrollY)+")"}),t&&(E(t,r,e,c,n.prevPages,n,0),E(t,r,e,c,n.prevPages,n,1),m(r,t))}}function S(t,e,r,i){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===i?s.scrollY+c*a.event.dy:i;var h=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return M(t,h,l),s.scrollY===u}}function E(t,e,r,n,a,i,o){n[o]!==a[o]&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var i=r.filter(function(t,e){return e===o&&n[e]!==a[e]});y(t,e,i,r),a[o]=n[o]}))}function C(t,e,r,i){return function(){var o=a.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,a,i=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+(a=(r=s.shift()).width+i)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=a;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0}),o.selectAll("tspan.line").remove(),x(o.select("."+n.cn.cellText),r,t,i),a.select(e.parentNode.parentNode).call(O)}}function L(t,e,r,i,o){return function(){if(!o.settledY){var s=a.select(e.parentNode),l=R(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:u,f=Math.max(h,u);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,t.selectAll("."+n.cn.columnCell).call(O),M(null,t.filter(k),0),m(r,i,!0)),s.attr("transform",function(){var t=this.parentNode.getBoundingClientRect(),e=a.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),i=e.top-t.top+(r?r.matrix.f:n.cellPad);return"translate("+P(o,a.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+i+")"}),o.settledY=!0}}}function P(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function O(t){t.attr("transform",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+z(e,1/0)},0);return"translate(0 "+(z(R(t),t.key)+e)+")"}).selectAll("."+n.cn.cellRect).attr("height",function(t){return(e=R(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r})}function I(t,e){for(var r=0,n=e-1;n>=0;n--)r+=D(t[n]);return r}function z(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:a({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: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"},domain:o({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":601,"../../lib/extend":710,"../../plots/domain":792,"../../plots/template_attributes":843,"../pie/attributes":1085,"../sunburst/attributes":1213,"./constants":1242}],1240:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="treemap",r.plot=function(t,e,a,i){n.plotBasePlot(r.name,t,e,a,i)},r.clean=function(t,e,a,i){n.cleanBasePlot(r.name,t,e,a,i)}},{"../../plots/plots":828}],1241:[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":1215}],1242:[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}},{}],1243:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./attributes"),i=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,h=c.handleDefaults;e.exports=function(t,e,r,c){function f(r,i){return n.coerce(t,e,a,r,i)}var p=f("labels"),d=f("parents");if(p&&p.length&&d&&d.length){var g=f("values");g&&g.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),"squarify"===f("tiling.packing")&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var v=f("text");f("texttemplate"),e.texttemplate||f("textinfo",Array.isArray(v)?"text+label":"label"),f("hovertext"),f("hovertemplate");s(t,e,c,f,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var m=-1!==e.textposition.indexOf("bottom");f("marker.line.width")&&f("marker.line.color",c.paper_bgcolor);var y=f("marker.colors"),x=e._hasColorscale=u(t,"marker","colors");x?h(t,e,c,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(y||[]).length);var b=2*e.textfont.size;f("marker.pad.t",m?b/4:b),f("marker.pad.l",b/4),f("marker.pad.r",b/4),f("marker.pad.b",m?b:b/4),x&&h(t,e,c,f,{prefix:"marker.",cLetter:"c"}),e._hovered={marker:{line:{width:2,color:i.contrast(c.paper_bgcolor)}}},f("pathbar.visible")&&(n.coerceFont(f,"pathbar.textfont",c.font),f("pathbar.thickness",e.pathbar.textfont.size+2*l),f("pathbar.side"),f("pathbar.edgeshape")),o(e,c,f),e._length=null}else e.visible=!1}},{"../../components/color":594,"../../components/colorscale":606,"../../lib":719,"../../plots/domain":792,"../bar/constants":860,"../bar/defaults":862,"./attributes":1239}],1244:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),h=t("../sunburst/fx");e.exports=function(t,e,r,f,p){var d=p.barDifY,g=p.width,v=p.height,m=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,k=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._fullLayout,E=e[0],C=E.trace,L=E.hierarchy,P=g/C._entryDepth,O=u.listPath(r.data,"id"),I=s(L.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(I=I.filter(function(t){var e=O.indexOf(t.data.id);return-1!==e&&(t.x0=P*e,t.x1=P*(e+1),t.y0=d,t.y1=d+v,t.onPathbar=!0,!0)})).reverse(),(f=f.data(I,u.getPtId)).enter().append("g").classed("pathbar",!0),k(f,!0,M,[g,v],x),f.order();var z=f;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._hoverX=m(s.x1-v/2),s._hoverY=y(s.y1-v/2);var f=n.select(this),p=a.ensureSingle(f,"path","surface",function(t){t.style("pointer-events","all")});w?p.transition().attrTween("d",function(t){var e=T(t,!0,M,[g,v]);return function(t){return x(e(t))}}):p.attr("d",x),f.call(h,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,C,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var d=a.ensureSingle(f,"g","slicetext"),k=a.ensureSingle(d,"text","",function(t){t.attr("data-notex",1)});k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,u.determineTextFont(C,s,S.font,C.pathdir)).call(o.convertToTspans,t),s.textBB=i.bBox(k.node()),s.transform=b(s,{onPathbar:!0}),u.isOutsideText(C,s)&&(s.transform.targetY-=u.getOutsideTextFontKey("size",C,s,S.font)-u.getInsideTextFontKey("size",C,s,S.font)),w?k.transition().attrTween("transform",function(t){var e=A(t,!0,M,[g,v]);return function(t){return _(e(t))}}):k.attr("transform",_(s))})}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../sunburst/fx":1218,"../sunburst/helpers":1219,"./constants":1242,"./partition":1249,"./style":1251,d3:164}],1245:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),h=t("../sunburst/fx"),f=t("../sunburst/plot").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,v=d.height,m=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,k=d.handleSlicesExit,T=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._fullLayout,E=e[0].trace,C=-1!==E.textposition.indexOf("left"),L=-1!==E.textposition.indexOf("right"),P=-1!==E.textposition.indexOf("bottom"),O=!P&&!E.marker.pad.t||P&&!E.marker.pad.b,I=s(r,[g,v],{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;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):(z=Math.min(z,e),D=Math.max(D,e))}),p=p.data(I,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append("g").classed("slice",!0),k(p,!1,{},[g,v],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:v}},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._hoverX=m(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),k=a.ensureSingle(d,"path","surface",function(t){t.style("pointer-events","all")});w?k.transition().attrTween("d",function(t){var e=T(t,!1,B(),[g,v]);return function(t){return x(e(t))}}):k.attr("d",x),d.call(h,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}),k.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?O?"":u.getPtLabel(s)||"":f(s,r,E,e,S)||"";var M=a.ensureSingle(d,"g","slicetext"),I=a.ensureSingle(M,"text","",function(t){t.attr("data-notex",1)});I.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":C||p?"start":"middle").call(i.font,u.determineTextFont(E,s,S.font)).call(o.convertToTspans,t),s.textBB=i.bBox(I.node()),s.transform=b(s,{isHeader:p}),w?I.transition().attrTween("transform",function(t){var e=A(t,!1,B(),[g,v]);return function(t){return _(e(t))}}):I.attr("transform",_(s))}),R}},{"../../components/drawing":615,"../../lib":719,"../../lib/svg_text_utils":743,"../sunburst/fx":1218,"../sunburst/helpers":1219,"../sunburst/plot":1223,"./constants":1242,"./partition":1249,"./style":1251,d3:164}],1246:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"treemap",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":1128,"./attributes":1239,"./base_plot":1240,"./calc":1241,"./defaults":1243,"./layout_attributes":1247,"./layout_defaults":1248,"./plot":1250,"./style":1251}],1247:[function(t,e,r){"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1248:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("treemapcolorway",e.colorway),r("extendtreemapcolors")}},{"../../lib":719,"./layout_attributes":1247}],1249:[function(t,e,r){"use strict";var n=t("d3-hierarchy");e.exports=function(t,e,r){var a,i=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],c=r.pad[i?"right":"left"],u=r.pad[i?"left":"right"],h=r.pad[o?"top":"bottom"];s&&(a=c,c=l,l=a,a=u,u=h,h=a);var f=n.treemap().tile(function(t,e){switch(t){case"squarify":return n.treemapSquarify.ratio(e);case"binary":return n.treemapBinary;case"dice":return n.treemapDice;case"slice":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(c).paddingRight(u).paddingTop(l).paddingBottom(h).size(s?[e[1],e[0]]:e)(t);return(s||i||o)&&function t(e,r,n){var a;n.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a);n.flipX&&(a=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-a);n.flipY&&(a=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-a);var i=e.children;if(i)for(var o=0;o-1?T+S:-(M+S):0,C={x0:A,x1:A,y0:E,y1:E+M},L=function(t,e,r){var n=g.tiling.pad,a=function(t){return t-n<=e.x0},i=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return{x0:a(t.x0-n)?0:i(t.x0-n)?r[0]:t.x0,x1:a(t.x1+n)?0:i(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}},P=null,O={},I={},z=null,D=function(t,e){return e?O[f(t)]:I[f(t)]},R=function(t,e,r,n){if(e)return O[f(v)]||C;var a=I[g.level]||r;return function(t){return t.data.depth-y.data.depth=(n-=v.r-s)){var m=(r+n)/2;r=m-s,n=m+s}var y;u?a<(y=i-v.b)&&y"===X?(l.x-=i,c.x-=i,u.x-=i,h.x-=i):"/"===X?(u.x-=i,h.x-=i,o.x-=i/2,s.x-=i/2):"\\"===X?(l.x-=i,c.x-=i,o.x-=i/2,s.x-=i/2):"<"===X&&(o.x-=i,s.x-=i),W(l),W(h),W(o),W(c),W(u),W(s),"M"+G(l.x,l.y)+"L"+G(c.x,c.y)+"L"+G(s.x,s.y)+"L"+G(u.x,u.y)+"L"+G(h.x,h.y)+"L"+G(o.x,o.y)+"Z"},toMoveInsideSlice:Z,makeUpdateSliceInterpolator:K,makeUpdateTextInterpolator:Q,handleSlicesExit:$,hasTransition:m,strTransform:tt})}e.exports=function(t,e,r,i){var o,s,l=t._fullLayout._treemaplayer,c=!r;((o=l.selectAll("g.trace.treemap").data(e,function(t){return t[0].trace.uid})).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),a(r))?(i&&(s=i()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()}).each(function(){l.selectAll("g.trace").each(function(e){p(t,e,this,r)})})):o.each(function(e){p(t,e,this,r)});c&&o.exit().remove()}},{"../../lib":719,"../bar/constants":860,"../bar/plot":868,"../sunburst/helpers":1219,"./constants":1242,"./draw_ancestors":1244,"./draw_descendants":1245,d3:164}],1251:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../components/color"),i=t("../../lib"),o=t("../sunburst/helpers");function s(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,h=u.i,f=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&&"rgba(0,0,0,0)"===f)d=0,s="rgba(0,0,0,0)",l=0;else if(s=i.castOption(r,h,"marker.line.color")||a.defaultLine,l=i.castOption(r,h,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var v,m=a.combine(a.addOpacity(r._backgroundColor,.75),f);if(!0===g){var y=o.getMaxDepth(r);v=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else v=e.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var x=0;x0){var y,x,b,_,w,k=t.xa,T=t.ya;"h"===f.orientation?(w=e,y="y",b=T,x="x",_=k):(w=r,y="x",b=k,x="y",_=T);var A=h[t.index];if(w>=A.span[0]&&w<=A.span[1]){var M=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,f,w),C=o.getPositionOnKdePath(A,f,S),L=b._offset,P=b._length;M[y+"0"]=C[0],M[y+"1"]=C[1],M[x+"0"]=M[x+"1"]=S,M[x+"Label"]=x+": "+a.hoverLabelText(_,w)+", "+h[0].t.labels.kde+" "+E.toFixed(3),M.spikeDistance=m[0].spikeDistance;var O=y+"Spike";M[O]=m[0][O],m[0].spikeDistance=void 0,m[0][O]=void 0,M.hovertemplate=!1,v.push(M),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+P),u[y+"2"]=n.constrain(L+C[1],L,L+P),u[x+"1"]=u[x+"2"]=_._offset+S}}d&&(v=v.concat(m))}-1!==p.indexOf("points")&&(c=i.hoverOnPoints(t,e,r));var I=l.selectAll(".violinline-"+f.uid).data(u?[0]:[]);return I.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),I.exit().remove(),I.attr(u),"closest"===s?c?[c]:v:c?(v.push(c),v):v}},{"../../lib":719,"../../plots/cartesian/axes":767,"../box/hover":886,"./helpers":1256}],1258:[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":778,"../box/defaults":884,"../box/select":891,"../scatter/style":1133,"./attributes":1252,"./calc":1253,"./cross_trace_calc":1254,"./defaults":1255,"./hover":1257,"./layout_attributes":1259,"./layout_defaults":1260,"./plot":1261,"./style":1262}],1259:[function(t,e,r){"use strict";var n=t("../box/layout_attributes"),a=t("../../lib").extendFlat;e.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":719,"../box/layout_attributes":888}],1260:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes"),i=t("../box/layout_defaults");e.exports=function(t,e,r){i._supply(t,e,r,function(r,i){return n.coerce(t,e,a,r,i)},"violin")}},{"../../lib":719,"../box/layout_defaults":889,"./layout_attributes":1259}],1261:[function(t,e,r){"use strict";var n=t("d3"),a=t("../../lib"),i=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,h=e.xaxis,f=e.yaxis;function p(t){var e=s(t,{xaxis:h,yaxis:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0});return i.smoothopen(e[0],1)}a.makeTraceGroups(c,r,"trace violins").each(function(t){var r=n.select(this),i=t[0],s=i.t,c=i.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+"axis"],m=e[s.posLetter+"axis"],y="both"===c.side,x=y||"positive"===c.side,b=y||"negative"===c.side,_=r.selectAll("path.violin").data(a.identity);_.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(t){var e,r,a,i,o,l,h,f,_=n.select(this),w=t.density,k=w.length,T=t.pos+d,A=m.c2p(T);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(h=new Array(k),o=0;o")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,i=r.line.color,o=r.line.width;if(a(n))return n;if(a(i)&&o)return i}(h,d),[c]}function w(t){return n(p,t)}}},{"../../components/color":594,"../../constants/delta.js":689,"../../plots/cartesian/axes":767,"../bar/hover":864}],1274:[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":778,"../bar/select":869,"./attributes":1267,"./calc":1268,"./cross_trace_calc":1270,"./defaults":1271,"./event_data":1272,"./hover":1273,"./layout_attributes":1275,"./layout_defaults":1276,"./plot":1277,"./style":1278}],1275:[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"}}},{}],1276:[function(t,e,r){"use strict";var n=t("../../lib"),a=t("./layout_attributes");e.exports=function(t,e,r){var i=!1;function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=0;s0&&(g+=h?"M"+u[0]+","+p[1]+"V"+p[0]:"M"+u[1]+","+p[0]+"H"+u[0]),"between"!==f&&(r.isSum||o path").each(function(t){if(!t.isBlank){var e=l[t.dir].marker;n.select(this).call(i.fill,e.color).call(i.stroke,e.line.color).call(a.dashLine,e.line.dash,e.line.width).style("opacity",l.selectedpoints&&!t.selected?o:1)}}),s(r,l,t),r.selectAll(".lines").each(function(){var t=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},{"../../components/color":594,"../../components/drawing":615,"../../constants/interactions":694,"../bar/style":871,d3:164}],1279:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),a=t("../lib"),i=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,i){if(i.enabled){for(var o=i.target,l=a.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 h;case"first":return f;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 f(t)>s};case">=":return function(t){return f(t)>=s};case"[]":return function(t){var e=f(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=f(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=f(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=f(t);return es[1]};case"](":return function(t){var e=f(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=f(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(f(t))};case"}{":return function(t){return-1===s.indexOf(f(t))}}}(r,i.getDataToCoordFunc(t,e,s,a),f),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(i=0;i 'name: asdf' * Lib.hovertemplateString('price: %{y:$.2f}', {y: 1}) --> 'price: $1.00' * - * @param {obj} d3 locale * @param {string} input string containing %{...:...} template strings * @param {obj} data object containing fallback text when no formatting is specified, ex.: {yLabel: 'formattedYValue'} + * @param {obj} d3 locale * @param {obj} data objects containing substitution values * * @return {string} templated string */ -lib.hovertemplateString = function(string, labels, d3locale) { +function templateFormatString(string, labels, d3locale) { + var opts = this; var args = arguments; + if(!labels) labels = {}; // Not all that useful, but cache nestedProperty instantiation // just in case it speeds things up *slightly*: var getterCache = {}; @@ -32585,6 +32605,7 @@ lib.hovertemplateString = function(string, labels, d3locale) { var obj, value, i; for(i = 3; i < args.length; i++) { obj = args[i]; + if(!obj) continue; if(obj.hasOwnProperty(key)) { value = obj[key]; break; @@ -32597,32 +32618,38 @@ lib.hovertemplateString = function(string, labels, d3locale) { if(value !== undefined) break; } - if(value === undefined) { - if(numberOfHoverTemplateWarnings < maximumNumberOfHoverTemplateWarnings) { - lib.warn('Variable \'' + key + '\' in hovertemplate could not be found!'); + if(value === undefined && opts) { + if(opts.count < opts.max) { + lib.warn('Variable \'' + key + '\' in ' + opts.name + ' could not be found!'); value = match; } - if(numberOfHoverTemplateWarnings === maximumNumberOfHoverTemplateWarnings) { - lib.warn('Too many hovertemplate warnings - additional warnings will be suppressed'); + if(opts.count === opts.max) { + lib.warn('Too many ' + opts.name + ' warnings - additional warnings will be suppressed'); } - numberOfHoverTemplateWarnings++; + opts.count++; + + return match; } if(format) { var fmt; - if(d3locale) { - fmt = d3locale.numberFormat; - } else { - fmt = d3.format; + if(format[0] === ':') { + fmt = d3locale ? d3locale.numberFormat : d3.format; + value = fmt(format.replace(TEMPLATE_STRING_FORMAT_SEPARATOR, ''))(value); + } + + if(format[0] === '|') { + fmt = d3locale ? d3locale.timeFormat.utc : d3.time.format.utc; + var ms = lib.dateTime2ms(value); + value = lib.formatDate(ms, format.replace(TEMPLATE_STRING_FORMAT_SEPARATOR, ''), false, fmt); } - value = fmt(format.replace(TEMPLATE_STRING_FORMAT_SEPARATOR, ''))(value); } else { if(labels.hasOwnProperty(key + 'Label')) value = labels[key + 'Label']; } return value; }); -}; +} /* * alphanumeric string sort, tailored for subplot IDs like scene2, scene10, x10y13 etc @@ -32697,6 +32724,10 @@ lib.isValidTextValue = function(v) { return v || v === 0; }; +/** + * @param {number} ratio + * @param {number} n (number of decimal places) + */ lib.formatPercent = function(ratio, n) { n = n || 0; var str = (Math.round(100 * ratio * Math.pow(10, n)) * Math.pow(0.1, n)).toFixed(n) + '%'; @@ -32714,6 +32745,35 @@ lib.isHidden = function(gd) { return !display || display === 'none'; }; +lib.getTextTransform = function(opts) { + var textX = opts.textX; + var textY = opts.textY; + var targetX = opts.targetX; + var targetY = opts.targetY; + var scale = opts.scale; + var rotate = opts.rotate; + + var transformScale; + var transformRotate; + var transformTranslate; + + if(scale < 1) transformScale = 'scale(' + scale + ') '; + else { + scale = 1; + transformScale = ''; + } + + transformRotate = (rotate) ? + 'rotate(' + rotate + ' ' + textX + ' ' + textY + ') ' : ''; + + // Note that scaling also affects the center of the text box + var translateX = (targetX - scale * textX); + var translateY = (targetY - scale * textY); + transformTranslate = 'translate(' + translateX + ' ' + translateY + ')'; + + return transformTranslate + transformScale + transformRotate; +}; + /***/ }), /* 27 */ @@ -35069,7 +35129,8 @@ module.exports = { valType: 'boolean', dflt: true, - editType: 'plot' + editType: 'plot', + }, editType: 'plot' }, diff --git a/packages/python/plotly/tox.ini b/packages/python/plotly/tox.ini index 4a0a056591b..d98beda6272 100644 --- a/packages/python/plotly/tox.ini +++ b/packages/python/plotly/tox.ini @@ -59,14 +59,14 @@ deps= pytz==2016.10 retrying==1.3.3 pytest==3.5.1 + pandas==0.24.2 backports.tempfile==1.0 optional: --editable=file:///{toxinidir}/../plotly-geo - optional: numpy==1.11.3 + optional: numpy==1.16.5 optional: ipython[all]==5.1.0 optional: ipywidgets==7.2.0 optional: ipykernel==4.8.2 optional: jupyter==1.0.0 - optional: pandas==0.19.2 optional: scipy==0.18.1 optional: shapely==1.6.4 optional: geopandas==0.3.0 @@ -74,7 +74,8 @@ deps= optional: pillow==5.2.0 optional: matplotlib==2.2.3 optional: xarray==0.10.9 - optional: scikit-image==0.13.1 + optional: pywavelets==1.0.3 + optional: scikit-image==0.14.4 ; CORE ENVIRONMENTS [testenv:py27-core] diff --git a/test/percy/plotly-express.py b/test/percy/plotly-express.py new file mode 100644 index 00000000000..7ca527efbb8 --- /dev/null +++ b/test/percy/plotly-express.py @@ -0,0 +1,445 @@ +## This script uses px functions to generate html figures, which will be +## tested with percy. + +# this directory +import os + +dir_name = os.path.join("test", "percy") + +import plotly.express as px + +print (px.data.iris.__doc__) +px.data.iris().head() + +# #### Scatter and Line plots + +import plotly.express as px + +iris = px.data.iris() +fig = px.scatter(iris, x="sepal_width", y="sepal_length") +fig.write_html(os.path.join(dir_name, "scatter.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.scatter(iris, x="sepal_width", y="sepal_length", color="species") +fig.write_html(os.path.join(dir_name, "scatter_color.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.scatter( + iris, + x="sepal_width", + y="sepal_length", + color="species", + marginal_y="rug", + marginal_x="histogram", +) +fig.write_html(os.path.join(dir_name, "scatter_marginal.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.scatter( + iris, + x="sepal_width", + y="sepal_length", + color="species", + marginal_y="violin", + marginal_x="box", + trendline="ols", +) +fig.write_html(os.path.join(dir_name, "scatter_trendline.html")) + +import plotly.express as px + +iris = px.data.iris() +iris["e"] = iris["sepal_width"] / 100 +fig = px.scatter( + iris, x="sepal_width", y="sepal_length", color="species", error_x="e", error_y="e" +) +fig.write_html(os.path.join(dir_name, "scatter_errorbar.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.scatter( + tips, + x="total_bill", + y="tip", + facet_row="time", + facet_col="day", + color="smoker", + trendline="ols", + category_orders={"day": ["Thur", "Fri", "Sat", "Sun"], "time": ["Lunch", "Dinner"]}, +) +fig.write_html(os.path.join(dir_name, "scatter_categories.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.scatter_matrix(iris) +fig.write_html(os.path.join(dir_name, "scatter_matrix.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.scatter_matrix( + iris, + dimensions=["sepal_width", "sepal_length", "petal_width", "petal_length"], + color="species", +) +fig.write_html(os.path.join(dir_name, "scatter_matrix_dimensions.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.parallel_coordinates( + iris, + color="species_id", + labels={ + "species_id": "Species", + "sepal_width": "Sepal Width", + "sepal_length": "Sepal Length", + "petal_width": "Petal Width", + "petal_length": "Petal Length", + }, + color_continuous_scale=px.colors.diverging.Tealrose, + color_continuous_midpoint=2, +) +fig.write_html(os.path.join(dir_name, "parallel_coordinates.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.parallel_categories( + tips, color="size", color_continuous_scale=px.colors.sequential.Inferno +) +fig.write_html(os.path.join(dir_name, "parallel_categories.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.scatter( + tips, + x="total_bill", + y="tip", + color="size", + facet_col="sex", + color_continuous_scale=px.colors.sequential.Viridis, + render_mode="webgl", +) +fig.write_html(os.path.join(dir_name, "scatter_webgl.html")) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.scatter( + gapminder.query("year==2007"), + x="gdpPercap", + y="lifeExp", + size="pop", + color="continent", + hover_name="country", + log_x=True, + size_max=60, +) +fig.write_html(os.path.join(dir_name, "scatter_hover.html")) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.scatter( + gapminder, + x="gdpPercap", + y="lifeExp", + animation_frame="year", + animation_group="country", + size="pop", + color="continent", + hover_name="country", + facet_col="continent", + log_x=True, + size_max=45, + range_x=[100, 100000], + range_y=[25, 90], +) +fig.write_html(os.path.join(dir_name, "scatter_log.html"), auto_play=False) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.line( + gapminder, + x="year", + y="lifeExp", + color="continent", + line_group="country", + hover_name="country", + line_shape="spline", + render_mode="svg", +) +fig.write_html(os.path.join(dir_name, "line.html")) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.area(gapminder, x="year", y="pop", color="continent", line_group="country") +fig.write_html(os.path.join(dir_name, "area.html")) + +# #### Visualize Distributions + +import plotly.express as px + +iris = px.data.iris() +fig = px.density_contour(iris, x="sepal_width", y="sepal_length") +fig.write_html(os.path.join(dir_name, "density_contour.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.density_contour( + iris, + x="sepal_width", + y="sepal_length", + color="species", + marginal_x="rug", + marginal_y="histogram", +) +fig.write_html(os.path.join(dir_name, "density_contour_marginal.html")) + +import plotly.express as px + +iris = px.data.iris() +fig = px.density_heatmap( + iris, x="sepal_width", y="sepal_length", marginal_x="rug", marginal_y="histogram" +) +fig.write_html(os.path.join(dir_name, "density_heatmap.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.bar(tips, x="sex", y="total_bill", color="smoker", barmode="group") +fig.write_html(os.path.join(dir_name, "bar.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.bar( + tips, + x="sex", + y="total_bill", + color="smoker", + barmode="group", + facet_row="time", + facet_col="day", + category_orders={"day": ["Thur", "Fri", "Sat", "Sun"], "time": ["Lunch", "Dinner"]}, +) +fig.write_html(os.path.join(dir_name, "bar_facet.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.histogram( + tips, x="total_bill", y="tip", color="sex", marginal="rug", hover_data=tips.columns +) +fig.write_html(os.path.join(dir_name, "histogram.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.histogram( + tips, + x="sex", + y="tip", + histfunc="avg", + color="smoker", + barmode="group", + facet_row="time", + facet_col="day", + category_orders={"day": ["Thur", "Fri", "Sat", "Sun"], "time": ["Lunch", "Dinner"]}, +) +fig.write_html(os.path.join(dir_name, "histogram_histfunc.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.strip(tips, x="total_bill", y="time", orientation="h", color="smoker") +fig.write_html(os.path.join(dir_name, "strip.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.box(tips, x="day", y="total_bill", color="smoker", notched=True) +fig.write_html(os.path.join(dir_name, "box.html")) + +import plotly.express as px + +tips = px.data.tips() +fig = px.violin( + tips, + y="tip", + x="smoker", + color="sex", + box=True, + points="all", + hover_data=tips.columns, +) +fig.write_html(os.path.join(dir_name, "violin.html")) + +# #### Ternary Coordinates + +import plotly.express as px + +election = px.data.election() +fig = px.scatter_ternary( + election, + a="Joly", + b="Coderre", + c="Bergeron", + color="winner", + size="total", + hover_name="district", + size_max=15, + color_discrete_map={"Joly": "blue", "Bergeron": "green", "Coderre": "red"}, +) +fig.write_html(os.path.join(dir_name, "scatter_ternary.html")) + +import plotly.express as px + +election = px.data.election() +fig = px.line_ternary( + election, a="Joly", b="Coderre", c="Bergeron", color="winner", line_dash="winner" +) +fig.write_html(os.path.join(dir_name, "line_ternary.html")) + +# #### 3D Coordinates + +import plotly.express as px + +election = px.data.election() +fig = px.scatter_3d( + election, + x="Joly", + y="Coderre", + z="Bergeron", + color="winner", + size="total", + hover_name="district", + symbol="result", + color_discrete_map={"Joly": "blue", "Bergeron": "green", "Coderre": "red"}, +) +fig.write_html(os.path.join(dir_name, "scatter_3d.html")) + +import plotly.express as px + +election = px.data.election() +fig = px.line_3d( + election, x="Joly", y="Coderre", z="Bergeron", color="winner", line_dash="winner" +) +fig.write_html(os.path.join(dir_name, "line_3d.html")) + +# #### Polar Coordinates + +import plotly.express as px + +wind = px.data.wind() +fig = px.scatter_polar( + wind, + r="frequency", + theta="direction", + color="strength", + symbol="strength", + color_discrete_sequence=px.colors.sequential.Plasma[-2::-1], +) +fig.write_html(os.path.join(dir_name, "scatter_polar.html")) + +import plotly.express as px + +wind = px.data.wind() +fig = px.line_polar( + wind, + r="frequency", + theta="direction", + color="strength", + line_close=True, + color_discrete_sequence=px.colors.sequential.Plasma[-2::-1], +) +fig.write_html(os.path.join(dir_name, "line_polar.html")) + +import plotly.express as px + +wind = px.data.wind() +fig = px.bar_polar( + wind, + r="frequency", + theta="direction", + color="strength", + template="plotly_dark", + color_discrete_sequence=px.colors.sequential.Plasma[-2::-1], +) +fig.write_html(os.path.join(dir_name, "bar_polar.html")) + +# #### Maps + +import plotly.express as px + +carshare = px.data.carshare() +fig = px.scatter_mapbox( + carshare, + lat="centroid_lat", + lon="centroid_lon", + color="peak_hour", + size="car_hours", + color_continuous_scale=px.colors.cyclical.IceFire, + size_max=15, + zoom=10, +) +fig.write_html(os.path.join(dir_name, "scatter_mapbox.html")) + +import plotly.express as px + +carshare = px.data.carshare() +fig = px.line_mapbox( + carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour" +) +fig.write_html(os.path.join(dir_name, "line_mapbox.html")) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.scatter_geo( + gapminder, + locations="iso_alpha", + color="continent", + hover_name="country", + size="pop", + animation_frame="year", + projection="natural earth", +) +fig.write_html(os.path.join(dir_name, "scatter_geo.html"), auto_play=False) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.line_geo( + gapminder.query("year==2007"), + locations="iso_alpha", + color="continent", + projection="orthographic", +) +fig.write_html(os.path.join(dir_name, "line_geo.html")) + +import plotly.express as px + +gapminder = px.data.gapminder() +fig = px.choropleth( + gapminder, + locations="iso_alpha", + color="lifeExp", + hover_name="country", + animation_frame="year", + range_color=[20, 80], +) +fig.write_html(os.path.join(dir_name, "choropleth.html"), auto_play=False)